Skip to content

Commit

Permalink
Fix magic wood
Browse files Browse the repository at this point in the history
  • Loading branch information
bobtfish committed Dec 24, 2022
1 parent c153227 commit 12a2375
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Bug / missing feature list:

Bugs
- Magic wood is broken
- second game has player 3+ and never finishes player selection
- When we have multiple players (8) then some are killed select spell screen allows selections for dead players

Expand Down
16 changes: 8 additions & 8 deletions screen/move.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,14 @@ func DoAttackMaybe(from, to logical.Vec, playerIdx int, ctx screeniface.GameCtx,
},
}
}
// Does belong to this player, see if it's mountable, if so we can move to it
_, isPlayer := grid.GetGameObject(from).(*player.Player)
if isPlayer || isDismount { // We're moving the player, lets see if target is something we can mount
fmt.Printf("Moving player, check for mount\n")
if ob.IsMount() {
fmt.Printf(" Is mount\n")
return AttackStatus{NotEmpty: true, IsMount: true}
}
}
// Does belong to this player, see if it's mountable, if so we can move to it
_, isPlayer := grid.GetGameObject(from).(*player.Player)
if isPlayer || isDismount { // We're moving the player, lets see if target is something we can mount
fmt.Printf("Moving player, check for mount\n")
if ob.IsMount() {
fmt.Printf(" Is mount\n")
return AttackStatus{NotEmpty: true, IsMount: true}
}
}
return AttackStatus{NotEmpty: true}
Expand Down
2 changes: 1 addition & 1 deletion spells/iface/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func ChooseSpells() []Spell {
}

for i := 0; i < len(AllSpells); i++ {
if AllSpells[i].GetName() == "Elf" {
if AllSpells[i].GetName() == "Magic Wood" {
spells[1] = AllSpells[i]
}
}
Expand Down

0 comments on commit 12a2375

Please sign in to comment.