Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Human: add reward after Level1
  • Loading branch information
smelc committed Sep 23, 2021
1 parent b5f14be commit 66908ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/shared/Campaign.hs
Expand Up @@ -64,7 +64,7 @@ rewards level team =
case (level, team) of
(_, Evil) -> []
(Level0, Human) -> map (mkIDC team) [Card.Knight]
(Level1, Human) -> []
(Level1, Human) -> map (mkIDC team) [Card.Ogre]
(Level0, Undead) -> map (mkIDC team) [Card.Necromancer, Card.Specter]
(Level1, Undead) -> [Card.IDI Card.SkBanner]
where
Expand All @@ -86,7 +86,7 @@ loot Draw level team =
altTake _ (win, []) = win
loot Loss level team =
case pred level of
Nothing -> rewards level team & drop 1
Nothing -> rewards level team & (\l -> if length l > 1 then drop 1 l else l)
Just levelb -> rewards levelb team

-- | All possible rewards that can have been obtained from the start,
Expand Down
9 changes: 4 additions & 5 deletions app/test/Main.hs
Expand Up @@ -321,11 +321,10 @@ testRewards =
==> Campaign.augment [] level team
`shouldAllSatisfy` (\deck -> natLength deck == Campaign.nbRewards level)
-- TODO @smelc, test Evil too
xit "There is always at least one reward (except Evil)" $
property $ do
\(outcome, level, team) ->
team /= Evil
==> Campaign.loot outcome level team `shouldSatisfy` (not . null)
prop "There is always at least one reward (except Evil)" $ do
\(outcome, level, team) ->
team /= Evil
==> Campaign.loot outcome level team `shouldSatisfy` (not . null)

testItemsAI shared =
describe "AI" $ do
Expand Down

0 comments on commit 66908ae

Please sign in to comment.