Commit Graph

754 Commits

Author SHA1 Message Date
The Immortal
1a79ddb045 Random Battle updates
- Do not count Fake Out as STAB because it can only be used once per
switch-in
- Protean means the Pokemon always has STAB and shouldn't get any move
removed in post-processing
- Prevent too many Dark-type moves
2015-02-28 02:04:08 +04:00
The Immortal
6d747f7921 Random Battle: Rapid Spin users prefer Assault Vest
rather than Life Orb or Expert Belt
2015-02-27 20:58:57 +04:00
The Immortal
582a794dbe Random Battle: Give offensive Protect users Life Orb
Speed Boost Blaziken/Sharpedo should not get Leftovers with Protect if
they have 3 attacking moves.
2015-02-27 01:40:29 +04:00
The Immortal
b1c39356af Random Battle: Prevent Rain Dance and Sunny Day together
Affects Castform.
2015-02-27 00:23:00 +04:00
The Immortal
e3ef841a98 Random Battle: Give Deoxys-Attack Life Orb
It currently gets Leftovers if it has Stealth Rock, and has a chance of
getting Expert Belt as well, but it should never get any other item. It
is a special case because there isn't a glass cannon as extreme as this.
2015-02-24 19:03:45 +04:00
The Immortal
499364050e Few Random Battle updates
- Prevent too many Dark-type moves
- Modify custom levels
2015-02-23 19:50:22 +04:00
The Immortal
d4917938ce Random Battle: Increase Aegislash's level 2015-02-23 05:16:37 +04:00
The Immortal
9a0820a95f Merge pull request #1555 from ascriptmaster/randoms
Random Battle: Don't count Rapid Spin as a Technician move
2015-02-23 04:43:48 +04:00
The Immortal
ab4fe73c9c Random Battle: Do not count Quick Attack as STAB
It is not acceptable as the only STAB move because it is a 40 base power
Normal-type attack... No Normal-type Technician gets it either, unlike
other priority moves.
2015-02-23 04:42:17 +04:00
Kevin Lau
6c291a3051 Random Battle: Don't count Rapid Spin as a Technician move
Affects Hitmontop, since if its only Technician move is Rapid Spin it'd
much rather prefer Intimidate as an ability.
2015-02-22 15:49:20 -08:00
The Immortal
f500da9767 Random Battle: Give Leftovers to Clear Smog users
It's used on defensive Pokemon that shouldn't get Life Orb, Choice or
Expert Belt. Also removed checks that where added because of the old
Weakness Policy selection.
2015-02-23 01:15:32 +04:00
The Immortal
c32666c178 Random Battle: Move Multiscale check
The previous one doesn't apply to Dragonite or Lugia. This prevents
Focus Sash Lugia if it is your first Pokemon.

Also moved the low priority Black Sludge selection above Leftovers for
the case of Poison/Flying Pokemon.
2015-02-22 14:04:40 +04:00
The Immortal
4f50a7de2d Merge pull request #1552 from ascriptmaster/randoms
Random Battles: Move rejection updates
2015-02-22 13:58:17 +04:00
Kevin Lau
684261287e Random Battles: Move rejection updates
- Reject Trick/Switcheroo with Acrobatics so that the Pokemon can properly
  receive Flying Gem
- Reject Rapid Spin with setup
- Do not reject Knock Off with setup
2015-02-22 00:37:26 -08:00
The Immortal
9b5aad7bdd Merge pull request #1550 from ascriptmaster/randoms
Random Battle: Item Updates
2015-02-22 02:13:15 +04:00
Kevin Lau
6b3fbb342a Random Battle: Item Updates
- Prevent Focus Sash and Life Orb with Multiscale.
- Add Custap Berry as a low-priority item for Sturdy + Explosion
2015-02-21 14:04:23 -08:00
The Immortal
e51a210571 Random Battle: Prevent three Electric attacks 2015-02-21 20:24:57 +04:00
The Immortal
15f1689117 Random Battle: Remove Technician check added in 5feb725a58 2015-02-21 14:13:30 +04:00
The Immortal
68379309ad Merge pull request #1542 from ascriptmaster/randoms
Random Doubles Battle: Update Movesets
2015-02-21 03:58:58 +04:00
Kevin Lau
61ce18abcc Random Doubles Battle: Update Movesets
Mostly Gen 1-2 Pokemon were changed.

Added Moonblast where the usage stats were indicating that it was as
commonly used than Dazzling Gleam in Doubles. Reject Moonblast with
Dazzling Gleam.

Reject Return with Double Hit (for Ambipom).

Reject Power Split with Guard Split (for Shuckle).

Reject Acid Spray with Sludge Bomb (for Tentacruel).

Pokemon with Focus Energy have Scope Lens.

Aeroblast is now considered STAB.
2015-02-20 15:55:19 -08:00
The Immortal
5feb725a58 Random Battle updates
- Reject Body Slam instead of Glare (so Dunsparce has a higher chance of
getting Glare + Headbutt rather than Body Slam + Headbutt)
- Reject Substitute with Taunt
- Update moves that are unacceptable as the only attacking move
- STAB is required for almost every mono-attacking case, exception is
that Fairy is allowed for Psychic types and Ice is allowed for certain
Normal types
- Always give Sylveon Hyper Voice
2015-02-21 03:12:04 +04:00
The Immortal
587cc30238 Random Battle: Reject Glare with Body Slam 2015-02-20 16:34:18 +04:00
The Immortal
5ae1ea63a7 Random Battle: Remove custom level for Mega Salamence
It is strong in Ubers, much like Gengar.
2015-02-20 15:42:39 +04:00
The Immortal
6367f2ff87 Random Battle: Few changes
- Cacturne is too slow to ever make use of Destiny Bond
- Prevent Choice with Charge Beam
- Updated custom levels
2015-02-20 15:24:08 +04:00
Guangcong Luo
b341a4d830 Merge pull request #1531 from Slayer95/randbats-3-moves
Randbats: fix incomplete movesets
2015-02-19 19:53:21 -06:00
The Immortal
c557c4565c Random Battle updates
- Slurpuff gets Drain Punch in ORAS
- Update Kecleon's moves (old moves for Color Change are irrelevant)
- Update items with Unburden
2015-02-20 02:47:00 +04:00
Ivo Julca
7cb4a4913f Randbats: only reject moves if there are enough remaining moves
This fixes for real the issue of Pokémon with multiple viable Hidden Powers getting less than four moves sometimes.
2015-02-19 17:11:49 -05:00
Ivo Julca
369a74abe3 Random Battle: properly track chosen moves 2015-02-19 16:58:03 -05:00
The Immortal
58d74807f7 Merge pull request #1539 from ascriptmaster/randoms
Random Battle: Refactor STAB Move Checks
2015-02-19 15:21:45 +04:00
Kevin Lau
1a5f1a4eff Random Battle: Refactor STAB Move Checks
The current variables in place to check for STAB do not work as intended.
If a Pokemon has two STAB moves of the same type, and one of them is set
as a move that shouldn't be counted as STAB, the Pokemon will be counted
as not having STAB. Since nothing in the code checks for Pokemon having
STAB of a specific type, it is refactored to be a boolean instead.

In order to avoid a situation where a move like Infestation sets the STAB
variable to true when it doesn't count as a damaging move, these kinds of
moves no longer increment counters for abilities that boost damage, like
Adaptability.
2015-02-18 20:03:49 -08:00
The Immortal
c9eadece1a Random Battle: Increase non-mega Lopunny's level 2015-02-19 01:17:02 +04:00
The Immortal
6e981e090d Merge pull request #1535 from ascriptmaster/randoms
Random Battle: Update Unfezant
2015-02-18 23:42:03 +04:00
Kevin Lau
ae80be8cf0 Random Battle: Update Unfezant
- Force Super Luck on Unfezant (it has a 33% chance of getting Big Pecks)
- Force Scope Lens on Unfezants with enough attacking moves
- Give Unfezant Night Slash
- Replace Wish with Roost in Doubles
2015-02-18 11:39:46 -08:00
The Immortal
9115982978 Random Battle: Reject speed setup without enough attacking moves
Also, not sure why Baton Pass was prevented with Trick. I can't remember
why I added that because it was probably long ago.
2015-02-18 22:50:38 +04:00
The Immortal
a9723181fa Random Battle: Update item for Eruption / Water Spout
It already gets Choice Scarf/Specs from the check above if it has no
status moves.
2015-02-18 21:51:58 +04:00
The Immortal
e2beae32b9 Random Battle updates
- Reject Water Spout and Eruption with setup or RestTalk
- Allow Origin Pulse with RestTalk
- Give Extremespeed users and Sucker Punch users without STAB Life Orb
instead of Expert Belt
- Prevent Life Orb with Dragon Tail
- Low priority: give Leftovers to Pokemon weak to Stealth Rock
2015-02-18 21:37:45 +04:00
Kevin Lau
ecb82454fa Random Battle: Add Scope Lens to Super Luck Pokemon (low-priority)
Super Luck + Scope Lens gives a 50% chance of crit, but isn't a very high
priority since a consistent damage boost from a Choice item can be a
better pick.
2015-02-16 22:58:29 -08:00
The Immortal
c34ec4b133 Random Battle: Reject Focus Blast with RestTalk 2015-02-16 17:51:25 +04:00
Kevin Lau
d46dbe58a0 Random Battle Updates
- Lumineon and Poliwrath have Storm Drain and Water Absorb respectively,
  which is always chosen over Swift Swim, so Rain Dance is unneccessary.
- Give Pokemon with Unburden a Focus Sash
- Give Unburden mons with stat-lowering moves a White Herb (specifically
  targets Sceptile)
2015-02-16 01:20:36 -08:00
Ivo Julca
5b689c0eb0 Random Battle: ensure max IVs for sets without Hidden Power 2015-02-15 18:45:44 -05:00
The Immortal
f126ce9e50 Random Battle: Prevent RestTalk + Rain Dance/Sunny Day 2015-02-15 22:05:34 +04:00
The Immortal
71fc094d36 Forgot this in the previous commit 2015-02-15 21:57:30 +04:00
The Immortal
15fbafeb2f Random Battle updates
- Added speedsetup counter
- Improve Weakness Policy selection (might give it to more than just
speedsetup later on but this is much better than the previous
implementation that gave it to very bad sets)
- Added Lustrous Orb as a low priority option for Palkia
- Slightly increased defensive requirement of Assault Vest
2015-02-15 21:23:24 +04:00
The Immortal
85f7d4c172 Random Battle: Reject Explosion with Wish
Affects Lickilicky.
2015-02-15 15:43:53 +04:00
Ivo Julca
b810465c97 Sync parameters for randomSet functions 2015-02-15 01:05:03 -05:00
Ivo Julca
1deedc5952 Improve performance and debuggability of random team makers
- 30% more op/s for randomTeam, randomDoublesTeam and randomCCTeam
- 300% more op/s for randomHackmonsCCTeam
- Implement helper method `sampleNoReplace`: takes an array parameter, removes a random element and returns it.
- Random team makers now follow the game RNG. Therefore, it's now possible to reconstruct the teambuilding process for bad sets, given that the starting seed is known.
2015-02-14 23:22:27 -05:00
The Immortal
e7c74ca15f Random Battle: Fix Arceus having horrible sets 2015-02-15 01:56:45 +04:00
The Immortal
ab07e9b7a5 Random Battle updates
Went through all fully-evolved Pokemon and updated their moves. Also
removed illegal moves on several Pokemon...

- Added Superpower to SetupException
- Reject Water Pulse with Scald
- Reject Acrobatics with Hurricane
- Prevent Focus Blast and Superpower together
- Reject Physical moves with Acid Spray (only affects Eelektross)
- Do not reject Baton Pass with Protect
- Reject Healing Wish with setup
- Reject Hydro Pump with RestTalk
- Prevent Precipice Blades with Earthquake
2015-02-15 01:40:57 +04:00
The Immortal
1a76c6001b Random Battle: Reject Hidden Power as the only damaging move
It is only acceptable with STAB, such as Unown or Lunatone.
2015-02-13 16:39:25 +04:00
The Immortal
95d9df4611 Random Battle changes
Fixes #1524
- Modify Lumineon's moves; it is far too weak for Hidden Power to be
useful
- Add 5a131be906 to singles like I
originally meant to
2015-02-13 13:40:23 +04:00
The Immortal
5a131be906 Random Battle: Count Low Kick as a Technician move
Specifically affects Ambipom, who prefers Technician over Skill Link if
it doesn't have any multi-hit moves and has Low Kick.
2015-02-13 04:23:19 +04:00
Kevin Lau
f83bec30eb Random Battle: Improve Hidden Power checks
- In accepting Shadow Ball + HP Fighting, ensure that it's HP Fighting
  (relevant for Reuniclus, Chandelure, and Sylveon, which have Hidden
  Power that aren't Fighting)
- If Hidden Power changes the IVs but is later removed by another
  processing cycle, reset the IVs to 31 all
2015-02-12 16:10:41 -08:00
The Immortal
1087e1d3ee Random Battle: Fix Hidden Power check 2015-02-13 03:08:18 +04:00
The Immortal
85b0179d7b Random Battle changes
- Shadow Ball + HP Fighting is an acceptable combination with setup
- Slightly lower Regigigas' level
2015-02-13 00:06:26 +04:00
The Immortal
44478cb429 More Random Battle updates
- Fix multiple Flare Blitz cases
- Reject Substitute with Draco Meteor
2015-02-12 03:27:57 +04:00
The Immortal
496778bad5 Random Battle: Update items
- Add more cases for Leftovers
- Increase priority for Lum Berry with setup and Outrage
2015-02-12 03:10:05 +04:00
The Immortal
9447b46709 Improve Random Battle item selection
- Removed old check for "bulky" Pokemon as it would give Leftovers to
Pokemon that would prefer Life Orb or even Assault Vest. For example,
Kyurem-White and Goodra, respectively.
- If the Pokemon has three attacking moves, give Life Orb to those with
either setup or a recovery move, and give Leftovers to everything else.
2015-02-12 02:10:08 +04:00
The Immortal
4b2e43ce47 Random Battle: Reject Overheat with Lava Plume 2015-02-12 00:08:03 +04:00
The Immortal
56cf5d2257 Random Battle: Increase Altaria's level 2015-02-11 23:43:44 +04:00
The Immortal
e56dcd070c Random Battle updates
- Give Keldeo HP Flying instead of HP Ghost
- Reject Hidden Power if the Pokemon has a special setup move and only
one other special attack
- Dark/Fighting is resisted by Fairy this generation and isn't a
"perfect" combination anymore
2015-02-11 20:43:00 +04:00
The Immortal
9624888b79 Update Random Battle levels
Added AG and removed Mega Gengar custom level.
2015-02-10 16:18:18 +04:00
Kevin Lau
9921f2524b Random Doubles Battle Update
- Remove Feint from Pikachu/Raichu
- Replace Rock Blast with Rock Slide on Golem line
- Add Surf to Octillery
- Reject Strong Jaw without bite moves
- Update Iron Fist check to use the punch flag
- Give preference to Rock Slide over Head Smash
- Give preference to Discharge over Thunderbolt and Electroweb
2015-02-09 11:46:22 -08:00
The Immortal
ed3307a1af Update Random Battle
- Modify Tyrantrum's moves
- Add bite moves counter for Strong Jaw
- Use punch flag for ironfist counter
- Give preference to Stone Edge over Head Smash
2015-02-09 22:44:13 +04:00
Juanma Serrano
027357076b Merge pull request #1515 from ascriptmaster/seasonal
Seasonal: Remove Baton Pass
2015-02-09 09:17:14 +01:00
Kevin Lau
eecb0c80b2 Seasonal: Remove Baton Pass
With the way the Han Chinese side's morale system works, Baton Pass is
broken at high morale.
2015-02-08 15:59:55 -08:00
The Immortal
3a8e7c2613 Random Battle: Reject Unburden for high base speed Pokemon
Specifically affects Accelgor, who should never be using Unburden.
2015-02-09 02:02:22 +04:00
Juanma Serrano
7990e0a5f5 Merge pull request #1512 from ascriptmaster/seasonal
Seasonal: Nerf Han Chinese Side, Flavor Changes
2015-02-08 22:44:18 +01:00
The Immortal
4cfb2894ca Random Battle: Improve Mega Altaria 2015-02-08 20:36:13 +04:00
Kevin Lau
a1a86a4454 Seasonal: Nerf Han Chinese Side, Flavor Changes
Mechanics Changes:
- Fire Rocket does less damage, cannot crit.
- Fire Rocket is no longer a bullet move (for Chesnaught)
- Only Li Shang can Train Recruits.
- Recruits start with lowered defenses as well.
- Edit Mushu's movepool.

Flavor Changes:
- Train Recruits now uses Bulk Up's animation.
- Fire Rocket now uses Eruption's animation. Backfires cause the animation
  to strike the user instead!
- Use Searing Shot as Fire Rocket instead of Octazooka.
2015-02-08 00:54:54 -08:00
The Immortal
bb4579545b Random Battle updates
- Modify moves
- Make sure Mega Gardevoir has a Normal move
- Reject Thunder Wave with Gyro Ball
2015-02-06 14:37:06 +04:00
Kevin Lau
0d229a88e5 Random Battle: Diversify Xerneas' Moveset
Also added checks to accommodate for the fact that Xerneas is no longer
guaranteed to have Geomancy, and only lower its level if it has Geomancy.
2015-02-05 17:47:59 -08:00
Guangcong Luo
956566f856 Merge pull request #1502 from Joimer/UnawareFix
Fix Unaware in Doubles and refactor stat ignoring abilities
2015-02-05 11:59:21 -06:00
Juanma Serrano
64b2246260 Fix Unaware in Doubles and refactor stat ignoring abilities
Unaware currently doesn't work because the ModifyMove event is fired on the move before each target is caculated in doubles and triples.
This means that the ModifyMove event should be fired for each target and the move not modified unless it fits the attacker-target.
It's easier and less expensive to use an ability property to check on attacker/target than to fire events.
This fixes Unaware in doubles/triples.
It takes account interaction with Mold Breaker, Gastro Acid, and other ability supressers.
2015-02-05 10:38:17 +01:00
Juanma Serrano
5dda5b88e2 Merge pull request #1504 from ascriptmaster/seasonal
Seasonal: Implement February Seasonal: Han vs Hun
2015-02-05 09:17:54 +01:00
Kevin Lau
70bf8eb547 Seasonal: Implement February Seasonal: Han vs Hun
Seasonal is based on Mulan, in honor of Chinese New Year.

General Shang must defeat the Huns, but his new recruits are weak! Over
time, however, they will get stronger over time by training (just like the
movie, they train during I'll Make A Man Out Of You.) Singing will also
make them train faster.

The Han Chinese also have powerful rockets at their disposal (select
Octazooka in battle). However, the rockets sometimes backfire on new
recruits, but as they train the chance of backfire goes down.
2015-02-04 19:45:23 -08:00
The Immortal
c224668a9c Random Battle: Make sure Mega Salamence has a Normal move
Also, the moves array contains ids already.
2015-02-04 21:57:27 +04:00
The Immortal
b3a3228f2a Random Battle: Remove Medicham's custom level 2015-02-03 23:26:29 +04:00
Kevin Lau
60f8d8143a Seasonal: Retire Spacetime Funtimes
January is over, so the Seasonal must pass.
2015-02-03 02:59:42 -08:00
Kevin Lau
7fb61bf240 Double Random Battle: Reject Wide Guard with Protect 2015-02-02 14:37:09 -08:00
Kevin Lau
b5dac325a8 Random Battle: Reject Serene Grace on Blissey and Chansey 2015-02-02 09:14:27 -08:00
The Immortal
46ef95c615 Random Battle: Fix -ate ability check 2015-02-01 23:55:50 +04:00
The Immortal
cf10105824 Random Battle: Reject -ate abilities with no Normal moves 2015-02-01 22:17:47 +04:00
Guangcong Luo
cb6949d49d Merge pull request #1493 from ascriptmaster/randoms
Random Battle: Reject Aurorus Snow Warning with Hyper Voice
2015-02-01 12:07:59 -06:00
The Immortal
95be15b2d6 Random Battle: Fix Serene Grace being on Blissey/Chansey 2015-02-01 17:38:28 +04:00
ascriptmaster
2219dd099b Random Battle: Reject Aurorus Snow Warning with Hyper Voice
Added a counter that tracks Normal damaging moves for purposes of -ate
Abilities, in case it becomes important later. This counter also
future-proofs Aurorus in case it receives other viable Normal attacks
later.
2015-02-01 01:32:21 -08:00
Guangcong Luo
072d37d6f7 Merge pull request #1491 from ascriptmaster/randoms
Random Battle Updates
2015-01-31 21:17:54 -06:00
Kevin Lau
b2cc14f5e2 Random Battle: Reject Quick Attack with Feint 2015-01-31 14:30:23 -08:00
Guangcong Luo
43ed3cbbbf Merge pull request #1487 from Slayer95/mega-evolution
Pokémon cannot megaevolve to themselves
2015-01-30 20:44:54 -06:00
Ivo Julca
6607d1c53b Pokémon cannot megaevolve to themselves
- Rename randbats helper function `canMegaEvo` to `hasMegaEvo`.
- Move duplicate mega evolution possibility checks from `runMegaEvo` and BattlePokemon constructor to `canMegaEvo` battle script.
2015-01-30 20:54:34 -05:00
Kevin Lau
3565c5a1fa Random Double Battle: Fix Stone Edge Typo
Rock Slide was mentioned twice. The second one was meant to be Rock Blast
2015-01-30 16:56:42 -08:00
Kevin Lau
803063d496 Random Doubles Battle: Fix Stone Edge Redundancy Check
Stone Edge somehow was a case three times in the switch statement, meaning
only the first one would have been checked. This fix merges the three
checks into one.
2015-01-30 16:18:42 -08:00
Marty-D
13ab79f0f9 Fix Sucker Punch working on redirection
- Also fixes Protean interaction with certain moves that would otherwise
fail
2015-01-30 18:41:46 -05:00
The Immortal
38db6fd2b3 Random Battle: Reject Shadow Claw with Shadow Ball
Should have been done with 66615c5331.
This is for Aegislash.
2015-01-28 19:50:25 +04:00
The Immortal
66615c5331 Update Random Battle
- Aegislash is too slow for at level 70 for Autotomize and prefers one
of its other moves
- Prevent Iron Head with Flash Cannon
2015-01-28 14:24:50 +04:00
Kevin Lau
caee7a0457 Random Battle: Change conditions for priority moves
If a Pokemon has a move that boosts speed (Rock Polish/Agility), reject
all modified-priority moves.

If a Pokemon has 4 Physical or 4 Special moves, reject Choice Scarf if the
Pokemon has a priority move.
2015-01-27 10:59:43 -08:00
Marty-D
5de159bee3 Past gens: Fix recovery moves' rounding
- Prior to Gen 5, recovery moves rounded down instead of half up
- Gen 2 weather-dependent recovery moves restore all HP in sun
2015-01-24 16:40:31 -05:00
The Immortal
05f8a26130 Prevent multiple Hidden Power in Hackmons CC 2015-01-22 18:26:51 +04:00
The Immortal
94a56552d8 Update randomCCTeam 2015-01-21 17:05:14 +04:00
The Immortal
d038f1f7c4 Update Hackmons Challenge Cup 2015-01-20 23:38:13 +04:00
The Immortal
1fcde879d3 Add Hackmons Challenge Cup 2015-01-20 22:45:54 +04:00
The Immortal
dfb16963a5 Random Battle: Prevent some status moves with Rest + Sleep Talk 2015-01-20 02:42:46 +04:00
The Immortal
c1b0b09d05 Random Battle: Reject Mach Punch with Focus Punch
Breloom is the only Pokemon that gets both and will get the better
ability with only one of them. Basically, no more Poison Heal Mach Punch
and no more Technician Focus Punch.
2015-01-19 16:34:36 +04:00
The Immortal
93e5a516a4 Random Battle: Allow Life Orb on non-setup
Four attacks + Leftovers is bad.
2015-01-19 15:49:43 +04:00
The Immortal
7033c0a83a Random Battle updates
- Eternal Flower Floette prefers Choice Scarf/Specs sets
- Lower the rate of Unreleased Pokemon to 20%
2015-01-19 15:02:40 +04:00
ascriptmaster
b3f9efed5d Split the Randoms check for Sheer Force and Serene Grace
- Serene Grace is automatically rejected for Chansey and Blissey, who
  prefer Natural Cure.
- Serene Grace works best with secondaries that have a high chance of
  activating, so a seperate counter is used to check those specifically.
- Sheer Force doesn't need a secondaries chance check; both branches of
  the check would have allowed Sheer Force to be used.
2015-01-18 18:56:31 -08:00
ascriptmaster
08fdf3de80 Random Battle Item Changes
- Dedenne gets Petaya Berry, since it always has Cheek Pouch
- Dusclops no longer gets Eviolite, because it's covered elsewhere in code
2015-01-18 01:01:22 -08:00
The Immortal
0d7f119000 Random Battle updates
- Add Eviolite for NFEs
- Removed old and mostly unused custom levels
- Updated some Pokemon levels
- Removed all NFE Pokemon from Random Battle except for Chansey,
Doublade, Pikachu, Porygon2,  and Scyther
2015-01-18 03:32:12 +04:00
Kevin Lau
1b27f8e99d Change items involved when a Pokemon has Acrobatics or Unburden
- Acrobatics Pokemon have Flying Gem.
- Hawlucha no longer has Sky Attack in its random battle movepool, so we
  remove references to that in the code.
- Double Random Battles only check for Fake Out on Unburden Pokemon (and
  formerly Sky Attack on Hawlucha, which is removed, so there is no need
  to cycle through all of their moves.
2015-01-17 01:44:58 -08:00
Juanma Serrano
d9c367ff65 Fix more Travis Build Errors
Add a spaces after tests.
2015-01-15 09:31:36 +01:00
The Immortal
4ce0b4f3a4 Random Battle: Reduce the rate of Cosplay Pikachu 2015-01-14 23:56:42 +04:00
Kevin Lau
2a7ae1790e Tweak Double Random Battles to include the same things as Random Battle
- Allow tiered NFE Pokemon
- Gourgeist formes have equal chance
- Pikachu formes have equal chance
2015-01-14 10:14:06 -08:00
The Immortal
8bd17725af Fix error in previous commit 2015-01-14 22:03:18 +04:00
The Immortal
23c830562a Update Random Battle
- Allow NFE Pokemon that are tiered
- Pikachu formes have an equal chance
2015-01-14 21:54:57 +04:00
Guangcong Luo
420531220f Merge pull request #1422 from ascriptmaster/randoms
Add Cosplay Pikachu's Random Battle movepool
2015-01-14 01:45:07 -08:00
Kevin Lau
74258baa75 Add Cosplay Pikachu's Random Battle movepool
Normal (no costume) Cosplay Pikachu is not included because its movepool
is just an inferior Pikachu one.
2015-01-13 01:01:12 -08:00
gamut-was-taken
4f8fe01a4d Change Compoundeyes to Compound Eyes
Pokemon such as Butterfree receive the Compound Eyes ability even when they do not have any inaccurate moves.
2015-01-12 17:42:41 -05:00
Kevin Lau
b4fdad485c Give Farfetch'd the Stick item in Random Battles 2015-01-12 13:45:10 -08:00
Guangcong Luo
ba426e0a73 Fix Burn+Explosion
Explosion/Selfdestruct used to be unaffected by burn. This commit
fixes that.
2015-01-10 01:39:35 -05:00
ascriptmaster
1c634b07fc Fix Hidden Powers on Terminator Scenario
Reduce all speed IVs by 30 to the lowest possible values that conserve the
typing of Hidden Power (since it's based on odd vs even)
2015-01-08 18:33:45 -08:00
The Immortal
020f704185 Free Contrary Serperior 2015-01-08 15:21:33 +04:00
Juanma Serrano
202fb7c09a Minor Seasonal improvements
Fix typo.
Lower level from Mega-Swampert and Milotic on sailors.
2015-01-07 18:00:09 +01:00
Juanma Serrano
97f4919c63 Seasonal: Further balance for the unbalanced scenarios
A series of changes to make sure battles are as balanced as possible.
Made Frodo Ground/Fairy.
Made Samwise Normal/Fairy.
Switched Gandalf and Saruman boosts.
Added Gollum for Mordor, which is pretty much annoying and Fighting-type move absorber.
Changed Swords Dance for Bulk Up on Aragorn to prevent unstoppable sweeps.
Added a SpD boost for Moses to be able to stand to the pharaoh. Also a cool sentence.
Made John Connor faster (slower but in TR) than Terminator T-1000 to give humans an even lead matchup.
Made Blissey on humans have a decent moveset. Including Barrier, yes.
Made specific sets for Hitmontop and Scrafty on humans, being able to take Robot hits.
Made electric attacks on sailors less likely, 66% instead of 100%.
2015-01-07 17:14:15 +01:00
Juanma Serrano
9ed9d251b4 Random Battles: Make HP Odd on Stealth Rock weak Pokémon
This change makes 1/4 weak Pokémon survive four switch ins and 50% weak Pokémon survive two Switch-ins.
Belly Drum HP still takes precedence (having Charizard in mind kek).
2015-01-07 15:02:14 +01:00
ascriptmaster
3e08561e00 Slightly tweak Exodus Scenario of Seasonals
- Groudon no longer has Water Absorb (relevant because of Hebrew
  Seismitoad)
- Removed Hebrew LC mons (but not Egyptian ones)
- Limit one Yahweh/Arceus per team
2015-01-06 19:09:08 -08:00
ascriptmaster
50ee39a3b2 Heavily balance Sailor Scenario in Seasonals
- Removed the rediculous level boost to most Pokemon.
- Tweak EVs for Lucario, Swift Swimmers, and Shell Smashers.
- Removed all LC sailors and fishes, and added some new Pokemon.
- Remove Rain Dance from sailor sets (mostly Swampert)
- Prevent 2 Mega Pokemon on a team for the Sailor Scenario
2015-01-06 18:37:11 -08:00
Joimer
7f7786c003 Seasonal improvements
Make Unburden Hitmonlee Reckless on Terminator battle.
Limit Lucario on megas too.
Improve zam's moveset on that battle as well.
Minimise speed on Terminator battle.
Make Chansey have Eviolite.
2015-01-06 21:47:34 +01:00
Joimer
20ef5de780 Seasonal: Update shipwreck battle
Make a more even lead battle of Machamp VS Kyogre.
Machamp is now a Technician Life Orb mon with mixed attack.
Kyogre has now a specific Choice Scarf set.
To not to make Machamp too overwhelming, its level is 75.
This, alongside Life Orb, makes it manageable with Kyogre out.
A trade of hits will end up with either fainted and the other at 10% HP.
2015-01-06 15:17:08 +01:00
Joimer
591b29fcb8 Seasonal: Further user request changes
Gen 1's defenses were too low, raise them a little.
Change Bolt Strike for Fusion Bolt on sailors, this achieves an almost perfect balance.
Nerf Charizard-Y slightly on Red VS Blue battle. Too strong.
Nerf Hoopa-Unbound's level too, as it's too damn strong.
2015-01-06 14:45:27 +01:00
Joimer
c017521990 Improve Seasonal after user requests
Added a way to effectively dealing with Smaug on LOTR, adding Bard as a possibility.
Frodo now gets evasion thanks to the one ring, it's invisible after all.
Nerf Groudon slightly on Desert, it is able to sweep an entire team with bad luck on the Pokémon chosen.
Nerf slightly Alakazam on Red vs Blue battle, it can take on a team easily.
Nerf defenses on Gen 1 team so damage is closer to that of Gen 1 (more).
Swampert should not get any boost on sailor team, otherwise it's an insta-win.
2015-01-06 14:31:10 +01:00
Joimer
6bafeb1f84 Seasonal: Nerf Yveltal
Too strong if mega gallade is out
2015-01-05 23:59:20 +01:00
Joimer
8180e0d036 Implement new Seasonal, Spacetime Funtimes 2015-01-05 13:12:07 +01:00
The Immortal
d1b457e0c6 Increase non-mega Pinsir level in Random Battle 2014-12-30 14:29:10 +04:00
Marty-D
7977b2c3cd Fix unsuccessful two-turn moves
Previously, if an invulnerable move's second turn was prevented from
executing, the user would remain invulnerable until the end of the turn.
2014-12-29 14:08:25 -05:00
The Immortal
93b623cc1b Allow Sturdy with recoil + recovery in Random Battle 2014-12-24 23:19:04 +04:00
Freigeist
0e85da224d Reject Sleeptalk + Lunar Dance in random battles 2014-12-23 16:36:45 +01:00
Juanma Serrano
412bf38d75 Gen 2: Fix AfterMoveSelf events
Leech seed, etc., must be activated just after the Pokémon moves and even if asleep or FP.
2014-12-22 13:23:04 +01:00
The Immortal
14b63873a3 Move mega evolution message to client 2014-12-20 21:56:15 +04:00
The Immortal
41cc584d16 Make Random Battle changes
- Prevent Oblivion Wing + Hurricane Yveltal
- Increase non-mega Banette's level
2014-12-20 21:15:14 +04:00
Juanma Serrano
6b3a5e8e18 Random Double Battles: reject Chlorophyll unless the Pokémon itself has Sunny Day
See: http://www.smogon.com/forums/threads/joims-to-do-list.3486934/page-3#post-5895492
2014-12-19 14:17:40 +01:00
The Immortal
e20060fa10 Update Random Battle 2014-12-19 00:46:21 +04:00
Guangcong Luo
2b80496baf Revert "Reject Rock Head with less than two recoil moves"
This reverts commit 4bc29710b4.
2014-12-18 15:35:29 -05:00
Guangcong Luo
132d55f840 Revert "Update Random Battle"
Don't remove Balloon Rotom-Fan without asking, that's just rude.
:|

This reverts commit fcaee25009.
2014-12-18 15:32:52 -05:00
Juanma Serrano
0114ad3dae Improve Seasonal with user suggestions
Improved the set maker to avoid bad sets due to Present.
Made the mountain 500 meters shorter.
Made the chance to hit an obstacle slightly lower.
Added weight to the sleigh that is lowered by throwing Presents and makes you faster.
2014-12-17 17:08:49 +01:00
The Immortal
4bc29710b4 Reject Rock Head with less than two recoil moves
in Random Battle
2014-12-17 13:41:59 +04:00
The Immortal
fcaee25009 Update Random Battle
- Added moves to Cherrim
- Changed levels
2014-12-17 13:33:32 +04:00
ascriptmaster
ad8a820d5b Update Balloon Fan Rotom (Rotom-Spin)
- Modified level scale so that it's less bad
- Removed Trick from its movepool because it's useless with Balloon
2014-12-17 00:18:10 -08:00
ascriptmaster
eb847519a3 Nerf Articuno in Random Battles
Reduced to Level 82.
2014-12-17 00:18:09 -08:00
ascriptmaster
6797a7b245 Reject Head Smash with Sturdy
Donphan is mostly going to have Sturdy, so we also remove it from its move
set and replace it with some better stuff.
2014-12-17 00:18:08 -08:00
ascriptmaster
469641c05e Don't give Normal Gem to Pokemon with Rapid Spin 2014-12-16 01:14:19 -08:00
Guangcong Luo
a95f2bcbe7 Merge pull request #1353 from asgdf/patch-12
Fix MRay to count as a mega in randbats team
2014-12-12 01:19:59 -06:00
asgdf
98cc285002 Fix MRay to count as a mega in randbats team 2014-12-12 02:22:41 +01:00
Juanma Serrano
608086189d Improve Seasonal Sleigh Showdown
Eliminate megas from teams.
Make freeze from event make you unable to move that turn.
Freeze thawing was meant to be when hit, not after a turn after all. Fixed comment.
2014-12-11 13:50:32 +01:00
asgdf
13139b4ec3 fix moves[] containing non-id move names 2014-12-10 20:45:47 +01:00
Juanma Serrano
1b75007647 Implement new Seasonal Ladder, Sleigh Showdown 2014-12-10 18:01:39 +01:00
Marty-D
8c2b18c622 Fix forced switch mechanics.
- Red Card and Eject Button do not activate if the holder is being
forced out.
- Circle Throw, Dragon Tail, Roar, and Whirlwind cannot attempt to force
out a Pokemon with no inactive unfainted allies.
2014-12-06 11:53:26 -05:00
The Immortal
b64287b64f Prevent Flare Blitz with Fire Blast in Random Battle 2014-12-06 16:31:15 +04:00
The Immortal
37fd088915 Random Battle updates 2014-12-06 16:25:00 +04:00
Guangcong Luo
151b7ea61a Merge pull request #1334 from ascriptmaster/primal
Ability refactor - Abilities now receive End events properly
2014-12-03 16:43:29 -06:00
ascriptmaster
e79e64e3fc Ability Refactor: Abilities now listen for End events
Added functionality for setAbility to send End events to abilities.

Fixed bug with Mold Breaker negating all Battle#singleEvent ability calls,
even those that don't involve damage calculation.

Fixed Skill Swap to now use End and Start events in the right order:
send the End events, then change the abilities, then send Start events.
If the same ability is swapped, don't send End events (the game simply
re-activates the abilities in question)

Moved SwitchOut/Faint events from weather to ability so the weather
can interact properly with Cloud Nine or Air Lock.

Primal weathers persist if a Pokemon with the relevant ability is
on-field, even if the originator switches out.
2014-12-03 12:22:21 -08:00
Ivo Julca
01de2eadf9 Magician's handler is now purely a global event
Reverts 3b5d455
2014-12-02 20:25:02 -05:00
Joimer
d3b233d8ac Update the Mega Pokemon check
There is no need to store whether the team has a mega anymore.
With the general use of pokemon.canMegaEvo and it being set to false for
the whole team after a mega evolution, it is what we need to check to avoid
more than one mega evolution or banned mega evolutions.
2014-11-29 23:58:27 +01:00
ascriptmaster
b6fcb793dc Mega Evolution now ends primal weathers from base form
Sends an EndAbility event when you mega evolve so the weather can check.
2014-11-26 12:58:56 -08:00
The Immortal
e2af6d65cc Fix Travis CI errors 2014-11-22 19:25:33 +04:00
The Immortal
bcf19608c9 Update Mega Rayquaza
Rayquaza does not have a mega stone; it can mega evolve with the move
Dragon Ascent.
2014-11-21 16:26:56 +04:00
The Immortal
1b302c7117 Random Battle: Prevent Flame Charge with Tailwind 2014-11-15 23:53:08 +04:00
Juanma Serrano
26c03e50f3 Update Seasonal Strikes Back: Add safeguard against hash collision
There's an improbable chance that a nickname gets a hash collision.
In such a case, the player gets five instead of six Pokémon.
This safeguard prevents that improbable event from happening at all.
2014-11-11 18:30:59 +01:00
ascriptmaster
15b04f0a8a Fix every error in the Travis CI Build / npm test 2014-11-10 10:57:38 -08:00
Joimer
2ff379f51e Implement november seasonal, Seasonal Strikes Back
Seasonal format is a random battle format that changes its rules monthly.
It often includes limited Pokmon pools, wacky mechanics you'd never encounter in game, and other fun stuff.
2014-11-10 11:34:12 +01:00
Joimer
6b10f3961d Exclude Magikarp's Revenge from Smeargle's movepool in Challenge Cup 2014-11-10 01:02:30 +01:00
Ivo Julca
d5b7034da1 Remove unnecessary checks for sound immunity
As of ecbc9bfd62, no effect provides an "immunity" to sound.
2014-11-05 21:26:25 -05:00
Audiosurfer
3d66859182 edit to random doubles item generation 2014-10-29 21:06:41 -05:00
The Immortal
e304345fe1 Modify Articuno's Random Battle level 2014-10-23 02:39:14 +04:00
Guangcong Luo
ffcce9d746 Randbats ORAS level-balance update
Groudon-Primal, Kyogre-Primal, and Rayquaza-Mega are now level
70 in randbats
2014-10-21 16:43:11 -04:00
Guangcong Luo
fd23027573 Fix level scaling for unreleased megas
Reverts f4cd04a651
2014-10-21 02:38:30 -04:00
Guangcong Luo
623ff87f74 Merge pull request #1265 from ascriptmaster/skydrop-patch
Sky Drop refactor and bug fixes
2014-10-19 23:23:53 -05:00
ascriptmaster
2ffaf0fc77 Sky Drop refactor and bug fixes
- Changed Sky Drop to use onTryHit on its first hit as well as its second,
  allowing it to check for Protect and Fly naturally.

- Added messages when a Pokemon is freed from Sky Drop.

- Allow Flying-type Pokemon to be hit by Sky Drop if their Ground immunity
  has been removed.

- Added BeforeMovePriority to allow Sky Drop to interact with Stance
  Change properly.

- Prevent a Pokemon trapped by Sky Drop from Mega Evolving.

- Added onRedirectTarget to allow Sky Drop to interact with Ally Switch
  properly.
2014-10-19 20:15:16 -07:00
The Immortal
26e882c976 Set even HP for Belly Drum + Sitrus Berry Pokemon in Random Battle 2014-10-20 01:07:17 +04:00
The Immortal
f4cd04a651 Set unreleased forms to the same level as the regular form in Random Battle 2014-10-19 17:06:16 +04:00
The Immortal
f3acd8bbd4 Fix crash 2014-10-18 19:18:05 +04:00
The Immortal
a72edc4ad1 Implement Primal Reversion 2014-10-18 19:10:17 +04:00
The Immortal
69e9d3d52f Fix Primal formes in Random Battle 2014-10-18 17:33:33 +04:00
The Immortal
db24264fae Change Lightningrod to Lightning Rod
It has been changed in ORAS.
2014-10-16 15:15:15 +04:00
Audiosurfer
38d915c7e3 resist berries only chosen for 4x weak in randdubs
made it so that shuca berry and chople berry will only be selected in randdubs in the case of a 4x weakness as opposed to being potential item picks for 2x or 4x weaknesses
2014-10-07 23:49:05 -05:00
Relados
cee46bb34c Prevent Life Orb with HP reliant attacking moves
Pokemon that have Eruption or Water Spout should not generate with Life Orb in random battles.
2014-10-07 00:24:40 -04:00
Ivo Julca
64f22e4fd4 Fix Mega check in b078d698 2014-10-03 13:36:28 -05:00
Ivo Julca
12bafc7036 Merge pull request #1223 from Audiosurfer/master
Conflicts:
	data/scripts.js
2014-10-03 13:31:34 -05:00
Audiosurfer
b078d698fe changes to random doubles item generation
- added charti & occa for 4x weaknesses
- made yache only for 4x weaknesses
- made it so you cant have fake out & sheer force (9-21-14)
- changed it so shuca berry and chople berry won't be added to
immunities
- unburden mons only have normal gem if they have fake out as opposed to
any normal attacking move
- made life orb more common over expert belt

fixed error in shuca generation

typoed, but fixed it so now it should only give shuca berry to pokemon
without a ground immunity

fixed broken indentation

fixed issues pointed out by slayer95

should have fixed the indentation and edited the  immunity check
2014-10-02 17:27:32 -05:00
The Immortal
c09498b58f Give Belly Drum Pokemon Sitrus Berry in Random Battle 2014-10-03 01:09:18 +04:00
The Immortal
84fedef174 Prevent Fake Out with setup in Random Battle 2014-10-01 20:05:44 +04:00
The Immortal
250c2e6af2 Prevent Spacial Rend with Draco Meteor in Random Battle 2014-10-01 18:54:44 +04:00
Guangcong Luo
80f8ff8dcd Merge pull request #1217 from kotarou3/style
Add some extra style checks to jshint and fix them in the files
2014-09-30 13:29:08 -07:00
The Immortal
72b36653dc Prevent Rest / Sleep Talk with speed boosting moves in Random Battle 2014-09-30 22:20:23 +04:00
小太
fe37f3b6a7 Apply jscs to the data files as well 2014-09-30 18:34:16 +10:00
小太
5027be79fb Add jscs as a style checker, and add some extra jshint options 2014-09-29 18:38:01 +10:00
The Immortal
53c4d953eb Modify Lopunny in Random Battle
Added the possibility of Klutz + Assault Vest + Switcheroo to
perma-taunt an opposing Pokemon.
2014-09-27 01:37:32 +04:00
The Immortal
4ab1090017 Update Random Battle
- Fix #1226
- Remove HP Electric from Empoleon
- Prevent Drain Punch with Superpower
2014-09-26 00:46:51 +04:00
The Immortal
8ca3da8f0a Prevent Flare Blitz with Sacred Fire in Random Battle 2014-09-19 20:25:00 +04:00
Relados
33b15dc383 Prevent Sacred Fire with Will-o-Wisp in randoms
Like Lava Plume, having Will-o-Wisp with Sacred Fire is redundant and the Pokemon would be better off with another move.
2014-09-16 23:12:56 -04:00
The Immortal
67dd902bc5 More Random Battle changes 2014-09-16 02:02:43 +04:00
The Immortal
bbeee481a1 Allow Volt Switch with another Electric move in Random Battle
This should solve the three moves bug on certain Pokemon.
2014-09-16 00:52:43 +04:00
The Immortal
265378088e Update Random Battle set generator
- Fixed repeated cases in moves
- Prevent Thunder Wave with setup
2014-09-15 23:32:19 +04:00
The Immortal
9bf54a127a Change Choice Scarf range in Random Battle 2014-09-15 23:04:41 +04:00
The Immortal
f32d331e8a Prevent Expert Belt with Fake Out / Return in Random Battle 2014-09-12 17:01:17 +04:00
The Immortal
313d144139 Prevent Defog with setup in Random Battle 2014-09-12 16:37:37 +04:00
The Immortal
f9a2407b8b Reject Gluttony in Random Battle
Every Pokemon that has Gluttony has a better alternative
2014-09-12 13:17:43 +04:00
The Immortal
040add20ac Prevent Air Balloon with Solid Rock in Random Battle 2014-09-11 20:34:59 +04:00
The Immortal
7c20a3854d Reduce Expert Belt in Random Battle
In favor of Choice Scarf. Expert Belt is now limited to mixed attackers.
2014-09-11 20:07:55 +04:00
The Immortal
77c889f612 Update Random Battle generator 2014-09-11 19:19:07 +04:00
The Immortal
9e05dbd15e Make sure Bisharp gets Defiant in Random Battle 2014-09-11 00:11:30 +04:00
The Immortal
09fd38776a Update Random Battle generator
Prevent Reversal + Leftovers
2014-09-10 20:32:13 +04:00
Guangcong Luo
8c631590b8 Fix multiple Hidden Powers in random battle 2014-09-06 13:26:53 -04:00
Guangcong Luo
f99b4fe751 Fix randbat set generator being too reject-happy
So yeah, this is a major bug in the randbat set generator, but other
than performance issues and the random 3-move pokemon, it shouldn't
have any other implications.
2014-09-04 16:12:29 -04:00
The Immortal
c4f44ea0dd Update Random Battle
Added PU level
2014-09-02 22:27:33 +04:00
The Immortal
45903b2e90 Lower Xerneas' level in Randoms 2014-09-02 00:38:30 +04:00
Ivo Julca
300302cec3 Give Black Sludge back to Poison-types in randbats
Accidentally removed in f57e771e8
2014-08-29 17:50:20 -05:00
Guangcong Luo
cff9737680 Merge pull request #1167 from Slayer95/ruleset-modding
Properly load banlist tables for modded formats
2014-08-25 11:20:53 -05:00
Ivo Julca
f57e771e8c Refactor randbats set generators a bit
- Move some variable declarations outside of loops.
- Use single-line if statements wherever reasonable.
- Update a check for Hyper Fang to Gen 6.
- Fix Ghost types getting Chople Berries in Random Doubles Battles.
- Fix a typo intended to fix in d24b184b and another one introduced in the same commit.
2014-08-25 01:42:17 -05:00
Ivo Julca
b4ec88610f Properly load banlist tables for modded formats
They are no longer loaded in Tools.getFormat, which could be called from any modded tools and cached the bans.
2014-08-24 22:24:09 -05:00
Ivo Julca
9a1ad50574 Fix Quick Guard failing to protect from moves called by other moves 2014-08-23 20:05:50 -05:00
Ivo Julca
69254f0c25 Fix bug from random battle moves refactor 2014-08-13 19:07:31 -05:00
Guangcong Luo
c286e46177 Remove randomBetaTeam; April Fool's is long over 2014-08-13 17:04:05 -04:00
Guangcong Luo
ac7f1d22b4 viableMoves are now randomBattleMoves
randomBattleMoves is now an array, and has been renamed from
viableMoves since it no longer is used for anything other than
random battles.

This commit also does some cleanup of some code relating to
random battle moves, including fixing gen 1's randomSet function,
which apparently has never worked.
2014-08-13 17:03:21 -04:00
Guangcong Luo
af2026436a More style fixes and Gulpfile updates
JSHint is now a fair bit stricter, and is now correctly checking
files in `mods/`.

The code has been fixed to match the new stricter standards.

JSHint has now caught its second actual bug: Gen 5 Pinap Berry
was Ice instead of Grass.
2014-08-10 20:43:53 -04:00
Guangcong Luo
12b673bb49 Fix style errors; update gulpfile
I used a hack to make the multiple declaration errors go away,
so all that remained in jsHint were actual errors, which I've
now mostly fixed.

All this linting ended up uncovering one actual bug: Uproar's
message not showing. It's a very minor bug in a move no one uses,
so I'm going to fold it into this commit.
2014-08-10 18:06:44 -04:00
V4Victini
3e3505e673 Add fail message for forceSwitch moves.
If the opponent cannot be switched due to having no more available pokemon, the move should fail.
2014-08-07 18:41:26 -04:00
The Immortal
e6ae62f6e4 Fix mega evolution mechanics
In Hackmons, Mega Charizard Y can mega evolve into Mega Charizard X, for example
2014-08-03 23:35:09 +04:00
V4Victini
882dfe7d19 Flame Charge is not a valid STAB 2014-08-01 02:46:47 -04:00
V4Victini
41c46e67d4 Aeroblast is a valid STAB move
The one who committed that probably meant Sky Attack. Like Bounce it is also a 2-turn move. Aeroblast is a 100 BP Special Flying-Type attack. Very STAB-worthy.
2014-07-31 11:56:04 -04:00
Guangcong Luo
378aa9670f Nerf randbats Xernas slightly 2014-07-21 23:38:56 -04:00
Guangcong Luo
6e626048a2 Nerf randbats Sigilyph 2014-07-21 23:29:22 -04:00
Slayer95
802cde5a30 Make sure that sleep stops multihit moves
If a pokémon fell asleep due to Effect Spore while performing a multi-strike move called by Assist or Metronome, the move wouldn't be stopped.
2014-07-16 04:01:24 -05:00
Slayer95
828154a6e6 Move global events ´TryHitField´ and ´TryHitSide´ to ´tryMoveHit´ 2014-07-16 00:26:53 -05:00
Slayer95
c2966e1d51 Fix Protean for moves targetting the field 2014-07-15 20:18:40 -05:00
Slayer95
377345454f Shed Bell may be nullified by Sheer Force
Also remove 'AfterMove' global event from all gens, and 'AfterMoveSelf' from Gen 3 onwards.
2014-07-14 19:03:38 -05:00
Slayer95
684a2a4418 Fix more bugs with Protean
- Fix an issue introduced in 6539521adc, where Protean didn't activate if the target was immune to the move.
- Protean should not activate if the user fails a Detect/Protect, or the move is Fling or Natural Gift and the user has no item.
- Protean should not activate on the first turn of a Pledge Combo. Aditionally, fix Flash Fire/Storm Drain, etc being activated by the first move in the combo.
- Introduce event 'PrepareHit', which is ran after any move target is resolved but before immunity is checked.
2014-07-12 21:42:02 -05:00
Slayer95
4c8df32744 Merge branch 'triples' 2014-07-09 22:29:18 -05:00
小太
09e0503b25 Remove trailing whitespace 2014-07-05 19:02:39 +10:00
The Immortal
4436cd283a Randbats: Prevent Foul Play with setup 2014-06-28 18:10:39 +04:00
Relados
f457e99af3 Improve mega selection in randoms
Megas now have their own viable moves, so that more unique megas like Heracross, Charizard and Mewtwo can have their viable options.

Potential mega evolving candidates can now be selected without their mega stone.  For example, if the team has Gengar with Gengarite, Heracross without Heracronite can be added.

Make multiple mega evolution selection random

It mistakenly always picked the Y forme rather than randomly choosing either.

Reduce number of getTemplate() calls

Slayer95 pointed out that this is a better implementation.

Fix syntax error

Improve randoms mega selection

Simplifying the code by having the mega template stored in 'template'.  For abilities, the original template is stored in 'baseTemplate'.  Also added the improved mega selection for Random Doubles, which would be affected by giving viable moves to megas in formats-data.js.

Improve mega selection in randoms

Megas now have their own viable moves, so that more unique megas like
Heracross, Charizard and Mewtwo can have their viable options.  Potential
mega evolving candidates can now be selected without their mega stone.
For example, if the team has Gengar with Gengarite, Heracross without
Heracronite can be added.
2014-06-27 17:53:11 -05:00
Slayer95
a6287a0bbc Fix Shield Dust for multitarget moves 2014-06-21 21:26:41 -05:00
Slayer95
a7efa2c350 Make sure that moves restricted to adjacent targets have valid targets
Also Helping Hand's targetting is not hard-coded anymore.
2014-06-16 17:28:30 -05:00
Slayer95
6a48ce030d Tweaks for adjacency check methods 2014-06-12 02:02:37 -05:00
Guangcong Luo
fba2f9d64d Merge pull request #990 from Slayer95/multihit
Fix Gen 4 multihit chance
2014-06-08 21:53:29 -05:00
Guangcong Luo
75bb5dd186 Fix Explosion faint order 2014-06-08 22:37:38 -04:00
Slayer95
62f6f9167b Fix Gen 4 multihit chance 2014-06-08 21:04:22 -05:00
Relados
3f407dc842 Allow Weather Ball with Rain Dance in randbats
This should only apply to Castform, but it needs all the help it can get.
2014-05-28 08:24:32 -05:00
Slayer95
13800312a9 Fix megaevo abilities activating too early
Any message sent on ability start was being sent before the megaevo message.
2014-05-24 10:40:56 -05:00
Slayer95
5d82f38b41 Fix recoil for multihit moves
- Recoil for Parental Bond Double Edge, etc should happen after all the hits have finished.
- Also removed the event 'Secondary', currently unused in the codebase.
2014-05-14 13:30:12 -05:00
Slayer95
52961253ae Obviate -formechange in mega evolution 2014-05-10 01:29:04 -05:00
Slayer95
e164c7f540 MegaEvo: tell the client that the change is permanent 2014-05-09 22:50:43 -05:00