Commit Graph

101 Commits

Author SHA1 Message Date
Guangcong Luo
b67454743b Hidden Power fix:
- Random battles and automatic detection sets Hidden Power IVs correctly
- Hidden Power now always does damage based on user's IVs
- User's Hidden Power base power is now reported
2013-01-24 15:03:04 -08:00
TheImmortal
f70ce8b12c Fix LC bug with DW moves
- No LC Pokemon can legally use its moves that are exclusively obtained from the Dream World

In other words, the Pokemon has to be above level 10 with it's DW ability + DW exclusive move
2013-01-15 01:51:34 +04:00
TheImmortal
65e0cebf6f Set level before set is validated- maxLevel for LC 2013-01-11 14:03:52 +04:00
Guangcong Luo
39c33e409c Fix the learnset checker to handle chainbreeding better
Specifically, Spikes + Sleep Powder Roserade is no longer legal
Also add more comments to checkLearnset
2013-01-11 01:42:47 -08:00
TheImmortal
3b647dbdfd Update learnset checker 2013-01-10 11:36:00 +04:00
Guangcong Luo
dad08d86a4 Correctly disallow empty movesets 2012-12-16 11:42:56 -08:00
Marty-D
8bf1653969 Implement move aliases. 2012-12-15 18:33:37 -05:00
Guangcong Luo
cae58c2fde More consistent name validation 2012-12-14 18:58:18 -08:00
Guangcong Luo
6f96a06440 Allow underleveled pokemon at level 50 if forced by VGC rules
(also add item clause to VGC)
2012-12-12 15:51:02 -08:00
Guangcong Luo
1e1cd11410 Implement item aliases 2012-12-12 15:49:48 -08:00
小太
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