Commit Graph

209 Commits

Author SHA1 Message Date
Marty-D
71c1858168 Gen II: Fix order of drag-outs and residual damage 2016-09-16 17:13:24 -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
urkerab
74aa31dcf1 Use TryAddVolatile for confusion rather than a custom event (#2641) 2016-08-07 12:11:58 -04:00
The Immortal
fd7f611e8c Update gen 2 tiers 2016-08-02 02:47:43 +04:00
ClaudiuBancos
f94d3ae019 Added Many Gen 2 Random Battle Movesets (#2637)
Finished adding movesets for all fully-evolved Pokemon (plus Scyther),
based on Smogon write-ups.
2016-07-23 04:19:45 +02:00
Marty-D
c74aa8dcc2 Gen II: Fix Random Battle genders 2016-07-21 19:06:52 -04:00
Marty-D
eb5eb2d234 Gen III: Berry Juice is unobtainable 2016-07-06 20:36:54 -04:00
Marty-D
0c0843ff4d Gen II: Fix AfterMoveSelf effects
burn/poison -> Leech Seed -> Nightmare -> Curse
2016-06-17 11:54:35 -04:00
Marty-D
d7afc6ab1b Gen I, II: Add Pikachu's Surf tutor from Stadium 2016-05-30 19:32:16 -04:00
urkerab
be0f9d3be2 Show ability activation when it causes an immunity (#2555)
- Also improve `trySetStatus` and `moveHit` implementations
2016-05-22 18:44:54 -04:00
Marty-D
fc86e0ef0a Prevent confusion damage from being a critical hit 2016-05-05 23:44:58 -04:00
QuiteQuiet
90672c6184 Add GSC NU tier list (#2531) 2016-04-23 10:25:54 -07: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
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
794d160eec Refactor runImmunity
BattlePokemon#runImmunity is now two functions, runImmunity and
runStatusImmunity.

The split is helpful because: 1. NegateImmunity only applies to type
immunities, and 2. Immunity only applies to status immunities and
Ground immunities.

Ground immunities are now entirely handled hardcoded in isGrounded.

This overall doesn't have a noticeable impact on performance, but
it makes certain things behave more predictably, and correctly
shows the ability activation for Levitate, so I assume that means it's
a net positive. I hope I at least improved readability...
2016-02-19 05:18:40 -06:00
Marty-D
afe31af0b4 Gen II: Fix critical hit interaction with screens 2016-02-15 23:16:07 -05:00
Marty-D
6e9d443ddd Gen II: Fix female Attack DVs 2016-01-24 23:32:39 -05:00
Marty-D
6c767da19a Gen II: Fix Double-Edge recoil 2016-01-13 18:24:01 -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
The Immortal
2e85f15d51 Gen 2: Change back IVs variable 2015-12-29 22:34:59 +04:00
The Immortal
d3786b0680 Gen 2: Remove duplicate HP IVs
The gen 2 mod doesn’t need HP IVs due to 0883c65. Updated the relevant
Hidden Power checks.
2015-12-29 20:24:39 +04:00
Guangcong Luo
c23c45c0ac Fix gen 2 item validations 2015-12-27 04:59:11 -05:00
Marty-D
8d2c022c14 Gen II: Remove now unneeded items.
And fix up the real Gen 2 items.
2015-12-24 12:36:57 -05:00
Guangcong Luo
4a0b1a101d Remove duplicate gen 2 item descriptions 2015-12-24 08:26:47 -06: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
88c9902ebe Remove unused variables in old-gen random set builders
- Gen 2: `isSetup` is not even assigned a value.
- Gen 5: unmaintained.
2015-12-03 19:55:19 -05:00
Marty-D
a0876824c1 Gen II: Fix Flail and Reversal
They can't crit and don't perform damage variance.
2015-11-23 18:42:13 -05:00
Marty-D
c5b5885709 Gen II: Implement screens properly
Watch out for rollovers!
2015-11-14 11:42:58 -05:00
Marty-D
ebf197734b Gen II: Fix stat calculation
No longer shall paralyzed Pokemon have a Speed of 1.
2015-11-14 10:41:39 -05:00
Marty-D
7bfee1b079 Gen II: Add weather modifiers to the damage formula
And put SolarBeam's rain check where it belongs.
2015-11-09 12:24:53 -05:00
Marty-D
e7b96c067f Gen II: Fix crash in Sleep Talk 2015-11-08 20:07:30 -05:00
Ivo Julca
8619ba2022 Turn on strict mode globally for real 2015-11-08 15:38:15 -05:00
Guangcong Luo
ded9f1cd5d Fix duplicate cases in random set generators 2015-11-07 23:12:19 -06:00
Ivo Julca
04c64c143e Cleanup: remove several unused variables 2015-11-07 17:34:21 -05:00
Ivo Julca
90973d5c0c Style fixes
- Cut down excessive spacing
- Add braces to missing conditionals
2015-11-07 17:08:09 -05:00
Ivo Julca
2c2a3bdf58 Fix misplaced cases in random sets generators 2015-11-07 16:50:51 -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
Guangcong Luo
afaa6d225a Fix Gen 2 Belly Drum display
We now use a -hint to convey that a +2 boost still happens in Gen 2
when Belly Drum fails.

Also, a bug in which 'x2 Atk' didn't appear was fixed.
2015-09-22 23:56:14 -05:00
Ivo Julca
407be53178 Add a noSketch flag to unsketchable moves across gens 2015-09-09 22:32:49 -05:00
Ivo Julca
85d92a58f4 Rename validateSet|Team and changeSet: prefix with "on" 2015-08-20 17:24:26 -05: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
Ivo Julca
15b925f7e4 RBY-GSC Randbats: Fix high incidence of later gen Pokémon 2015-07-16 13:33:42 -05:00
Ivo Julca
baadd0a92f Overhaul old-gen random team builders
Mainly follow-up for 1deedc595, but also fixes a few bugs.
- BW/GSC/RBY - randomSet: fixed and renamed slot argument.
- BW - randomTeam: crashlogger relative path was set incorrectly.
- BW - randomTeam: PotD Magikarp and Delibird used outdated randomBattleMoves data format.
- RBY - randomTeam: builder was too reject-happy regarding weaknesses (counters prematurely updated).

An improvement of 130% more op/s is observed for RBY randomCCTeam,
with no significative performance regression for randomTeam in any gen.
2015-07-16 12:03:14 -05:00
Ivo Julca
261f246357 Update GSC Drain+Subs mechanic hint to use -hint 2015-07-03 19:30:56 -05:00
Guangcong Luo
9f8829197b Note that gen 2 drain-substitute mechanic is not a bug 2015-07-03 20:19:56 -04:00
Marty-D
1d7f27c655 Gen II: Smoochum can't legally learn Lovely Kiss
- There are no males in the Human-Like group that can pass it down
2015-06-26 15:04:04 -04:00