Reworked weapon system to be more dynamic

This commit is contained in:
mollusk 2017-10-11 06:32:40 -07:00
parent 1bb390c415
commit 65c896dd17

View File

@ -1,14 +1,18 @@
package main
type Character struct {
Name string
Health int
Damage int
Weapons [5]Weapon
Weapons (map[string] Weapon)
Spell Spell
Initiative int
Gear PaperDoll
}
var (
player = Character{
@ -16,14 +20,16 @@ var (
Health: 100,
Damage: 30,
Spell: firearrow,
Weapons: [5]Weapon{Broadsword},
Initiative: 4}
Weapons: make(map[string] Weapon),
Initiative: 4,
Gear: PaperDoll{Weapon: Broadsword}}
goblin = Character{
Name: "Goblin",
Health: 100,
Damage: 20,
Weapons: [5]Weapon{GoblinClaw},
Initiative: 3}
Weapons: make(map[string] Weapon),
Initiative: 3,
Gear: PaperDoll{Weapon: GoblinClaw}}
)