Commit Graph

23714 Commits

Author SHA1 Message Date
Bill Meltsner
9e16cbcec8 Fix Future Sight hitting through Psychic immunity.
Also fix the future move hit message.
2012-06-03 17:01:44 -05:00
Guangcong Luo
f0e134a0ac Revert bmelts's security fix (This should actually be fixed in the login server) 2012-06-03 14:07:56 -07:00
Bill Meltsner
a2be12e5b3 User renames now rely on the information provided by the login server, instead of blindly accepting the user's input. 2012-06-03 15:47:21 -05:00
Bill Meltsner
caaef761cf Restore individual case-checking for user IDs in the 'challenge' message. 2012-06-03 15:27:46 -05:00
Bill Meltsner
c63593fdd7 Stylistic cleanup. 2012-06-03 13:47:35 -05:00
Bill Meltsner
a38f78d53b Take more caution with what we accept from the client. 2012-06-03 13:46:31 -05:00
Bill Meltsner
a5f553246a Improve DW legality checking for male-only released Pokemon.
When a Pokemon has been released but its prevos haven't (e.g. Mamoswine and Lucario), it can't learn any moves exclusive to its prevos. For instance, DW Mamoswine can't learn Ice Shard.
2012-06-03 13:42:57 -05:00
Cody Thompson
67dc6cfae5 Enabled more DW released Pokemon
- Happiny / Chansey / Blissey
- Porygon / Porygon2 / Porygon-Z
2012-06-03 10:03:30 -04:00
Bill Meltsner
7499f3f81c Limit the size of the server-side chatlog.
We're now only keeping the last 100ish messages (100 plus any that arrived between updates). There's really no good reason to keep the entire thing in memory. This should also hopefully mitigate some of the lag issues.
2012-06-02 15:49:33 -05:00
Cody Thompson
3297296c91 DW Male-Only Lucario is released 2012-06-02 09:58:07 -04:00
Guangcong Luo
048d06239e Chat throttling implemented
Happens mostly in users.js. Now, chatting is proxied through users.js, which handles throttling.
I tried to write my code to avoid race conditions, but I'm not entirely sure if I succeeded.
2012-05-31 02:42:52 -07:00
Guangcong Luo
af08b9a2fc Refactor users.js again
This time, we're using an IIFE.
Ostensibly, it's so classes can have static private data in their own scope.
Really, it's so each class gets its own block, which also makes cold folding nice.
2012-05-31 02:42:51 -07:00
Bill Meltsner
7b976eaca6 Trace cannot copy Illusion. 2012-05-30 16:30:09 -05:00
Bill Meltsner
cb1264ff55 Merge branch 'prototype-party' 2012-05-28 20:57:19 -05:00
Bill Meltsner
eae2317b79 Confusion should not be able to crit. 2012-05-28 14:49:09 -05:00
Guangcong Luo
5063cdb9e1 Merge pull request #58 from RisingDusk/master
Curse (Not Ghost) now works properly with no target
2012-05-27 18:07:47 -07:00
Cody Thompson
8846475f46 !== not != for security 2012-05-27 21:05:12 -04:00
Cody Thompson
4bb2ff508e Fixed up previous commit to be less invasive
Use 'this' instead of passing the battle to change targets
Put back the original simulators.js to guarantee that it wasn't improperly
altered
Name the new var baseMove to match PS coding conventions
2012-05-27 19:09:02 -04:00
Cody Thompson
93b5e537bd Curse (Not Ghost) now works with no enemy out
This is actually a fairly invasive change that required changing the
.useMove and .runMove methods in scripts.js and simulator.js. I had to add
the battle itself to the argument list so that I could access the
.resolveTarget method if ModifyMove changed the targeting of the move.
Ideally, we may want to consider not even resolving the target until after
ModifyMove, but this is something we (aeo, bmelts, me) should discuss.
Feel free to respond to this commit or (preferably) AIM me.
2012-05-27 11:58:44 -04:00
Cody Thompson
15f705ea1d Fixed the order of healing and sleeping in Rest
The last commit mixed up this ordering, so I had to fix it while
maintaining the last commit's bug fix.
2012-05-27 08:58:28 -04:00
Cody Thompson
571d458af3 Fixed Rest putting Pokemon to sleep at full HP
Rest should fail at max HP before it puts the Pokemon to sleep
2012-05-27 08:41:38 -04: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
ddca317952 Change the function declaration format to User.prototype.function. 2012-05-24 12:52:10 -05:00
Bill Meltsner
87fc45987d A first shot at refactoring users.js to use the prototype.
Normally, this is used for OOP-style inheritance, but we're not really interested in that; mainly, we just want things to use less memory, and since Users are never garbage collected, sharing all those functions among the prototype should help cut down on memory usage considerably once you've got a few thousand people coming in and out.
2012-05-24 02:58:56 -05:00
Guangcong Luo
10ee41a8f9 Nothing to see here, Nintendo lawyers 2012-05-24 00:57:08 -07:00
Guangcong Luo
2c4b48224a Add !donate and /donate 2012-05-24 00:44:31 -07: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
Cody Thompson
cd4bb0fad3 Added a fix to prevent a serious abuse
There is almost assuredly a more robust solution to this, but it needs to
be at least fixed now.
2012-05-24 00:03:28 -04:00
Bill Meltsner
494c598346 Merge pull request #57 from Marty-D/master
Fix Toxic damage rounding.
2012-05-23 18:57:03 -07:00
Marty-D
ad36471917 Fix Toxic damage rounding. 2012-05-23 21:53:45 -04:00
Bill Meltsner
47401b9e2b Streamline and simplify the boosting function. 2012-05-23 16:15:04 -05:00
Bill Meltsner
5310ff23c4 Correction to last commit: healing moves (e.g. Recover, Heal Pulse) round half up (< 0.5 down, >= 0.5 up). 2012-05-23 15:38:15 -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
Cody Thompson
e9a87a965d Added a better solution to Cursed Body's crash 2012-05-22 20:32:10 -04:00
Guangcong Luo
2be06cac91 Fix crash in Cursed Body, TI <_< 2012-05-22 19:32:06 -04:00
TheImmortal
5c1715bf2d Conversion 2 implementation 2012-05-22 21:51:47 +04:00
Bill Meltsner
39570b6224 Fix the overwhelming Arceus rate in randbats. 2012-05-21 15:41:50 -05:00
Bill Meltsner
f0ca8bf19f Improve DW compatibility checking:
- DW-exclusive moves are now illegal on Pokemon without their DW ability.
- Released Pokemon with no DW ability (e.g. Gastly, Koffing, Chimecho) are checked as both DW and non-DW.
2012-05-21 11:23:32 -05:00
Bill Meltsner
a84dea12de Add Dream World moves to every released Pokemon's learnset.
Moves attained through the Dream World have a learnset code of 5D.
2012-05-21 10:45:11 -05:00
Bill Meltsner
f59053499e Prevent special PotD movesets from being used unless the Pokemon is actually the PotD.
Delibird is no longer completely useless in randbats.
2012-05-21 10:44:20 -05:00
Bill Meltsner
c8b7c8b196 Add a few missing released DW Pokemon. 2012-05-21 10:43:02 -05:00
Bill Meltsner
7374bef8ca Remove Magikarp's Revenge from Magikarp's viable moves. 2012-05-21 09:58:20 -05:00
TheImmortal
e9b02ee56e Fix some messages 2012-05-20 14:04:47 +04:00
TheImmortal
a8ad279743 Conversion implementation 2012-05-19 23:50:10 +04:00
TheImmortal
c2663677a7 Cursed Body implementation 2012-05-19 01:01:45 +04:00
Bill Meltsner
ce0f1bdf9c Merge pull request #56 from Marty-D/master
Add a shortDesc to all Abilities.
2012-05-18 08:18:25 -07:00
Marty-D
2ec27cabd5 Add a shortDesc to all Abilities. 2012-05-18 10:57:11 -04:00
Cody Thompson
dc829e81ee Fixed DW ability + mimic glitch bug in Glitchmons
Gen 1-4 PKMN with mimic glitch used to be able to use their DW abilities
with mimic glitch moves due to an incorrect check in the mimic glitch
learnset checker
2012-05-18 10:41:03 -04:00
Cody Thompson
7ae24a30c3 Glitchmons now has Unreleased banned 2012-05-18 10:14:06 -04:00
Cody Thompson
6924d1729a Glitchmons now has Team Preview 2012-05-18 09:54:05 -04:00