-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix Gen 4 interaction between U-turn/Substitute/Intimidate #5222
Conversation
From UPC, it seems like this could in fact just be a special interaction with U-turn and Substitute, not something more general
|
…bstitutebroke' volatile
source.lastDamage = damage; | ||
if (target.volatiles['substitute'].hp <= 0) { | ||
target.removeVolatile('substitute'); | ||
target.addVolatile('substitutebroken'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three lines are the only ones that changed - shame to have to copy the rest of effect
from Gen 5.
@@ -50,6 +50,12 @@ let BattleStatuses = { | |||
return false; | |||
}, | |||
}, | |||
substitutebroken: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah.... Not super keen on having added a new volatile....
Hmm, I'm not sure if If p2a has a substitute from a previous turn, p1a breaks it with U-turn and switches into whatever, p1b uses Baton Pass or U-turn against anyone and brings in something with Intimidate, it works against p2a. |
Was not aware of this. Switched to special casing gen 4 in |
We can also show hint messages to exactly one side, using |
Alright, I think I did that (I copied the pattern from Gen 3 Pressure)? On my other PR I also wanted slightly fancier hints, so i extracted this out to a Battle method I can migrate these to. |
Originally posted by @Marty-D in #2367 (comment)
Alright, it seems like my options here are to edit U-turn, Substitute or Intimidate. Some thoughts:
I don't think U-turn + sub interaction should be special cased (whether its a U-turn move listener checking for the substitute or the sub checking to see if it was broken by U-turn). It seems too niche. The behavior seems like it should be innate to Substitute and midturn, not to U-turn? Maybe the question is: what happens in a double battle on a turn like:
Would
p1a
's attack be reduced in Gen 4 in this scenario where the Intimidate user was dragged in on the middle of the turn wherep1a
's sub broke? (though the ordering differences of dragged in vs. uturn might be an important distinction that im glossing over)leave the
substitute
volatile around until end of turn after it is broken (just with 0 HP) so that it still blocks the Intimidate. I'd need to add logic to make sure the sub faded animation still occurs, as well as make sure Intimidate checks to target's sub HP to know whether it should display a-hint
instead of the-immune
message. However, I'm not sure whether Intimidate even activates in this case (ie/ whether there should be an-ability
message) - from the thread it looks like it shouldn't activate at all? I'm also not keen on leaving thesubstitute
volatile around, I feel it could break things, as everything would then need to check for sub hp etcadd some kind of
subbroken
volatile if the sub was broken that turn (removed at end of turn), and look for that inIntimidate
. Adding a new volatiles feels contrived.So yeah, not really sure about the best way to fix this, not a fan of most of the approaches I can think of. Starting this PR as a draft looking for ideas before I dive in deeper, the the worst case I can't figure out anything and I can at least submit a pending test to help document our bugs.