Ejemplo n.º 1
0
        private void CleanupStep()
        {
            CurrentStep = Phases.CleanupStep;

            ActivePlayer.DiscardToHandSize();

            // Remove Marked Damage from Permanents, and "Until End of Turn" and "This Turn" effects go away
            foreach (var player in _players)
            {
                foreach (var creature in player.Battlefield.Creatures)
                {
                    creature.ResetDamage();
                }
            }

            // TODO: If there are triggered abilities on the stack then players may receive priority, in ApNap order, to react to them before the stack resolves.
            // Example: Madness is a triggered ability that happens when a player discards a card with Madness. This can potentially be put on the stack from the First part of the Cleanup step
            CheckStateBasedActions();
            if (Stack.Count > 0)
            {
                ApNapLoop(false);
            }

            DrainManaPools();
        }