public void PlayTurn(Card c, Minion caster, TriggerItem target) { if (c.effect != null && c.effect is Effect_Rewind) { if (gameStates.Count <= 1) return; // rewind isn't really a spell like everything else gameStates.RemoveAt(gameStates.Count - 1); gameStateOnSkip = gameStates.Last().GetGameStateOnSkip(); selectionState = new UISelectionState(gameStates.Last()); } else { GameState oldGameState = gameStates.Last(); if (oldGameState.CanPlayCard(c, target)) { nextGameState = new GameState(gameStates.Last()); animation.Clear(); if (caster == null) caster = nextGameState.wizard; nextGameState.PlayCard(c, caster, nextGameState.Adapt(target), animation); nextGameState.TurnEffects(animation); gameStateOnSkip = nextGameState.GetGameStateOnSkip(); } } }
public GameState GetGameStateOnSkip() { GameState result = new GameState(this); result.TurnEffects(new MinionAnimationSequence()); return result; }