trinket/main.go

34 lines
473 B
Go
Raw Normal View History

2017-10-08 22:17:53 -07:00
package main
2017-10-09 00:27:09 -07:00
import "fmt"
2017-10-08 22:17:53 -07:00
//Characters
var (
player = Character{
2017-10-09 00:27:09 -07:00
Name: "Daniel",
Health: 100,
Damage: 60,
Spell: firearrow,
Weapons: [5]Weapon{Broadsword}}
2017-10-08 22:17:53 -07:00
goblin = Character{
2017-10-09 00:27:09 -07:00
Name: "Goblin",
Health: 100,
Damage: 20,
Weapons: [5]Weapon{GoblinClaw}}
2017-10-08 22:17:53 -07:00
firearrow = Spell{
2017-10-09 00:27:09 -07:00
Name: "Fire Arrow",
2017-10-08 22:17:53 -07:00
Damage: 50,
Cost: 10,
2017-10-09 00:27:09 -07:00
Level: 1,
2017-10-08 22:17:53 -07:00
Active: true}
)
2017-10-09 00:27:09 -07:00
func main() {
2017-10-08 22:17:53 -07:00
Battle(player, goblin, 1)
2017-10-09 00:27:09 -07:00
fmt.Println(goblin.Weapons[0].Damage)
}