feat(battle-engine-port): M7 COMPLETE — targeted destroy resolves headless (follower death / board-removal)

First proof that follower DEATH / board-removal commits in the authoritative
part of PlayCard headless (not the cosmetic post-Process tail). Card 800144120
(cost-0 when_play destroy of a select_count=1 enemy follower) resolves via the
M6 selectedCards path: selected enemy follower removed (board -1 + cemetery +1),
un-selected untouched (routing confirmed load-bearing by swapping the selection).

Shim gap fixed (the predicted M7 cost): SkillProcessor.SelectCardToHaveDestroyVoicePlay's
cosmetic death-voice tail NRE'd on three M1 default!/Null* shadows
(IBattleCardView.VoiceInfo, CardVoiceInfoCache.GetCardVoiceInfoForBattle,
ReadOnlyVoiceInfo.GetDestroyVoice — the last unusable as the interface since
m1_stub_gen dropped its : IReadOnlyVoiceInfo base). Fix = one hand shim
HeadlessVoiceInfo : IReadOnlyVoiceInfo returning the engine's own
VoiceAndWaitTime._nullVoice sentinel, wired into the two generated seams with
// HEADLESS-FIX markers. No Engine/ edit (drift clean).

dotnet test SVSim.BattleEngine.Tests -> 7/7 green; check_drift.py clean; engine 0 Error(s).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-06 08:23:53 -04:00
parent c8314bd3c0
commit 9fc97abee7
5 changed files with 167 additions and 3 deletions

View File

@@ -69,6 +69,22 @@ namespace SVSim.BattleEngine.Tests
public const int SelectTargetFollowerId = 900041010; // neutral 13/13
public const int UnselectTargetFollowerId = 102011010; // neutral 6/7
// M7 next milestone: targeted DESTROY — the first card proving follower DEATH / board-removal
// resolves in the AUTHORITATIVE (committed) part of PlayCard headless, not the cosmetic
// post-Process tail. 800144120 is an ELF (clan 1) cost-0 SPELL whose sole skill is `when_play`
// `destroy` of a SELECTED enemy follower
// (skill_target=character=op&target=inplay&card_type=unit&select_count=1), ungated
// (skill_condition=character=me), no RNG, no dynamic value. `destroy` is UNCONDITIONAL removal
// (vs `damage` needing a >=life amount), so the oracle is the cleanest possible "card left the
// board": selected follower gone + enemy board count -1 + selected card in CemeteryList, while
// the un-selected follower stays (routing, M6's lesson, confirmed load-bearing by swapping the
// selection). Reuses the two M2/M6 vanilla followers as the target board (destroy is
// unconditional so their stats are irrelevant — distinct ids only so selected vs un-selected
// can't be confused). InitCardTemplates is NOT needed (destroy creates no card).
public const int DestroySpellId = 800144120;
public const int DestroyTargetFollowerId = FollowerId; // neutral 1/2 (the selected, destroyed one)
public const int DestroyOtherFollowerId = UnselectTargetFollowerId; // neutral 6/7 (the un-selected survivor)
private static bool _done;
public static void EnsureInitialized()
@@ -89,7 +105,7 @@ namespace SVSim.BattleEngine.Tests
// real stats. The summoned token id must be present: Skill_summon_token resolves it
// through CardMaster.GetCardParameterFromId during creation.
HeadlessCardMaster.Load(FollowerId, SpellId, BuffFollowerId, TokenSpellId, SummonedTokenId,
TargetSpellId, SelectTargetFollowerId, UnselectTargetFollowerId);
TargetSpellId, SelectTargetFollowerId, UnselectTargetFollowerId, DestroySpellId);
// Master reference data (class-character list) for leader/class card resolution.
HeadlessMasterData.Install();
// Player/enemy leaders (chara ids must map to a ClassCharacterMasterData in Master).