diff --git a/core/src/com/unciv/logic/map/mapunit/MapUnit.kt b/core/src/com/unciv/logic/map/mapunit/MapUnit.kt index de58532944..6fa1673bb7 100644 --- a/core/src/com/unciv/logic/map/mapunit/MapUnit.kt +++ b/core/src/com/unciv/logic/map/mapunit/MapUnit.kt @@ -559,10 +559,9 @@ class MapUnit : IsPartOfGameInfoSerialization { fun gift(recipient: Civilization) { civ.units.removeUnit(this) civ.cache.updateViewableTiles() - // all transported units should be destroyed as well + // all transported units should be gift as well currentTile.getUnits().filter { it.isTransported && isTransportTypeOf(it) } - .toList() // because we're changing the list - .forEach { unit -> unit.destroy() } + .forEach { unit -> unit.gift(recipient) } assignOwner(recipient) recipient.cache.updateViewableTiles() } diff --git a/core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActions.kt b/core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActions.kt index d37bcb9867..6a05b910dd 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActions.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActions.kt @@ -634,6 +634,9 @@ object UnitActions { // If gifting to major civ they need to be friendly else if (!tile.isFriendlyTerritory(unit.civ)) return null + // Transported units can't be gifted + if (unit.isTransported) return null + if (unit.currentMovement <= 0) return UnitAction(UnitActionType.GiftUnit, action = null)