Commit Graph

118 Commits

Author SHA1 Message Date
Caleb Young
9bec06d349 Fix Baton Pass Clause error message (#2565) 2016-05-18 20:49:13 -05:00
The Immortal
5db51a7091 Add in-game event data
And flag those as event only. This provides a more accurate database,
and some other flags are no longer needed.
2016-05-10 04:48:14 +04:00
The Immortal
f0101cf864 Remove unused Kalos Pokedex rule 2016-05-09 16:58:13 +04:00
Quinton Lee
641a229672 Check legality of shiny Pokemon obtained in gen 6 (#2526)
Several shiny Pokemon are currently unobtainable in gen 6 games. Affects
formats with the requirePentagon flag
2016-04-19 01:06:48 -07:00
The Immortal
5c693ec13d Add Volcanion to Standard GBU banlist 2016-04-16 01:58:43 +04:00
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