Commit Graph

76 Commits

Author SHA1 Message Date
Guangcong Luo
c335870340 Make sure formats have their full ruleset 2012-08-01 19:54:23 -07:00
Guangcong Luo
b801be60c0 Normalize set variables 2012-07-28 17:28:42 -07:00
Antar1011
0d5db9483a Challenge Cup 2012-07-10 09:47:35 -04:00
Bill Meltsner
eb153e7427 Implement recursive rules for formats.
A format will inherit rulesets and banlists from any rules specified in its ruleset which contain their own rulesets or banlists. For instance, UU can inherit OU's rules and bans, while adding its own tier bans and weather bans.
2012-07-08 02:40:00 -05:00
Bill Meltsner
05b972bd8a Add more descriptive "X is banned" messages.
More specifically, if the rule under which something is banned has a name (e.g. "Evasion Clause"), inform the user that it's banned under that particular rule.
2012-07-08 02:40:00 -05:00
Bill Meltsner
4f7ee84bd6 Capitalize Pokemon.
IT MATTERS, OKAY?!
2012-07-08 01:14:30 -05:00
Bill Meltsner
f8a655786c Add Kyurem formes' learnsets.
The Kyurem formes get Fusion Bolt/Flare and Freeze Shock/Ice Burn *in place of* Glaciate and Scary Face, so checkLearnset should not recurse down to the base Kyurem forme.
2012-06-23 12:25:26 -05:00
Guangcong Luo
7d437ad7ee Fix a validation crash on a pokemon
- a pokemon without a formats-data would crash
- because SOMEONE doesn't know how templates work ;)
2012-06-22 09:42:22 -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
Guangcong Luo
b3054fefdf Load all data using tools.js
- the original names BattleItems etc have been deprecated; please use:
  - Tools.getItem() accessor method if possible
  - Tools.data.Items for lower-level access (e.g. iteration)
- app.js was also rearranged a bit
2012-06-13 22:51:37 -07:00
Guangcong Luo
cbde94b6a6 Let Tools install itself and scripts into Battles 2012-06-13 22:25:26 -07:00
Guangcong Luo
12e9b5458b Make tools.js support mods (past gens)
- replace Tools.foo with Tools.mod('gen4').foo for gen 4 tools
- mods are stored in mods/modname/ in the same directory structure as data/
- mods modify base data
- further documentation coming soon in mods/modding.md
2012-06-13 08:27:32 -07: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
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
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
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
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
Guangcong Luo
e17703f1f3 Ban gen 5 egg moves + male-only DW release 2012-05-17 23:22:33 -07:00
Guangcong Luo
86b293ba13 Update set validator for R_D's DW release info 2012-05-17 21:47:23 -07:00
Bill Meltsner
a30ec141f2 Fix and improve set validation:
- Pokemon with a different DW ability from their prevo are now handled properly.
- The problem message now changes depending on whether an illegal move is incompatible with the Dream World.
- Problem messages now display the name of each Pokemon only if the Pokemon has been explicitly given a nickname. Otherwise, it just displays the species.
- Poison Heal Gliscor with Roost is now covered under standard DW legality.
2012-05-17 16:53:10 -04:00
Guangcong Luo
477f46746a Ban illegalities involving DW abilities 2012-05-17 09:55:28 -07:00
Guangcong Luo
0e4d01f5bc Merge all data from formats-data.js and learnsets.js in, instead of listing keys 2012-05-17 09:40:06 -07:00
Guangcong Luo
85890e4e41 Implement Glitchmons (Streetmons) 2012-05-17 01:01:46 -07:00
Guangcong Luo
4772a90deb Make 'Illegal' bans work correctly:
- Ability legality checking is triggered by an 'Illegal' ban, instead of a 'Standard' rule
- So is moveset legality checking
- Banning 'Legal' is now meaningless, since it's redundant with 'Illegal'
2012-05-17 01:00:57 -07:00
Guangcong Luo
6d013c3361 Add a custom ban for an illegal combo
(namely, Poison Heal + Roost Gliscor)
2012-05-17 00:54:41 -07:00
Guangcong Luo
039109f725 Make getMove/getTemplate/getAbility report gen 2012-05-17 00:53:11 -07: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
9a93ba04e3 Remove Limbo from the source, and revert back to using Unreleased/Illegal. 2012-05-16 00:09:49 -04:00
Bill Meltsner
0ad29fd359 Illegal is no longer used as a "tier", so we can eliminate it from the Standard banlist.
Pokemon without defined tiers will be placed in Limbo instead. (Seems fitting.)
2012-05-15 20:11:09 -04:00
Guangcong Luo
66d65de02e Update formats-data format
- viablemoves => viableMoves
- add requiredItem
- simplify eventPokemon list
2012-05-15 16:30:45 -04:00
Guangcong Luo
fedc12d35f Consolidate formats data in formats-data.js 2012-05-15 16:07:35 -04:00
Guangcong Luo
615d8d4d01 Use a compressed version of kota's learnsets/pokedex
This solves the problem of the old pokedex not having every prevo, and adds some useful features for future learnset checking
2012-05-15 04:20:53 -04:00
Guangcong Luo
8e066db32d No learnset doesn't mean no checking anymore 2012-05-14 21:18:05 -04:00
Guangcong Luo
d832fa233f Learnset-check base formes like prevos 2012-05-14 21:18:05 -04:00
Cody Thompson
e9fc0b6f95 Banned + fixed implementation on unreleased items
- Custap Berry
- Ganlon Berry
- Jaboca Berry
- Liechi Berry
- Micle Berry
- Petaya Berry
- Rowap Berry
- Salac Berry
- Soul Dew
2012-05-11 12:36:03 -04:00
Guangcong Luo
b707663bf6 Make sure a lack of item/ability/etc doesn't evaluate to an item/ability/etc named 'undefined' 2012-05-07 22:41:28 -04:00
Bill Meltsner
e3e6229d23 Use the Illegal tier as a default if a Pokemon isn't found in the tier list. 2012-05-07 22:17:16 -04:00
Bill Meltsner
fbc6e7ede1 Only display the "limited to 1 Sketch move" message for moves that Necturna can't learn except via Sketch. 2012-04-25 19:15:40 -04:00
Bill Meltsner
33eb437a6e Clean up some pre-ID shift code in Tools.checkLearnset.
This fixes Necturna being unable to use her Sketch move.
2012-04-25 19:14:56 -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
Guangcong Luo
06838e71e3 Better way to limit moves in sets 2012-04-14 17:13:56 -04:00
Guangcong Luo
8a3ccfbd4b The last of data validation
All of the data received from the client is now validated, with the assumption that it only has JSON code (as far as I know; I may have forgotten something)
2012-04-14 14:55:04 -04:00
Guangcong Luo
c732321895 Some validation for hacked team data. 2012-04-14 13:04:23 -04:00