mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-24 13:41:08 +07:00
Fix isEmbarked() Crash (#6290)
* Correct logic for blocking Naval Melee from capturing Civilians on Land * Even better solution now that we can move on to unguarded Civilian tiles. But still won't let us capture Civilians if we can't get there * Make Embarked unable to capture Civilians * Embarked can't capture Water Civilians * Fix Gradle Test * Better unit test without making variable not internal * attempt not working * Just make currentTile not internal * remove debug * erronious import * Fix exception for when currentTile isn't initialized yet * More precise solution Co-authored-by: itanasi <spellman23@gmail.com>
This commit is contained in:
parent
28ab45ae40
commit
906d770443
@ -486,6 +486,7 @@ class TileMap {
|
||||
var unitToPlaceTile: TileInfo? = null
|
||||
// try to place at the original point (this is the most probable scenario)
|
||||
val currentTile = get(position)
|
||||
unit.currentTile = currentTile // temporary
|
||||
if (unit.movement.canMoveTo(currentTile)) unitToPlaceTile = currentTile
|
||||
|
||||
// if it's not suitable, try to find another tile nearby
|
||||
|
Loading…
Reference in New Issue
Block a user