From 697e193f515ec7f5cfa93bee043c4ea288ba93cc Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 31 Aug 2020 20:42:50 +0300 Subject: [PATCH] Resolved #3065 - Ottomans' unique is now according to Vanilla --- android/assets/jsons/Civ V - Vanilla/Nations.json | 2 +- core/src/com/unciv/logic/battle/Battle.kt | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/android/assets/jsons/Civ V - Vanilla/Nations.json b/android/assets/jsons/Civ V - Vanilla/Nations.json index 9e573ecb12..583ce8f564 100644 --- a/android/assets/jsons/Civ V - Vanilla/Nations.json +++ b/android/assets/jsons/Civ V - Vanilla/Nations.json @@ -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", diff --git a/core/src/com/unciv/logic/battle/Battle.kt b/core/src/com/unciv/logic/battle/Battle.kt index 5c483546d6..097a040c4a 100644 --- a/core/src/com/unciv/logic/battle/Battle.kt +++ b/core/src/com/unciv/logic/battle/Battle.kt @@ -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 } }