backend: frontend: add missing fields
This commit is contained in:
parent
d50f5dab03
commit
0fd2775aa3
4 changed files with 111 additions and 9 deletions
|
|
@ -58,15 +58,37 @@ func AddMonster(Monsters *[]model.Monster) http.HandlerFunc {
|
||||||
Dex: r.FormValue("saveDex"),
|
Dex: r.FormValue("saveDex"),
|
||||||
Con: r.FormValue("saveCon"),
|
Con: r.FormValue("saveCon"),
|
||||||
Wis: r.FormValue("saveWis"),
|
Wis: r.FormValue("saveWis"),
|
||||||
|
Str: r.FormValue("saveStr"),
|
||||||
|
Cha: r.FormValue("saveCha"),
|
||||||
|
Int: r.FormValue("saveInt"),
|
||||||
},
|
},
|
||||||
Skill: model.Skill{
|
Skill: model.Skill{
|
||||||
Perception: r.FormValue("perception"),
|
Perception: r.FormValue("perception"),
|
||||||
Stealth: r.FormValue("stealth"),
|
Stealth: r.FormValue("stealth"),
|
||||||
|
Acrobatics: r.FormValue("acrobatics"),
|
||||||
|
AnimalHandling: r.FormValue("animalHandling"),
|
||||||
|
Arcana: r.FormValue("arcana"),
|
||||||
|
Athletics: r.FormValue("athletics"),
|
||||||
|
Deception: r.FormValue("deception"),
|
||||||
|
History: r.FormValue("history"),
|
||||||
|
Insight: r.FormValue("insight"),
|
||||||
|
Intimidation: r.FormValue("intimidation"),
|
||||||
|
Investigation: r.FormValue("investigation"),
|
||||||
|
Medicine: r.FormValue("medicine"),
|
||||||
|
Nature: r.FormValue("nature"),
|
||||||
|
Performance: r.FormValue("performance"),
|
||||||
|
Persuasion: r.FormValue("persuasion"),
|
||||||
|
SleightOfHand: r.FormValue("sleightOfHand"),
|
||||||
|
Survival: r.FormValue("survival"),
|
||||||
|
Religion: r.FormValue("religion"),
|
||||||
},
|
},
|
||||||
Resist: []string{r.FormValue("resist")},
|
Resist: []string{r.FormValue("resist")},
|
||||||
Senses: []string{r.FormValue("senses")},
|
ConditionImmune: []string{r.FormValue("conditionImmune")},
|
||||||
Languages: []string{r.FormValue("languages")},
|
Immune: []string{r.FormValue("immune")},
|
||||||
CR: r.FormValue("cr"),
|
Vulnerable: []string{r.FormValue("vulnerable")},
|
||||||
|
Senses: []string{r.FormValue("senses")},
|
||||||
|
Languages: []string{r.FormValue("languages")},
|
||||||
|
CR: r.FormValue("cr"),
|
||||||
Traits: []model.Trait{
|
Traits: []model.Trait{
|
||||||
{
|
{
|
||||||
Name: r.FormValue("traitName"),
|
Name: r.FormValue("traitName"),
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ type Monster struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Vulnerable []string `json:"vulnerable"`
|
Vulnerable []string `json:"vulnerable"`
|
||||||
ConditionImmnue []string `json:"conditionImmune"`
|
ConditionImmune []string `json:"conditionImmune"`
|
||||||
Resist []string `json:"resist"`
|
Resist []string `json:"resist"`
|
||||||
Immune []string `json:"immune"`
|
Immune []string `json:"immune"`
|
||||||
Traits []Trait `json:"trait"`
|
Traits []Trait `json:"trait"`
|
||||||
|
|
@ -78,7 +78,7 @@ type Skill struct {
|
||||||
Nature string `json:"nature"`
|
Nature string `json:"nature"`
|
||||||
Perception string `json:"perception"`
|
Perception string `json:"perception"`
|
||||||
Performance string `json:"performance"`
|
Performance string `json:"performance"`
|
||||||
Persuation string `json:"persuation"`
|
Persuasion string `json:"persuasion"`
|
||||||
SleightOfHand string `json:"sleightOfHand"`
|
SleightOfHand string `json:"sleightOfHand"`
|
||||||
Survival string `json:"survival"`
|
Survival string `json:"survival"`
|
||||||
Religion string `json:"religion"`
|
Religion string `json:"religion"`
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,31 @@
|
||||||
<td>{{.Save.Dex}}</td>
|
<td>{{.Save.Dex}}</td>
|
||||||
<td>{{.Save.Con}}</td>
|
<td>{{.Save.Con}}</td>
|
||||||
<td>{{.Save.Wis}}</td>
|
<td>{{.Save.Wis}}</td>
|
||||||
|
<td>{{.Save.Str}}</td>
|
||||||
|
<td>{{.Save.Con}}</td>
|
||||||
|
<td>{{.Save.Cha}}</td>
|
||||||
<td>{{.Skill.Perception}}</td>
|
<td>{{.Skill.Perception}}</td>
|
||||||
<td>{{.Skill.Stealth}}</td>
|
<td>{{.Skill.Stealth}}</td>
|
||||||
<td>{{range .DamageRes}}{{.}}{{end}}</td>
|
<td>{{.Skill.Acrobatics}}</td>
|
||||||
|
<td>{{.Skill.AnimalHandling}}</td>
|
||||||
|
<td>{{.Skill.Arcana}}</td>
|
||||||
|
<td>{{.Skill.Athletics}}</td>
|
||||||
|
<td>{{.Skill.Deception}}</td>
|
||||||
|
<td>{{.Skill.History}}</td>
|
||||||
|
<td>{{.Skill.Insight}}</td>
|
||||||
|
<td>{{.Skill.Intimidation}}</td>
|
||||||
|
<td>{{.Skill.Investigation}}</td>
|
||||||
|
<td>{{.Skill.Medicine}}</td>
|
||||||
|
<td>{{.Skill.Nature}}</td>
|
||||||
|
<td>{{.Skill.Performance}}</td>
|
||||||
|
<td>{{.Skill.Persuasion}}</td>
|
||||||
|
<td>{{.Skill.SleightOfHand}}</td>
|
||||||
|
<td>{{.Skill.Survival}}</td>
|
||||||
|
<td>{{.Skill.Religion}}</td>
|
||||||
|
<td>{{range .Resist}}{{.}}{{end}}</td>
|
||||||
|
<td>{{range .Immune}}{{.}}{{end}}</td>
|
||||||
|
<td>{{range .Vulnerable}}{{.}}{{end}}</td>
|
||||||
|
<td>{{range .ConditionImmune}}{{.}}{{end}}</td>
|
||||||
<td>{{range .Senses}}{{.}}{{end}}</td>
|
<td>{{range .Senses}}{{.}}{{end}}</td>
|
||||||
<td>{{range .Languages}}{{.}}{{end}}</td>
|
<td>{{range .Languages}}{{.}}{{end}}</td>
|
||||||
<td>{{.CR}}</td>
|
<td>{{.CR}}</td>
|
||||||
|
|
|
||||||
|
|
@ -406,6 +406,40 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tile is-parent">
|
||||||
|
<div class="tile is-child field">
|
||||||
|
<label for="persuasion">Persuasion:</label>
|
||||||
|
<div class="control">
|
||||||
|
<input type="text" name="persuasion" required class="input input-bordered w-full max-w-xs">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tile is-ancestor">
|
||||||
|
<div class="tile is-parent">
|
||||||
|
<div class="tile is-child field">
|
||||||
|
<label for="sleightOfHand">Sleight of Hand:</label>
|
||||||
|
<div class="control">
|
||||||
|
<input type="text" name="sleightOfHand" required class="input input-bordered w-full max-w-xs">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tile is-parent">
|
||||||
|
<div class="tile is-child field">
|
||||||
|
<label for="religion">Religion:</label>
|
||||||
|
<div class="control">
|
||||||
|
<input type="text" name="religion" required class="input input-bordered w-full max-w-xs">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tile is-parent">
|
||||||
|
<div class="tile is-child field">
|
||||||
|
<label for="survival">Survival:</label>
|
||||||
|
<div class="control">
|
||||||
|
<input type="text" name="survival" required class="input input-bordered w-full max-w-xs">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -419,6 +453,30 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tile is-parent">
|
||||||
|
<div class="tile is-child field">
|
||||||
|
<label for="immune">Damage Immunity:</label>
|
||||||
|
<div class="control">
|
||||||
|
<input type="text" name="immune" required class="input input-bordered w-full max-w-xs">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tile is-parent">
|
||||||
|
<div class="tile is-child field">
|
||||||
|
<label for="vulnerable">Vulnerability:</label>
|
||||||
|
<div class="control">
|
||||||
|
<input type="text" name="vulnerable" required class="input input-bordered w-full max-w-xs">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tile is-parent">
|
||||||
|
<div class="tile is-child field">
|
||||||
|
<label for="conditionImmune">Condition Immunity:</label>
|
||||||
|
<div class="control">
|
||||||
|
<input type="text" name="conditionImmune" required class="input input-bordered w-full max-w-xs">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tile is-ancestor">
|
<div class="tile is-ancestor">
|
||||||
<div class="tile is-parent">
|
<div class="tile is-parent">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue