mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 20:59:18 +07:00
Converted civ uniques up to India
This commit is contained in:
@ -259,8 +259,9 @@ object BattleDamage {
|
||||
}
|
||||
|
||||
private fun getHealthDependantDamageRatio(combatant: ICombatant): Float {
|
||||
return if(combatant.getUnitType() == UnitType.City
|
||||
|| combatant.getCivInfo().nation.unique == UniqueAbility.BUSHIDO && !combatant.getUnitType().isAirUnit())
|
||||
return if (combatant.getUnitType() == UnitType.City
|
||||
|| combatant.getCivInfo().hasUnique("Units fight as though they were at full strength even when damaged")
|
||||
&& !combatant.getUnitType().isAirUnit())
|
||||
1f
|
||||
else 1 - (100 - combatant.getHealth()) / 300f// Each 3 points of health reduces damage dealt by 1% like original game
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ class CityExpansionManager {
|
||||
if (cityInfo.containsBuildingUnique("Culture and Gold costs of acquiring new tiles reduced by 25% in this city"))
|
||||
cost *= 0.75 // Specialty of Krepost
|
||||
|
||||
if (cityInfo.civInfo.nation.unique == UniqueAbility.MANIFEST_DESTINY)
|
||||
if (cityInfo.civInfo.hasUnique("-50% cost when purchasing tiles"))
|
||||
cost /= 2
|
||||
return cost.toInt()
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ class CityStats {
|
||||
unhappinessModifier *= civInfo.gameInfo.getDifficulty().aiUnhappinessModifier
|
||||
|
||||
var unhappinessFromCity = -3f // -3 happiness per city
|
||||
if (civInfo.nation.unique == UniqueAbility.POPULATION_GROWTH)
|
||||
if (civInfo.hasUnique("Unhappiness from number of Cities doubled"))
|
||||
unhappinessFromCity *= 2f//doubled for the Indian
|
||||
|
||||
newHappinessList["Cities"] = unhappinessFromCity * unhappinessModifier
|
||||
@ -196,12 +196,9 @@ class CityStats {
|
||||
unhappinessFromCitizens *= 1.5f
|
||||
else if (hasExtraAnnexUnhappiness())
|
||||
unhappinessFromCitizens *= 2f
|
||||
if (civInfo.hasUnique("Unhappiness from population decreased by 10%"))
|
||||
unhappinessFromCitizens *= 0.9f
|
||||
if (civInfo.hasUnique("-5% unhappiness from citizens"))
|
||||
unhappinessFromCitizens *= 0.95f
|
||||
if (civInfo.nation.unique == UniqueAbility.POPULATION_GROWTH)
|
||||
unhappinessFromCitizens *= 0.5f //halved for the Indian
|
||||
|
||||
for(unique in civInfo.getMatchingUniques("Unhappiness from population decreased by []%"))
|
||||
unhappinessFromCitizens *= (1-unique.params[0].toFloat()/100)
|
||||
|
||||
newHappinessList["Population"] = -unhappinessFromCitizens * unhappinessModifier
|
||||
|
||||
|
@ -160,7 +160,7 @@ class MapUnit {
|
||||
visibilityRange += getUniques().count { it == "+1 Visibility Range" }
|
||||
if (hasUnique("+2 Visibility Range")) visibilityRange += 2 // This shouldn't be stackable
|
||||
if (hasUnique("Limited Visibility")) visibilityRange -= 1
|
||||
if (civInfo.nation.unique == UniqueAbility.MANIFEST_DESTINY)
|
||||
if (civInfo.hasUnique("+1 Sight for all land military units"))
|
||||
visibilityRange += 1
|
||||
if (type.isWaterUnit() && !type.isCivilian()
|
||||
&& civInfo.hasUnique("All military naval units receive +1 movement and +1 sight"))
|
||||
|
Reference in New Issue
Block a user