Commit Graph

239 Commits

Author SHA1 Message Date
Ivo Julca
a0601bdb73 Add MoveAborted event, to be run when move execution stops on BeforeMove 2016-11-25 15:23:52 -05:00
Ivo Julca
00ced09ba3 Revert 4aaa3cb 2016-11-19 15:44:56 -05:00
Ivo Julca
4aaa3cb260 Move .templateRequiredItem to array everywhere 2016-11-19 15:23:42 -05:00
The Immortal
332ff1d49e Set Pichu-Spiky-eared to gen 4
And move eventOnly to the base data, for consistency.
2016-11-18 14:18:49 +04:00
Guangcong Luo
71249f48fe Make Gen 3 inherit from Gen 4
Due to a quirk of history (namely, programmers having a poor
understanding of the mod inheritance system), Gen 3 inherited from
Gen 5 for a long time, resulting in a lot of duplicate code.

This commit changes up the inheritance system and removes some
duplicate code (specifically, statuses.js and moves.js besides
Metronome and Mirror Move which need more investigation), the rest is
reserved for a future commit.
2016-11-14 09:18:30 -07:00
Quinton Lee
55fa6c630e Rulesets: standardize types and names (#2838)
Rules that affect validation are now typed ValidatorRule and rule
names are no longer affected by Tools.getFormat input.
2016-10-12 14:24:53 -05:00
Marty-D
aac63d3e26 Fix various issues with Bide
Corrects all of the following
Gen 2: lasts 2-3 turns
Gen 3: can't hit Ghosts
Gen 4: can hit Ghosts, stops immediately when the user falls asleep or
becomes frozen
Gens 2-6: Stops immediately when the user is prevented from moving
2016-10-06 21:33:30 -04:00
Marty-D
c3f24da150 Gen IV: Update move descriptions
Also removes unneeded Hidden Powers.
2016-09-26 17:06:08 -04:00
The Immortal
bb456401f8 Update gen 4 tiers 2016-09-11 04:35:21 +04:00
Marty-D
17e58b0bbd Gen IV: Fix Effect Spore 2016-08-22 17:06:36 -04:00
urkerab
51fab2d10f Fix client-side activation of Aromatherapy and Heal Bell for all gens (#2699) 2016-08-17 22:35:35 -04:00
Marty-D
4f5cdb92a9 Refactor Heal Block to use flags 2016-06-28 17:41:41 -04:00
Marty-D
98667e8dd5 Correct Wonder Guard message
- Also remove its very unnecessary reimplementation in `futuremove`
2016-06-23 14:34:50 -04:00
Marty-D
d8e4fe8486 Display allies and statuses cured by Aromatherapy/Heal Bell
- Except prior to Gen 5
2016-06-22 11:35:10 -04:00
The Immortal
cd487aeb2a Gen 4 FormatsData: Only inherit those with events 2016-06-15 16:37:10 +04:00
Guangcong Luo
303dfcc465 Properly fix Spiky-Eared Pichu crash 2016-05-27 11:41:03 -04:00
The Immortal
5feb454a9b Fix Spiky-eared Pichu
And move its gender to the event data.
2016-05-26 18:35:40 +04: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
c928a4523f Gen 4: Inherit formats-data 2016-05-08 21:23:23 +04:00
The Immortal
e8c8632805 Update Darkrai events
- Remove duplicate possibly shiny event
- Add new event
2016-05-08 02:52:37 +04:00
mizdra
f262d02c42 Fix recoil in Gen 3-4 (#2461)
* Fix the 1/3 recoil moves in Gen 3-4
* Fix rounding recoil in Gen 3-4
2016-04-18 16:26:54 -04:00
Kevin Lau
1c574c6c55 Critical Hit Ratio refactor: Use an event to modify crit ratios (#2501)
This allows for proper crit ratios when a Pokemon loses/gains an ability,
item, or other effect in the middle of a multi-hit attack.
2016-04-11 21:35:36 -04:00
Marty-D
4c2bc7585f Merge pull request #2449 from ascriptmaster/move-fixes
Normalize overwrites moves that change type
2016-03-16 23:38:03 -04:00
Kevin Lau
bfac338ddb Normalize doesn't affect moves that change type
The ModifyMove singleEvent for moves always runs before the
larger event that triggers an ability's event handler and
take precedence over Normalize, so we code exceptions in
Normalize to not change the type in those situations.

Conveniently, all the moves that change type right now are
defaulted to Normal-type, and since Normalize technically
won't change the type of any Normal-type move, we're using
that as the guideline for our exception.
2016-03-16 10:54:47 -07:00
Guangcong Luo
a4ef6a0680 Fix infinite loop in Gen 3-4 Beat Up 2016-03-16 09:44:46 -05:00
Marty-D
9d496e00dc Gen IV: Fix Focus Sash properly 2016-03-10 12:29:39 -05:00
Marty-D
f567c1ec90 Gen IV: Fix Toxic Spikes interaction with Safeguard 2016-03-10 11:25:44 -05:00
Marty-D
56da976d87 Gen IV: Fix Focus Sash interaction with multi-hit moves 2016-03-10 11:25:11 -05:00
Guangcong Luo
0fbaf3fc8e Stop using ModifyPokemon for disabling moves
We already have DisableMove.
2016-02-16 21:47:27 -06:00
Marty-D
ceeb6a3049 Gen IV: Fix Crush Grip 2016-02-16 10:32:05 -05:00
Guangcong Luo
1bf9c57bf4 Fix Gen 4 Wring Out 2016-02-16 01:19:56 -05:00
Guangcong Luo
97c21f150c Fix Gen 2-4 Beat Up
- No longer affected by weakness and resistance
- No longer affected by damage modifiers on attacker (Choice Band,
  Huge Power, etc)
- Gen 2-3 now uses Gen 4 Beat Up system
2016-02-16 01:08:54 -05:00
Marty-D
2465c1d5b2 Add more event IV restrictions 2016-01-30 20:10:49 -05:00
Kevin Lau
f9d3692555 ACTUALLY fix Focus Punch in old gens
Returned the wrong value
2016-01-29 22:10:18 -08:00
Kevin Lau
d75d0178ca Fix Focus Punch in old gens 2016-01-29 22:08:50 -08:00
Marty-D
f248d191d5 Add shiny Jirachi, Darkrai, and Shaymin events
- Darkrai and Shaymin could be caught in the wild in Gen 4.
- WISHMKR Jirachi has a very small chance to be shiny (but only 9
possible Natures).
2016-01-21 18:56:33 -05:00
Marty-D
4994541d1e Fix Endeavor interaction with Gems
And protection moves.
2016-01-21 11:32:18 -05:00
Marty-D
e6d4a48885 Gen III, IV: Fix revealing Natural Cure on fainted Pokemon 2016-01-12 17:59:53 -05:00
Guangcong Luo
d49107cf3a Fix Natural Cure in gen 3-4 2016-01-12 13:29:06 -08:00
Marty-D
905fbc6e16 Fix Sticky Hold mechanics after fainting
Since Gen 5, the effects of Thief and Knock Off (among other things)
happen after the target has fainted, so it's possible to remove a
Pokemon with Sticky Hold's item at this point since Abilities don't
'exist' once inactive.
2016-01-07 22:03:39 -05:00
Konrad Borowski
81f602b8d8 Always use trailing comma for multiline objects 2016-01-01 00:20:07 +01:00
Konrad Borowski
79a5b23f25 Modify data and mods files to follow style rules 2016-01-01 00:18:00 +01:00
Konrad Borowski
b7051bf0c0 Make learnsets and Pokedex more readable 2016-01-01 00:11:49 +01:00
Marty-D
cc447473a0 Allow shiny Manaphy
The one obtained from the Ranger games may be shiny if the egg is
hatched in a game other than the one it was transferred to.
2015-12-30 18:26:06 -05:00
Marty-D
edc2b8f98a Fix Jaboca and Rowap Berries' damage ordering
Corrects interactions with Bug Bite/Pluck/Knock Off, etc.
2015-12-28 17:40:30 -05:00
Marty-D
6d6d1724fd Make sure Doom Desire/Future Sight deal direct damage
No more Magic Guard being immune, bypassing Sturdy, etc.
2015-12-15 15:53:11 -05:00
The Immortal
751ca009d8 Past gens: Add missing flags to Pokemon 2015-12-12 18:41:49 +04:00
The Immortal
fe33d2c4e5 Update past gen data
This utilizes the new `eventOnly` and `eventOnlyHidden` flags.
`unobtainableShiny` is not necessary for event only Pokemon.

This also includes various fixes such as duplicate events and missing
data entries.
2015-12-12 05:09:11 +04:00
Konrad Borowski
133595c70f Fix style issues in mods hidden by ESLint before 2015-12-10 23:14:32 +01:00
Ivo Julca
47918a6d92 Replace remaining instances of var by block bindings 2015-12-03 19:45:35 -05:00