Updated battle.go to allow for weapons
This commit is contained in:
parent
6db16d0ed3
commit
b962452832
@ -10,11 +10,10 @@ type Character struct {
|
|||||||
Name string
|
Name string
|
||||||
Health int
|
Health int
|
||||||
Damage int
|
Damage int
|
||||||
|
Weapons [5]Weapon
|
||||||
Spell Spell
|
Spell Spell
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func Battle(hero, enemy Character, speed time.Duration) {
|
func Battle(hero, enemy Character, speed time.Duration) {
|
||||||
speed *= time.Second
|
speed *= time.Second
|
||||||
|
|
||||||
@ -35,7 +34,6 @@ func Battle(hero, enemy Character, speed time.Duration) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func spellOrAttack() string {
|
func spellOrAttack() string {
|
||||||
if rand.Intn(2) == 1 {
|
if rand.Intn(2) == 1 {
|
||||||
return "spell"
|
return "spell"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user