Skip to content

Commit

Permalink
Make effects that last until end of turn end in the cleanup step
Browse files Browse the repository at this point in the history
  • Loading branch information
MedeaMelana committed Jul 6, 2013
1 parent 9bd6742 commit bfea409
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Magic/src/Magic/Engine.hs
Expand Up @@ -22,7 +22,7 @@ import Control.Applicative ((<$>), (<*>))
import Control.Monad (forever, forM_, when, void, liftM)
import Control.Monad.Trans (lift)
import Control.Monad.Writer (tell, execWriterT)
import Data.Label.Pure (get, set)
import Data.Label.Pure (get, set, modify)
import Data.Label.PureM (gets, (=:))
import Data.List (nub, intersect, delete)
import Data.Maybe (catMaybes)
Expand Down Expand Up @@ -225,6 +225,10 @@ executeStep (EndPhase EndOfTurnStep) = do
executeStep (EndPhase CleanupStep) = do
-- TODO [514.1] discard excess cards
-- TODO [514.2] remove damage from permanents

-- [514.2] Remove effects that last until end of turn
battlefield ~:* modify temporaryEffects
(filter (\tle -> temporaryDuration tle /= UntilEndOfTurn))
shouldOfferPriority <- executeSBAsAndProcessPrestacks
when shouldOfferPriority offerPriority

Expand Down

0 comments on commit bfea409

Please sign in to comment.