test(battlenode): target-discriminating + documented choice shape (M-HC-4c review)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-06 23:46:59 -04:00
parent 3add58f939
commit 3285097d1b
2 changed files with 71 additions and 22 deletions

View File

@@ -97,7 +97,9 @@ internal sealed class NodeNativeBattleHarness : IDisposable
/// <c>card_id=121011010:120011010,...</c> — i.e. "choose ONE of two tokens to add to hand"
/// (<see cref="ChoiceTokenA"/> / <see cref="ChoiceTokenB"/>). The choice OUTCOME is directly
/// observable: the chosen token lands in the caster's hand, so a test can assert which branch
/// resolved by the new hand card's identity. Present + creatable in cards.json.</summary>
/// resolved by the new hand card's identity. (The token resolves into HAND — confirmed against the
/// capture's <c>orderList.add{to:20}</c> hand-zone op — despite the skill_option <c>summon_side=me</c>
/// superficially reading like a summon-to-board.) Present + creatable in cards.json.</summary>
public const long ChoiceCardId = 127011010;
/// <summary>The first choice option of <see cref="ChoiceCardId"/> (token added to hand).</summary>
@@ -328,6 +330,9 @@ internal sealed class NodeNativeBattleHarness : IDisposable
{
new Dictionary<string, object?>
{
// The real capture sends type:1 (int); "Choice" (string) is equivalent — the receiver does
// Enum.Parse(KeyActionType, type.ToString()) and KeyActionType.Choice == 1, so the string and
// the int both parse to the same enum value.
["type"] = "Choice",
["cardId"] = playedCardId,
// The RECEIVE parse reads selectCard via ConvertToListInt (NetworkBattleReceiver.cs:1202),