enter details for the factions and Lord of Waterdeep cards
This commit is contained in:
parent
97aa7a53e4
commit
2c390343cb
|
|
@ -24,7 +24,10 @@ import System.Random.Shuffle
|
||||||
import Text.Printf
|
import Text.Printf
|
||||||
import Waterdeep.Actions
|
import Waterdeep.Actions
|
||||||
import Waterdeep.Buildings
|
import Waterdeep.Buildings
|
||||||
|
import Waterdeep.Factions
|
||||||
|
import Waterdeep.Intrigues
|
||||||
import Waterdeep.Logic
|
import Waterdeep.Logic
|
||||||
|
import Waterdeep.Lords
|
||||||
import Waterdeep.Quests
|
import Waterdeep.Quests
|
||||||
import Waterdeep.Types
|
import Waterdeep.Types
|
||||||
import Waterdeep.Util
|
import Waterdeep.Util
|
||||||
|
|
@ -40,30 +43,6 @@ data DisplayState =
|
||||||
}
|
}
|
||||||
makeLenses ''DisplayState
|
makeLenses ''DisplayState
|
||||||
|
|
||||||
f1 = Faction "Jesters" Blue
|
|
||||||
l1 = Lord "Prince Henry XXX" "" (QuestBonus [Skullduggery, Commerce] 4)
|
|
||||||
p1 = ("Harry", f1, l1)
|
|
||||||
|
|
||||||
f2 = Faction "Pilots" Green
|
|
||||||
l2 = Lord "Princess Anastasia" "" (QuestBonus [Arcana, Warfare] 4)
|
|
||||||
p2 = ("Ned", f2, l2)
|
|
||||||
|
|
||||||
i1 = IntrigueCard { _intrigueTitle = "Graduation Day"
|
|
||||||
, _intrigueType = Utility
|
|
||||||
, _intrigueAction = do
|
|
||||||
takeResources 2 [Wizard]
|
|
||||||
forOneOpponent (takeResources 1 [Wizard])
|
|
||||||
, _intrigueQuote = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
i2 = IntrigueCard { _intrigueTitle = "Call for Adventurers"
|
|
||||||
, _intrigueType = Utility
|
|
||||||
, _intrigueAction = do
|
|
||||||
takeResources 2 [Cleric, Fighter, Rogue, Wizard]
|
|
||||||
forOneOpponent (takeResources 1 [Cleric, Fighter, Rogue, Wizard])
|
|
||||||
, _intrigueQuote = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
clearScreen :: IO ()
|
clearScreen :: IO ()
|
||||||
clearScreen = putStr "\o033[H\o033[2J" >> hFlush stdout
|
clearScreen = putStr "\o033[H\o033[2J" >> hFlush stdout
|
||||||
|
|
||||||
|
|
@ -163,7 +142,11 @@ printMenu cs = do
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
w0 <- newGame [p1, p2] defaultQuestDeck (mrepeat 4 [i1, i2]) defaultBuildingDeck <$> getSplit
|
players <- zip3 <$> pure ["Ludd", "Nudd"]
|
||||||
|
<*> shuffleM defaultFactions
|
||||||
|
<*> shuffleM defaultLords
|
||||||
|
rndgen <- getSplit
|
||||||
|
let w0 = newGame players defaultQuestDeck defaultIntrigueDeck defaultBuildingDeck rndgen
|
||||||
ref <- newIORef (DisplayState { _gameState = w0, _gameMessages = [] })
|
ref <- newIORef (DisplayState { _gameState = w0, _gameMessages = [] })
|
||||||
runWaterdeepM (menuPrompt ref (drawState ref)) waterdeepGame w0
|
runWaterdeepM (menuPrompt ref (drawState ref)) waterdeepGame w0
|
||||||
return ()
|
return ()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
module Waterdeep.Factions
|
||||||
|
( defaultFactions
|
||||||
|
) where
|
||||||
|
|
||||||
|
import Waterdeep.Types
|
||||||
|
|
||||||
|
defaultFactions :: [Faction]
|
||||||
|
defaultFactions =
|
||||||
|
[ Faction { _factionName = "Knights of the Shield", _factionColor = Yellow }
|
||||||
|
, Faction { _factionName = "City Guard", _factionColor = Black }
|
||||||
|
, Faction { _factionName = "Silver Stars", _factionColor = Blue }
|
||||||
|
, Faction { _factionName = "Harpers", _factionColor = Green }
|
||||||
|
, Faction { _factionName = "Red Sashes", _factionColor = Red }
|
||||||
|
]
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
module Waterdeep.Intrigues
|
||||||
|
( defaultIntrigueDeck
|
||||||
|
) where
|
||||||
|
|
||||||
|
import Control.Applicative
|
||||||
|
import Control.Monad
|
||||||
|
import Data.List
|
||||||
|
import Data.Monoid
|
||||||
|
import Data.Traversable (traverse)
|
||||||
|
import Lens.Family2
|
||||||
|
import Lens.Family2.Stock
|
||||||
|
import Lens.Family2.State
|
||||||
|
import Lens.Family2.TH
|
||||||
|
import Waterdeep.Actions
|
||||||
|
import Waterdeep.Types
|
||||||
|
import Waterdeep.Util
|
||||||
|
|
||||||
|
import qualified Data.IntMap as IM
|
||||||
|
import qualified Data.Map as M
|
||||||
|
import qualified Data.MultiSet as MS
|
||||||
|
|
||||||
|
defaultIntrigueDeck :: [IntrigueCard]
|
||||||
|
defaultIntrigueDeck = concat $ map (uncurry replicate) $
|
||||||
|
[ (2, IntrigueCard { _intrigueTitle = "Graduation Day"
|
||||||
|
, _intrigueType = Utility
|
||||||
|
, _intrigueAction = do
|
||||||
|
takeResources 2 [Wizard]
|
||||||
|
forOneOpponent (takeResources 1 [Wizard])
|
||||||
|
, _intrigueQuote = ""
|
||||||
|
})
|
||||||
|
, (2, IntrigueCard { _intrigueTitle = "Call for Adventurers"
|
||||||
|
, _intrigueType = Utility
|
||||||
|
, _intrigueAction = do
|
||||||
|
takeResources 2 [Cleric, Fighter, Rogue, Wizard]
|
||||||
|
forOneOpponent (takeResources 1 [Cleric, Fighter, Rogue, Wizard])
|
||||||
|
, _intrigueQuote = ""
|
||||||
|
})
|
||||||
|
]
|
||||||
|
|
@ -22,7 +22,6 @@ import Data.Traversable (traverse)
|
||||||
import Lens.Family2
|
import Lens.Family2
|
||||||
import Lens.Family2.State
|
import Lens.Family2.State
|
||||||
import Lens.Family2.Stock
|
import Lens.Family2.Stock
|
||||||
import System.Random.Shuffle
|
|
||||||
import Text.Printf
|
import Text.Printf
|
||||||
import Waterdeep.Actions
|
import Waterdeep.Actions
|
||||||
import Waterdeep.Buildings (basicBuildings)
|
import Waterdeep.Buildings (basicBuildings)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
module Waterdeep.Lords
|
||||||
|
( defaultLords
|
||||||
|
) where
|
||||||
|
|
||||||
|
import Waterdeep.Types
|
||||||
|
|
||||||
|
defaultLords :: [Lord]
|
||||||
|
defaultLords =
|
||||||
|
[ Lord { _lordName = "Piergeiron the Paladinson"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = QuestBonus [Piety, Warfare] 4
|
||||||
|
}
|
||||||
|
, Lord { _lordName = "Nindil Jalbuck"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = QuestBonus [Piety, Skullduggery] 4
|
||||||
|
}
|
||||||
|
, Lord { _lordName = "Kyriani Agrivar"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = QuestBonus [Piety, Arcana] 4
|
||||||
|
}
|
||||||
|
, Lord { _lordName = "Mirt the Moneylender"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = QuestBonus [Piety, Commerce] 4
|
||||||
|
}
|
||||||
|
, Lord { _lordName = "Caladorn Cassalanter"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = QuestBonus [Warfare, Skullduggery] 4
|
||||||
|
}
|
||||||
|
, Lord { _lordName = "Khelben Arunsun, the Blackstaff"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = QuestBonus [Warfare, Arcana] 4
|
||||||
|
}
|
||||||
|
, Lord { _lordName = "Durnan the Wanderer"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = QuestBonus [Warfare, Commerce] 4
|
||||||
|
}
|
||||||
|
, Lord { _lordName = "Brianne Byndraeth"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = QuestBonus [Skullduggery, Arcana] 4
|
||||||
|
}
|
||||||
|
, Lord { _lordName = "Nymara Scheiron"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = QuestBonus [Skullduggery, Commerce] 4
|
||||||
|
}
|
||||||
|
, Lord { _lordName = "Sammereza Sulphontis"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = QuestBonus [Arcana, Commerce] 4
|
||||||
|
}
|
||||||
|
, Lord { _lordName = "Larissa Neathal"
|
||||||
|
, _lordQuote = ""
|
||||||
|
, _lordBonus = BuildingBonus 6
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -229,7 +229,7 @@ data QuestType = Piety | Warfare | Skullduggery | Arcana | Commerce | Mandato
|
||||||
data IntrigueType = Utility | Attack
|
data IntrigueType = Utility | Attack
|
||||||
deriving (Eq,Ord,Enum,Bounded,Show)
|
deriving (Eq,Ord,Enum,Bounded,Show)
|
||||||
|
|
||||||
data FactionColor = Red | Yellow | Green | Blue | Black
|
data FactionColor = Yellow | Black | Blue | Green | Red
|
||||||
deriving (Eq,Ord,Enum,Bounded,Show)
|
deriving (Eq,Ord,Enum,Bounded,Show)
|
||||||
|
|
||||||
data BonusType = QuestBonus [QuestType] Int
|
data BonusType = QuestBonus [QuestType] Int
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue