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",
|
"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
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("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")))
|
||||||
|
|
||||||
|
|
|
@ -8,14 +8,20 @@ type Character struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Misc struct {
|
type Misc struct {
|
||||||
Level int `json:"level"`
|
Level int `json:"level"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Race string `json:"race"`
|
Race string `json:"race"`
|
||||||
Class string `json:"class"`
|
Class string `json:"class"`
|
||||||
Background string `json:"background"`
|
Background string `json:"background"`
|
||||||
ReliableTalent bool `json:"reliableTalent"`
|
PersonalityTrait string `json:"personalityTrait"`
|
||||||
JackOfAllTrades bool `json:"jackOfAllTrades"`
|
Ideals string `json:"ideals"`
|
||||||
IsKurthog bool `json:"isKurthog"`
|
Bonds string `json:"bonds"`
|
||||||
|
Flaws string `json:"flaws"`
|
||||||
|
Quirk string `json:"quirk"`
|
||||||
|
|
||||||
|
ReliableTalent bool `json:"reliableTalent"`
|
||||||
|
JackOfAllTrades bool `json:"jackOfAllTrades"`
|
||||||
|
IsKurthog bool `json:"isKurthog"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Skill struct {
|
type Skill struct {
|
||||||
|
@ -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"`
|
||||||
|
|
Loading…
Reference in a new issue