feat(phase7): complete ability revamp gap items 1-11
- Fix [PolyType] attribute placement bug in Effects.cs (silent poly-deser failure) - Add SpiritToken guard to BazaarBuyPrebuiltDeck and CollectionSelectStarterDeck handlers - Wire CostGroup payment into ActivateAbility with PendingCostGroupPick pause support - Add PendingActionGroupPick, PendingCostGroupPick, PendingBranchPick models + GameState props - Add Phase 5 engine switch cases: ModifyChannelRange, RelocateRuin, ActivateRuinAbility, DisableRuinForDuration, CloneSpiritAsToken, DestroyToken, SkipTurn, ModifyCardsDrawnThisTurn, StackDeck, SearchAndPlace, ChangeAttackType, ObstructMovement, AscendFromZone stubs - Add ActionGroup recursion (ResolveActionGroup AND-flatten / OR-XOR interactive pick) - Add ResumeActionGroupPick, ResumeCostGroupPick, ResumeBranchPick methods - Add ChooseOne ChooserRole branching + TargetSelector.Chooser (Random early-return) - Change SearchDeckEffect.ThenAction → ThenGroup: ActionGroup? - Change ApplyOnEventEffect.Effects → Actions: Action[] - Add SOR.Tools console project with cutover-abilities command (EffectsJsonCutover) - AbilityBuilder: add ActionGroupDraft, SubGroups, Compile Groups[], ParseJson Groups[], CompileActionNode/ParseActionNode helpers, nested sub-group UI section - Add Tile.RuinDisabledUntilTurn, PlayerState.SkipTurnCount/CardsDrawnThisTurnBonus, CardInstance.AttackType nullable override - Add SOR.Tools to solution Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -107,6 +107,25 @@ public sealed class GameState
|
||||
/// the picker submits a <c>game.cost_pick</c> response.
|
||||
/// </summary>
|
||||
public Abilities.Models.PendingCostPick? PendingCostPick { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Non-null when a CostGroup with OR/XOR logic requires a player to choose which
|
||||
/// cost option to pay. Paused until the chooser submits a <c>game.cost_group_pick</c>.
|
||||
/// </summary>
|
||||
public Abilities.Models.PendingCostGroupPick? PendingCostGroupPick { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Non-null when an ActionGroup with OR/XOR logic requires a player to choose which
|
||||
/// child (action or nested group) to execute. Paused until chooser submits
|
||||
/// a <c>game.action_group_pick</c>.
|
||||
/// </summary>
|
||||
public Abilities.Models.PendingActionGroupPick? PendingActionGroupPick { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Non-null when a ChooseOne action's ChooserRole is Opponent/Ally and the non-activating
|
||||
/// player must select a branch. Paused until chooser submits a <c>game.branch_pick</c>.
|
||||
/// </summary>
|
||||
public Abilities.Models.PendingBranchPick? PendingBranchPick { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PlayerState
|
||||
@@ -173,6 +192,18 @@ public sealed class PlayerState
|
||||
public bool CanChannelTerramorphaDi { get; set; } = true;
|
||||
public bool CanChannelTerramorphaTri { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Bonus/penalty to cards drawn THIS turn only (reset at end of turn).
|
||||
/// Modified by ModifyCardsDrawnThisTurnEffect.
|
||||
/// </summary>
|
||||
public int CardsDrawnThisTurnBonus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of upcoming turns this player will skip (decremented at turn-start).
|
||||
/// Set by SkipTurnEffect.
|
||||
/// </summary>
|
||||
public int SkipTurnCount { get; set; }
|
||||
|
||||
// ── Leader ───────────────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>
|
||||
@@ -222,9 +253,13 @@ public class CardInstance
|
||||
|
||||
// ── Attack ────────────────────────────────────────────────────────────────
|
||||
|
||||
public int? MinAttackRange { get; set; }
|
||||
public int? MaxAttackRange { get; set; }
|
||||
public bool RequiresLos { get; set; }
|
||||
public int? MinAttackRange { get; set; }
|
||||
public int? MaxAttackRange { get; set; }
|
||||
public bool RequiresLos { get; set; }
|
||||
/// <summary>
|
||||
/// Override attack type set by ChangeAttackTypeEffect. Null = use card definition default.
|
||||
/// </summary>
|
||||
public AttackType? AttackType { get; set; }
|
||||
|
||||
// ── Channeling ────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -366,8 +401,8 @@ public sealed class PendingDeferredEffect
|
||||
/// <summary>InstanceId (card) or AccountId (player) of the entity to apply effects to.</summary>
|
||||
public string TargetRef { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Serialized Effect[] JSON — effects applied to TargetRef when the trigger fires.</summary>
|
||||
public string EffectsJson { get; set; } = "[]";
|
||||
/// <summary>Serialized Action[] JSON — actions executed when the trigger fires.</summary>
|
||||
public string ActionsJson { get; set; } = "[]";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user