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

Minor AI flag fixes / cleanup #4924

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Conversation

Pawkkie
Copy link
Collaborator

@Pawkkie Pawkkie commented Jul 7, 2024

Description

When writing up the AI flag document with psf and Alex, I stumbled across a few minor oversights that this PR address. This includes:

  • Baton Pass score associated with AI_FLAG_PREFER_BATON_PASS did not consider any stat buffs the user has

    • Now adjusts score by (CountPositiveStatStages(battlerAtk) - CountNegativeStatStages(battlerAtk))
  • The comment for AI_FLAG_DOUBLE_BATTLE is not accurate and should be replaced

    • Old: "removed, split between AI_FLAG_CHECK_BAD_MOVE & AI_FLAG_CHECK_GOOD_MOVE"
    • New: "Automatically set for double battles, handles AI behaviour with partner"
  • AI_FLAG_HP_AWARE's handling of status moves at low HP could use a minor cleanup pass

    • EFFECT_LIGHT_SCREEN had negative score at lower HP but EFFECT_REFLECT did not; this was added
    • EFFECT_AURORA_VEIL had a negative score at lower HP, I believe Aurora Veil is generally best used if able regardless of HP, so this was removed
  • AI_FLAG_WILL_SUICIDE doesn't consider Final Gambit and its comment says it does

    • Added a positive score modifier to Final Gambit with AI_FLAG_WILL_SUICIDE matching the flag's other behaviour
  • AI_FLAG_CONSERVATIVE does not assume low rolls in switch calculations

    • This was an oversight when I added it initially, it has now been added

People who collaborated with me in this PR

Alex and psf through discussion

Discord contact info

@Pawkkie

@AlexOn1ine AlexOn1ine merged commit 0f21415 into rh-hideout:upcoming Jul 8, 2024
1 check 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