mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 01:39:40 +07:00
Added "Self-destructs when attacking" unique
This commit is contained in:
@ -1050,7 +1050,7 @@
|
|||||||
"cost": 600,
|
"cost": 600,
|
||||||
"requiredTech": "Nuclear Fission",
|
"requiredTech": "Nuclear Fission",
|
||||||
"requiredResource": "Uranium",
|
"requiredResource": "Uranium",
|
||||||
"uniques": ["Nuclear weapon", "Requires [Manhattan Project]"]
|
"uniques": ["Nuclear weapon", "Requires [Manhattan Project]", "Self-destructs when attacking"]
|
||||||
// Plane rather than a missile - can be based in city or Carrier only. But cannot be intercepted because of a civ 5 bug that was never fixed.
|
// Plane rather than a missile - can be based in city or Carrier only. But cannot be intercepted because of a civ 5 bug that was never fixed.
|
||||||
// Single-use like missile
|
// Single-use like missile
|
||||||
// No strength/rangedStrength tags in civ 5 xmls. Instead has NukeDamageLevel = 1 tag (Nuclear Missile has NukeDamageLevel = 2)
|
// No strength/rangedStrength tags in civ 5 xmls. Instead has NukeDamageLevel = 1 tag (Nuclear Missile has NukeDamageLevel = 2)
|
||||||
|
@ -32,7 +32,7 @@ object Battle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attacker.getUnitType() == UnitType.Missile) {
|
if (attacker is MapUnitCombatant && attacker.unit.hasUnique("Nuclear weapon")) {
|
||||||
return nuke(attacker, attackableTile.tileToAttack)
|
return nuke(attacker, attackableTile.tileToAttack)
|
||||||
}
|
}
|
||||||
attack(attacker, getMapCombatantOfTile(attackableTile.tileToAttack)!!)
|
attack(attacker, getMapCombatantOfTile(attackableTile.tileToAttack)!!)
|
||||||
@ -86,7 +86,7 @@ object Battle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (attacker is MapUnitCombatant) {
|
if (attacker is MapUnitCombatant) {
|
||||||
if (attacker.getUnitType() == UnitType.Missile)
|
if (attacker.unit.hasUnique("Self-destructs when attacking"))
|
||||||
attacker.unit.destroy()
|
attacker.unit.destroy()
|
||||||
else if (attacker.unit.isMoving())
|
else if (attacker.unit.isMoving())
|
||||||
attacker.unit.action = null
|
attacker.unit.action = null
|
||||||
|
Reference in New Issue
Block a user