Commit Graph

113 Commits

Author SHA1 Message Date
Ivo Julca
0281176fd1 Remove usage of Array|Object methods implemented by Sugar.js
Adds a dependency to shim Object.values until it's natively available.
2016-03-09 16:55:34 -05:00
Guangcong Luo
9b46d7658c Show item existence in Team Preview 2016-02-16 14:59:33 -05:00
Guangcong Luo
a445b86daf Support hacked genders in Hackmons 2016-02-08 10:25:04 -05:00
The Immortal
62258f4bce Fix perfect IV error message 2016-01-30 16:42:56 +04:00
Guangcong Luo
ddbb1a04ad Fix perfect IV count check
Previous check was requiring Latias-Mega to have 3 perfect IVs because
Latias-Mega is a gen 6 pokemon even though Latias itself isn't.

This also gives clearer error messages in the remaining situations.
2016-01-30 04:20:12 -08:00
The Immortal
c280f19221 G&F: Remove unneeded clause
Forget that `onBegin` existed.
2016-01-01 23:23:13 +04:00
The Immortal
6ec7595785 Add new OMs of the Month 2016-01-01 22:53:36 +04:00
Konrad Borowski
81f602b8d8 Always use trailing comma for multiline objects 2016-01-01 00:20:07 +01:00
The Immortal
3a00f4a83b Change Pikachu-Cosplay to the appropriate forme
If it has a cosplay move.
2015-12-31 03:11:36 +04:00
Guangcong Luo
8aa1409da7 Add Gen 2 only items
PS has a tradition of supporting future-gen items/moves/etc in past gens,
so why not the other way around? Obviously, these items are banned
outside of Custom Game.

This mainly helps make the teambuilder less confusing to gen 2 players.
2015-12-24 03:19:31 -06:00
The Immortal
e35bcbbbc5 Prevent legendaries with less than 3 perfect IVs
Fixes #1342. The one in rulesets is the general check, and the one in
team-validator is the event check. I don’t think we can combine it into
a single check; duplication is needed.
2015-12-13 01:34:37 +04:00
Ivo Julca
e985c2a7c6 Properly iterate moves in OHKO Clause 2015-11-08 22:19:46 -05:00
Ivo Julca
90973d5c0c Style fixes
- Cut down excessive spacing
- Add braces to missing conditionals
2015-11-07 17:08:09 -05:00
Juanma Serrano
c4ac8d6e2f Use strict mode and let and const instead of var
This commit also fixes some duplicated variable declarations.
2015-11-06 21:56:52 -05:00
Ivo Julca
99ac2cad62 Inheritance: work around overly strict Pokémon ruleset using format flags
This change also allows to
- Fix inheritance from Giratina-Origin.
- Remove set cloning for good.
2015-11-02 21:37:10 -05:00
Ivo Julca
40cb48bf9f Improve error message for illegal shinies 2015-10-22 23:01:23 -05:00
Ivo Julca
ddd87205ab AAA: do not autofix ability in Pokemon rule 2015-10-22 22:01:35 -05:00
Ivo Julca
724675b4e5 Fix legality check for shiny megas 2015-10-21 13:55:32 -05:00
Ivo Julca
1a8c51e9a9 Consolidate Pokémon forme validation
- Introduces `battleOnly` to Pokémon formats-data to flag which formes are forbidden on battle start.
- Adds back Secret Sword as Keldeo-Resolute's required move.
- Introduces `requiredAbility` to handle Darmanitan-Zen.
- Introduces `forcedForme` to items' data to flag the formes that some items enforce.
2015-10-20 23:13:32 -05:00
Ivo Julca
7cefd67626 Reject illegal non-shiny sets rather than fixing
Closes #2197
2015-10-20 16:49:09 -05:00
Ivo Julca
488a54b5c2 Formats now declare their team length requirements as teamLength
E.g., to enforce players to bring teams with 4-6 Pokémon to Team Preview,
and make them choose 2 of them there to battle with:

```
teamLength: {
  validate: [4, 6],
  battle: 2
}
```
2015-10-19 15:44:09 -05:00
Guangcong Luo
836eaa2553 Allow Starf Berry in Baton Pass Clause 2015-10-07 02:13:23 -04:00
Konrad Borowski
70665f6f5f Baton Pass Clause now supports Pokemon without a nickname
This fixes problems with showing Pokemon name as "undefined" when
Pokemon lacks a nickname
2015-09-05 10:37:20 +02:00
Ivo Julca
85d92a58f4 Rename validateSet|Team and changeSet: prefix with "on" 2015-08-20 17:24:26 -05:00
The Immortal
7800643e55 Update Monotype bans 2015-08-20 00:57:32 +04:00
Guangcong Luo
ddb8b7f7a3 Minor Endless Battle Clause update 2015-07-22 04:22:32 -04:00
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
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
The Immortal
37a855b450 Ban Smooth Rock from Monotype 2015-07-17 13:21:01 +04:00
Guangcong Luo
aae50cdb43 Ban Leppa+Bestow in Endless Battle Clause 2015-07-16 02:19:24 -04:00
Guangcong Luo
91e52bdca5 Fix Heal Pulse ban to singles only 2015-07-16 02:12:35 -04:00
Guangcong Luo
75d4fc3b21 Update Endless Battle Clause 2015-07-15 19:29:18 -04:00
Guangcong Luo
c43c8cea1f Improve phrasing of teambuilder messages 2015-07-15 19:27:42 -04:00
The Immortal
84cc2bc2c6 Add Hoopa to Standard GBU bans 2015-07-15 02:03:05 +04:00
The Immortal
4b69b3671f Fix Baton Pass clause
Moved Acupressure from `boostSpeed` to `boostNonSpeed.`
2015-07-14 02:07:28 +04:00
Guangcong Luo
e6c0eda54e Fix Baton Pass Clause
It was mistakenly banning all boosting of Speed + non-Speed, not
just with Baton Pass.
2015-07-13 04:43:18 -04:00
Guangcong Luo
caddeb6ac4 Baton Pass Clause update
We now ban boosting both Speed and non-Speed with Baton Pass.
To make this simpler, we introduce changeSet as separate from
validateSet, which allows us to pass setHas to validateSet
2015-07-13 04:18:28 -04:00
Marty-D
afc1fbd141 Show correct species name for Species Clause 2015-07-03 11:33:55 -04:00
Ivo Julca
e3862b22de Add missing effect type for team preview rules 2015-06-18 21:29:00 -05:00
Guangcong Luo
7f2b9ec88f Mega Rayquaza Clause is not a mod
A mod is PS functionality that cannot be replicated in a real
cartridge battle. Preventing someone from pressing the Mega Evolution
button is possible on-cart. It's completely different from changing
the results of pressing a button, which is what Sleep Clause
Mod does.
2015-06-16 19:12:21 -04:00
SolarisFox
29b961ff69 Style fix: indexOf() comparisons 2015-05-18 15:55:57 -07:00
sirDonovan
541c427784 Update Monotype Bans
http://www.smogon.com/forums/threads/monotype-xy-read-post-393-for-tiering-updates.3493087/page-70#post-6162829
2015-04-13 09:28:13 -05:00
Konrad Borowski
8830318a66 Remove complex ban for Kyurem-White in Monotype
Kyurem-White is now completely banned from Monotype. This removes
unused code from Same Type Clause.
2015-04-07 13:12:46 +02:00
The Immortal
e56eea5d15 Forgot to remove the clause 2015-04-02 16:10:24 +04:00
Juanma Serrano
cf1785cb83 Update Final Destination
Proper wording for clause.
Critical hits are removed, they are uncompetitive.
2015-04-01 10:23:26 +02:00
Juanma Serrano
29b13451b6 Implement OM of the Decade
Disregard puny OM of the Month thing. That's for losers anyway.
From now on, the strongest and best OM is going to be added as the OM of the Decaed.
It will only be changed when a strongest OM appears and beats it off.
Right now, with no contender really, that OM is Final Destination. Any other OMs just pale in comparison.
2015-04-01 10:00:11 +02:00
Kevin Lau
e4f3c81e39 Prevent multiple Kyurem-Black and Kyurem-White on AG teams
Anything Goes allows anything that is obtainable in-game, and only one
Kyurem-Black or Kyurem-White can exist on a game cartridge at a time.
2015-03-22 17:12:42 -07:00
Ivo Julca
0bcc4cacb6 Update Monotype bans 2015-02-12 23:07:31 -05:00
The Immortal
b76005ee46 Fix Sleep Clause Mod
In doubles, if a Pokemon asleep was knocked out and in the same turn its
ally was put to sleep, it would not allow it. Can be seen here:
http://replay.pokemonshowdown.com/gen5smogondoubles-209911884 at turn
10.
2015-02-11 04:12:56 +04:00
Ivo Julca
4c069668e6 Add "Cancel Mod" ruleset
- It enables the `supportCancel` battle flag.
- Add it to all formats and standard rulesets.
2015-01-29 21:53:10 -05:00