The full description is in the comments of the Endless Battle
Clause entry in rulesets.js.
This update fixes a lot of the issues with yesterday's version.
Also included: A minor refactor of deductPP, which did not need
a success variable.
Rainbow Road is a Mario Kart and color themed seasonal.
Every few turns, a player can get an item that changes the course of the
battle, such as a Mushroom to increase speed.
Pokemon also get color moves that are super-effective on certain other
colors.
- Reject Sunny Day if the Pokemon lacks an ability that benefits, and
lacks SolarBeam
- Add Dark Pulse to Pyroar to fix the issue raised in #2063
- Reordered the Status cases to weather/status/recovery/other instead
of just alphabetical
Implement new function getMoveTargets to list all move targets given a
user and a move. Refactor Battle system to remove redundancies with
checking move targets. Run the RedirectTarget in this function instead of
later after TryMove, since technically single-target moves changing
targets should occur before the move is attempted.
Refactor the DeductPP event to be a singleEvent that targets the Pokemon's
ability instead of a global event. Run this event on the move's targets as
calculated by BattlePokemon#getMoveTargets.
Add a new event ModifyAccuracy that affects all moves other than OHKO
moves and switched many event handlers that originally used the Accuracy
event to ModifyAccuracy instead.
- On failure, they will no longer trigger the `AfterMoveSecondarySelf` event. It was a common pattern to check for success on its handlers, so this removes some duplication.
- All failed moves will now run any set `MoveFail` single events.
- Life Orb will now harm the holder if a successful attack did 0 damage (e.g. False Swipe on a 1 HP target).
Added BattlePokemon#isGrounded to check for the grounded-ness of a
Pokemon. Also BattlePokemon#isSemiInvulnerable for whether a Pokemon is
in the first turn of a two-turn move that makes them semi-invulnerable.
Fixed Terrain bugs involving Pokemon in a semi-invulnerable state.
Changed OHKO move check to use BattlePokemon#isSemiInvulnerable, fixing a
graphical bug that would display an immunity message when a Pokemon
attempted an OHKO move on a higher-leveled Pokemon that was being held by
the effect of Sky Drop.
Fixed Misty Terrain bug that was causing Rest and the effect of Yawn to
put Pokemon to sleep.
Fixed Misty Terrain bug that was causing Yawn to fail.
Fixed Electric Terrain bug that was causing Yawn to succeed.
Instead of having a hardcode in scripts.js that people needed to
reference, it seemed more intuitive to take advantage of the Damage
event instead, and have Rock Head negate damage within the event.
Fixed a bug in Gen-NEXT Rock Head exhibiting the same behavior that
was causing the original Rock Head + Mummy glitch.
- Removed Trick/Gyro Ball checks as no Pokemon uses that combination.
- Reject Life Orb on Pokemon with 55 or less base Speed.
- Add a check for slow and strong Regenerator Pokemon to receive Assault
Vest, at slightly higher priority than Sitrus Berry.
- Reject teams significatively weak to a single attack type.
- Improve rejection of multiple megas.
- Reject weather-based abilities without their associated weather.
In place of Challenge Cup 1v1. Challenge Cup 1v1 under the new Challenge
Cup rules (f73ea6a0ea) isn't a good
format. It's supposed to have some competitive element in that you can
make predictions on what an opponent might have to beat your "best"
choice and as a result you can counter-pick. But with the new Challenge
Cup, that goes out the window.
This adds a slightly updated version of the old CC generator.
- CC now follows Hackmons mechanics to differentiate it from Random
further (in other words, CC is now Hackmons CC)
- Took this opportunity to finally rename CC 1v1
- Commented out Gen 1 CC