From d623b8ba2ac4c0ef5c9a31f4f9954816abcf1f75 Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Mon, 9 Oct 2017 00:27:09 -0700 Subject: [PATCH] Added weapons to goblin and player --- main.go | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/main.go b/main.go index 9ad68fd..af5401b 100644 --- a/main.go +++ b/main.go @@ -1,29 +1,33 @@ package main - +import "fmt" //Characters var ( player = Character{ - Name: "Daniel", - Health: 100, - Damage: 60, - Spell: firearrow} + Name: "Daniel", + Health: 100, + Damage: 60, + Spell: firearrow, + Weapons: [5]Weapon{Broadsword}} goblin = Character{ - Name: "Goblin", - Health: 100, - Damage: 20} + Name: "Goblin", + Health: 100, + Damage: 20, + Weapons: [5]Weapon{GoblinClaw}} firearrow = Spell{ - Name: "Fire Arrow", + Name: "Fire Arrow", Damage: 50, Cost: 10, - Level: 1, + Level: 1, Active: true} ) -func main(){ + +func main() { Battle(player, goblin, 1) -} \ No newline at end of file + fmt.Println(goblin.Weapons[0].Damage) +}