Commit Graph

1026 Commits

Author SHA1 Message Date
The Immortal
3530e95a96 Random Battle: Fix Pokemon with both Physical and Special setup
such as Lucario. Instead of always setting `setupType` to `Special` for
those cases, it now sets it to the one with the most attacks (or random
if it’s equal).

Also, added another check to fix the issue of too many Dark type
attacks on a Pokemon.
2015-09-02 17:10:43 +04:00
The Immortal
fb55d5a032 Random Battle updates
- Fixed Stealth Rock (and Defog/Spin, which isn’t as big of a problem)
being on multiple Pokemon
- Reject Snow Cloak without Snow Warning on the team
- Reject Swift Swim without Drizzle/Rain Dance on the team
- Give Mega Venuasaur Chlorophyll as a starting ability (because
Overgrow is useless)
- Give RestTalk Pokemon Leftovers (so they don’t get Focus Sash if they
are the lead)
2015-08-28 16:46:32 +04:00
The Immortal
6fc79a1e39 Random Battle updates
- Give Regigigas Knock Off instead of Earthquake
- Reject Hidden Power with RestTalk
- Reject Toxic with Flame Charge
2015-08-27 21:26:18 +04:00
The Immortal
4c5bbdc40c Random Battle: Fix Sleep Talk without Rest 2015-08-20 21:59:58 +04:00
Konrad Borowski
f8266fc0b1 Add support to randbats for mega stone banning
This fixes a problem introduced by 77b6b666 causing certain Pokemon
with mega stones (and base forme of Audino) to have level 90 in
randbats.

This commit intentionally doesn't introduce any new levels for mons who
have their tier in parenthesis. Looking over the list of mons who don't
have hardcoded levels, most of them are barely improvement over their
base forme, which is the issue in a standard tiers with its limit of
one mega. However, because teams don't have to use a mega in randbats
(because of how its generator works), getting just a slightly version
of a Pokemon is not a big deal as it's still an improvement, even if
minor.
2015-08-20 10:36:59 +02:00
Kevin Lau
d0e18e3e15 Random Battle: Update Slurpuff
Give it Dazzling Gleam as an attack option, and reject Unburden on it if
it doesn't have setup moves.
2015-08-19 12:41:35 -07:00
Marty-D
6b0f323f69 Challenge Cup: Reduce chances of getting a forme-changing item
- Forme changes requiring an item were being generated too frequently
2015-08-17 14:59:13 -04:00
Kevin Lau
5790cf20fe Random Doubles Battle: Synchronize Ability selection with Singles
Many of the rules used in Random Singles Battles also apply to Doubles, so
many of them are transferred over to the Doubles set generation code.
2015-08-14 18:16:16 -07:00
The Immortal
46586337e6 Merge pull request #2110 from ascriptmaster/randoms
Random Battle: Add extra scenario for Choice Scarf distribution
2015-08-14 21:10:13 +04:00
Marty-D
afa03ac2a9 Improve Challenge Cup's forme selection 2015-08-14 11:39:41 -04:00
The Immortal
91e9744ed7 Random Battle: Improve Basculin, Wobbuffet, and sets
Mold Breaker is rated high but Basculin always prefer Adaptability. Add
Safeguard as an alternative to Destiny Bond for Wobbuffet (but prevent
both on the same set), and Sitrus Berry as an alternative to Leftovers.

Prevent Counter, Metal Burst and Mirror Coat from being rejected. They
only apply to Bastiodon, Chansey and Wobbuffet, who don’t care about
STAB.
2015-08-13 05:11:56 +04:00
The Immortal
f8f51ad4fc Random Battle: Improve Life Orb selection with Speed Boost
Life Orb is selected unless the Speed Boost user has Substitute (in
which case Leftovers is selected later on). Also moved the Speed Boost
check above the Choice checks so that they don’t have to check for
Speed Boost.
2015-08-12 21:27:25 +04:00
Kevin Lau
e09857fe9f Random Battle: Add extra scenario for Choice Scarf distribution
It is given to Pokemon within a certain speed tier with 3 Special attacks
and also U-Turn.
2015-08-12 00:54:55 -07:00
The Immortal
c2903eae0c Random Battle updates
- Add Foul Play to Mandibuzz
- Prevent more than one Stealth Rock setter per team
- Prevent more than one hazard remover per team
2015-08-10 22:28:06 +04:00
The Immortal
02945dd017 Merge pull request #2107 from ascriptmaster/randoms
Random Battle: Slightly tweak Hoopa, fix chance of Hoopa forme appearing
2015-08-10 03:18:37 +04:00
Kevin Lau
faea82765b Random Battle: Slightly tweak Hoopa, fix chance of Hoopa forme appearing
Reject Psychic with Hyperspace Hole in Doubles, and give Hoopa Trick Room.

Give Hoopa-Unbound Gunk Shot, Psychic, and Substitute.
2015-08-09 15:26:03 -07:00
Marty-D
02c7323fb8 Refactor breaking protection
- And fix Mat Block
2015-08-08 14:38:51 -04:00
The Immortal
ae6fc17ac3 Random Battle: Prevent Air Balloon with RestTalk 2015-08-08 04:50:51 +04:00
Guangcong Luo
08463c42a5 Merge pull request #2040 from ascriptmaster/seasonal
Implement August/September Seasonal, Rainbow Road
2015-07-30 03:49:41 +00:00
Kevin Lau
9ab24bd684 Random Doubles: Tweak Helping Hand, Heal Pulse, Trick Room distributions
Removed Helping Hand and Heal Pulse from Pokemon with very low usage stats
for those moves.

Reject Trick Room with Icy Wind.
2015-07-29 11:10:22 -07:00
The Immortal
f29e35ea9d Move Pidgeot to PU
And it’s custom Random Battle level isn’t needed anymore because it’s
unlikely (Mega) Pidgeot will go to OU.
2015-07-26 15:59:29 +04:00
Guangcong Luo
8fd4ea2bae Fix locked move and PP tracking interaction 2015-07-26 04:18:31 -04: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
The Immortal
e92714a2ed Random Battle: Prevent Outrage with Draco Meteor
if they are the Pokemon’s only two damaging moves.
2015-07-21 02:16:53 +04:00
Kevin Lau
411d741b08 Implement August/September Seasonal, Rainbow Road
Rainbow Road is a Mario Kart and color themed seasonal.

Every few turns, a player can get an item that changes the course of the
battle, such as a Mushroom to increase speed.

Pokemon also get color moves that are super-effective on certain other
colors.
2015-07-20 14:38:14 -07:00
The Immortal
ba5cb5d932 Merge pull request #2063 from SolarisFox/patch-2
Randoms: Enable Lilligant to get Own Tempo
2015-07-18 03:12:50 +04:00
The Immortal
5ed4a13610 Random Battle: Improve Pyroar and Rapidash
- Reject Sunny Day if the Pokemon lacks an ability that benefits, and
lacks SolarBeam
- Add Dark Pulse to Pyroar to fix the issue raised in #2063
- Reordered the Status cases to weather/status/recovery/other instead
of just alphabetical
2015-07-18 03:05:01 +04:00
SolarisFox
7eb1a284d9 Randoms: Enable Lilligant to get Own Tempo 2015-07-17 16:04:19 -07:00
Kevin Lau
b0e1fd5789 Fix Pressure's interaction with multi-target moves and Follow Me
Implement new function getMoveTargets to list all move targets given a
user and a move. Refactor Battle system to remove redundancies with
checking move targets. Run the RedirectTarget in this function instead of
later after TryMove, since technically single-target moves changing
targets should occur before the move is attempted.

Refactor the DeductPP event to be a singleEvent that targets the Pokemon's
ability instead of a global event. Run this event on the move's targets as
calculated by BattlePokemon#getMoveTargets.
2015-07-17 01:47:55 -07:00
Kevin Lau
e7688f518a Random Battle: Pikachu is no longer an allowed NFE
Also remove its Cosplay Pikachu formes since those don't register as
having evolutions.
2015-07-01 10:56:15 -07:00
Kevin Lau
cbef63343a Fix OHKO moves' interaction with accuracy-changing abilities/effects
Add a new event ModifyAccuracy that affects all moves other than OHKO
moves and switched many event handlers that originally used the Accuracy
event to ModifyAccuracy instead.
2015-06-29 17:22:42 -07:00
Kevin Lau
b1b9c05db6 Fix -fail messages appearing with Circle Throw/Dragon Tail 2015-06-26 23:10:45 -07:00
The Immortal
cc5ae35b44 Random Battle: Prevent Focus Blast with Close Combat 2015-06-24 05:35:58 +04:00
The Immortal
47d1bfb049 Random Battle: Fix Rhyperior's ability
Both of its other abilities are useless on it, so it should always be
getting Solid Rock.
2015-06-23 17:50:38 +04:00
The Immortal
50c7b574e0 Random Battle: Prevent Choice items with Body Slam
CB Dunsparce is bad. Even Jirachi doesn’t want Choice with Body Slam.
2015-06-21 15:56:55 +04:00
The Immortal
e562c14f9a Random Battle: Remove Unown, add Gligar
Unown is worse than LC Pokemon, which are not in Random Battle.
Gligar is UU, which is reason enough.
2015-06-20 18:18:47 +04:00
The Immortal
69b5648864 Random Battle: Improve Life Orb and Leftovers selection
Now uses Pokemon’s bulkiness. This fixes Mandibuzz receiving Life Orb,
and Greninja receiving Leftovers, with 3 attacks.
2015-06-20 17:01:15 +04:00
Ivo Julca
2bae97db67 Battle Factory: support similar sets' sharing probability mass 2015-06-14 01:15:32 -05:00
The Immortal
e9006768f0 Merge pull request #1955 from SolarisFox/patch-5
Randoms: Allow Mono-Attack Setup with BP, change Venomoth movepool
2015-06-13 22:35:12 +04:00
SolarisFox
63a3eb20c5 Randoms: Allow Mono-Attack Setup with BP 2015-06-13 11:20:48 -07:00
The Immortal
ca581b9e29 Random Battle: Prevent Zen Headbutt with Psyshock 2015-06-13 18:59:58 +04:00
Guangcong Luo
cf112d1d3c Merge pull request #1945 from Slayer95/jscs-rules
Implement custom JSCS rules to enforce code style
2015-06-13 06:18:24 +00:00
The Immortal
5e079da138 Random Battle: Give Wobbuffet a chance to get Custap Berry 2015-06-13 03:00:03 +04:00
Ivo Julca
f18eef39ca Fix Travis build 2015-06-12 03:41:22 -05:00
The Immortal
ae94ce4cc2 Update CC formats
Per Smogon, “Challenge Cup” is keeping its old meaning. Renaming the
new CC to Hackmons Cup.
2015-06-10 13:35:39 +04:00
Ivo Julca
26680768eb Properly handle failure of multitarget moves
- On failure, they will no longer trigger the `AfterMoveSecondarySelf` event. It was a common pattern to check for success on its handlers, so this removes some duplication.
- All failed moves will now run any set `MoveFail` single events.
- Life Orb will now harm the holder if a successful attack did 0 damage (e.g. False Swipe on a 1 HP target).
2015-06-09 19:31:11 -05:00
The Immortal
6d904e9096 Random Battle: Fix Megas being removed in d279b2ded5 2015-06-03 23:13:02 +04:00
Kevin Lau
d279b2ded5 Restrict Stealth Rocks on Random Battle Teams to 2
Refactor set generation function to use a new parameter `teamDetails` to
keep track of more than just whether there shouldn't be a Mega Evolution.
2015-05-31 17:52:42 -07:00
Guangcong Luo
b7aa629703 Merge pull request #1889 from ascriptmaster/move-fixes-2
Battle refactor: New function isGrounded(), bug fixes
2015-05-26 07:09:19 +00:00
Kevin Lau
61996d3f6e Battle refactor: New function isGrounded(), bug fixes
Added BattlePokemon#isGrounded to check for the grounded-ness of a
Pokemon. Also BattlePokemon#isSemiInvulnerable for whether a Pokemon is
in the first turn of a two-turn move that makes them semi-invulnerable.

Fixed Terrain bugs involving Pokemon in a semi-invulnerable state.

Changed OHKO move check to use BattlePokemon#isSemiInvulnerable, fixing a
graphical bug that would display an immunity message when a Pokemon
attempted an OHKO move on a higher-leveled Pokemon that was being held by
the effect of Sky Drop.

Fixed Misty Terrain bug that was causing Rest and the effect of Yawn to
put Pokemon to sleep.

Fixed Misty Terrain bug that was causing Yawn to fail.

Fixed Electric Terrain bug that was causing Yawn to succeed.
2015-05-21 16:54:44 -07:00
Kevin Lau
17724c59f0 Un-hardcode Rock Head in favor of an onDamage handler
Instead of having a hardcode in scripts.js that people needed to
reference, it seemed more intuitive to take advantage of the Damage
event instead, and have Rock Head negate damage within the event.

Fixed a bug in Gen-NEXT Rock Head exhibiting the same behavior that
was causing the original Rock Head + Mummy glitch.
2015-05-21 13:52:02 -07:00
Guangcong Luo
1824125753 Merge pull request #1887 from SolarisFox/patch-5
Style fix: indexOf() comparisons
2015-05-20 18:59:18 +00:00
Marty-D
0e2606b9b9 Fix failure message showing for self effects 2015-05-20 10:45:17 -04:00
Kevin Lau
276f5ff475 Random Doubles Battle: Item Distribution Update
- Removed Trick/Gyro Ball checks as no Pokemon uses that combination.

- Reject Life Orb on Pokemon with 55 or less base Speed.

- Add a check for slow and strong Regenerator Pokemon to receive Assault
  Vest, at slightly higher priority than Sitrus Berry.
2015-05-19 16:02:47 -07:00
Marty-D
c1a1ce85df Fix failure message showing for secondary effects 2015-05-19 15:49:45 -04:00
SolarisFox
29b961ff69 Style fix: indexOf() comparisons 2015-05-18 15:55:57 -07:00
The Immortal
fca467c76d Random Battle: Give Aegislash a better item
No more Assault Vest Aegislash!
2015-05-16 23:06:49 +04:00
Marty-D
27db03ebef Battle Factory: Fix Thick Fat resistances 2015-05-15 21:52:07 -04:00
Kevin Lau
b4ccff60dd Fix npm build errors 2015-05-15 01:08:25 -07:00
Ivo Julca
49b2898e28 Battle Factory improvements
- Reject teams significatively weak to a single attack type.
- Improve rejection of multiple megas.
- Reject weather-based abilities without their associated weather.
2015-05-14 16:10:51 -05:00
The Immortal
f7167c9393 Add new format: Battle Cup 1v1
In place of Challenge Cup 1v1. Challenge Cup 1v1 under the new Challenge
Cup rules (f73ea6a0ea) isn't a good
format. It's supposed to have some competitive element in that you can
make predictions on what an opponent might have to beat your "best"
choice and as a result you can counter-pick. But with the new Challenge
Cup, that goes out the window.

This adds a slightly updated version of the old CC generator.
2015-05-14 23:08:38 +04:00
The Immortal
f73ea6a0ea Update Challenge Cup
- CC now follows Hackmons mechanics to differentiate it from Random
further (in other words, CC is now Hackmons CC)
- Took this opportunity to finally rename CC 1v1
- Commented out Gen 1 CC
2015-05-12 13:48:14 +04:00
Guangcong Luo
8b7963e996 Merge pull request #1874 from ascriptmaster/tests
Upgrade tests
2015-05-12 06:25:38 +00:00
Rhythms
8ec0b193a4 Battle Factory: EV Fix
not really necessary, but "more proper"
2015-05-11 19:10:33 -06:00
Juanma Serrano
f9375a77a6 Merge pull request #1870 from Slayer95/battle-factory
Implement Battle Factory
2015-05-11 09:54:34 +02:00
Ivo Julca
3817311d9c Implement Battle Factory 2015-05-11 01:03:25 -05:00
Kevin Lau
93d5efef43 Status moves return -immune if the target is immune to the status move 2015-05-10 21:00:23 -07:00
Kevin Lau
c9c54ada16 Random Battle: Reject Toxic Spikes where Spikes is rejected
Prevents things like Shell Smash + Toxic Spikes.
2015-05-08 00:34:58 -07:00
Juanma Serrano
1a2882eb09 Remove March-April Seasonal, Super Staff Bros. 2015-05-04 17:35:21 +02:00
Marty-D
1209954765 Fix Sheer Force properly 2015-05-04 10:45:44 -04:00
Juanma Serrano
299213040d Fix Sheer Force
This adds the intended fix of bdd99e84d3 and fixes the problem that made all Sheer Force mons to ignore the AfterMoveSecondary event.
2015-05-04 12:15:09 +02:00
Marty-D
bdd99e84d3 Fix Sheer Force
- Sheer Force may not be user's Ability by the time `AfterMoveSecondary`
effects are checked
- Sheer Force boosted moves called by other moves now ignore
`AfterMoveSecondary` effects properly
2015-05-03 11:40:39 -04:00
The Immortal
bea648d979 Add tier changes 2015-05-03 09:35:05 +04:00
Marty-D
a92e38547f Fix Rock Head
- Since Mummy exists, it is entirely possible not to have Rock Head by
the time recoil happens
2015-05-02 15:05:42 -04:00
The Immortal
0000f4dfab Random Battle: Prevent Choice with Speed Boost
Fixes #1848
2015-05-02 13:35:51 +04:00
Joimer
5c9b7ed707 Remove unused team makers 2015-05-01 05:08:33 +02:00
Marty-D
c53d022e4b Fix OHKO moves
- Fix Gen 1/Stadium's accuracy and immunity order
- Fix OHKO moves ignoring Phantom Force
- Add OHKO messages
2015-04-30 13:06:45 -04:00
Slayer95
5788bf82b7 Merge pull request #1839 from Rhythms88/seasonal
Super Staff Bros.: Change Astyanax into Asty
2015-04-29 17:14:38 -05:00
Rhythms
fb9cc056b2 Super Staff Bros.: Change Astyanax into Asty 2015-04-29 16:12:56 -06:00
The Immortal
b270788e0d Merge pull request #1837 from SolarisFox/patch-4
add weakcoasta to randbats
2015-04-29 16:08:54 +08:00
SolarisFox
5f95a7cc3b add weakcoasta to randbats 2015-04-29 00:43:32 -07:00
The Immortal
8e6d7fd4c9 Merge pull request #1838 from Rhythms88/seasonal
Super Staff Bros.: Remove @Goddess Briyella.
2015-04-29 15:38:15 +08:00
Rhythms
0a57a27595 Super Staff Bros.: Remove @Goddess Briyella 2015-04-29 00:28:23 -06:00
Juanma Serrano
d44bfb3e92 Merge pull request #1823 from Rhythms88/master
Seasonal: Rank Changes
2015-04-27 08:45:03 +02:00
Ivo Julca
54c8c8a0ad Hackmons: fix decisions being overriden when Struggle is in the first slot 2015-04-26 17:36:36 -05:00
Guangcong Luo
4db053befe Revert "Show fail message when status is blocked by Sub"
This was implemented exactly the wrong way and showed fail messages
in a lot of situations they shouldn't show up, such as when
Close Combat's Def/SpD drops didn't happen.

This reverts commit 1edc40f936.
2015-04-25 21:58:09 -05:00
Rhythms
9b4c9617bb Seasonal: Rank Changes
- Promoted Acedia and Audiosurfer.
- Fixed one of Diatom's ranks.
- Moved shaymin's and MattL's moves to the correct areas, as well as
Acedia's and Audiosurfer's.
2015-04-25 13:15:40 -06:00
Juanma Serrano
9ace640bcc Merge pull request #1808 from RhythmsAreFromVibrations/seasonal
Super Staff Bros.: Add %Kayo
2015-04-25 14:57:08 +02:00
Kevin Lau
b55951d5db Random Battle: Slightly tweak Hidden Power rejection check
STAB Hidden Power without the Pokemon's other STAB can be bad. Since
there's no real way to check if the Pokemon has the other STAB with the
current system, it's better to remove that check.
2015-04-24 18:23:31 -07:00
The Immortal
3d2aee35ed Merge pull request #1810 from ascriptmaster/randoms
Random Battle: Improve Hidden Power rejection check
2015-04-25 06:44:15 +08:00
Kevin Lau
25d50dc2b1 Random Battle: Improve Hidden Power rejection checks
Reject Hidden Power with Special setup and 2 Special moves if:
- It is not STAB
- It is not part of a Ghost/Fighting combination
- It is not part of an Electric/Ice combination
- It is not being used by Lilligant, which needs it for coverage
2015-04-24 15:09:41 -07:00
Kevin Lau
04052d6449 Random Battle: Tweak Shedinja's EVs
HP/Def/SpD EVs are completely useless on Shedinja.
2015-04-23 19:45:47 -07:00
Joimer
4938087d53 Super Staff Bros.: Demote Vacate
He quit :(
2015-04-21 19:46:23 +02:00
Kevin Lau
43171a8613 Random Battle: Improve Trick Room rejection
Pokemon with Trick Room should be ready to attack once it's up, and don't
really have time to set up, so it's rejected with setup.
2015-04-21 01:30:42 -07:00
Rhythms
8c6edb7038 Super Staff Bros.: Add %Kayo
I also moved %Hugendugen's entry quote because it wasn't in the right
place and I changed the double quotes to single quotes.
2015-04-20 22:22:28 -06:00
Guangcong Luo
80102c29e4 Merge pull request #1798 from ascriptmaster/randoms
Random Battle Refactor: Move Tracking split off as seperate function
2015-04-21 04:21:43 +00:00
Kevin Lau
e1d7393620 Random Battle Refactor: Move Tracking split off as separate function
This will help reduce repetition, and also will allow for the move
tracking to easily update after the final moveset modification
(for example, allowing Choice Band/Scarf Mega Rayquaza if its last
Status move was overwritten by Dragon Ascent).
2015-04-20 12:20:23 -07:00
Kris Johnson
e5d4e02c5a Super Staff Bros.: Fix single quotes 2015-04-18 15:39:34 -06:00
Kris Johnson
857d3c8f23 Super Staff Bros.: Add %Bumbadadabum 2015-04-18 11:09:09 -06:00
Juanma Serrano
bd5d724d0e Super Staff Bros.: Remove imanalt
People who are demoted from rulebreaking are not entitled to a voice character.
Exceptions are made only for meme former staff.
2015-04-17 12:22:53 +02:00
Kris Johnson
7d81d7623a Super Staff Bros.: Remove a move from %QuoteCS
Removed Dragon Ascent so QuoteCS's signature move could allow him to
keep the SpD boost.
2015-04-17 03:15:21 -06:00
The Immortal
1edc40f936 Show fail message when status is blocked by Sub 2015-04-17 03:31:30 +04:00
Konrad Borowski
027b45e75f Super Staff Bros.: Promote @xfix 2015-04-16 15:10:47 +02:00
Konrad Borowski
0f93a57e8b Super Staff Bros.: Promote @trinitrotoluene. 2015-04-15 18:35:26 +02:00
Konrad Borowski
5d990198e9 Super Staff Bros.: Fix name of %Crestfall's signature 2015-04-14 22:18:00 +02:00
Guangcong Luo
54947b665f Merge pull request #1728 from ascriptmaster/move-fixes
Move refactor: moves/items that ignore immunity/effectiveness
2015-04-14 17:05:22 +00:00
Konrad Borowski
9172e7a3a5 Super Staff Bros.: Add %galbia. 2015-04-14 12:57:58 +02:00
Konrad Borowski
ca7f91d1d3 Super Staff Bros.: Demote imanalt. 2015-04-12 18:19:20 +02:00
Kevin Lau
8245e1d3b9 Random Monotype: Treat Castform-Sunny and Castform-Rainy as Normal-type 2015-04-10 15:25:31 -07:00
Juanma Serrano
8d149dea2e Monotype RandBats: Make Meloetta-P get into Normal or Psychic teams 2015-04-10 14:31:24 +02:00
Kevin Lau
936f95d64d Random Double Battle: Update move rejection for -ate Pokemon
Remove hardcoded checks that give -ate Pokemon Normal moves, instead using
the Random Single Battle's code.
2015-04-08 14:24:28 -07:00
The Immortal
f1e669e24a Update Random Battle script
Removed the hardcoded moveset modifications for Pokemon with -ate
abilities.
2015-04-08 20:52:24 +04:00
The Immortal
70c3dbe046 Random Battle: Modify custom levels
Ninetales and Politoed are kept because weather is banned in UU (and
below) so they are PU as a result. However, weather is in Random Battle
so they are lowered to RU level. The same applies to Wobbuffet and
Shadow Tag.
2015-04-08 15:29:22 +04:00
Kevin Lau
2e56120ad9 Move refactor: affectedByImmunities -> ignoreImmunity
While move.affectedByImmunities was always a Boolean value to denote if
the move was affected by immunities, move.ignoreImmunity can be a Boolean
value if it ignores or is affected by all type immunities, but also can
act as an object such that !!move.ignoreImmunity[type] means it ignores
immunities of that type.
2015-04-08 00:17:12 -07:00
Kevin Lau
51690081dd Random Battle: Reject Leaf Blade with Giga Drain and no Setup
Affects Mega Sceptile.
2015-04-07 16:59:10 -07:00
The Immortal
a33aecbe83 Random Battle: Make sure Mega Glalie has a Normal move 2015-04-08 02:45:47 +04:00
Kris Johnson
05c3f0397e Seasonal: Update %QuoteCS's EVs 2015-04-07 16:33:09 -06:00
Konrad Borowski
7b071f45a3 Super Staff Bros.: Implement Charles Carmichael 2015-04-07 18:17:14 +02:00
Juanma Serrano
8bedc8aa6d Merge pull request #1740 from RhythmsAreFromVibrations/master
Seasonal: Adjust a lot more
2015-04-07 17:57:39 +02:00
Kevin Lau
6b2234a4dd Random Battle: Update Porygon2, improve Water redundancy checks
Reject Hydro Pump with Waterfall (affects Samurott and Kingdra).

Reduce the number of moves available to Porygon2 so it has a higher chance
of getting Recover.
2015-04-07 02:54:23 -07:00
Kris Johnson
83ef4c5792 Seasonal: Adjust a lot more
Added `%QuoteCS`'s Pokémon, move, and entering/dying phrases (I
talked with him on PS! for info on what he wanted).
Fixed casing on `%Birkal`, `%DTC`, and `%raseri`.
Moved `@rekeri`'s and `@Timbuktu`'s moves to the correct places.
2015-04-06 20:45:52 -06:00
Kevin Lau
bc273b0773 Random Double Battle: Update Huntail, Remove Icy Wind/HP-Ice check
The Doubles EV generator means it's more beneficial to give Huntail all
Physical moves (252 Atk Ice Fang outdamages 0 SpA Ice Beam, for example)

Remove Icy Wind/HP-Ice redundancy check because Keldeo no longer has
Hidden Power Ice on its random battle sets.
2015-04-06 12:40:59 -07:00
Kris Johnson
9dc504a737 Seasonal: Adjust a lot
fixed casing on astara, bean, barton, and haunter
fixed `@Timbuktu`'s rank and added custom messages
added MattL and shaymin to voices since they 'retired/resigned'
2015-04-05 22:25:49 -06:00
The Immortal
fcc619e7ca Merge pull request #1730 from ascriptmaster/randoms
Random Battle: Update Tauros
2015-04-06 05:12:25 +04:00
Kevin Lau
7a97f790a4 Random Battle: Update Tauros
Single Battle: Replace Rock Climb with Return if Tauros does not have
Sheer Force (1/3 chance of getting Intimidate)

Double Battle: Remove Rock Climb for Return and add Stone Edge, since
Tauros always has Intimidate in Random Double Battles
2015-04-05 18:03:28 -07:00
The Immortal
4949d4a476 Random Battle: Reject Rock Climb with Double-Edge 2015-04-06 04:56:47 +04:00
The Immortal
1c9fb89988 Remove isTwoTurnMove property and use charge flag 2015-04-05 03:27:32 +04:00
Guangcong Luo
77b232ec25 Fix Substitute blocking foeSide moves
TryPrimaryHit, originally created for Substitute, is currently
being used for Substitute, gems, and auras. Neither of these
should affect all, foeSide, and allySide moves, so the event no
longer fires in these cases.

Included: Bonus: unit test for Substitute not blocking Stealth Rock
2015-04-03 22:48:24 -04:00
Rhythms
f05af24486 Seasonal: Capitalize Bean 2015-04-03 19:13:31 -06:00
The Immortal
a706b5601c Update Random Battle level scale 2015-04-03 17:14:22 +04:00
Cranham
64939bf3ad Random battles: Reject ice beam & freeze dry together
Seems a bit redundant to have both together. affects articuno and lapras
2015-04-03 02:11:56 +01:00
The Immortal
08f108aefd Random Battle: Merge Rain Dance and Sunny Day checks 2015-04-02 15:24:48 +04:00
Kevin Lau
703399bc8b Random Battle: Split Castform into Sunny and Rainy Formes
Also implement fix for Meloetta starting out in Pirouette Forme in Random
Doubles Battles.
2015-04-01 17:42:47 -07:00
Juanma Serrano
c1210f33ff Implement OMotD contender, Mr Bones Wild Ride 2015-04-01 17:16:50 +02:00
Juanma Serrano
29b13451b6 Implement OM of the Decade
Disregard puny OM of the Month thing. That's for losers anyway.
From now on, the strongest and best OM is going to be added as the OM of the Decaed.
It will only be changed when a strongest OM appears and beats it off.
Right now, with no contender really, that OM is Final Destination. Any other OMs just pale in comparison.
2015-04-01 10:00:11 +02:00
Quinton Lee
5180adac40 Fix error from a0fb03cc91 2015-03-31 22:04:38 -05:00
Ivo Julca
a0fb03cc91 Make randomMonotypeTeam deterministic 2015-03-31 21:01:18 -05:00
The Immortal
20b1b00f4c Random Battle: Reject Flame Charge without enough attacking moves
This fixes #1704 to give Ho-Oh, and other Pokemon with Flame Charge,
better sets.
2015-03-31 19:16:20 +04:00
Juanma Serrano
17be3943c8 Implement Monotype Random Battle challenge option
The long awaited Random Battle format of one of the most acclaimed OM is finally here.
2015-03-31 15:55:49 +02:00
Konrad Borowski
a9c2ed2262 Reject Fire Blast with Fire Punch
There is no reason for Flygon to run both, and having two fire moves 
restricts Flygon a bit.
2015-03-30 17:09:17 +02:00
Juanma Serrano
059d99838a Super Staff Bros.: Buff Beowulf slightly
Fix typo on EVs and give back 10% flinch chance as well as some BP
2015-03-30 11:25:07 +02:00
Juanma Serrano
1b679d63aa Super Staff. Bros: Implement Articuno 2015-03-30 11:11:12 +02:00
Juanma Serrano
3a8f98b3ca Super Staff. Bros: Buff Lyto
Too weak on the current meta, removed debuffs and made it Modest.
2015-03-30 11:01:39 +02:00
Juanma Serrano
7d4b4208fb Super Staff. Bros: Implement Crestfall 2015-03-30 11:00:27 +02:00
Kevin Lau
a5bb313a74 Random Battle: Update Cradily, Cacturne
Reject Seed Bomb with Giga Drain.

Switch Cacturne's Doubles set to fully Physical.
2015-03-29 14:13:13 -07:00
Kevin Lau
9f25d18169 Fix ModifyBoost crashes
ModifyBoost events called for accuracy and evasion were sending the wrong
object as the relay variable.
2015-03-28 17:37:20 -07:00
Guangcong Luo
603f9b8141 Merge pull request #1685 from ascriptmaster/move-fixes
Make sure the flags object always exists in moveData
2015-03-28 18:47:26 -05:00
The Immortal
f05143c00f Random Battle: Improve Aurorus 2015-03-28 16:41:08 +04:00
Kevin Lau
a92cc2b8e0 Make sure the flags object always exists in moveData 2015-03-27 18:43:36 -07:00
Kevin Lau
609286728d Random Battle: Update Ambipom
If Ambipom doesn't have any Technician moves, give it Pickup instead of
Skill Link because Skill Link is useless on it and it might as well have
a slight chance of recovering an item if its item is Knocked Off.
2015-03-27 17:36:35 -07:00
Kevin Lau
ab80397192 Refactor Unaware to use ModifyBoost
Cleans up the code quite a bit because it no longer needs the hardcoding
option that it was having.
2015-03-26 20:06:47 -07:00
Guangcong Luo
67c8df4da0 Merge pull request #1665 from ascriptmaster/move-fixes
Fix Foresight and Miracle Eye to use ModifyBoost
2015-03-26 16:08:20 -05:00
Kevin Lau
c5bc1a60d1 Fix Foresight and Miracle Eye to use ModifyBoost
Also deprecates move.ignorePositiveEvasion
2015-03-26 13:00:51 -07:00
Kevin Lau
47ea3b5f32 Refactor ModifyBoost to use objects
This allows ModifyBoost handlers to check the stat names properly.
2015-03-26 13:00:49 -07:00
Kevin Lau
5a3c2a25e6 Random Battle: Update some sets
With the EV generation policy in place for Doubles, it is detrimental
for Pokemon to run mixed sets, so some physical moves were removed
from Charizard and Dewgong.

Added Double-Edge to standard Pidgeot to give it extra damage output.

Reject Unburden on super-fast Pokemon (Accelgor) in Doubles like it is in
Singles.

Reject Wood Hammer with Giga Drain (Abomasnow)
2015-03-25 22:04:16 -07:00
The Immortal
555bae44d1 Include Status moves in lastAttackedBy
This is needed for Mirror Move to work correctly. This also fixes a rare
Focus Punch bug involving 0 damage.
2015-03-25 03:14:40 +04:00
The Immortal
01c81f3415 Random Battle: Reject Stealth Rock with Rest 2015-03-21 19:27:45 +04:00
Rhythms
7736ae05cf Seasonal: Lowercase antemortem 2015-03-19 23:08:50 -06:00
Guangcong Luo
4f312e7a51 Merge pull request #1642 from codelegend/getteam-patch
remove redundant code in get team
2015-03-19 17:47:32 -05:00
The Immortal
c527eecbeb Seasonal updates 2015-03-20 00:45:17 +04:00
codelegend
b72c19c49a remove redundant code in get team 2015-03-18 23:18:01 +05:30
The Immortal
a48eb28773 Merge pull request #1636 from ascriptmaster/randoms
Random Battle: Reject Crunch and Dark Pulse together
2015-03-16 00:16:03 +04:00
Kevin Lau
70102961a1 Random Battle: Reject Crunch and Dark Pulse together
Affects Lucario. It should prefer Crunch unless it is a Nasty Plot set.
2015-03-15 13:13:17 -07:00
The Immortal
7c4c0480d1 Minor Random Battle change
Use the ate counter to check for Normal moves.
2015-03-15 22:31:00 +04:00
Kevin Lau
181d715cd6 Random Battle: Increase priority of Outrage+Setup item check
Prevents Sub+DD+Outrage from receiving Leftovers.
2015-03-15 10:55:30 -07:00
Kevin Lau
dbf9d58e1d Random Battle: Force Unburden with Acrobatics
Affects Hawlucha.
2015-03-14 22:16:52 -07:00
Konrad Borowski
74b6869232 Make &Sweep hold Mail instead of Brick Mail
There is no item called Brick Mail.
2015-03-14 21:37:19 +01:00
Guangcong Luo
670a04dede Merge pull request #1625 from ascriptmaster/move-fixes
Generation 4: Fix Simple
2015-03-14 14:38:31 -05:00
Kevin Lau
d36297d491 Generation 4: Fix Simple to use proper DPP mechanics
In Generation 4, Simple did not double stat boosts as they changed.
Instead, it treated each stat boost as if it had twice the effect.
Reimplemented the deprecated ModifyBoost event, but with slightly
different functionality as before; it now modifies the live boosts so that
they work properly with Simple.
2015-03-13 18:02:33 -07:00
The Immortal
51c9544a4c Merge pull request #1607 from ascriptmaster/randoms
Random Double Battle: Update level scales based on item/ability
2015-03-14 00:29:52 +04:00
The Immortal
47238d2bac Minor Random Battle changes
Fixes #1627
2015-03-14 00:28:42 +04:00
Kevin Lau
420315407a Random Double Battle: Update levels based on some abilities/Eviolite
This will prevent Pokemon like Azumarill from being too powerful due to
their low base stats with an ability that boosts it to incredible levels.
2015-03-13 13:15:06 -07:00
The Immortal
371d11bea8 Random Battle: Reject rain/sun with only one attack 2015-03-13 22:36:23 +04:00
The Immortal
8d1d789d86 Random Battle: Few updates
- Remove Sucker Punch from Hitmonlee as it gets Unburden majority of the
time (100% actually, according to usage stats) and already has Knock Off
- Remove old check specific to Breloom
- Fix Breloom getting Poison Heal when it wants Technician
2015-03-13 19:52:04 +04:00
The Immortal
4d403ba182 Random Battle: Fix Meloetta-P
Also removed Chlorophyll check for Mega Venusaur because it only has
Thick Fat... Not necessary to hardcode it like Mega Mawile having
Intimidate.
2015-03-13 12:09:38 +04:00
The Immortal
ddaa3bc65d Random Battle: Undo two changes from 8e8420971d 2015-03-13 01:48:03 +04:00
The Immortal
f353aab11e Seasonal: Fix Transform properly
Also updated qtrx.
2015-03-12 23:57:40 +04:00
The Immortal
b06b3723d9 Seasonal changes 2015-03-12 23:24:57 +04:00
The Immortal
10f5ce234d Seasonal: Modify Temporaryanonymous' move
Try to balance it by removing priority and adding a crit chance instead.
2015-03-12 23:01:12 +04:00
The Immortal
8e8420971d Update Random Battle script
- Sorted checks
- Removed old and unused checks
- Added new checks and updated several current ones
Moves:
- Moved some cases to be in the appropriate section
Abilities:
- Fixed a Pokemon's third ability never being used if it has the same
rating as `ability1` (example: Iron Fist has 0% usage on Conkeldurr
because it is rated the same as Guts)
Items:
- Reordered the checks / changed priority of items
2015-03-12 22:49:47 +04:00
Konrad Borowski
0556c56b44 Change the case of TalkTakesTime 2015-03-12 14:43:25 +01:00
Rhythms
0f93f17df8 Seasonal: Fix spacing errors 2.0
same reasoning as the other PR that got merged
2015-03-11 21:56:20 -06:00
The Immortal
17d966b9de Merge pull request #1618 from ascriptmaster/randoms-2
Random Battle: Update Meloetta
2015-03-12 01:06:15 +04:00
Rhythms
9058594f64 fix rekeri
Rekeri is a mod
2015-03-11 14:15:19 -06:00
Kevin Lau
1a34f623fa Random Battle: Update Meloetta
- Add sets to Meloetta-Pirouette, effectively splitting Meloetta into
  distinct Physical and Special sets.
- Added Focus Blast to Meloetta-Aria.
2015-03-11 11:46:14 -07:00
Kevin Lau
e6458dea8a Random Double Battle: Add required moves section
This would have resulted in Mega Rayquazas without Dragon Ascent, Drive
Genesect without Technoblast, etc.
2015-03-11 11:05:26 -07:00
The Immortal
fbfec84f9e Seasonal updates
- Update Eevee General's moves
- Add Shame That
- Slightly nerf Dell by removing the accuracy boost, which means he
actually has some risk with Jump Kick
2015-03-11 21:16:27 +04:00
The Immortal
867d6fa29c Seasonal changes
- Remove Defog from WaterBomb
- Change DTC to dtc
- Fix Feliburn's special
- Add message for myself
2015-03-11 03:25:39 +04:00
The Immortal
fa580c5160 Seasonal updates 2015-03-10 21:53:00 +04:00
Juanma Serrano
b07966fd7f Super Staff Bros.: Balance and fix patch
Fix a typo in bloobblob's faint sentence.
chaos's move should not be bounceable.
Update Goddess Briyella's move: change name and animation.
Update Beowulf's moveset, make Spiky Shield mandatory.
Update Legitimate Username's moveset.
Update Queez, he's now a moderator.
2015-03-10 09:38:02 +01:00
The Immortal
66f32b8a39 Random Battle: Add more custom levels
Ninetales and Politoed are in PU because Drought and Drizzle are banned
in UU. Slightly lowered their levels.
2015-03-10 02:08:13 +04:00
Juanma Serrano
98981a774e Super Staff Bros.: Fix style on Morfent
Moves are added through ids.
Also acid armor was wrong.
2015-03-09 16:12:22 +01:00
Juanma Serrano
4ab80e0cfd Implement new Seasonal, Super Staff Bros.
This Seasonal is a joined effort of the whole staff team.
It contains over 100 custom sets and moves, allowing users to play the whole month and still find new things.
For format editing purposes, let it be noted that the Seasonal starts on line 348 and ends on line 3211 on formats.js as of this commit.

While I'm making the final commit to the master repository, let it be noted that this huge code is a joined effort of some members of the staff.
Special thanks to people who have worked on this code, without whose contributions this Seasonal couldn't have been finished for this month:
@ascriptmaster @cadaeic @Slayer95 @TheImmortal @xfix

More information for this special format can be found here:
http://www.smogon.com/forums/threads/3491902/page-6#post-6093168
2015-03-09 11:07:50 +01:00
Juanma Serrano
a158cdfcee Remove February Seasonal, Han vs Hun 2015-03-09 11:07:50 +01:00
Kevin Lau
c75b0db6fa Random Battle: Fix Baton Pass check
It would not reject Baton Pass if the Pokemon did not have Speed Boost.
2015-03-09 00:53:49 -07:00
The Immortal
dc7d170858 Random Battle: Reject Sucker Punch with Foul Play
Foul Play is rejected with setup already.
2015-03-08 22:05:24 +04:00
The Immortal
88e09b03d5 Merge pull request #1602 from ascriptmaster/randoms
Random Double Battle: Update Feint usage on Pokemon
2015-03-08 15:24:18 +04:00
Kevin Lau
505821e103 Random Double Battle: Update Feint usage on Pokemon
- Removed it from Pokemon that are too weak to use it.
- Reject Feint with Fake Out (for Persian).
- Update move checking to not count single hit moves with 30 base power as
  damaging moves.
2015-03-08 00:57:22 -08:00
The Immortal
ef59084e6c Random Battle: Prevent Choice Specs with Acid Spray 2015-03-07 23:31:44 +04:00
The Immortal
c052031408 Random Battle: Change e4ae003f54 2015-03-07 15:52:15 +04:00
The Immortal
16d0655f0a Merge pull request #1597 from ascriptmaster/randoms
Random Battle: Enforce two damaging moves with Trick/Switcheroo
2015-03-07 14:29:58 +04:00
Kevin Lau
e4ae003f54 Random Battle: Enforce two damaging moves with Trick/Switcheroo
Mostly affects Rotom formes.
2015-03-07 00:44:38 -08:00
The Immortal
12bc11c894 Merge pull request #1594 from ascriptmaster/randoms
Random Doubles Battle: Improve move rejection with one attacking move
2015-03-06 22:10:37 +04:00
Kevin Lau
b1cf0f7f5f Random Doubles Battle: Improve move rejection with one attacking move
It now uses the same rules as Random Battle (Singles).
2015-03-06 09:51:46 -08:00
The Immortal
18892c8612 Merge pull request #1592 from ascriptmaster/randoms
Random Battle: Improve readability of ability checks
2015-03-06 13:43:38 +04:00
Kevin Lau
3a85f2246d Random Battle: Improve readability of ability checks
Added a new variable hasAbility that keeps track of all available
abilities on a Pokemon, reducing the verbosity of ability checks
within the move rejection stage of the algorithm.

Also, change the Solarbeam check to look for Drought directly.
2015-03-06 01:22:20 -08:00
The Immortal
fd075c217d Random Battle: Improve Focus Sash selection on leads
Vaporeon with 285 shouldn't get it. Dragonite is 286 so checking for
Multiscale is unnecessary now.
2015-03-06 12:09:25 +04:00
Marty-D
00e316c085 Fix Pursuit potentially running multiple times
- Previously, a Pokemon unable to execute Pursuit against a slower
target would attempt to execute Pursuit again should its target switch
out with U-turn, Volt Switch, or Parting Shot, which would run two sleep
checks, freeze checks, etc.
2015-03-05 20:19:17 -05:00
Kevin Lau
74fc197f99 Random Battle: Update Baton Pass conditions, modify movesets
- Accept Baton Pass with Wish, speed setup, Pokemon with Speed Boost.
- Removed Baton Pass from Glaceon in favor if Wish and Protect.
- Removed Agility from Emolga since it doesn't need it; added Encore.
2015-03-04 12:05:20 -08:00
The Immortal
70328ef13a Merge pull request #1580 from ascriptmaster/randoms
Random Battle: Do not reject setup with Rest+Sleep Talk
2015-03-04 03:34:24 +04:00
The Immortal
905c465ab5 Random Battle: Update SetupException
U-turn and Volt Switch are rejected with setup so it doesn't make sense
that they are in SetupException.
2015-03-04 03:32:39 +04:00
Kevin Lau
0d73a390ba Random Battle: Do not reject setup with Rest+Sleep Talk
Setup + Rest + Sleep Talk + Attack is an acceptable combination.
2015-03-03 15:05:10 -08:00
The Immortal
72b55f127a Random Battle: Reject Heal Bell with speed setup
Speed setup needs attacking moves or another setup move or even
recovery/substitute.
2015-03-04 00:47:06 +04:00
The Immortal
8c62c58510 Random Battle updates
- Try to improve Spiritomb by giving it Calm Mind as an option
- Prevent Shadow Sneak with RestTalk
- Prevent Storm Throw with Circle Throw in some cases
- Reject Rest if the Pokemon does not have Sleep Talk but has it in its
move pool (Pokemon with RestTalk are designed to use both and not just
Rest)
- Combine setup checks and allow a single attack with setup only if the
Pokemon has RestTalk
2015-03-03 23:58:15 +04:00
The Immortal
ccb62ff03a Random Battle: Prevent multiple STABs on Arceus 2015-03-02 22:00:07 +04:00
The Immortal
077a74c50e Random Battle: Prevent Rain Dance + Circle Throw on Poliwrath 2015-02-28 21:15:51 +04:00
The Immortal
eeee8a4936 Random Battle: Allow Focus Sash on lead Deoxys-Attack with Stealth Rock 2015-02-28 19:13:11 +04:00
The Immortal
9d349a093e Random Battle: Prevent Focus Sash on Regenerator
Also fixed Weakness Policy check so Metagross gets it.
2015-02-28 15:32:56 +04:00
Kevin Lau
0ba58fe9c1 Random Battle: Count Normal moves as STAB for all -ate mons
Just like the recent change to make Protean count all moves as STAB, do
the same with -ate abilities and Normal moves.

Manually include Nature Power as a damaging move since it becomes Tri
Attack. Its placement lets it automatically increment the -ate counter as
well.
2015-02-28 02:24:36 -08:00
The Immortal
619454d46e Random Doubles: Update Unburden item check to match singles
Fixes #1564
2015-02-28 09:28:06 +04:00
Quinton Lee
302d5e5f2b Remove trailing whitespace from e4ca1a721b 2015-02-27 22:12:06 -06:00
The Immortal
e4ca1a721b Fix Struggle in Hackmons CC
https://github.com/Zarel/Pokemon-Showdown/blob/master/battle-engine.js#L3985
2015-02-28 03:11:44 +04:00
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