Commit Graph

159 Commits

Author SHA1 Message Date
Guangcong Luo
125ede327f Gen next changes:
- several bugfixes and new features
- see GEN-NEXT.md for details
2012-07-06 16:50:20 -04:00
Guangcong Luo
ec48d36721 Gen NEXT changes:
- Too many to list. See GEN-NEXT.md for details
2012-07-06 03:31:19 -04:00
Guangcong Luo
d04d502f96 Fix a crash when deducting HP from an unspecified source 2012-07-06 02:22:05 -04:00
Guangcong Luo
f8170aa348 Make sure drain/recoil works correctly against Substitute 2012-07-05 21:01:13 -04:00
Bill Meltsner
bb50802365 Fix Intimidate's message.
We already have the "X intimidates Y!" message, that provides enough context for a straight stat drop - plus, that's how the game actually does it (albeit with an ability activation animation instead of an explicit message).
2012-07-03 05:13:36 -05:00
Bill Meltsner
39c4cd7988 Fix illusion being set to null. 2012-07-03 01:21:49 -05:00
Bill Meltsner
bdf4acda55 Fix Trace, for real this time. Honest. 2012-07-02 20:07:00 -05:00
Bill Meltsner
a133ff8037 Rewrite Illusion to run on its own event.
Fixes issues with timing and switching to an Illusion Pokemon when that Pokemon is last in your team.
2012-07-02 20:06:57 -05:00
Guangcong Luo
a23e4ec763 Limit names to 20 characters 2012-07-02 15:15:04 -04:00
Guangcong Luo
5cfa9fdd03 Report real HP values for pokemon on your own side 2012-07-02 01:36:34 -04:00
Guangcong Luo
bfe864ca0f Fix crash when getTarget is called before resolveTarget 2012-06-29 20:43:38 -04:00
Guangcong Luo
4001463370 Only show debug messages in debug mode 2012-06-23 00:59:42 -07:00
Guangcong Luo
b12702aa23 Fix for the U-turn fix... 2012-06-22 16:15:23 -07:00
Guangcong Luo
b9071e6ded Fix the U-turn race condition bug 2012-06-22 14:35:24 -07:00
Guangcong Luo
96ace339c8 Make sure the correct mod is loaded in a battle 2012-06-16 22:49:19 -07:00
Guangcong Luo
cb4aae18a3 formats.js can now list alternate gens 2012-06-16 15:50:34 -07:00
Bill Meltsner
acc8ea5c3c Update Pokemon *before* they're switched in.
This fixes Illusion.
2012-06-14 23:17:59 -05:00
Bill Meltsner
a5a658ab18 Update Pokemon as they're switched in.
Fixes Flying-types not being hit by (t)spikes under Gravity.
2012-06-14 19:17:17 -05:00
Guangcong Luo
cbde94b6a6 Let Tools install itself and scripts into Battles 2012-06-13 22:25:26 -07:00
Bill Meltsner
9bbb0b8d56 Convert battles to use the new, cartridge-simulating RNG.
Non-battle randomness is still based off of Math.random().
2012-06-12 03:47:14 -05:00
Bill Meltsner
bf779986bc Add Battle.random, an implementation of the cartridge PRNG. 2012-06-11 20:42:10 -05:00
Bill Meltsner
95a1f6d49d Clear volatiles on switch out instead of switch in.
This has the same practical effect, but is slightly more intuitive and keeps the client better informed. For example, if a Pokemon used Skill Swap and then switched out, previously it would still display the swapped skill on mouseover; now, it displays the original skill, as it should.
2012-06-10 07:07:26 -05:00
Bill Meltsner
f4677c8535 Keep pokemon.moves in sync with pokemon.moveset. 2012-06-10 07:04:02 -05:00
Guangcong Luo
7009b3a4bb Revert bmelts's hasty porting of Id etc to Sugar.js extensions
- The reverted utility functions, toId/toUserid/sanitize/clampIntRange, were designed to handle unsanitized data gracefully
2012-06-08 15:44:49 -07:00
Bill Meltsner
eae2317b79 Confusion should not be able to crit. 2012-05-28 14:49:09 -05:00
Bill Meltsner
c62d923f73 Fix a bug with the new prototype functions.
There will probably be more of these.
2012-05-24 13:13:27 -05:00
Bill Meltsner
4f729aae7f Refactor most utility functions (toId, clampIntRange, etc.) into Sugar extensions of the relevant objects. 2012-05-24 01:41:01 -05:00
Bill Meltsner
47401b9e2b Streamline and simplify the boosting function. 2012-05-23 16:15:04 -05:00
Bill Meltsner
11e8cd7602 Fix healing to be closer to the (highly idiosyncratic) games:
- Most healing is rounded down, except moves that heal directly (e.g. Recover and Heal Pulse) and draining moves, except Leech Seed
- Big Root rounds the boosted result half down (i.e. values <= 0.5 are rounded down, values > 0.5 are rounded up)
2012-05-23 14:51:38 -05:00
Guangcong Luo
3c444d3030 Use Sugar implementations of clone and shuffle, instead of rolling our own 2012-05-16 21:56:30 -07:00
Bill Meltsner
9301e2c6aa Replace custom objectKeys function with the native Object.keys function. 2012-05-16 04:56:41 -04:00
Bill Meltsner
3d74e7034f Add a new event, TrySecondaryHit.
This event behaves much like TryHit, except it's only called on the secondary effect(s) of a move, and only when it affects the target, not the user.

It is also suppressed by Mold Breaker.
2012-05-14 18:11:07 -04:00
Guangcong Luo
5f31554ef9 Fix Pressure 2012-05-12 18:12:20 -04:00
Cody Thompson
5edd404cff Fixed bug in damage calculation
- Bug removed randomness from damage dealt
2012-05-09 13:41:41 -04:00
Guangcong Luo
10df844fd8 New Baton Pass implementation:
- now works properly when called by Copycat, Metronome, etc
2012-05-07 22:35:29 -04:00
Guangcong Luo
c751e3f843 Show the correct Hidden Power type when Transforming. 2012-05-05 03:42:49 -04:00
TheImmortal
bfab555b9f Undo lastItem fix 2012-04-26 01:37:54 +04:00
Bill Meltsner
40d2c22346 Check for immunity when adding new volatiles. 2012-04-25 00:15:02 -04:00
Guangcong Luo
da67b7e32a Add a Battle.tie() function
- does exactly what you think
2012-04-19 12:13:21 -04:00
TheImmortal
f1b7ed74f5 lastItem Fix 2012-04-18 23:41:40 +04:00
小太
e7f5c157ab Merge remote-tracking branch 'upstream/master' into fixes3
Conflicts:
	abilities.js
	simulator.js
2012-04-17 15:23:17 +10:00
Guangcong Luo
6cefa1955a Fix the battle freeze bug once and for all
curCallback should no longer ever be empty before the end of a battle
2012-04-17 01:17:11 -04:00
小太
f03d2f516f Proper four spaces -> single tab 2012-04-16 14:22:08 +10:00
小太
33162d2501 Revert "Four spaces -> Single tab"
This reverts commit 8f8d387f56.
2012-04-16 14:09:07 +10:00
小太
aee9a0b41a Remove a bit of whitespace from the previous commit 2012-04-16 13:39:54 +10:00
小太
f9a9d5543b Fix a few bad replaces 2012-04-16 13:37:47 +10:00
小太
8f8d387f56 Four spaces -> Single tab 2012-04-16 12:55:40 +10:00
小太
dfca43114d Move braces to the same line as their control statements 2012-04-16 12:54:03 +10:00
小太
64d876f1ca Begone, trailing whitespace!
Also converted all line endings to UNIX format
2012-04-16 12:03:15 +10:00
Bill Meltsner
5e1620a0f9 Implement Hidden Power properly.
When a Pokemon is created (i.e. when a battle begins), its Hidden Power type and base power are calculated from its IVs. The base "Hidden Power" move will use those.

"Hidden Power [Type]", however, still bypasses the system entirely.
2012-04-14 17:37:09 -04:00