Pantheon Mod Constants (#9562)

* Religion Mod Constant

* Update mistake in wiki
This commit is contained in:
SeventhM 2023-06-11 02:36:41 -07:00 committed by GitHub
parent 8b72dba4fb
commit c506331dcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -106,7 +106,7 @@ class ReligionManager : IsPartOfGameInfoSerialization {
|| (religionState == ReligionState.Religion || religionState == ReligionState.EnhancedReligion) // any belief adding outside of great prophet use
fun faithForPantheon(additionalCivs: Int = 0) =
10 + (civInfo.gameInfo.civilizations.count { it.isMajorCiv() && it.religionManager.religion != null } + additionalCivs) * 5
civInfo.gameInfo.ruleset.modOptions.constants.pantheonBase + (civInfo.gameInfo.civilizations.count { it.isMajorCiv() && it.religionManager.religion != null } + additionalCivs) * civInfo.gameInfo.ruleset.modOptions.constants.pantheonGrowth
/** Used for founding the pantheon and for each time the player gets additional pantheon beliefs
* before forming a religion */
@ -117,7 +117,7 @@ class ReligionManager : IsPartOfGameInfoSerialization {
if (numberOfBeliefsAvailable(BeliefType.Pantheon) == 0)
return false // no more available pantheons
if (civInfo.gameInfo.civilizations.any { it.religionManager.religionState == ReligionState.EnhancedReligion }
&& civInfo.gameInfo.civilizations.count { it.religionManager.religionState >= ReligionState.Pantheon } < maxNumberOfReligions()
&& civInfo.gameInfo.civilizations.count { it.religionManager.religionState >= ReligionState.Pantheon } >= maxNumberOfReligions()
) {
return false
}

View File

@ -66,6 +66,10 @@ class ModConstants {
var religionLimitBase = 1
var religionLimitMultiplier = 0.5f
//Factors in formula for pantheon cost
var pantheonBase = 10
var pantheonGrowth = 5
fun merge(other: ModConstants) {
if (other.maxXPfromBarbarians != defaults.maxXPfromBarbarians) maxXPfromBarbarians = other.maxXPfromBarbarians
if (other.cityStrengthBase != defaults.cityStrengthBase) cityStrengthBase = other.cityStrengthBase
@ -88,6 +92,8 @@ class ModConstants {
if (other.maxRiverLength != defaults.maxRiverLength) maxRiverLength = other.maxRiverLength
if (other.religionLimitBase != defaults.religionLimitBase) religionLimitBase = other.religionLimitBase
if (other.religionLimitMultiplier != defaults.religionLimitMultiplier) religionLimitMultiplier = other.religionLimitMultiplier
if (other.pantheonBase != defaults.pantheonBase) pantheonBase = other.pantheonBase
if (other.pantheonGrowth != defaults.pantheonGrowth) pantheonGrowth = other.pantheonGrowth
}
companion object {

View File

@ -151,6 +151,8 @@ and city distance in another. In case of conflicts, there is no guarantee which
| maxRiverLength | Int | 666 | [^I] |
| religionLimitBase | Int | 1 | [^K] |
| religionLimitMultiplier | Float | 0.5 | [^K] |
| pantheonBase | Int | 10 | [^L] |
| pantheonGrowth | Int | 5 | [^L] |
Legend:
@ -179,6 +181,7 @@ Legend:
- [^I]: RiverGenerator: river frequency and length bounds
- [^J]: A [UnitUpgradeCost](#UnitUpgradeCost) sub-structure.
- [^K]: Maximum foundable Religions = religionLimitBase + floor(MajorCivCount * religionLimitMultiplier)
- [^L]: Cost of pantheon = pantheonBase + CivsWithReligion * pantheonGrowth
#### UnitUpgradeCost