Spells and trivia

- Trivia logic in sheet and main
- Spell logic in sheet
This commit is contained in:
Nox Sluijtman 2023-02-01 10:54:27 +01:00
parent bbd5f100cd
commit b56d515a47
3 changed files with 46 additions and 9 deletions

View file

@ -5,6 +5,11 @@
"race": "Human", "race": "Human",
"class": "Fighter", "class": "Fighter",
"background": "Generic", "background": "Generic",
"personalityTrait":"Cardboard Cutout",
"ideals":"For king and country!",
"bonds":"I am loyal to the crown",
"flaws":"I am loyal to the crown",
"quirk":"Sometimes I stutter a little bit",
"reliableTalent": false, "reliableTalent": false,
"jackOfAllTrades": false, "jackOfAllTrades": false,
"isKurthog": false "isKurthog": false
@ -37,7 +42,12 @@
{"skillName":"performance", "proficient":true, "expertise":false, "baseStat":"charisma"}, {"skillName":"performance", "proficient":true, "expertise":false, "baseStat":"charisma"},
{"skillName":"persuasion", "proficient":false, "expertise":false, "baseStat":"charisma"} {"skillName":"persuasion", "proficient":false, "expertise":false, "baseStat":"charisma"}
], ],
"spells":[
{"spellName":"Eldritch Blast", "level":0, "castingTime":"1 Action", "range": 120, "components":"v,s", "duration":"Instantaneous","attack_save":"Ranged", "damage_effect":"Force"},
{"spellName":"Eldritch Blast", "castingTime":"1 Action", "range": 120, "components":"v,s", "duration":"Instantaneous","attack_save":"Ranged", "damage_effect":"Force"}
],
"feats":[ "feats":[
{"featName":"Boring", "featDescription":"Due to being excessivly generic, Bob gains... something"} {"featName":"Boring", "featDescription":"Due to being excessivly generic, Bob gains... something"},
{"featName":"Test Dummy", "featDescription":"As the test dummy for this project, you gain the ability to use things from other classes willy nilly."}
] ]
} }

10
main.go
View file

@ -99,6 +99,16 @@ func main() {
fmt.Printf("Name: %s\tLevel: %d\tProficiency: %d\n", char.Misc.Name, char.Misc.Level, GetProficiency()) fmt.Printf("Name: %s\tLevel: %d\tProficiency: %d\n", char.Misc.Name, char.Misc.Level, GetProficiency())
fmt.Printf("Race: %s\tClass: %s\tBackground: %s\n", char.Misc.Race, char.Misc.Class, char.Misc.Background) fmt.Printf("Race: %s\tClass: %s\tBackground: %s\n", char.Misc.Race, char.Misc.Class, char.Misc.Background)
fmt.Printf("\n")
fmt.Printf("Personality trait: %s\n", char.Misc.PersonalityTrait)
fmt.Printf("Ideals: %s\n", char.Misc.Ideals)
fmt.Printf("Bonds: %s\n", char.Misc.Bonds)
fmt.Printf("Flaws: %s\n", char.Misc.Flaws)
fmt.Printf("Quirk: %s\n", char.Misc.Quirk)
fmt.Printf("\n")
fmt.Printf("Passive perception: %d\n", passiveSkillCheck(GetSkill("perception"))) fmt.Printf("Passive perception: %d\n", passiveSkillCheck(GetSkill("perception")))
fmt.Printf("Passive investigation: %d\n", passiveSkillCheck(GetSkill("investigation"))) fmt.Printf("Passive investigation: %d\n", passiveSkillCheck(GetSkill("investigation")))

View file

@ -13,6 +13,12 @@ type Misc struct {
Race string `json:"race"` Race string `json:"race"`
Class string `json:"class"` Class string `json:"class"`
Background string `json:"background"` Background string `json:"background"`
PersonalityTrait string `json:"personalityTrait"`
Ideals string `json:"ideals"`
Bonds string `json:"bonds"`
Flaws string `json:"flaws"`
Quirk string `json:"quirk"`
ReliableTalent bool `json:"reliableTalent"` ReliableTalent bool `json:"reliableTalent"`
JackOfAllTrades bool `json:"jackOfAllTrades"` JackOfAllTrades bool `json:"jackOfAllTrades"`
IsKurthog bool `json:"isKurthog"` IsKurthog bool `json:"isKurthog"`
@ -32,6 +38,17 @@ type Stat struct {
SaveProficient bool `json:"saveProficient"` SaveProficient bool `json:"saveProficient"`
} }
type Spell struct {
SpellName string `json:"spellName"`
Level int `json:"level"`
CastingTime string `json:"castingTime"`
Range int `json:"range"`
Components string `json:"components"`
Duration string `json:"duration"`
Attack_Save string `json:"attack_save"`
Damage_Effect string `json:"damage_effect"`
}
type Feat struct { type Feat struct {
FeatName string `json:"featName"` FeatName string `json:"featName"`
FeatDescription string `json:"featDescription"` FeatDescription string `json:"featDescription"`