Improve Dynamax/Max-Move support
See original GitHub issuehttps://www.smogon.com/forums/threads/sword-shield-battle-mechanics-research.3655528/
Original Max HP
- It appears effects which deal damage or heal in fractions of max HP do so by calculating with the original max HP
This is difficult, because right now Pokemon#maxHP
looks like
/* get */ maxHP() {
return this.isDynamaxed ? this.rawStats.hp * 2 : this.rawStats.hp;
}
We need to add an originalMaxHP
method:
// Effects which deal damage or heal in fractions of max HP do sousing the original max HP
// (https://www.smogon.com/forums/threads/sword-shield-battle-mechanics-research.3655528/)
/* get */ originalMaxHP() {
return this.rawStats.hp;
}
I don’t know everywhere this applies in the damage calc. in gen78.ts
it seems fairly straightforward (though I could be wrong), but the difficult comes in desc.ts
where recoil/healing/weather effects damage etc is taken into account.
SEE BELOW
@Lusamine @Marty-D @DaWoblefet might be able to help us here to figure out when we should be using which HP
Brine deals double damage based on the Dynamax HP (Anubis)
Huh? I would have naively just changed this check to use the defenders original max HP:
(move.named('Brine') && defender.curHP <= defender.maxHP() / 2) ||
But this seems to contradict that?
Choice Band
- Choice Band/Scarf/Specs move lock and stat boosts are ignored during the effect (Anubis)
Shedinja
- Shedinja still has 1 max HP during the effect even if its Dynamax Level is maxed out (DaWoblefet)
Gorilla Tactics
- Gorilla Tactics has no effect during Dynamax (Anubis)
I think we make a stab at implementing this, but its gotta be wrong - why is this not checking attacker.isDynamaxed
?
(attacker.hasAbility('Gorilla Tactics') &&
!['Gmax', 'Dynamax'].some(s => attacker.name.includes(s)))
Max Guard
- Deal 1/4 damage through protection moves other than Max Guard (Anubis and DaWoblefet
G-Max EOT
In progress: https://github.com/smogon/damage-calc/pull/395
-
G-Max Wildfire’s end of turn damage is 1/6 max HP (Anubis)
-
G-Max Finale heals 1/6 of active allies’ max HP, and does take into account the Dynamax max HP unlike other fractional healing effects (SolaceAcheron)
-
G-Max Centiferno and G-Max Sandblast start the Fire Spin and Sand Tomb effects, respectively, on both opponents, even if they have substitutes (Anubis), but the trapping and damage continues even if the user leaves the field. (Tangrowth_Fan) Both effects last 4-5 turns or 7 turns with Grip Claw. It appears both opponents receive the same turn count. (Anubis)
These would need to be implemented in desc.ts
given they are EOT
Sheer Force
- Sheer Force does not power up the moves or remove the effects (SadisticMystic)
-ate Moves
- -ate moves should change typing while Dynamaxing, but should not get any increase in base power.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top GitHub Comments
Not off the top of my head! 😉 Given an effect and the above understanding of HP stuff, it can be figured out:
Does the effect check only one of current HP or max HP? --> use original HP Does the effect check both current HP and max HP? --> use original or Dynamax HP, just be consistent Is the effect G-Max Finale’s 1/6 healing? --> use Dynamax HP
Hey! I’m not sure if this belongs here, but based on the thread title, it appears that it would. The calc currently doesn’t handle max weather ball and terrain pulse correctly, where they should change into the max move corresponding to the weather and gain the damage+weather boost as well. I’ve attached a photo: