Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #13 #29

Merged
merged 1 commit into from
Feb 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions internal/app/characters/Character.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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},
}
}

Expand Down
4 changes: 4 additions & 0 deletions internal/app/ui/Form.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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"))
Expand Down