Skip to content

Commit

Permalink
Merge pull request #28 from mcred/develop
Browse files Browse the repository at this point in the history
Fixes #17
Fixes #15
Fixes #14
  • Loading branch information
mcred authored Feb 22, 2020
2 parents 327e3ae + be2a2b8 commit 8a6f029
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 187 deletions.
19 changes: 0 additions & 19 deletions internal/app/characters/Albert.go

This file was deleted.

38 changes: 29 additions & 9 deletions internal/app/characters/Character.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,35 @@ import (
)

type Character struct {
ID int
Name string
XP Attribute
HP Attribute
Weapon Attribute
Helmet Attribute
Chest Attribute
Boots Attribute
Accessory Attribute
ID int
Name string
XP Attribute
HP Attribute
MP Attribute
SP Attribute
Level Attribute
Weapon Attribute
Helmet Attribute
Chest Attribute
Boots Attribute
Accessory Attribute
}

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},
}
}

func GetCharacters() []Character {
Expand Down
37 changes: 37 additions & 0 deletions internal/app/characters/Characters.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package characters

func Dart() Character {
return CreateCharacter(0,"Dart",0x52C)
}

func Lavitz() Character {
return CreateCharacter(1,"Lavitz",0x558)
}

func Shana() Character {
return CreateCharacter(2,"Shana",0x584)
}

func Rose() Character {
return CreateCharacter(3,"Rose",0x5B0)
}

func Haschel() Character {
return CreateCharacter(4,"Haschel",0x5DC)
}

func Albert() Character {
return CreateCharacter(5,"Albert",0x608)
}

func Meru() Character {
return CreateCharacter(6,"Meru",0x634)
}

func Kongol() Character {
return CreateCharacter(7,"Kongol",0x660)
}

func Miranda() Character {
return CreateCharacter(8,"Miranda",0x68C)
}
19 changes: 0 additions & 19 deletions internal/app/characters/Dart.go

This file was deleted.

19 changes: 0 additions & 19 deletions internal/app/characters/Haschel.go

This file was deleted.

19 changes: 0 additions & 19 deletions internal/app/characters/Kongol.go

This file was deleted.

19 changes: 0 additions & 19 deletions internal/app/characters/Lavitz.go

This file was deleted.

19 changes: 0 additions & 19 deletions internal/app/characters/Meru.go

This file was deleted.

19 changes: 0 additions & 19 deletions internal/app/characters/Miranda.go

This file was deleted.

19 changes: 0 additions & 19 deletions internal/app/characters/Rose.go

This file was deleted.

19 changes: 0 additions & 19 deletions internal/app/characters/Shana.go

This file was deleted.

20 changes: 13 additions & 7 deletions internal/app/ui/Form.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,25 @@ func createPartyForm(s *Slot) *fyne.Container {

func createCharacterBox(b *widget.Box, c characters.Character, w inventory.Inventory, s *Slot, window fyne.Window) {
b.Append(widget.NewLabel(c.Name))

b.Append(widget.NewLabel("Level"))
b.Append(createCharEntry(c.Level, s))
b.Append(widget.NewLabel("EXP"))
b.Append(createCharEntry(c.XP, s))
b.Append(widget.NewLabel("HP"))
b.Append(createCharEntry(c.HP, s))

b.Append(widget.NewLabel("Weapon"))
b.Append(widget.NewLabel("MP"))
b.Append(createCharEntry(c.MP, s))
b.Append(widget.NewLabel("SP"))
b.Append(createCharEntry(c.SP, s))
//b.Append(widget.NewLabel("Weapon"))
b.Append(createCharSelect(w, c.Weapon, s))
b.Append(widget.NewLabel("Armor"))
//b.Append(widget.NewLabel("Armor"))
b.Append(createCharSelect(inventory.Armor(), c.Chest, s))
b.Append(widget.NewLabel("Headgear"))
//b.Append(widget.NewLabel("Headgear"))
b.Append(createCharSelect(inventory.Helms(), c.Helmet, s))
b.Append(widget.NewLabel("Boots"))
//b.Append(widget.NewLabel("Boots"))
b.Append(createCharSelect(inventory.Boots(), c.Boots, s))
b.Append(widget.NewLabel("Accessories"))
//b.Append(widget.NewLabel("Accessories"))
b.Append(createCharSelect(inventory.Accessories(), c.Accessory, s))
}

Expand Down

0 comments on commit 8a6f029

Please sign in to comment.