Bill Meltsner
b7f0f88d9b
Upgrade several more move-related messages
2012-03-29 21:58:17 -05:00
Guangcong Luo
b5cba2933b
Implement the healing message on heal moves
2012-03-29 17:49:45 -04:00
Bill Meltsner
391ed6efbd
Modify selfB.add to generate the proper log message format from the passed arguments.
2012-03-29 04:04:48 -05:00
Guangcong Luo
8e54290457
New toId function to match new IDs
2012-03-29 03:07:16 -04:00
Guangcong Luo
bff08efaa6
Use p1 and p2 properly in move command
2012-03-29 02:35:48 -04:00
Guangcong Luo
8f1bc5d8d9
Correct location of pipe in move kwargs
2012-03-29 01:57:56 -04:00
Bill Meltsner
c444fa7545
Begin converting to the new log format, with the move message.
2012-03-29 00:25:05 -05:00
Guangcong Luo
38ba706f1b
Check PotD template validity before continuing
2012-03-28 23:32:43 -04:00
Bill Meltsner
7674969270
Fix PotD letting two of the same Pokemon be on a team.
2012-03-28 16:27:31 -05:00
Bill Meltsner
cd41ce3b64
Fix False Swipe.
2012-03-27 03:11:16 -05:00
Bill Meltsner
783f70f83f
OHKO moves gain accuracy when the user's level is higher than the target's.
...
Also, OHKO failure due to the user's level being lower than the target's is now reported to the client.
2012-03-25 15:37:01 -05:00
Bill Meltsner
743e0f6a76
Rename the "Limbo" tier to "NFE", and re-tier its Pokemon to match Smogon's data.
2012-03-25 14:53:26 -05:00
Guangcong Luo
a9cdc89313
Fix some typos in the TryHit event documentation
2012-03-24 21:52:33 -04:00
Guangcong Luo
66c50f7f73
Some more fixes to make sure Substitute behaves properly
2012-03-24 21:14:31 -04:00
Guangcong Luo
771bbf3c77
Fix a crash from checking immunities during a Substitute
2012-03-24 20:17:30 -04:00
Guangcong Luo
4a6c726c48
Two more move event changes:
...
- Immunity checking happens after TryHit events now
- Only moves that target all adjacents will selfdestruct on failure
2012-03-24 19:51:14 -04:00
Guangcong Luo
3dad213e95
Don't run TryHit if the move fails.
2012-03-24 19:45:23 -04:00
Guangcong Luo
0be246f39f
Revise TryHitField/HitField and update comments accordingly
2012-03-24 17:14:16 -04:00
Guangcong Luo
42a66e3bd1
Redo the hit events entirely
...
(also add a ton of documentation so bmelts doesn't get them wrong again. :P )
2012-03-24 16:58:56 -04:00
Bill Meltsner
11fb841ae8
Call FieldHit on moves which target all.
2012-03-24 11:28:32 -04:00
Bill Meltsner
e192e6eb28
Properly fix singleEvent('ModifyMove').
2012-03-24 01:44:28 -04:00
Bill Meltsner
829d4d7af2
Get rid of typeCallback - any type modification should be done in onModifyMove instead.
...
Also, fixed the singleEvent('ModifyMove') call to have the move as its first argument, like its runEvent counterpart.
2012-03-24 01:27:12 -04:00
Guangcong Luo
5eeb6341f0
Lots of event changes:
...
- Remove the SecondaryHit, SecondarySelfHit, and SelfHit events: these were most
ly useless
- ModifyMove is now also a move event: it replaces the aforementioned events
- Rename Hit and FieldHit to TryHit and TryFieldHit
- Introduce a new Hit event that occurs after everything else
2012-03-23 23:53:56 -04:00
Guangcong Luo
0c6e423de9
Fix bmelts' crash ;)
...
- Move .used = true to simulator.js, and check to see if the move exists first
2012-03-18 00:29:33 -04:00
Guangcong Luo
7265e69999
Refactor: lastHitBy is now lastDamagedBy
...
- now tracks total damage of multi-hit moves, not just last hit
- the rename is meant to reflect this
2012-03-16 22:40:37 -04:00
Bill Meltsner
933c7d676e
Add AfterMove and AfterMoveSelf events.
...
These might need a more descriptive name - they only execute for a move that the user selects (or is forced into), because they run in runMove instead of useMove. I've also never messed with the event system before, so I don't know if I'm actually doing this right. But they seem to work.
2012-03-14 19:56:15 -04:00
Bill Meltsner
a56274f3f8
Mark a move as used when runMove isn't interrupted.
2012-03-14 19:48:48 -04:00
Bill Meltsner
56d98a0739
Make PP deduction happen before useMove executes.
...
This is closer to how the game actually handles the order of actions when making a move, and enables Trump Card to function properly.
2012-03-14 19:48:06 -04:00
Bill Meltsner
b337895afc
Fix Circle Throw and Dragon Tail to be contact moves, and fix forceSwitch to not trigger when either the user or the target have 0 HP (e.g. someone uses Circle Throw but faints that turn due to Iron Barbs).
2012-03-11 19:23:39 -04:00
Bill Meltsner
f283b269c2
Return false from moveHit if the target is immune to the move.
...
This fixes a bug with Focus Punch where getting "hit" by a move the user was immune to would still interrupt the punch.
2012-03-11 14:17:48 -04:00
Bill Meltsner
21be1f4ae9
Automatically create move.secondaries in getMove if necessary, to simplify secondary checking.
2012-03-10 20:48:37 -05:00
Bill Meltsner
2acdf083c4
Use move.secondaries for multiple secondary effects, instead of overloading move.secondary.
2012-03-10 20:28:28 -05:00
Bill Meltsner
9c2857c526
Add support for moves to have multiple secondary effects. (Largely for the Fangs.)
2012-03-10 20:04:13 -05:00
Guangcong Luo
27cfaa7b58
Don't apply immunities for secondary/self-hits of moves
2012-03-06 16:15:21 -05:00
Guangcong Luo
72f18cea2a
Check immunities during moveHit, not before
...
- Moves bounced by Magic Bounce still check immunities
- Moves called by Metronome, Assist, etc, too
2012-03-06 12:28:00 -05:00
Guangcong Luo
8b882a3d7a
Healing should fail if target is at full health.
2012-03-06 11:02:16 -05:00
Guangcong Luo
3b5a0546ef
Fix Magic Bounce
...
- More than one move can be bounced per turn now (each move is still bounced a maximum of once)
- Introduces a new function: Tools.getMoveCopy, which replaces the previous system of cloning the move object. It still clones the move object, just more abstractedly.
2012-02-27 13:51:55 -05:00
Guangcong Luo
ce0f90c703
Fix a crash from invalid template
2012-02-18 07:28:37 -05:00
Guangcong Luo
42aacaf982
CAP pokemon are now correctly level 74 instead of level 90.
2012-02-08 17:53:11 -05:00
Guangcong Luo
a42f25c016
Add support for four new move flags:
...
- ignoreAccuracy, ignoreEvasion, ignoreOffensive, ignoreDefensive
These abstract out crit functionality, and also allow support for things like Sacred Sword
2012-02-05 05:48:00 -05:00
Bill Meltsner
0484284367
Should hopefully fix Iron Barbs, and some other ability/item effects, triggering through Protect.
2012-01-25 20:56:49 -05:00
Guangcong Luo
682917d4ae
Give Delibird Bestow as well as Present, and make it always have Leftovers. _Really_ early preparation for Delibird PotD next Christmas. :P
2012-01-02 02:25:03 -05:00
Guangcong Luo
fe0369763a
Implement Delibird, and make the default Delibird have only Present
2011-12-31 19:40:08 -05:00
Guangcong Luo
b9699e9347
Change the Hit event of moves targeting foeSide or allySide to actually target the side instead of the pokemon. Fixes the bug where hazards fail when the foe's pokemon is fainted.
2011-12-23 19:20:49 -05:00
Guangcong Luo
4ce2d95037
Everything I did before moving to Git
2011-12-22 23:53:05 -05:00