Commit Graph

9156 Commits

Author SHA1 Message Date
Guangcong Luo
c8c03ad92d Update Endless Battle Clause
The full description is in the comments of the Endless Battle
Clause entry in rulesets.js.

This update fixes a lot of the issues with yesterday's version.

Also included: A minor refactor of deductPP, which did not need
a success variable.
2015-07-22 03:41:43 -04:00
Guangcong Luo
1199108fc0 Fix Spite message 2015-07-22 03:38:49 -04:00
Guangcong Luo
1dde0a9473 Some debug code for diagnosing node-static issues 2015-07-21 06:39:10 -04:00
Guangcong Luo
9bf3517f2e Implement New Endless Battle Clause
The new Endless Battle Clause attempts to ban endless battles by
detecting situations in which a battle could become endless.

This approach bans endless battles without banning Leppacycling.

The exact formulation is:

A Pokémon is considered cornered if:

- it has no available moves other than Struggle
- OR a stale Pokémon used Assist Whirlwind on it
- OR it has been hit by a Struggle from a stale Pokémon on the turn
  it switched in

(at the beginning of a turn, if you have available moves other than
Struggle, you are no longer cornered)

A Pokémon is considered stale if:

- it has gained a Leppa berry through any means besides starting
  with one (including but not limited to Harvest, Recycle, Pickup,
  Symbiosis, Bestow, Thief, Switcheroo, and Magician)
- OR it has been targeted with Fling Leppa Berry
- OR it is cornered and begins a turn with more HP than it the last
  turn it began
- OR it is cornered and begins a turn with as much HP as the last
  turn it began, and was not fully paralyzed, loafing around from
  Truant, or immobilized from Attract
- OR it uses Transform/Imposter against a stale Pokémon

(a Pokémon that becomes stale stays stale for the rest of the match)

If all active Pokémon are stale, the player whose team originally
started with a Leppa Berry loses. If both or neither team started
with a Leppa Berry, the team that had the first stale Pokémon wins.
2015-07-21 06:38:22 -04:00
Guangcong Luo
53501b32bb Merge pull request #2072 from ascriptmaster/move-fixes-3
Update priority of switches when a player has no actives
2015-07-21 01:13:03 +00:00
Kevin Lau
58f4c1e145 Update priority of switches when a player has no actives
Switches and runSwitch were recently updated to priority 7 and 7.1, so
this part needs to be updated as well.
2015-07-20 16:58:54 -07:00
Ivo Julca
b2cdda40cb Fix support for aliases in /formatshelp 2015-07-20 17:51:53 -05:00
Ivo Julca
1f4c352ee0 Fix lobby broadcast of /formatshelp 2015-07-20 17:33:12 -05:00
The Immortal
e92714a2ed Random Battle: Prevent Outrage with Draco Meteor
if they are the Pokemon’s only two damaging moves.
2015-07-21 02:16:53 +04:00
The Immortal
aa0525f724 Fix Intimidate activation message 2015-07-21 00:06:08 +04:00
Ivo Julca
b2b9dc75c0 Fix HP Percentage Mod 2015-07-20 14:44:56 -05:00
Guangcong Luo
e31b48d685 Merge pull request #2073 from kotarou3/tournaments
Fix tournament bug where merging users doesn't automatically send an update
2015-07-20 05:43:23 +00:00
小太
789dd73c46 Fix tournament bug where merging users doesn't automatically send an update 2015-07-20 15:14:46 +10:00
Kevin Lau
b310eb00b9 Add Intimidate test for double-KOs 2015-07-19 16:54:55 -07:00
Ivo Julca
9b32c6c3dc Mix and Mega: Lucario banned from megaevolving 2015-07-19 18:51:51 -05:00
Guangcong Luo
9cffbbb6c8 Merge pull request #2071 from Slayer95/loginserver
More improvements to login server requests' error handling
2015-07-19 23:41:13 +00:00
The Immortal
29cdfe96df Ban Hoopa-U from AAA 2015-07-20 01:51:16 +04:00
Ivo Julca
38e28a9f4e Ensure login server callbacks are called once on errors
Goodbye "socket hang up". Hi "Response not received.
2015-07-19 14:43:55 -05:00
Ivo Julca
a24ad13e4f Make loginserver client more robust
It will no longer stop working when a callback crashes.
2015-07-19 14:38:09 -05:00
The Immortal
9981743363 Fix event Pokemon bug in validateSet
Any Pokemon with only one Ability in Gen 3 can get the new Gen 4 one by
evolving. Such as, Extreme Speed Zigzagoon has Pickup only in Gen 3 but
its evolution, Linoone, can have either Pickup or Gluttony in Gen 4 or
higher.
2015-07-19 23:07:49 +04:00
The Immortal
315f57d4fc Add new Mix and Mega bans 2015-07-19 21:28:06 +04:00
Ivo Julca
40c4c91af6 Fix future move gem boost message 2015-07-19 12:21:14 -05:00
Marty-D
b77e3795b5 Gen III: Reset sleep's skippedTime counter properly 2015-07-19 12:21:04 -05:00
Ivo Julca
30875bb956 Handle lack of descripction in /formatshelp single matches 2015-07-19 05:29:33 -05:00
Ivo Julca
2e9ef08a56 Update /smogdex to PS identifier format
Smogon now supports it.
2015-07-19 03:10:58 -05:00
Guangcong Luo
c1a1623053 Lock unregistered usernames
Before, locking/banning an unregistered user wouldn't punish the
username. In practice, though, PS has millions of user accounts and
sharing an unregistered username with a recently-banned spammer is
unlikely to be a coincidence. Bans are commuted to locks, though,
so users can still PM a moderator in the case of a mistake.
2015-07-18 14:31:41 -04:00
Guangcong Luo
757ff95358 Notify users about unlocks 2015-07-18 14:31:41 -04:00
Guangcong Luo
77dfc68445 Unlink/hide spammer usernames through renames
This also adds a new variable from .splitTarget, .inputUsername,
which represents the username before following the user through
renames.
2015-07-18 14:31:41 -04:00
Guangcong Luo
d206d3cc28 Allow admins to talk in private modchat rooms 2015-07-18 14:31:41 -04:00
Guangcong Luo
0bc8f9c50f Merge pull request #2059 from Slayer95/formatshelp
Finish implementation of /formatshelp
2015-07-18 13:16:32 -05:00
The Immortal
8fb1ffc716 Release Hyperspace moves 2015-07-18 14:28:01 +04:00
The Immortal
4b1f7a42f0 Add new event Pokemon
And free Hoopa!
2015-07-18 14:15:25 +04:00
Ivo Julca
0ec8eeab21 Finish implementation of /formatshelp
- Now mostly merged with /tiers and /othermetas.
- Format descriptions are arrays of HTML strings, which are joined to be displayed.
2015-07-18 05:00:10 -05:00
Marty-D
d7ead997a5 Fix Ditto Transformed into Ditto gaining Metal/Quick Powder boosts 2015-07-17 21:57:09 -04:00
Marty-D
f1ae041707 Fix Endeavor showing two failure messages 2015-07-17 21:31:28 -04:00
Slayer95
5da23028df Merge pull request #2065 from SolarisFox/patch-1
/coverage: Struggle is typeless
2015-07-17 19:26:01 -05:00
SolarisFox
91be91e589 /coverage: Struggle is typeless 2015-07-17 17:13:44 -07:00
Kevin Lau
3ecb7ac301 Fix crash in BattlePokemon#getMoveTargets 2015-07-17 16:53:48 -07:00
Ivo Julca
fed435ab2d Improve /dice notation
Default amount of dice to 1 (`d6` will equal `1d6`)
2015-07-17 18:29:01 -05:00
The Immortal
8c94abf8d8 Merge pull request #2064 from Rhythms88/master
Add an alias for Doubles OU
2015-07-18 03:23:33 +04:00
The Immortal
ba5cb5d932 Merge pull request #2063 from SolarisFox/patch-2
Randoms: Enable Lilligant to get Own Tempo
2015-07-18 03:12:50 +04:00
Rhythms
099540c48d Add an alias for Doubles OU 2015-07-17 17:07:22 -06:00
The Immortal
5ed4a13610 Random Battle: Improve Pyroar and Rapidash
- Reject Sunny Day if the Pokemon lacks an ability that benefits, and
lacks SolarBeam
- Add Dark Pulse to Pyroar to fix the issue raised in #2063
- Reordered the Status cases to weather/status/recovery/other instead
of just alphabetical
2015-07-18 03:05:01 +04:00
SolarisFox
7eb1a284d9 Randoms: Enable Lilligant to get Own Tempo 2015-07-17 16:04:19 -07:00
Ivo Julca
4986032b75 Add aliases for various OMs 2015-07-17 17:23:21 -05:00
Guangcong Luo
9c0de62062 Update Credits 2015-07-17 16:39:24 -05:00
Guangcong Luo
d2a60eb10c Merge pull request #2062 from SolarisFox/patch-1
/dexsearch: BST as stat comparison parameter
2015-07-17 15:49:57 -05:00
SolarisFox
f5879578e5 /dexsearch: BST as stat comparison parameter 2015-07-17 13:28:43 -07:00
Marty-D
fc1268da2e Fix Telepathy's interaction with Bide 2015-07-17 15:52:19 -04:00
Guangcong Luo
41a9706de0 Merge pull request #2058 from Slayer95/smogdex-formats
Bring back formats support for /smogdex
2015-07-17 13:41:00 -05:00