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

Quick fixes for degenerate behaviour in rebelAttack #2144

Merged

Conversation

jaj22
Copy link

@jaj22 jaj22 commented Sep 25, 2021

What type of PR is this.

  1. Bug
  2. Change
  3. Enhancement

What have you changed and why?

The four small attacks against easy targets option and wave count calculation were not working as intended. I've removed the former and simplified the latter to temporarily fix the behaviour. Example cases that now work reasonably:

  • Small attacks not spawning due to HC maxUnits limits so the attack does nothing.
  • Only one small attack spawning and being less effective than a wavedCA for a higher timer cost.
  • Depending on the size and grouping of the singleAttack, captured target will often have a very small garrison afterwards and so be very easy to recapture.
  • With 1-3 easy targets, the code would always prefer a non-easy target, often leading to useless attacks on cities.
  • Long distance targets having very large wave counts, even if very early game.
  • Short distance targets having minimal wave counts, even if heavily defended.

It's not ideal, but I don't think there's any practical downside.

Please specify which Issue this PR Resolves.

closes #2142

Please verify the following and ensure all checks are completed.

  1. Have you loaded the mission in LAN host?
  2. Have you loaded the mission on a dedicated server?

Is further testing or are further changes required?

  1. No
  2. Yes (Please provide further detail below.)

How can the changes be tested?

Difficult because attacks targets are deterministic but target side is random, and there's no function separation. In general, set up various situations with markerChange and garrison functions and then run [attackerSide] spawn A3A_fnc_rebelAttack. Using reb vs gov to constrain the target side may be useful.

Not really any new code here though, just removal of paths.

@jaj22 jaj22 added the Change A change to existing functionality label Sep 25, 2021
@jaj22 jaj22 added this to the 2.5.3 milestone Sep 25, 2021
Copy link
Collaborator

@HakonRydland HakonRydland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks resonable

@Bob-Murphy Bob-Murphy merged commit fc07e3f into official-antistasi-community:unstable Oct 2, 2021
@Bob-Murphy Bob-Murphy added the Added to changelog Added to changelog label Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added to changelog Added to changelog Change A change to existing functionality Ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Game balance]: Four-singleAttack response isn't working as intended
3 participants