feat: module 01 handles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1453a00b9c
commit
78dc09b303
32 files changed
+2561
No files matched your search
@@ -201,6 +201,7 @@ All five repos exist. I shallow-cloned each on 2026-10-28 and read the files lis
|
||||
- §2.2 "every card, token, player, spell, and ability is just an `EntityId`", plus components as pure data **[ID]**
|
||||
- §2.3 "Rule 613: Base State vs. Projected State" ("Calculated lazily and cached per immutable `GameState` instance"; "the engine doesn't need to 'undo' +3/+3. It simply removes the floating effect.") **[INT]**
|
||||
- §2.7 "**Principle:** Replacement effects modify game actions *before* they produce events, without using the stack." (replacements as data with an `appliesTo: EventPattern`) **[INT]**
|
||||
- §2.2 subsection "Rules object identity across zones" (re-read live 2026-10-29 for Module 1): "`EntityId` is the stable card/entity slot"; "Every real destination insertion goes through `addToZone`, positional `insertIntoZone`, or `pushToStack`"; "The allocator is independent of timestamps used to order continuous effects." **[ID]**
|
||||
- §2.8 `StateBasedActionChecker.checkAndApply`, a do/while loop "that runs until no more SBAs apply" **[SBA]**
|
||||
- **"Trigger twice" example:** `mtg-sets/2008-2016/src/main/kotlin/com/wingedsheep/mtg/sets/definitions/kld/cards/Panharmonicon.kt` declares `staticAbility { ability = AdditionalETBOrLTBTriggers(filter = GameObjectFilter.Artifact or GameObjectFilter.Creature, ...) }`, which is pure data. The engine consumes it in `rules-engine/src/main/kotlin/com/wingedsheep/engine/event/TriggerDetector.kt` (`duplicateETBOrLTBTriggers`, around line 4482): "Duplicate ETB and LTB triggers for [AdditionalETBOrLTBTriggers] static abilities … Multiple copies are additive: N copies add N extra copies of each trigger." The card file also carries the ruling "Replacement effects are unaffected by Panharmonicon's ability", which is a useful teaching point on trigger doubling vs. interceptors.
|
||||
- **Verdict: keep. Make `architecture-principles.md` a required reading** for DATA, INT, and SBA. It's the best single document found. Panharmonicon.kt plus `TriggerDetector.duplicateETBOrLTBTriggers` is the "after" picture for the Rivendare refactor.
|
||||
|
||||
Reference in new issue
Block a user