question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve Dynamax/Max-Move support

See original GitHub issue

https://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:open
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Marty-Dcommented, Apr 21, 2020

but from the sounds of it even research doesn’t know where all of those places are?

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

0reactions
Amaterasu5commented, Aug 9, 2020

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: Screen Shot 2020-08-07 at 9 53 02 PM

Read more comments on GitHub >

github_iconTop Results From Across the Web

Raihan looks like a setup for Dynamax Max Move Effects
Max Steelspike boosts defense and activates Tough Cookie. This was a really odd grid tile on first glance since Raihan didn't have any...
Read more >
NinjaPikachu56 (@NPikachu56) / Twitter
In addition to educating people about autism better, we need to do a better job at educating autistic people. Our schools' abilities to...
Read more >
A very casual Blind Shield Written Log/Screenshot Run - Final ...
... as useful as your regular Dynamax Max Move...So honestly, the Dynamax versions are actually often better than the Gigantamax versions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found