mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 06:51:30 -04:00
Ancient Ruins can now provide Culture
This commit is contained in:
parent
2e0d73cf75
commit
3b2e813523
@ -463,6 +463,7 @@ The City-State of [name] has been destroyed! =
|
|||||||
We have captured a barbarian encampment and recovered [goldAmount] gold! =
|
We have captured a barbarian encampment and recovered [goldAmount] gold! =
|
||||||
A barbarian [unitType] has joined us! =
|
A barbarian [unitType] has joined us! =
|
||||||
We have found survivors in the ruins - population added to [cityName] =
|
We have found survivors in the ruins - population added to [cityName] =
|
||||||
|
We have discovered cultural artifacts in the ruins! (+20 Culture) =
|
||||||
We have discovered the lost technology of [techName] in the ruins! =
|
We have discovered the lost technology of [techName] in the ruins! =
|
||||||
A [unitName] has joined us! =
|
A [unitName] has joined us! =
|
||||||
An ancient tribe trains our [unitName] in their ways of combat! =
|
An ancient tribe trains our [unitName] in their ways of combat! =
|
||||||
|
@ -224,8 +224,8 @@ object Battle {
|
|||||||
if(barbarianUnit.isDefeated() && barbarianUnit is MapUnitCombatant
|
if(barbarianUnit.isDefeated() && barbarianUnit is MapUnitCombatant
|
||||||
&& barbarianUnit.getCivInfo().isBarbarian()
|
&& barbarianUnit.getCivInfo().isBarbarian()
|
||||||
&& civUnit.getCivInfo().hasUnique("Gain Culture when you kill a barbarian unit"))
|
&& civUnit.getCivInfo().hasUnique("Gain Culture when you kill a barbarian unit"))
|
||||||
civUnit.getCivInfo().policies.storedCulture +=
|
civUnit.getCivInfo().policies.addCulture(
|
||||||
max(barbarianUnit.unit.baseUnit.strength,barbarianUnit.unit.baseUnit.rangedStrength)
|
max(barbarianUnit.unit.baseUnit.strength, barbarianUnit.unit.baseUnit.rangedStrength))
|
||||||
}
|
}
|
||||||
|
|
||||||
// XP!
|
// XP!
|
||||||
|
@ -56,11 +56,15 @@ class PolicyManager {
|
|||||||
tryAddLegalismBuildings()
|
tryAddLegalismBuildings()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun endTurn(culture: Int) {
|
fun addCulture(culture: Int){
|
||||||
val couldAdoptPolicyBefore = canAdoptPolicy()
|
val couldAdoptPolicyBefore = canAdoptPolicy()
|
||||||
storedCulture += culture
|
storedCulture += culture
|
||||||
if (!couldAdoptPolicyBefore && canAdoptPolicy())
|
if (!couldAdoptPolicyBefore && canAdoptPolicy())
|
||||||
shouldOpenPolicyPicker = true
|
shouldOpenPolicyPicker = true
|
||||||
|
}
|
||||||
|
|
||||||
|
fun endTurn(culture: Int) {
|
||||||
|
addCulture(culture)
|
||||||
if (autocracyCompletedTurns > 0)
|
if (autocracyCompletedTurns > 0)
|
||||||
autocracyCompletedTurns -= 1
|
autocracyCompletedTurns -= 1
|
||||||
}
|
}
|
||||||
|
@ -595,6 +595,11 @@ class MapUnit {
|
|||||||
civInfo.addNotification("We have found a stash of [$amount] gold in the ruins!",tile.position, Color.GOLD)
|
civInfo.addNotification("We have found a stash of [$amount] gold in the ruins!",tile.position, Color.GOLD)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
actions.add {
|
||||||
|
civInfo.policies.addCulture(20)
|
||||||
|
civInfo.addNotification("We have discovered cultural artifacts in the ruins! (+20 Culture)",tile.position, Color.GOLD)
|
||||||
|
}
|
||||||
|
|
||||||
// Map of the surrounding area
|
// Map of the surrounding area
|
||||||
actions.add {
|
actions.add {
|
||||||
val revealCenter = tile.getTilesAtDistance(ANCIENT_RUIN_MAP_REVEAL_OFFSET).toList().random(tileBasedRandom)
|
val revealCenter = tile.getTilesAtDistance(ANCIENT_RUIN_MAP_REVEAL_OFFSET).toList().random(tileBasedRandom)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user