mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 03:53:12 -04:00
Move CS tribute modifiers to mod constants (#12989)
* Update ModConstants.kt * Update CityStateFunctions.kt * Update ModConstants.kt
This commit is contained in:
parent
905d3c7bfa
commit
9f2ffa5df1
@ -450,7 +450,8 @@ class CityStateFunctions(val civInfo: Civilization) {
|
||||
|
||||
val forceRank = civInfo.gameInfo.getAliveMajorCivs().sortedByDescending { it.getStatForRanking(
|
||||
RankingType.Force) }.indexOf(demandingCiv)
|
||||
modifiers["Military Rank"] = 100 - ((100 / civInfo.gameInfo.gameParameters.players.size) * forceRank)
|
||||
val globalModifier = civInfo.gameInfo.ruleset.modOptions.constants.tributeGlobalModifier
|
||||
modifiers["Military Rank"] = globalModifier - ((globalModifier / civInfo.gameInfo.gameParameters.players.size) * forceRank)
|
||||
|
||||
if (!requireWholeList && modifiers.values.sum() < -100)
|
||||
return modifiers
|
||||
@ -468,13 +469,14 @@ class CityStateFunctions(val civInfo: Civilization) {
|
||||
else 0
|
||||
}
|
||||
val forceRatio = forceNearCity.toFloat() / csForce.toFloat()
|
||||
val localModifier = civInfo.gameInfo.ruleset.modOptions.constants.tributeLocalModifier
|
||||
|
||||
modifiers["Military near City-State"] = when {
|
||||
forceRatio > 3f -> 100
|
||||
forceRatio > 2f -> 80
|
||||
forceRatio > 1.5f -> 60
|
||||
forceRatio > 1f -> 40
|
||||
forceRatio > 0.5f -> 20
|
||||
forceRatio > 3f -> localModifier
|
||||
forceRatio > 2f -> localModifier * 4/5
|
||||
forceRatio > 1.5f -> localModifier * 3/5
|
||||
forceRatio > 1f -> localModifier * 2/5
|
||||
forceRatio > 0.5f -> localModifier / 5
|
||||
else -> 0
|
||||
}
|
||||
|
||||
|
@ -105,6 +105,10 @@ class ModConstants {
|
||||
var baseTurnsUntilRevolt = 4
|
||||
var cityStateElectionTurns = 15
|
||||
|
||||
// City State Tribute: maximum points from Force ranking towards reaching Tribute willingness threshold
|
||||
var tributeGlobalModifier = 100 // 75 in BNW
|
||||
var tributeLocalModifier = 100 // 125 in BNW
|
||||
|
||||
// Espionage
|
||||
var maxSpyRank = 3
|
||||
// How much of a skill bonus each rank gives.
|
||||
|
Loading…
x
Reference in New Issue
Block a user