Commit Graph

91 Commits

Author SHA1 Message Date
小太
b5b2b42ac4 Merge tools.js and chat-commands.js from master. This adds support for evoLevel, modifies checkLearnset() to return the problem and fixes a few things in chat-commands.js 2012-11-30 21:05:56 +11:00
小太
8d2387c3f5 Update pokedex with evoLevel and evoMove; and add camelCase 2012-11-30 21:03:37 +11:00
Guangcong Luo
f45f1c118e Sets without valid pokemon should be rejected
(they were previously converted to Bulbasaur later on, back before PS
had a set validator)
2012-11-15 19:32:35 -08:00
Guangcong Luo
52de2b4d19 Ran a static analyzer, fixed some errors
Specifically, Git Canary: gitconary.com
2012-11-12 15:31:57 -08:00
Guangcong Luo
c15bd05e8d Fix move legality checker bug
Combinations of level-up/tutor/TM moves from before gen-5 now work correctly
2012-10-22 11:30:18 -07:00
Guangcong Luo
28f550b5a4 Fullnames should use actual names where relevant 2012-10-05 01:30:34 -07:00
Guangcong Luo
bf191e778d Correctly disallow | in nicknames 2012-10-04 22:04:26 -07:00
Guangcong Luo
4d1ea5569c Disallow | in pokemon names 2012-10-04 21:25:44 -07:00
Guangcong Luo
c1a63d4f92 Fix learnset checker for baby pokemon 2012-09-17 11:31:03 -07:00
Guangcong Luo
b7ea982716 New system for event abilities
Fixes validation issues on Salamence and Gallade
2012-09-09 00:39:31 -07:00
Guangcong Luo
4c6a85d1d5 Different algorithm for checking event abilities 2012-08-22 19:32:06 -07:00
Guangcong Luo
157c0cbaec Small fix to learnset checker
A forme with a prevo presumably can't switch formes
2012-08-21 23:33:14 -07:00
Guangcong Luo
c41e7813f7 Several improvements to learnset checker 2012-08-21 23:17:50 -07:00
Guangcong Luo
ad72b5e657 Take event data into account by the set validator 2012-08-20 23:26:01 -07:00
Guangcong Luo
b1d448c717 !learnset command, for checking learnsets 2012-08-20 19:56:31 -07:00
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