Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving leader selection in land and naval battles #1889

Merged
merged 5 commits into from
Feb 1, 2025

Conversation

ZombieFreak115
Copy link
Contributor

This PR is meant to improve the selection of leaders in battles (ie who the game picks to be the leader, and apply their +atk and +def stats).

At the moment once a leader is chosen in a battle (whichever army starts the battle first), the leaders are more or less set in stone, and won't change even if a better leader is inserted together with another army.

The PR changes the following regarding selection logic:

1: When a new army joins the battle, it will re-calculate all the leader scores in the battle, and select the one with the highest score. This enables the player to not have to worry about which army they have to insert "first", as any "Better" generals will automatically take over once inserted.
2: The leader score calculation is changed so that it will ignore the opposite stat, ie if a leader is attacking, it will not factor in any +defence bonus in the calculation. This leads to less user frustation if they, say, have a very good attack general, but is -2 defence. This general might take over defensive battles instead of more qualified defensive generals in the same stack.

@schombert schombert merged commit b6497e2 into schombert:main Feb 1, 2025
2 of 3 checks passed
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