Move results are now passed all the way up to the useMove script.
It's now possible to tell from within useMove whether or not the move
succeeded.
This fixes a bug where successful Memento and Healing Wish were
considered to have failed and so didn't cause the user to faint.
Currently, if a burned Pokemon explodes in doubles, all targets except
the first will take full damage, because it's fainted (and no longer
burned) by the time those damage calculations are done.
The correct solution is to do all damage calculations before dealing
any damage, which I will do someday. Today is not that day.
Today, we move fainting the Explosion user to after damage is dealt.
Which, aside from making the faint order wrong, doesn't really have
any other consequences, and is better than the current buggy
damage calculation.
Specifically, the TryFieldHit event no longer exists.
Instead, Magic Bounce has separate event handlers for TryHit and
TryHitSide.
This also fixes it so Magic Coat/Bounce happen before ability
absoption (like Water Absorb).
Gems now boost all hits of a spread move.
This introduces a new event BasePowerMultiplier, so that gems actually
activate at the right time now.
The name is similar to basePowerModifier but they do the same thing
anyway. We should probably figure something out for their naming,
though.
- Add Hustle counter
- Prevent a few move combinations
- Prevent Simple without a boosting move
- Prevent Swift Swim/Chlorophyll without Rain Dance/Sunny Day
- Set Combee's ability to always be Honey Gather
- Set Deoxys-D and Deoxys-S to level 74
- Healing Wish and Lunar Dance fail correctly when the user is the last
Pokemon.
- Final Gambit and Memento don't faint the user when used against a
Protecting target.
- Prevent Baton Pass with Switcheroo/Trick
- Prevent Fiery Dance with Fire Blast (Volcarona)
- Prevent SolarBeam without Sun
- Prevent Bolt Strike with Fusion Bolt (Zekrom)
Added the random team selection for the new Seasonal ladder for
February Valentine Venture (randomSeasonalVVTeam).
It's a doubles ladder that chooses three couples for each player.
- Random battles and automatic detection sets Hidden Power IVs correctly
- Hidden Power now always does damage based on user's IVs
- User's Hidden Power base power is now reported
- Reject Relic Song with setup
- Reject Encore/Pursuit/Stealth Rock/Sucker Punch with RestTalk
- Reject Hydro Pump with Razor Shell/Scald
- Reject Flamethrower with Blue Flare
- Reject Bonemerang/Earth Power with Earthquake
- Make Wynaut/Wobbuffet get Custap Berry 50% of the time with Destiny Bond
- Add the possibility of getting Lum Berry with Outrage
- several pokemon receive level adjustments
- Guts and Tinted Lens should be slightly less common
- Sheer Force is now filtered (will not be chosen without a move that benefits from it
- Bidoof now gets Moody for the lulz
In the event that the user and target get KOed in the same turn (Life Orb recoil, Iron Barbs, etc.), make sure the user isn't forced to switch to another Pokemon before the opponent chooses a replacement.
Two-turn moves are now controlled by a volatile, twoturnmove, which determines whether a Pokemon executes the charge turn or the move turn of a two-turn move. This handles mechanics like Truant Pokemon being unable to use two-turn moves, as the execution turn is their truancy turn. It also handles various edge cases involving moves that call other moves (e.g. Metronome) and Encore.
These changes add a new event, onChargeMove, in which one can return false to "skip" the charging turn and execute the move in full immediately. For example, Solarbeam returns false in onChargeMove if the weather is sunny, and Power Herb returns false if the Pokemon uses its item successfully. (Actually, those are the only two examples at present.)
This implementation is complete except for one issue, an inversion of a previous problem: whereas before, moves like Assist calling two-turn moves would execute them immediately, now, only the charge turn will be executed, and the Pokemon will not be locked into the move. This is due to be fixed soon.
- teams were passed around a lot more haphazardly before
- a race condition may have caused the team issue in LC earlier
- teams are now passed very carefully from search to battle start
A move cannot "miss" if there is no target, and if the target is immune to an attack, the game always displays the immunity message - the move will never register as "missing".
This fixes a bug where a Pokemon with a type-absorbing ability (e.g. Volt Absorb) behind a Substitute would not absorb status moves (e.g. Thunder Wave) - they'd be blocked by the Substitute before the immunity check was ever run.
There is still a graphical glitch where if a move fails its accuracy check against an immune opponent, the animation will still be that of the move missing, even though the text will be the immunity text. I'm not sure how to fix that given the current move message format.
- the original names BattleItems etc have been deprecated; please use:
- Tools.getItem() accessor method if possible
- Tools.data.Items for lower-level access (e.g. iteration)
- app.js was also rearranged a bit