Skip to content

Generalized belief sources code for pantheon effects#13198

Draft
Hokath wants to merge 14 commits into
LoneGazebo:masterfrom
Hokath:belief_sources
Draft

Generalized belief sources code for pantheon effects#13198
Hokath wants to merge 14 commits into
LoneGazebo:masterfrom
Hokath:belief_sources

Conversation

@Hokath

@Hokath Hokath commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Starting the implementation of cleaner pantheon effect code blocks as discussed in PR #13185

For player level effects we'd need another struc, but I think that only appears once in pantheons iirc?

Hokath added 7 commits July 9, 2026 21:22
because we have to evaluate it for when the religion changes, we need to pass the new religion before the city has it
we got up to UpdateReligion when we realized the argument needed to be passed
when it calls eNewMajority for no_religion the struc will just not evaluate secondary pantheon, so i think the refactor is fine?

Note the check for city connection was actually missing in the perma pantheon code before
@Hokath

Hokath commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

I should remove these obsolete era checks because they aren't used and the way they're used for the wonder modifier is on the building era, not the player era.

Edit: done, will rebase later

Hokath added 2 commits July 9, 2026 22:59
this one didn't make use of the bIsHolyCity flag in the belief call, instead using a hardcoded holy city check.

Therefore this effect actually didn't work for, e.g., follower beliefs.

I've dropped this check for the pantheon part, it could go either way but isn't used in VP at the moment. I checked vanilla and it doesn't seem to be used there either.
@azum4roll

Copy link
Copy Markdown
Collaborator

Maybe the struct and the new function fit more in CvCityReligions.

@Hokath

Hokath commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

yes good point

I realize we will also need this in DoInstantYield player level function

Hokath added 5 commits July 11, 2026 10:16
now have to find belief calculations that did not consider secondary pantheons
religion guard was outside the pantheon stuff
have to ditch the ones measuring following cities and followers, etc.

First because pantheons dont do that but
Second because we don't know the source religion (or no religion) of the extra belief sources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants