mirror of
https://gitlab.com/EternalWanderer/sheet-parser.git
synced 2024-11-28 21:13:51 +01:00
Spells and trivia
- Trivia logic in sheet and main - Spell logic in sheet
This commit is contained in:
parent
bbd5f100cd
commit
b56d515a47
12
example.json
12
example.json
|
@ -5,6 +5,11 @@
|
|||
"race": "Human",
|
||||
"class": "Fighter",
|
||||
"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,
|
||||
"jackOfAllTrades": false,
|
||||
"isKurthog": false
|
||||
|
@ -37,7 +42,12 @@
|
|||
{"skillName":"performance", "proficient":true, "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":[
|
||||
{"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
10
main.go
|
@ -99,6 +99,16 @@ func main() {
|
|||
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("\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 investigation: %d\n", passiveSkillCheck(GetSkill("investigation")))
|
||||
|
||||
|
|
|
@ -13,6 +13,12 @@ type Misc struct {
|
|||
Race string `json:"race"`
|
||||
Class string `json:"class"`
|
||||
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"`
|
||||
JackOfAllTrades bool `json:"jackOfAllTrades"`
|
||||
IsKurthog bool `json:"isKurthog"`
|
||||
|
@ -32,6 +38,17 @@ type Stat struct {
|
|||
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 {
|
||||
FeatName string `json:"featName"`
|
||||
FeatDescription string `json:"featDescription"`
|
||||
|
|
Loading…
Reference in a new issue