-
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
3e5eb36
commit 48ad5db
Showing
8 changed files
with
60 additions
and
7 deletions.
There are no files selected for viewing
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
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
38 changes: 34 additions & 4 deletions
38
backend/arkham-api/library/Arkham/Location/Cards/ClutteredDormitory.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,49 @@ | ||
module Arkham.Location.Cards.ClutteredDormitory (clutteredDormitory) where | ||
|
||
import Arkham.Ability | ||
import Arkham.Asset.Cards qualified as Assets | ||
import Arkham.Card.CardDef | ||
import Arkham.Enemy.Cards qualified as Cards | ||
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 ClutteredDormitory = ClutteredDormitory LocationAttrs | ||
deriving anyclass (IsLocation, HasModifiersFor) | ||
deriving anyclass IsLocation | ||
deriving newtype (Show, Eq, ToJSON, FromJSON, Entity) | ||
|
||
clutteredDormitory :: LocationCard ClutteredDormitory | ||
clutteredDormitory = location ClutteredDormitory Cards.clutteredDormitory 4 (PerPlayer 2) | ||
|
||
mirageCards :: [CardDef] | ||
mirageCards = [Cards.memoryOfAnUnspeakableEvil] | ||
|
||
instance HasModifiersFor ClutteredDormitory where | ||
getModifiersFor (ClutteredDormitory a) = do | ||
modifySelfWhenM | ||
a | ||
( selectAny | ||
$ mapOneOf | ||
assetIs | ||
[Assets.danforthBrilliantStudent, Assets.danforthBrilliantStudentResolute] | ||
<> at_ (be a) | ||
) | ||
[ShroudModifier (-2)] | ||
|
||
instance HasAbilities ClutteredDormitory where | ||
getAbilities (ClutteredDormitory attrs) = | ||
extendRevealed attrs [] | ||
getAbilities (ClutteredDormitory a) = | ||
extendRevealed | ||
a | ||
[ mirage a 2 mirageCards | ||
, restricted a 1 (youExist $ at_ (be a)) | ||
$ forced | ||
$ ResolvingRevelation #when You | ||
$ TreacheryWithTitle "Tekeli-li" | ||
] | ||
|
||
instance RunMessage ClutteredDormitory where | ||
runMessage msg (ClutteredDormitory attrs) = runQueueT $ case msg of | ||
_ -> ClutteredDormitory <$> liftRunMessage msg attrs | ||
_ -> ClutteredDormitory <$> mirageRunner Stories.clutteredDormitory mirageCards 2 msg attrs |
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
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
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
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
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