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

[battle_engine] fix multi hit/stormdrain-like interactions #1958

Conversation

kleeenexfeu
Copy link

@kleeenexfeu kleeenexfeu commented Nov 30, 2021

To avoid hits passed the first one to go through storm drain (and possibly flash fire), I added the orhalfword used in water absorb battlescript.
I added comments on the lines that I think should be deleted because I don't see what purpose they serve. Following a water absorb or storm drain-like activation, the user cannot faint since rocky helmet, life orb and friends wouldn't activate. Any input is welcome :)
EDIT: doesn't fix scenario like galvanized explosion being blocked by volt absorb or motor drive in double. After volt absorb is activated, no other target will take damage. This is a bug from the battle engine, I'll see if I can fix it in this PR.

@@ -8072,7 +8072,8 @@ BattleScript_MoveStatDrain::
printstring STRINGID_TARGETABILITYSTATRAISE
waitmessage B_WAIT_TIME_LONG
clearsemiinvulnerablebit
tryfaintmon BS_ATTACKER, FALSE, NULL
tryfaintmon BS_ATTACKER, FALSE, NULL @ this should be removed, unless I'm missing something
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is here just for Explosion/Self Destruct, which can be changed to electric type and absorbed. I think running tryfaintmon only for those move effects would be fine, but it does need to be there or they'll glitch out.

Copy link
Author

Choose a reason for hiding this comment

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

Interesting!
Why is it not there for volt absorb then?

Copy link
Collaborator

Choose a reason for hiding this comment

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

For whatever reason it was working properly with Volt Absorb IIRC, but not Lightningrod/Motor Drive.

Copy link
Author

Choose a reason for hiding this comment

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

Added the fix for waterabsorb-like abilities, also left a comment to not wonder what's up in the future

@kleeenexfeu kleeenexfeu changed the title fix multi hit/stormdrain-like interactions [Not ready yet] fix multi hit/stormdrain-like interactions Nov 30, 2021
@kleeenexfeu kleeenexfeu marked this pull request as draft December 2, 2021 08:24
@kleeenexfeu kleeenexfeu changed the title [Not ready yet] fix multi hit/stormdrain-like interactions [battle_engine] fix multi hit/stormdrain-like interactions Dec 2, 2021
@ghoulslash ghoulslash added the category: battle-mechanic Pertains to battle mechanics label Dec 2, 2021
@kleeenexfeu kleeenexfeu closed this Dec 3, 2021
@kleeenexfeu kleeenexfeu deleted the be_fix_multi_stormdrain branch November 1, 2023 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: battle-mechanic Pertains to battle mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants