mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 17:24:24 +07:00
Make pantheon cost respect game speed modifer (#12635)
* Make pantheon cost respect game speed modifer * Inplement suggestion
This commit is contained in:
parent
f07444e030
commit
b55e02fd4d
@ -15,6 +15,7 @@ import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.ui.components.extensions.toPercent
|
||||
import com.unciv.ui.screens.worldscreen.unit.actions.UnitActionModifiers
|
||||
import java.lang.Integer.min
|
||||
import kotlin.math.roundToInt
|
||||
import kotlin.random.Random
|
||||
|
||||
class ReligionManager : IsPartOfGameInfoSerialization {
|
||||
@ -106,8 +107,12 @@ class ReligionManager : IsPartOfGameInfoSerialization {
|
||||
|| religionState == ReligionState.Pantheon // any subsequent pantheons before founding a religion
|
||||
|| (religionState == ReligionState.Religion || religionState == ReligionState.EnhancedReligion) // any belief adding outside of great prophet use
|
||||
|
||||
fun faithForPantheon(additionalCivs: Int = 0) =
|
||||
civInfo.gameInfo.ruleset.modOptions.constants.pantheonBase + (civInfo.gameInfo.civilizations.count { it.isMajorCiv() && it.religionManager.religion != null } + additionalCivs) * civInfo.gameInfo.ruleset.modOptions.constants.pantheonGrowth
|
||||
fun faithForPantheon(additionalCivs: Int = 0): Int {
|
||||
val gameInfo = civInfo.gameInfo
|
||||
val numCivs = additionalCivs + gameInfo.civilizations.count { it.isMajorCiv() && it.religionManager.religion != null }
|
||||
val cost = gameInfo.ruleset.modOptions.constants.pantheonBase + numCivs * gameInfo.ruleset.modOptions.constants.pantheonGrowth
|
||||
return (cost * gameInfo.speed.faithCostModifier).roundToInt()
|
||||
}
|
||||
|
||||
/** Used for founding the pantheon and for each time the player gets additional pantheon beliefs
|
||||
* before forming a religion */
|
||||
|
Loading…
Reference in New Issue
Block a user