Formatting and refactor

This commit is contained in:
Nox Sluijtman 2024-11-19 10:40:42 +01:00
parent 7d8bf5d857
commit e07d859fe4
Signed by: Egg
SSH key fingerprint: SHA256:2sG9X3C7Xvq2svGumz1/k7cm8l4G9+qAtAeugqB4J9M
4 changed files with 18 additions and 10 deletions

View file

@ -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"

View file

@ -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)