diff --git a/TODO b/TODO index fbe070e..cb1aadc 100644 --- a/TODO +++ b/TODO @@ -4,7 +4,6 @@ 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 - - Shadow wood attack successful moves the wood Visual / animation: Press number to flash characters of one player diff --git a/screen/attack.go b/screen/attack.go index 4ed0107..bf8f10c 100644 --- a/screen/attack.go +++ b/screen/attack.go @@ -321,6 +321,7 @@ func (screen *DoAttack) Step(ctx screeniface.GameCtx) screeniface.GameScreen { defenceRating := defender.(movable.Attackable).GetDefence() + rand.Intn(9) attacker := getAttacker(grid.GetGameObject(screen.AttackerV), screen.IsDismount) attackRating := attacker.(movable.Attackerable).GetCombat() + rand.Intn(9) + attackerMovement := attacker.(movable.Movable).GetMovement() fmt.Printf("Attack rating %d defence rating %d\n", attackRating, defenceRating) if attackRating > defenceRating { @@ -329,7 +330,7 @@ func (screen *DoAttack) Step(ctx screeniface.GameCtx) screeniface.GameScreen { return newScreen } - if canMoveOnto { + if canMoveOnto && attackerMovement > 0 { doCharacterMove(screen.AttackerV, screen.DefenderV, grid, screen.IsDismount) screen.AttackerV = screen.DefenderV }