From 5b790a7542b72defc48d35ec628f9a825d9d7392 Mon Sep 17 00:00:00 2001 From: Derek Smart Date: Sat, 22 Feb 2020 01:05:52 -0500 Subject: [PATCH] Fixes #13 Signed-off-by: Derek Smart --- internal/app/characters/Character.go | 28 ++++++++++++++++------------ internal/app/ui/Form.go | 4 ++++ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/internal/app/characters/Character.go b/internal/app/characters/Character.go index 78f5580..080bf06 100644 --- a/internal/app/characters/Character.go +++ b/internal/app/characters/Character.go @@ -11,7 +11,9 @@ type Character struct { HP Attribute MP Attribute SP Attribute + SPMax Attribute Level Attribute + DLevel Attribute Weapon Attribute Helmet Attribute Chest Attribute @@ -21,18 +23,20 @@ type Character struct { func CreateCharacter(ID int, name string, root int) Character { return Character{ - ID: ID, - Name: name, - XP: Attribute{root,4,true}, - HP: Attribute{root + 8,2,true}, - MP: Attribute{root + 10,2,true}, - SP: Attribute{root + 12,2,true}, - Level: Attribute{root + 18,1,false}, - Weapon: Attribute{root + 20,1,false}, - Helmet: Attribute{root + 21,1,false}, - Chest: Attribute{root + 22,1,false}, - Boots: Attribute{root + 23,1,false}, - Accessory: Attribute{root + 24,1,false}, + ID: ID, + Name: name, + XP: Attribute{root,4,true}, + HP: Attribute{root + 8,2,true}, + MP: Attribute{root + 10,2,true}, + SP: Attribute{root + 12,2,true}, + SPMax: Attribute{root + 14,2,true}, + Level: Attribute{root + 18,1,false}, + DLevel: Attribute{root + 19,1,false}, + Weapon: Attribute{root + 20,1,false}, + Helmet: Attribute{root + 21,1,false}, + Chest: Attribute{root + 22,1,false}, + Boots: Attribute{root + 23,1,false}, + Accessory: Attribute{root + 24,1,false}, } } diff --git a/internal/app/ui/Form.go b/internal/app/ui/Form.go index 5e32704..b979b14 100644 --- a/internal/app/ui/Form.go +++ b/internal/app/ui/Form.go @@ -80,6 +80,8 @@ func createCharacterBox(b *widget.Box, c characters.Character, w inventory.Inven b.Append(widget.NewLabel(c.Name)) b.Append(widget.NewLabel("Level")) b.Append(createCharEntry(c.Level, s)) + b.Append(widget.NewLabel("Dragoon Level")) + b.Append(createCharEntry(c.DLevel, s)) b.Append(widget.NewLabel("EXP")) b.Append(createCharEntry(c.XP, s)) b.Append(widget.NewLabel("HP")) @@ -88,6 +90,8 @@ func createCharacterBox(b *widget.Box, c characters.Character, w inventory.Inven b.Append(createCharEntry(c.MP, s)) b.Append(widget.NewLabel("SP")) b.Append(createCharEntry(c.SP, s)) + b.Append(widget.NewLabel("SP Max")) + b.Append(createCharEntry(c.SPMax, s)) //b.Append(widget.NewLabel("Weapon")) b.Append(createCharSelect(w, c.Weapon, s)) //b.Append(widget.NewLabel("Armor"))