-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a50e25
commit e4a9d42
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
20 changes: 16 additions & 4 deletions
20
backend/arkham-api/library/Arkham/Location/Cards/DesertedStation.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,31 @@ | ||
module Arkham.Location.Cards.DesertedStation (desertedStation) where | ||
|
||
import Arkham.Card.CardDef | ||
import Arkham.Helpers.Modifiers | ||
import Arkham.Location.Cards qualified as Cards | ||
import Arkham.Location.Import.Lifted | ||
import Arkham.Matcher | ||
import Arkham.Scenarios.FatalMirage.Helpers | ||
import Arkham.Story.Cards qualified as Stories | ||
|
||
newtype DesertedStation = DesertedStation LocationAttrs | ||
deriving anyclass (IsLocation, HasModifiersFor) | ||
deriving anyclass IsLocation | ||
deriving newtype (Show, Eq, ToJSON, FromJSON, Entity) | ||
|
||
desertedStation :: LocationCard DesertedStation | ||
desertedStation = location DesertedStation Cards.desertedStation 3 (PerPlayer 2) | ||
|
||
mirageCards :: [CardDef] | ||
mirageCards = [Cards.alaskanWilds] | ||
|
||
instance HasModifiersFor DesertedStation where | ||
getModifiersFor (DesertedStation a) = do | ||
modifySelfWhenM a (selectAny $ treacheryAt a.id) [ShroudModifier 3] | ||
|
||
instance HasAbilities DesertedStation where | ||
getAbilities (DesertedStation attrs) = | ||
extendRevealed attrs [] | ||
getAbilities (DesertedStation a) = | ||
extendRevealed a [mirage a 2 mirageCards] | ||
|
||
instance RunMessage DesertedStation where | ||
runMessage msg (DesertedStation attrs) = runQueueT $ case msg of | ||
_ -> DesertedStation <$> liftRunMessage msg attrs | ||
_ -> DesertedStation <$> mirageRunner Stories.desertedStation mirageCards msg attrs |