Resolved #3065 - Ottomans' unique is now according to Vanilla

This commit is contained in:
Yair Morgenstern 2020-08-31 20:42:50 +03:00
parent 503bf45e8d
commit 697e193f51
2 changed files with 6 additions and 4 deletions

View file

@ -366,7 +366,7 @@
"outerColor": [245,248,185],
"innerColor": [18,84,30],
"uniqueName": "Barbary Corsairs",
"uniques": ["Pay only one third the usual cost for naval unit maintenance", "Melee naval units have a 1/3 chance to capture defeated naval units"],
"uniques": ["Pay only one third the usual cost for naval unit maintenance", "50% chance of capturing defeated Barbarian naval units and earning 25 Gold"],
"cities": ["Istanbul","Edirne","Ankara","Bursa","Konya","Samsun","Gaziantep","Diyabakir","Izmir","Kayseri","Malatya",
"Marsin","Antalya","Zonguldak","Denizli","Ordu","Mugia","Eskishehir","Inebolu","Sinop","Adana","Artuin",
"Bodrum","Eregli","Silifke","Sivas","Amasya","Marmaris","Trabzon","Erzurum","Urfa","Izmit","Afyonkarhisar",

View file

@ -165,10 +165,12 @@ object Battle {
}
// Similarly, Ottoman unique
if (defender.isDefeated() && defender.getUnitType().isWaterUnit() && attacker.isMelee() && attacker.getUnitType().isWaterUnit()
&& attacker.getCivInfo().hasUnique("Melee naval units have a 1/3 chance to capture defeated naval units")
&& Random().nextDouble() > 0.33) {
if (defender.isDefeated() && defender.getUnitType().isWaterUnit() && defender.getCivInfo().isBarbarian()
&& attacker.isMelee() && attacker.getUnitType().isWaterUnit()
&& attacker.getCivInfo().hasUnique("50% chance of capturing defeated Barbarian naval units and earning 25 Gold")
&& Random().nextDouble() > 0.5) {
attacker.getCivInfo().placeUnitNearTile(attackedTile.position, defender.getName())
attacker.getCivInfo().gold += 25
}
}