Permalink
Browse files

Renamed WillSimpleEffect -> Will, DidSimpleEffect -> Did

  • Loading branch information...
1 parent 12488c0 commit d08bb98de216a6745319ee29b9a5f0cf71fe6343 @MedeaMelana committed Nov 4, 2012
Showing with 9 additions and 9 deletions.
  1. +5 −5 Engine.hs
  2. +2 −2 M12.hs
  3. +2 −2 Types.hs
View
@@ -87,7 +87,7 @@ executeStep (BeginningPhase UntapStep) = do
-- [502.2] untap permanents
rp <- gets activePlayer
ios <- IdList.filter (isControlledBy rp) <$> gets battlefield
- _ <- for ios $ \(i, _) -> executeEffect (WillSimpleEffect (UntapPermanent i))
+ _ <- for ios $ \(i, _) -> executeEffect (Will (UntapPermanent i))
return ()
executeStep (BeginningPhase UpkeepStep) = do
@@ -99,7 +99,7 @@ executeStep (BeginningPhase UpkeepStep) = do
executeStep (BeginningPhase DrawStep) = do
-- [504.1]
ap <- gets activePlayer
- executeEffect (WillSimpleEffect (DrawCard ap))
+ executeEffect (Will (DrawCard ap))
-- TODO [504.2] handle triggers
@@ -186,7 +186,7 @@ executeEffect e = do
-- Compilation of effects
compileEffect :: OneShotEffect -> Engine ()
-compileEffect (WillSimpleEffect e) = compileSimpleEffect e
+compileEffect (Will e) = compileSimpleEffect e
compileEffect (WillMoveObject rObj rToZone obj) = moveObject rObj rToZone obj
compileSimpleEffect :: SimpleOneShotEffect -> Engine ()
@@ -287,7 +287,7 @@ collectSBAs = execWriterT $ do
ips <- IdList.toList <$> lift (gets players)
forM_ ips $ \(i,p) -> do
when (get life p <= 0 || get failedCardDraw p) $
- tell [WillSimpleEffect (LoseGame i)]
+ tell [Will (LoseGame i)]
checkBattlefield = do
ios <- IdList.toList <$> lift (gets battlefield)
@@ -307,7 +307,7 @@ collectSBAs = execWriterT $ do
(Just t, Just d) -> t > 0 && d >= t
_ -> False
when (hasLethalDamage || get deathtouched o) $
- tell [WillSimpleEffect (DestroyPermanent (Battlefield, i) True)]
+ tell [Will (DestroyPermanent (Battlefield, i) True)]
-- [704.5i]
when (o `hasTypes` planeswalkerType && countCountersOfType Loyalty o == 0) $
View
@@ -35,6 +35,6 @@ shockEffect rSelf rActivator = do
_ -> return False
ts <- askMagicTargets rActivator (singleTarget <?> ok)
let f t = case t of
- TargetObject or -> return [WillSimpleEffect (DamageObject rSelf or 2 False True)]
- TargetPlayer pr -> return [WillSimpleEffect (DamagePlayer rSelf pr 2 False True)]
+ TargetObject or -> return [Will (DamageObject rSelf or 2 False True)]
+ TargetPlayer pr -> return [Will (DamagePlayer rSelf pr 2 False True)]
return (f <$> ts)
View
@@ -383,7 +383,7 @@ data PriorityAction = PlayCard ObjectRef
-- | Events triggered abilities watch for.
data Event
- = DidSimpleEffect SimpleOneShotEffect
+ = Did SimpleOneShotEffect
| DidMoveObject ZoneRef ObjectRef -- old zone, new zone/id
-- Keyword actions [701]
@@ -396,7 +396,7 @@ data Event
| WillEndStep Step
data OneShotEffect
- = WillSimpleEffect SimpleOneShotEffect
+ = Will SimpleOneShotEffect
| WillMoveObject ObjectRef ZoneRef Object -- current zone/id, new zone, suggested form
data SimpleOneShotEffect

0 comments on commit d08bb98

Please sign in to comment.