Commit Graph

771 Commits

Author SHA1 Message Date
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