diff --git a/android/assets/jsons/Policies.json b/android/assets/jsons/Policies.json index 7fc07816ce..71567ba8d0 100644 --- a/android/assets/jsons/Policies.json +++ b/android/assets/jsons/Policies.json @@ -89,7 +89,7 @@ { name:"Honor", era:"Ancient", - description:"+25% bonus vs Barbarians", + description:"+25% bonus vs Barbarians; gain Culture when you kill a barbarian unit", policies:[ { name:"Warrior Code", diff --git a/android/assets/jsons/Translations.json b/android/assets/jsons/Translations.json index 795665e783..ad1ce40635 100644 --- a/android/assets/jsons/Translations.json +++ b/android/assets/jsons/Translations.json @@ -6620,7 +6620,7 @@ German:"Ehre" French:"Honneur" } - "+25% bonus vs Barbarians":{ //it's 33% in the original game + "+25% bonus vs Barbarians; gain Culture when you kill a barbarian unit":{ //25% in Vanilla, 33% in G&K Spanish:"+25% bonus al luchar contra Barbaros" Italian:"+25% forza contro Barbari" Romanian:"+25% bonus contra Barbarilor" diff --git a/android/build.gradle b/android/build.gradle index e3eedf3ebe..c5da329d54 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.app" minSdkVersion 14 targetSdkVersion 28 - versionCode 209 - versionName "2.13.9" + versionCode 211 + versionName "2.13.10" } // Had to add this crap for Travis to build, it wanted to sign the app diff --git a/core/src/com/unciv/UnCivGame.kt b/core/src/com/unciv/UnCivGame.kt index 9c5991b460..c98d93a2ea 100644 --- a/core/src/com/unciv/UnCivGame.kt +++ b/core/src/com/unciv/UnCivGame.kt @@ -17,7 +17,7 @@ class UnCivGame : Game() { * This exists so that when debugging we can see the entire map. * Remember to turn this to false before commit and upload! */ - val viewEntireMapForDebug = true + val viewEntireMapForDebug = false // For when you need to test something in an advanced game and don't have time to faff around val superchargedForDebug = false diff --git a/core/src/com/unciv/logic/battle/Battle.kt b/core/src/com/unciv/logic/battle/Battle.kt index 01f8ed07d4..3534626d53 100644 --- a/core/src/com/unciv/logic/battle/Battle.kt +++ b/core/src/com/unciv/logic/battle/Battle.kt @@ -8,6 +8,7 @@ import com.unciv.logic.civilization.diplomacy.DiplomaticIncidentType import com.unciv.logic.map.TileInfo import com.unciv.models.gamebasics.unit.UnitType import java.util.* +import kotlin.math.max /** * Damage calculations according to civ v wiki and https://steamcommunity.com/sharedfiles/filedetails/?id=170194443 @@ -125,6 +126,18 @@ class Battle(val gameInfo:GameInfo) { addXp(defender,2,attacker) } + // Add culture when defeating a barbarian when Honor policy is adopted (can be either attacker or defender!) + fun tryGetCultureFromHonor(civUnit:ICombatant, barbarianUnit:ICombatant){ + if(barbarianUnit.isDefeated() && barbarianUnit is MapUnitCombatant + && barbarianUnit.getCivInfo().isBarbarianCivilization() + && civUnit.getCivInfo().policies.isAdopted("Honor")) + civUnit.getCivInfo().policies.storedCulture += + max(barbarianUnit.unit.baseUnit.strength,barbarianUnit.unit.baseUnit.rangedStrength) + } + + tryGetCultureFromHonor(attacker,defender) + tryGetCultureFromHonor(defender,attacker) + if(defender.isDefeated() && defender is MapUnitCombatant && !defender.getUnitType().isCivilian() && attacker.getCivInfo().policies.isAdopted("Honor Complete")) attacker.getCivInfo().gold += defender.unit.baseUnit.getGoldCost(hashSetOf()) / 10