Added weapons to goblin and player
This commit is contained in:
parent
b962452832
commit
d623b8ba2a
10
main.go
10
main.go
@ -1,6 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
//Characters
|
//Characters
|
||||||
var (
|
var (
|
||||||
@ -9,13 +9,15 @@ var (
|
|||||||
Name: "Daniel",
|
Name: "Daniel",
|
||||||
Health: 100,
|
Health: 100,
|
||||||
Damage: 60,
|
Damage: 60,
|
||||||
Spell: firearrow}
|
Spell: firearrow,
|
||||||
|
Weapons: [5]Weapon{Broadsword}}
|
||||||
|
|
||||||
goblin = Character{
|
goblin = Character{
|
||||||
|
|
||||||
Name: "Goblin",
|
Name: "Goblin",
|
||||||
Health: 100,
|
Health: 100,
|
||||||
Damage: 20}
|
Damage: 20,
|
||||||
|
Weapons: [5]Weapon{GoblinClaw}}
|
||||||
|
|
||||||
firearrow = Spell{
|
firearrow = Spell{
|
||||||
Name: "Fire Arrow",
|
Name: "Fire Arrow",
|
||||||
@ -24,6 +26,8 @@ var (
|
|||||||
Level: 1,
|
Level: 1,
|
||||||
Active: true}
|
Active: true}
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
Battle(player, goblin, 1)
|
Battle(player, goblin, 1)
|
||||||
|
fmt.Println(goblin.Weapons[0].Damage)
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user