trinket/characters.go

39 lines
733 B
Go

package main
//Character define general type for characters
type Character struct {
Name string
Health int
Damage int
Weapons (map[string]Weapon)
Spell Spell
Initiative int
Gear PaperDoll
}
//PaperDoll define type for creating basic paper doll feature
type PaperDoll struct {
Weapon Weapon
}
var (
player = Character{
Name: "Daniel",
Health: 100,
Damage: 30,
Spell: firearrow,
Weapons: make(map[string]Weapon),
Initiative: 4,
Gear: PaperDoll{Weapon: Broadsword}}
goblin = Character{
Name: "Goblin",
Health: 100,
Damage: 30,
Weapons: make(map[string]Weapon),
Initiative: 3,
Gear: PaperDoll{Weapon: GoblinClaw}}
)