Commit graph Aetheria/tests/Aetheria.Shared.Tests/ConsumableTests.cs
Author SHA1 Message Date
Meta Vens
0b721d691f Tests: the VerseGrammar global replaces TestCatalogGlobal as the catalog global fixtures author
TestCatalogGlobal existed only to give the test host one [CultGlobal] routed to the catalog. VerseGrammar is the
game's first, so the test-only type is deleted and every fixture authors a VerseGrammar instead (63 call sites; the
missing-global tests assert on aetheria.verse_grammar). Stale comments about the test type are rewritten.
Builds (not yet run when committed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 07:18:00 +02:00
Meta Vens
d519d99b1e Consumable host: an effect lives exactly its Duration, not Duration plus one tick
Expiry fires when the remaining duration reaches zero (<= 0), so behaviours execute on
Duration/dt ticks and not one more. AConsumableRunsForExactlyItsDurationInTicks pins it
with 0.25 s ticks. Builds; verified in the next run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:48:02 +02:00
Meta Vens
afe44b09d3 ConsumableTests: the overlap test attaches both modifiers before the first expires
The first draft activated the second effect so late it was not yet attached when the
first detached, so the shared-entry guard mutants survived it. Builds; tests green
status is in the next verification run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:38:26 +02:00
Meta Vens
29c5f7aba1 Consumable host: one initialiser for gear and running effects; tests pin overlap, lifetime, per-design cooldown, refit
Entity.Activate re-initialises the running consumable effects through the same
InitializeBehaviors that initialises gear and ActivateConsumable, so a consumable
active across deactivate/refit/activate retargets to the new items.
ConsumableTests gains the stackable overlap/multiply, shared-entry detach,
expiry-boundary, per-design cooldown and refit facts. StatResolverTests' expiry
test builds its consumable through ItemManager.CreateInstance.
Not yet built or run; verification follows in a later commit message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:24:54 +02:00
Meta Vens
f79cf8b7a7 ConsumableTests: a hold with room for two consumables
The 1x1 interior fixture could not store the second consumable the
non-stackable test needs. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 20:29:27 +02:00
Meta Vens
aaab561f98 Consumable host: initialise at activation, dispose at expiry, instantiate consumables
ActivateConsumable runs Initialize on the effect's behaviours; expiry disposes
them before Resolver.Forget, so a consumable's modifiers exist exactly while
its effect is active. ItemManager.CreateInstance returns a ConsumableItem for a
consumable design. StatResolver.DetachModifier drops an entry left with
nothing attached, so ModifierEntryCount returns to baseline. LoadoutTests'
hand-built ConsumableItem goes through CreateInstance. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 20:19:22 +02:00
Meta Vens
739eee4a8e Consumable host: tests first (red at the base; they build, three fail)
Adds AConsumableModifierBoostsUntilExpiry, ABoughtConsumableActivates and
ANonStackableConsumableRefusesASecondActivation. This commit builds; its tests
fail until the host cut lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 20:17:36 +02:00