Formatting and refactor
This commit is contained in:
parent
7d8bf5d857
commit
e07d859fe4
4 changed files with 18 additions and 10 deletions
|
@ -9,7 +9,13 @@ testStats :: [Stat]
|
|||
testStats = [strStat, dexStat, conStat, intStat, wisStat, chaStat]
|
||||
|
||||
testPreamble :: Preamble
|
||||
testPreamble = Preamble 1 "Bob" "Elf" "Fighter" False
|
||||
testPreamble = Preamble
|
||||
{ charLevel = 5
|
||||
, charName = "Bob"
|
||||
, charRace = "Elf"
|
||||
, charClass = "Fighter"
|
||||
, jackOfAllTrades = False
|
||||
}
|
||||
|
||||
testTrivia :: Trivia
|
||||
testTrivia = Trivia "farmer" "none" "I me likey fun things" "yay" "all" "idk"
|
||||
|
@ -44,11 +50,11 @@ intSkills = [ Skill "Arcana" None "Intelligence"
|
|||
]
|
||||
|
||||
wisStat :: Stat
|
||||
wisStat = Stat "Wisdom" 10 False
|
||||
wisStat = Stat "Wisdom" 20 False
|
||||
|
||||
wisSkills :: [Skill]
|
||||
wisSkills = [ Skill "Animal Handling" None "Wisdom"
|
||||
, Skill "Insight" None "Wisdom"
|
||||
wisSkills = [ Skill "Animal Handling" Proficient "Wisdom"
|
||||
, Skill "Insight" Expertise "Wisdom"
|
||||
, Skill "Medicine" None "Wisdom"
|
||||
, Skill "Perception" None "Wisdom"
|
||||
, Skill "Survival" None "Wisdom"
|
||||
|
|
|
@ -49,6 +49,7 @@ instance ToJSON SpellComponent
|
|||
data ScoreMod = None
|
||||
| Proficient
|
||||
| Expertise
|
||||
| Half
|
||||
deriving (Show, Eq, Ord, Generic, Enum)
|
||||
|
||||
data Character = Character
|
||||
|
@ -78,14 +79,14 @@ data Trivia = Trivia
|
|||
} deriving ( Show, Eq, Ord, Generic)
|
||||
|
||||
data Skill = Skill
|
||||
{ skillName :: String
|
||||
, skillMod :: ScoreMod
|
||||
, relatedStat :: String
|
||||
{ skillName :: String
|
||||
, skillMod :: ScoreMod
|
||||
, skillStat :: String
|
||||
} deriving ( Show, Eq, Ord, Generic)
|
||||
|
||||
data Stat = Stat
|
||||
{ statName :: String
|
||||
, score :: Int
|
||||
, statScore :: Int
|
||||
, proficient :: Bool
|
||||
} deriving ( Show, Eq, Ord, Generic)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue