pokemon-showdown/test/sim/abilities
Guangcong Luo 6a677e39e8 Fix Emergency Exit timing
This is a really hacky implementation of Emergency Exit, but Emergency
Exit itself is a huge mess on cart, too.

Our previous implementation:
- activated Emergency Exit at AfterMoveSecondary timing for move damage
- activated Emergency Exit immediately after dealing any other damage

This new one:
- activates Emergency Exit only in three situations:
- right after AfterMoveSecondary timing, for move damage
- right after DamagingHit timing, for DamagingHit residual damage
  (Rough Skin, Iron Barbs, Rocky Helmet)
- right after the switch update, for switch-hazard residual damage
  (Stealth Rock, Spikes)
- does not otherwise activate (so Substitute, Hail, Toxic, etc no
  longer activate Emergency Exit)

This should much accurately simulate Emergency Exit behavior, including
most famously timing it after healing berries after hazards, as
documented in:

https://www.smogon.com/forums/threads/pokemon-sun-moon-battle-mechanics-research.3586701/#post-7075354

Fixes #6309
2020-02-08 08:07:39 -08:00
..
aftermath.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
angerpoint.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
arenatrap.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
battlearmor.js Refactor battle.dex out of battle (#5851) 2019-10-06 07:38:08 +11:00
clearbody.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
cloudnine.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
colorchange.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
comatose.js Refactor battle.dex out of battle (#5851) 2019-10-06 07:38:08 +11:00
contrary.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
damp.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
dancer.js Make moves called by Dancer target properly (#5616) 2019-07-16 21:15:05 -04:00
deltastream.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
desolateland.js Refactor battle.dex out of battle (#5851) 2019-10-06 07:38:08 +11:00
disguise.js Fix tests to run on Gen 8 instead of Gen 7 2019-12-04 13:36:37 +09:00
dryskin.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
emergencyexit.js Fix Emergency Exit timing 2020-02-08 08:07:39 -08:00
flashfire.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
flowergift.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
flowerveil.js Moves: Fix Flower Veil + Yawn interaction when ally is already under effect of Yawn 2019-07-21 14:21:42 -05:00
iceface.js TypeScript event handler types 2019-11-18 07:02:32 +13:00
immunity.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
intimidate.js Refactor unit test battle formats again 2019-12-11 16:26:45 +09:00
klutz.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
levitate.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
lightningrod.js Refactor unit test battle formats again 2019-12-11 16:26:45 +09:00
magicbounce.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
magicguard.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
magnetpull.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
multiscale.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
mummy.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
neutralizinggas.js Another Neutralizing Gas test 2019-12-05 17:55:10 +04:00
normalize.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
parentalbond.js Refactor battle.dex out of battle (#5851) 2019-10-06 07:38:08 +11:00
pickpocket.js Fix Pickpocket interaction with switches 2020-02-02 15:02:41 -05:00
pickup.js Refactor unit test battle formats again 2019-12-11 16:26:45 +09:00
prankster.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
pressure.js Refactor unit test battle formats again 2019-12-11 16:26:45 +09:00
primordialsea.js Refactor battle.dex out of battle (#5851) 2019-10-06 07:38:08 +11:00
rockhead.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
roughskin.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
shadowtag.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
sheerforce.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
shellarmor.js Refactor battle.dex out of battle (#5851) 2019-10-06 07:38:08 +11:00
shielddust.js Refactor battle.dex out of battle (#5851) 2019-10-06 07:38:08 +11:00
simple.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
stickyhold.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
stormdrain.js Refactor unit test battle formats again 2019-12-11 16:26:45 +09:00
sturdy.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
suctioncups.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
symbiosis.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
thickfat.js Refactor battle.dex out of battle (#5851) 2019-10-06 07:38:08 +11:00
truant.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
unaware.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
unburden.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30
wonderguard.js Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30