See #5415 for context - having these methods is unsafe and leads
to crashes because not all ActiveMoves are created through the
Data.ActiveMove constructor. Instead of Pokemon, these could
alternatively be static methods on ActiveMove (or the ActiveMove
class could be completely abolished and reverted back to an
interface), but #5415 will deal with ActiveMove long term, this just
fixes the crashes.
- Only give Porygon-Z Z-Conversion under the right circumstances
- Slightly reduce the rating of Download so Porygon gets Adaptability a bit more
- Improve Haxorus' movepool
- Remove unviable Genesect sets
- Allow U-turn as the only STAB on Genesect
- Improve Magearna's movepool (+Fairium Z)
- Don't reject Flash Cannon with Special setup
- Give Fairies STAB when they need it
- Set Shift Gear as a Speed setup move
- Change the Life Orb bulk requirement to match Focus Sash
- Reject Trick with Speed setup
Fixes Drapion, who has 3 different moves with a rating of 1. Keen Eye is
less useful than Battle Armor or Sniper because of a lack of accuracy
reduction moves in random battle, so this ensures that it is not chosen.
Problem: Parental Bond when changed to Mummy midstrike would cause the second move to miss the .25 base power modification
Added Parental Bond check in Mummy to maintain the power modification
The types Template, Move, Ability, and Item are now read-only. This
should guard against accidental writing to types that shouldn't be
written to.
A new type, ActiveMove, has been introduced. Like it sounds, it's
used for moves that are currently actively being used. A lot of
attributes that are only relevant to active moves, such as
`hasBounced`, are now only available on ActiveMove, not on Move.
ActiveMoves are mutable, unlike Moves.
getMoveCopy has been renamed getActiveMove, to better reflect its
role. `isCopy` has been deprecated, and distinguishing Moves from
ActiveMoves is now done by `typeof move.hit === 'number'` where
necessary.
ActiveMoves now internally track which hit of a multihit move
they're on, in move.hit, so move.hit doesn't need to be manually
incremented by Triple Kick and Parental Bond anymore.
move.hasParentalBond has been replaced by a more generic
move.multihitType.