Commit Graph

857 Commits

Author SHA1 Message Date
The Immortal
8da6d39a9f Random Battle: Fix several checks
And prevent Night Shade with two other attacks.
2015-12-07 04:12:24 +04:00
The Immortal
a6d06116ff Random Battle: Keep track of the available moves
Previously, it only did so if the set had a setup move. This fixes a
bug introduced in the last commit, as well as checks that used these
counters.
2015-12-07 03:31:51 +04:00
The Immortal
4cfed633b4 Random Battle updates
- Do not reject attacking moves if they are none in the pool; no STAB
is better than a messed up set
- Set HP to activate Sitrus Berry after two subs
- Fixes #2306
2015-12-07 03:15:02 +04:00
The Immortal
2624c9fe51 Random Battle: Some setup improvements
- Reject Growth without Sunny Day
- Don’t count speed setup as a setup move if the Pokemon has a setup
move (fixes Landorus-T)
2015-12-06 20:32:24 +04:00
The Immortal
6fdb6a21eb Random Battle: Limit EVs to 85 2015-12-05 19:06:17 +04:00
The Immortal
6729fa0c80 Random Battle: Fix Mega Gardevoir 2015-12-05 01:07:49 +04:00
The Immortal
25344c2e24 December tier changes
- Megas tiered separately
- Remove custom Random Battle levels for Megas without stones
2015-12-05 00:20:22 +04:00
The Immortal
34fd61e1f3 Random Battle updates
- Fix Mega Lucario with only Bullet Punch as STAB
- Make sure dual typed Dark Pokemon have a reliable STAB
- Make sure dual typed Psychic Pokemon have a second STAB
- Only reject moves if there are moves in the pool to replace it
2015-12-04 15:32:33 +04:00
The Immortal
33e7e3c9fa Random Battle: Prevent Choice Band Dragon Tail 2015-12-04 02:17:11 +04:00
The Immortal
ddf2e27a4b Random Battle: Improve Healing Wish sets 2015-12-02 19:17:14 +04:00
The Immortal
758da01ccc Random Battle: Few improvements
- Fire types always get a Fire move
- Smeargle gets Focus Sash
2015-12-02 01:07:48 +04:00
The Immortal
29bfbd89f2 Update OMotM
Still have to code the second OMotM, but put the first one up, and
removed old seasonal.
2015-12-01 16:50:23 +04:00
The Immortal
cf89ca7bf6 Random Battle updates
-  Add Earth Power to Arceus-Dragon as it only has two Special moves
(which results in bad sets because of Calm Mind)
- Increment the correct type counter for Judgment
- Make sure Dragon types have a Dragon move, in certain circumstances
- Fix the “Pokemon should have benefiting moves” check to reject the
right moves (such as rejecting the 2nd setup move, and moves of the
incorrect setup type, first)
2015-12-01 03:50:47 +04:00
The Immortal
0b2cb6bda2 Random Battle: Few updates
- Reject Focus Punch, Sucker Punch, and Hidden Power when moves are
processed, not after (if they are the only attacking move)
- Simplify the checks for too many Dark moves by using the new type
counter; this should fix remaining Spiritomb issues as well
2015-11-28 14:13:08 +04:00
The Immortal
50365d9e2a Random Battle: Reset IVs if Hidden Power was removed
This was mistakenly removed in the previous commit.
2015-11-28 04:30:31 +04:00
The Immortal
d1877237ea Random Battle: Improve Genesect formes
Genesect formes tend to get bad sets because of the obligatory Techno
Blast. Removed Physical setup from them to fix this.

In addition, removed moveset modifications as they are no longer needed.
2015-11-28 03:54:49 +04:00
The Immortal
b19e7fd45b Random Battle: Improve Ground types and Rain Dancers
- Water Pokemon that have Rain Dance should have a Water attack as well
- Ground Pokemon that setup should always have a Ground attack
2015-11-28 00:08:34 +04:00
The Immortal
6eb94903dd Random Battle: Improve Kecleon
Make it so Protean users have at least one non-priority move.
2015-11-27 20:53:58 +04:00
Guangcong Luo
32a9c20ddd Give miss animations to spread moves in singles 2015-11-26 04:17:06 -05:00
The Immortal
7956c0135a Random Battle: Few improvements
- Add Vacuum Wave to Infernape
- Replace Thunder Punch with Stone Edge on Hawlucha
- Don’t count Vacuum Wave as STAB
- Prevent Vacuum Wave with Close Combat or Mach Punch
- Make sure Darkrai has Dark Void
- Make sure Yveltal has a Dark move
2015-11-26 13:00:57 +04:00
The Immortal
4068c7689a Random Battle: Team details additions
- Prevent multiple Toxic Spikes setters
- Reject Sand Veil if the team doesn’t have a sand setter
2015-11-26 02:56:03 +04:00
The Immortal
ccba1a64b9 Random Battle: Improve Liepard
This prevents it from getting Sucker Punch if it has Copy Cat.
2015-11-24 16:52:34 +04:00
The Immortal
ebef173e3d Random Battle: Fix RestTalk check 2015-11-24 15:31:04 +04:00
The Immortal
c8fea66fb2 Random Battle updates
- Check the move pool of a Pokemon when deciding to accept
Physical/Special setup
- Don’t count `NoStab` moves as STAB for Protean users
- Prevent Dark Pulse with Hyperspace Fury
- Fix Aura Sphere/Shadow Claw rejection to check setup
- Prevent too many Ice moves on Refrigerate Pokemon
- Reject Acid Spray with any Special moves
- Do not reject Bullet Punch with Adaptability
- Improved the rejection of moves that don’t satisfy setup requirements
- Make sure Gale Wings has a Flying move
- Remove unneeded combo checks (the consensus is that STAB is better
than Ghost/Fighting or Electric/Ice coverage)
- Give AG (Mega Rayquaza) the same chances of appearing as Uber
2015-11-24 06:55:10 +04:00
Kevin Lau
e6f0fb9760 Random Battle: Fix issues with deprecated 'ate' counter 2015-11-23 16:45:02 -08:00
Kevin Lau
6bcee1926d Random Battle: Update Gligar, Mega Charizard, Pyroar, and more
Gligar always gets Immunity.

Reject Solar Power on Mega Charizard (both formes)

Update move selection to ensure Fire Pokemon with Drought/Sunny Day get a
Fire move.
2015-11-23 16:22:34 -08:00
Kevin Lau
d8deac0e58 Random Battle Refactor: Track damaging moves of each type
Adds counters for each type in queryMoves. Many updates to ability checks
were also needed.

Also, update Random Double Battles to use teamDetails like Singles.
2015-11-23 16:22:32 -08:00
Marty-D
0d37b7946d Seasonal: Fix custom movesets
Merge conflicts were being resolved in the wrong direction, giving all Pokemon their normal Random Battle movepools.
2015-11-22 21:46:14 -05:00
Ivo Julca
52f1d43d3d Battle Factory: do not read Pokémon flags
They have been unused for a while.
2015-11-17 21:47:24 -05:00
Kevin Lau
53032b2851 Random Battle: Don't count weak moves for Life Orb item checks
By checking the damagingMoves index length instead of the number of
Physical and Special moves, it not only ensures no Life Orb for Pokemon
with Rapid Spin, but also Nuzzle (such as Pachirisu) and any other
potential cases that have been missed.
2015-11-17 11:56:51 -08:00
The Immortal
3af21a71f2 Random Battle: Prevent multiple Fire/Poison moves 2015-11-13 23:32:10 +04:00
The Immortal
5812136ddf Random Battle updates
- Add Knock Off to Watchog
- Prevent Ice Shard as the only STAB
- Prevent Superpower with RestTalk
- Only allow Endeavor on leads

(Fixes #2261)
2015-11-12 23:26:04 +04:00
Ivo Julca
4410843e5a Unhardcode alternate forme handling in random team generators
- Use the recently added `battleOnly` template property to handle formes not directly allowed in-battle.
- Implement utility method `checkBattleForme` to unify handling of Mega and Primal formes.
2015-11-11 20:28:13 -05:00
The Immortal
a52d655e07 Random Battle: Prevent U-turn as the only STAB 2015-11-12 02:09:46 +04:00
The Immortal
65dfd4ee27 Random Battle: Improve Heliolisk
Fixes #2259.

And removed an unnecessary check for Forecast as the Castforms have their own sets now.
2015-11-11 23:47:35 +04: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
2c2a3bdf58 Fix misplaced cases in random sets generators 2015-11-07 16:50:51 -05:00
Ivo Julca
0479d2b729 Clean up handling of variable bindings in switch statements 2015-11-06 21:58:36 -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
Ivo Julca
ef4963e030 Battle Factory: PU is now playable 2015-11-06 01:00:43 -05:00
The Immortal
7b625b7380 Random Battle: Update levels for megas without stones 2015-11-05 03:18:43 +04:00
Juanma Serrano
41167748b6 Seasonal: Keep naming convention for team generator
Seasonal team generators all should be randomSeasonalNameTeam.
2015-11-04 01:18:23 +01:00
Ivo Julca
6742c1e2a6 Fix Seasonal corrupting randbats moves 2015-11-02 07:53:47 -05:00
Juanma Serrano
22d6f81294 Merge pull request #2201 from ascriptmaster/seasonal
Implement November Seasonal, Super Squad Showdown
2015-11-02 08:16:13 +01:00
The Immortal
11fd83d7f8 Random Battle: Move and Item updates
- Prevent Hidden Power as the only STAB on dual-typed Pokemon
- Prevent U-turn and Volt Switch with Baton Pass
- Prevent Life Orb on Forretress
2015-11-02 01:31:47 +04:00
Kevin Lau
a38aa59eaa Implement November/December Seasonal, Super Squad Showdown 2015-10-29 17:15:43 -07:00
Kevin Lau
fc0237649c Random Battle: Update Swellow
Remove Endeavor.

Force Guts on Pokemon with the ability and have Protect.
2015-10-28 15:29:45 -07:00
The Immortal
872c4995a6 Merge pull request #2237 from ascriptmaster/randoms
Random Battle: Ability and STAB Changes
2015-10-26 22:59:22 +04:00
Kevin Lau
ea1a2dee8c Random Battle: Setup and STAB Fixes
Reject Sucker Punch if it is the only STAB move on a Pokemon with moves
that boost Special attacks.

Fix issues with setupType not being set properly with setup moves
appearing in mixed sets.
2015-10-26 10:41:05 -07:00