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

Refactor fleet missions' code | Part 04 | Morale modifiers calculation #95

Merged
merged 14 commits into from
Apr 2, 2020

Conversation

mdziekon
Copy link
Owner

@mdziekon mdziekon commented Mar 31, 2020

Summary:

Currently there are several places where morale-related modifiers are calculated manually for each attacker and defender, also duplicated in several files. All of these modifiers are applied identically, therefore they should be calculated using a shared utility function.

Changelog:

  • Extract morale combat modifiers calculating function
  • Use the new combat updating functions in attacks handling functions:
    • Regular attack
    • Group attack (ACS)
    • Moon destruction
  • Extract morale pillage modifiers calculating function
  • Use the new pillage updating functions in attacks handling functions:
    • Regular attack
    • Group attack (ACS)
    • Moon destruction
  • Bugfix: when sending a united attack by yourself (only one attacker), apply morale BONUS when pillaging

Related issues or PRs:

@mdziekon mdziekon added the pr:enhancement_request All pull requests related to enhancements proposals label Mar 31, 2020
@mdziekon mdziekon added this to In progress in Basic modernisation via automation Mar 31, 2020
@mdziekon mdziekon force-pushed the mdziekon/91/fleet-mission-attack-refactor-part04 branch from 5835e10 to 95637b4 Compare April 1, 2020 21:58
@mdziekon mdziekon added the pr:bugfix All pull requests related to fixing bugs label Apr 2, 2020
@mdziekon mdziekon marked this pull request as ready for review April 2, 2020 00:43
@mdziekon mdziekon merged commit 702eb3c into master Apr 2, 2020
Basic modernisation automation moved this from In progress to Done Apr 2, 2020
@mdziekon mdziekon deleted the mdziekon/91/fleet-mission-attack-refactor-part04 branch April 2, 2020 22:04
@mdziekon mdziekon removed this from Done in Basic modernisation Apr 8, 2022
@mdziekon mdziekon added this to In progress in Flight Control refactor via automation Apr 8, 2022
@mdziekon mdziekon moved this from In progress to Done in Flight Control refactor Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:bugfix All pull requests related to fixing bugs pr:enhancement_request All pull requests related to enhancements proposals
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant