mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-22 20:49:36 +07:00
Implemented aircraft carrier "Flight Deck" and "Armor Plating" promotions (#1754)
* Implemented aircraft carrier "Flight Deck" and "Armor Plating" promotions * Template for the translation strings * New icons are added Co-authored-by: ltrcao <ltrcao@users.noreply.github.com>
This commit is contained in:
parent
b21fdc6c37
commit
e0a00eb9a5
BIN
android/Images/UnitPromotionIcons/Armor Plating.png
Normal file
BIN
android/Images/UnitPromotionIcons/Armor Plating.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
android/Images/UnitPromotionIcons/Flight Deck.png
Normal file
BIN
android/Images/UnitPromotionIcons/Flight Deck.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -224,6 +224,42 @@
|
||||
"unitTypes": ["WaterSubmarine"]
|
||||
},
|
||||
|
||||
// Aircraft Carrier
|
||||
{
|
||||
"name": "Armor Plating I",
|
||||
"effect": "+25% Combat Bonus when defending",
|
||||
"unitTypes": ["WaterAircraftCarrier"]
|
||||
},
|
||||
{
|
||||
"name": "Armor Plating II",
|
||||
"prerequisites": ["Armor Plating I"],
|
||||
"effect": "+25% Combat Bonus when defending",
|
||||
"unitTypes": ["WaterAircraftCarrier"]
|
||||
},
|
||||
{
|
||||
"name": "Armor Plating III",
|
||||
"prerequisites": ["Armor Plating II"],
|
||||
"effect": "+25% Combat Bonus when defending",
|
||||
"unitTypes": ["WaterAircraftCarrier"]
|
||||
},
|
||||
{
|
||||
"name": "Flight Deck I",
|
||||
"effect": "Can carry 1 extra air unit",
|
||||
"unitTypes": ["WaterAircraftCarrier"]
|
||||
},
|
||||
{
|
||||
"name": "Flight Deck II",
|
||||
"prerequisites": ["Flight Deck I"],
|
||||
"effect": "Can carry 1 extra air unit",
|
||||
"unitTypes": ["WaterAircraftCarrier"]
|
||||
},
|
||||
{
|
||||
"name": "Flight Deck III",
|
||||
"prerequisites": ["Flight Deck II"],
|
||||
"effect": "Can carry 1 extra air unit",
|
||||
"unitTypes": ["WaterAircraftCarrier"]
|
||||
},
|
||||
|
||||
// Bomber
|
||||
{
|
||||
"name": "Siege I",
|
||||
|
@ -3114,6 +3114,14 @@ Bonus when intercepting [amount]% =
|
||||
Ambush I =
|
||||
# Requires translation!
|
||||
Ambush II =
|
||||
Armor Plating I = Armor Plating I
|
||||
Armor Plating II = Armor Plating II
|
||||
Armor Plating III = Armor Plating III
|
||||
+25% Combat Bonus when defending = +25% Combat Bonus when defending
|
||||
Flight Deck I = Flight Deck I
|
||||
Flight Deck II = Flight Deck II
|
||||
Flight Deck III = Flight Deck III
|
||||
Can carry 1 extra air unit = Can carry 1 extra air unit
|
||||
Can carry 2 aircraft = Can carry 2 aircraft
|
||||
# Requires translation!
|
||||
Haka War Dance =
|
||||
|
@ -1663,6 +1663,14 @@ Reduces damage taken from interception by 50% =
|
||||
Bonus when intercepting [amount]% =
|
||||
Ambush I =
|
||||
Ambush II =
|
||||
Armor Plating I =
|
||||
Armor Plating II =
|
||||
Armor Plating III =
|
||||
+25% Combat Bonus when defending =
|
||||
Flight Deck I =
|
||||
Flight Deck II =
|
||||
Flight Deck III =
|
||||
Can carry 1 extra air unit =
|
||||
Can carry 2 aircraft =
|
||||
Haka War Dance =
|
||||
-10% combat strength for adjacent enemy units =
|
||||
|
@ -166,6 +166,9 @@ class BattleDamage{
|
||||
if (defenceVsRanged > 0) modifiers["defence vs ranged"] = defenceVsRanged
|
||||
}
|
||||
|
||||
val carrierDefenceBonus = 0.25f * defender.unit.getUniques().count { it == "+25% Combat Bonus when defending" }
|
||||
if (carrierDefenceBonus > 0) modifiers["Armor Plating"] = carrierDefenceBonus
|
||||
|
||||
|
||||
if (defender.unit.isFortified())
|
||||
modifiers["Fortification"] = 0.2f * defender.unit.getFortificationTurns()
|
||||
|
@ -297,7 +297,7 @@ class UnitMovementAlgorithms(val unit:MapUnit) {
|
||||
val unitAtDestination = tile.militaryUnit!!
|
||||
|
||||
var unitCapacity = if (unitAtDestination.getUniques().contains("Can carry 2 aircraft")) 2 else 0
|
||||
// unitCapacity += unitAtDestination.getUniques().count { it == "Can carry 1 extra air unit" }
|
||||
unitCapacity += unitAtDestination.getUniques().count { it == "Can carry 1 extra air unit" }
|
||||
|
||||
return ((unitAtDestination.type.isAircraftCarrierUnit() && !unit.type.isMissileUnit()) ||
|
||||
(unitAtDestination.type.isMissileCarrierUnit() && unit.type.isMissileUnit()))
|
||||
|
@ -481,6 +481,8 @@ Unless otherwise specified, all the following are from [the Noun Project](https:
|
||||
* [Submarine](https://thenounproject.com/search/?q=submarines&i=96833) by Lloyd Humphreys for Wolfpack
|
||||
* [Axe](https://thenounproject.com/search/?q=axe&i=14290) by Brian Oppenlander for Woodsman
|
||||
* [Competition](https://thenounproject.com/search/?q=move%20fast&i=1743826) by luca fruzza
|
||||
* Icon for Flight Deck is made by [JackRainy](https://github.com/JackRainy)
|
||||
* Icon for Armor Plating is made by [JackRainy](https://github.com/JackRainy)
|
||||
|
||||
## Others
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user