Commit Graph

1264 Commits

Author SHA1 Message Date
urkerab
46f3683a3a Fix Z-Power behaviour while Transformed into Ultra (#4479) 2018-03-11 00:01:50 +08:00
Matthew Glazar
df5988bacf Refactor some code to use randomChance
Mechanically refactor code which uses PRNG#random for booleans to use
PRNG#randomChance instead.

Take advantage of the following properties:

    random(x) < y        is equivalent to   randomChance(y, x)
    random(x) <= y       is equivalent to   random(x) < (y + 1), i.e. randomChance(y + 1, x)
    random(x) >= y       is equivalent to   !(random(x) < y), i.e. !randomChance(y, x)
    random(x) > y        is equivalent to   random(x) >= (y + 1), i.e. !randomChance(y + 1, x)
    random(x) === 0      is equivalent to   random(x) < 1, i.e. randomChance(1, x)
    !random(x)           is equivalent to   random(x) === 0, i.e. randomChance(1, x)
    Boolean(random(x))   is equivalent to   random(x) > 0, i.e. !randomChance(1, x)

This commit should not change behaviour. In particular, PRNG#next is
called the same number of times with the same number of parameter as
before this commit, and PRNG#next's results are interpreted in the same
way as before this commit.
2018-03-08 20:11:33 +09:00
Marty-D
055666dc02 Fix recoil damage source 2018-02-16 22:02:35 -05:00
urkerab
30cd0b4125 Make Pressure work in Shared Power (#4398) 2018-02-02 23:15:05 -05:00
urkerab
ef005d3076 Fix Protective Pads interaction with Spectral Thief (#4389)
Specifically, stat boosts gained are from the user, not the target.
2018-01-30 14:46:11 -05:00
urkerab
396fda7adf Fix Z-Power interaction with called Status moves (#4291)
Latest research (http://www.smogon.com/forums/posts/7625046/) shows that although Z-Synthesis bypasses Heal Block, using Z-Copycat to copy Synthesis does not. (Z-Copycat on a damaging move does of course turn into a damaging Z-Move.)
2018-01-17 08:57:37 -05:00
Marty-D
2c9f8ba45f Fix multi-hit Mind Blown again
Went missing in
801883c53a
2017-12-19 09:51:40 -05:00
Marty-D
3ff22dcf2f
Fix Mega Evolution behaviour 2017-12-14 12:43:39 -05:00
MacChaeger
8d571be74e Fix certain Abilities not being overwritten by most forme changes (#4245) 2017-12-14 11:45:12 -05:00
MacChaeger
fae30ca078 Dancer shouldn't activate after the battle has ended (#4240) 2017-12-11 16:21:01 -05:00
urkerab
dc3945ff86 Protect should not affect Clangorous Soulblaze's other target (#4237)
Closes #4232
2017-12-11 09:02:24 -05:00
Guangcong Luo
958c5087fc Revert "Protect should not affect Clangorous Soulblaze's other target (#4230)"
This reverts commit e8a7fa98d5.
2017-12-10 02:26:29 -05:00
urkerab
e8a7fa98d5 Protect should not affect Clangorous Soulblaze's other target (#4230) 2017-12-09 21:09:11 -06:00
MacChaeger
801883c53a Implement Stomping Tantrum (#4175) 2017-12-07 18:36:19 -06:00
Guangcong Luo
53ee56ff3b Fix Mega Rayquaza mega evolution 2017-12-06 20:09:13 -06:00
Marty-D
f443d1a213
Fix Mega Evolution for Rayquaza 2017-12-06 17:57:10 -05:00
Guangcong Luo
c0da44c482 Refactor moveset -> moveSlots
pokemon.moveset is now pokemon.moveSlots, which is at least slightly
clearer about what it's doing (tracking move state, mainly PP).

Mostly, this gives a consistent naming scheme for `move` (a Move
object) vs `moveSlot` (a MoveSlot object).

This also refactors a lot of existing `moveSlot` accesses to be modern,
including using `for...of`.
2017-12-05 11:12:44 -06:00
Guangcong Luo
08d079037d Pass source effect of switches to client
We are now tracking source effects for switch actions, if they're
initiated by effects such as U-turn or Baton Pass. This will lead
to better messages client-side.
2017-12-04 19:14:13 -06:00
Guangcong Luo
f3dbfbe685 Refactor Decision -> Action
"Decision" and "Choice" were always kind of unclear, so Decision is now
Action. It should now be a lot clearer.

Actions are also now strongly typed.
2017-12-02 11:34:55 -06:00
Guangcong Luo
1ac2745c3e Refactor Pursuit hack
Pursuit no longer uses `moveThisTurn`, but rather `willMove`, which
involves significantly fewer Pursuit hacks.
2017-12-01 15:59:13 -06:00
urkerab
cebac2b5bb Dancer should activate during other two-turn moves (#4186) 2017-11-26 17:13:17 -05:00
Marty-D
f849ea0415 Fix Mind Blown again 2017-11-21 09:32:06 -05:00
Guangcong Luo
cfcbbf19b6 Battles: |-mega| before |detailschange|
This mostly makes the mega evolution message more readable, especially
in Fast replays.
2017-11-21 07:49:05 -05:00
MacChaeger
4d95bb2ed9 Dancer shouldn't copy moves that did nothing (#4101) 2017-11-17 17:41:34 -06:00
Marty-D
33be9cc5a5 Fix spread moves' self-boost behaviour 2017-11-17 18:13:19 -05:00
Marty-D
ee18392b57
Swap Ultra Burst messages 2017-11-17 13:37:50 -05:00
Marty-D
91712024ff Fix Mind Blown behaviour when multi-hit or multi-target 2017-11-17 11:00:58 -05:00
Guangcong Luo
e716e9edc7 Implement Ultra Burst 2017-11-17 00:01:09 -06:00
MacChaeger
06e03e3431 Parting Shot shouldn't switch if it doesn't change stats (#4105) 2017-11-13 22:23:20 -05:00
urkerab
c352ea70b2 Dancer should not activate while semi-invulnerable (#4137) 2017-11-09 22:55:25 -06:00
Guangcong Luo
246dfa1da3 Refactor in-object-literal to array-includes (#4079)
Previously, if we wanted to test if A was either 'B' or 'C', we would use
the pattern:

    A in {B:1, C:1}

I actually don't know how common this pattern is; I just started using
it because I was tired of typing `A === 'B' || A === 'C'` all the time.
I never really liked it, though; the `:1` part made it kind of
blatantly a hack.

I did some testing and `['B', 'C'].includes(A)` is overall faster.

(A switch statement is around 20x faster still, but who wants to type
that much code?)

Anyway, the new standard is

    ['B', 'C'].includes(A)

Something something progress!
2017-10-23 09:19:15 -05:00
Marty-D
934fc5b40d Fix Z-Power behaviour while Transformed into Mega/Primal 2017-10-21 15:04:44 -04:00
Ridaz
8aef13ae18 Update Encore & Fake Out move animations (#4035) 2017-10-03 18:57:05 -05:00
MacChaeger
05cdd33542 Fix Dancer activation order (#4009) 2017-09-23 20:17:00 -04:00
Guangcong Luo
0646743a6d Sim: Check Protect/etc before type immunities in gen 7
TryHit effects, like Protect, Lightningrod, Magic Bounce, etc now
activate before type immunities, rather than after.
2017-09-05 09:36:18 -04:00
Guangcong Luo
6921390955 Fix Z-Instruct
The moves it calls shouldn't be Z-moves.

https://www.youtube.com/watch?v=FRI5PSekhR4
https://www.youtube.com/watch?v=57leF8RuGOg
2017-09-05 06:09:10 -04:00
urkerab
0ed87b755d Remove some ability effects to improve compatibility with Instruct (#3905) 2017-08-23 22:45:54 -07:00
Guangcong Luo
3b4d8b3ff0 Split random-teams.js out of scripts.js
Random team generation scripts are no longer in scripts.js, but instead
in a new file random-teams.js.

The scripts are now also no longer run from inside battles, but in a
new team generator object. This makes it easier for external scripts
to generate random teams by running Dex.generateTeam(format).
2017-07-25 02:59:59 -04:00
The Immortal
d36ba3bf36 Random Battle: Shuffle Pokemon 2017-07-24 17:20:51 +04:00
Guangcong Luo
d79e348ebc Refactor banlistTable -> ruleTable
PS's rule table has been renamed from banlistTable, and works a bit
differently now. It's a Map instead of an object now, and the keys
work a bit differently.

The original banlistTable was designed to store bans, and later
additions shoved rules and then unbans in there. The new table is
designed to support all of these.
2017-07-20 12:50:41 -05:00
HoeenHero
ee0e086c0e Dont use Dex in mods (#3803) 2017-07-19 16:58:18 -05:00
LegoFigure11
a7dbe96127 BSSF: Fix bug where Piloswine is named "Mamoswine" (#3780) 2017-07-14 01:50:00 -10:00
Kevin Lau
24a945efca Random Battle: Add possibility for Fly-Z or Bounce-Z (#3730)
* Random Battle: Add possibility for Fly-Z or Bounce-Z

This involves adding Fly to some Flying Pokemon without a good Flying
STAB. (This also makes sure Fly is not their only STAB, and only exists
with setup.)

* Update scripts.js
2017-07-13 01:42:35 +04:00
Kevin Lau
b167065d53 Random Battle: Update Swanna and Comfey (#3723)
Swanna has no use for Surf if it has Scald, even in Rain sets.

Triage and Draining Kiss should always be together. Give Triage a
rejection condition.
2017-07-05 01:17:00 +04:00
LegoFigure11
b0f82869e0 BSS Factory: Fix Weather restriction and update some sets (#3711)
Set alterations:
* Change SubCM Raikou EV spread from 4 HP / 252 SpA / 252 Spe to 220 HP
/ 52 SpA / 236 Spe
* Change LO Pheromosa from Hasty to Lonely
* Remove Hydro Pump from Scarf Greninja

Scripts alterations:
* Fix Weather restriction
* Remove unused resistance abilities
2017-06-30 20:52:35 +04:00
Kevin Lau
ebbb72d4de Random Battle: Update Armaldo, A-Dugtrio (#3628)
Armaldo is far too slow to utilize Swords Dance well, and only works on
dedicated Rain teams (which are very uncommon in Randoms).

Update item selection for Substitute and Reversal in combination.
2017-06-25 07:15:25 +04:00
Marty-D
88e03486a8 Update Sheer Cold mechanics 2017-06-21 19:25:53 -04:00
Bär Halberkamp
961ffc3f9b Upgrade eslint to 4.x (#3657) 2017-06-18 22:37:43 -07:00
The Immortal
a1348e2f04 Random Battle: Prevent Scarf on weak Pokemon 2017-06-18 18:20:42 +04:00
LegoFigure11
39d8197458 BSSF: Minor Set updates, code cleanup (#3625)
* Magnet Pull Magnzone now gets HP Fire 100% of the time
* Change Ditto's IVs to allow players to know it's Hidden Power at Team
Preview
* Dittos are now Sassy to give a better download matchup in the case of
a 'double down" - mirror matchup remains unchanged
* Removed weather restriction on Chlorophyll to bump up Venusaur usage
* Removed unused weather abilities

Also updated the link to the VR thread in the BSS format description
2017-06-12 19:30:03 +04:00
The Immortal
85a674fb92 Update tiers 2017-06-08 16:36:21 +04:00
LegoFigure11
8521529717 BSS Factory: Fix illegal moveset and item clause (#3575)
Eevee only gets Celebrate from an Event, and thus Umbreon cannot have its HA or Egg Move (Wish) on a set that also has Celebrate.
Also fixes several items being left out of the item clause (Thanks Urkerab and DragonWhale)
2017-06-03 13:10:05 -04:00
Ivo Julca
a87032ae8a Update names of Deep Sea (Tooth|Scale) to Gen 6+ format 2017-05-27 21:56:34 -05:00
Slayer95
9165e883fd Fix Hackmons Cup EVs 2017-05-27 19:20:09 -05:00
LegoFigure11
04d23a9e54 Add BSS Factory (#3553) 2017-05-27 16:10:58 +04:00
LegoFigure11
805313338d Fix Gender randomisation in Battle Factory (#3551)
At the moment everything gets rolled as Male
2017-05-25 10:41:39 +09:00
asgdf
b4b42ce4ad Fix Z-Move mismatch when moves have 0 PP (#3539) 2017-05-24 20:36:00 -04:00
HoeenHero
bcbc941907 Smeargle cannot sketch Z-moves (#3545) 2017-05-23 20:24:17 +04:00
Marty-D
32fc3711ad Fix Pursuit's interaction with Pressure 2017-05-22 12:42:31 -04:00
GraillLord
fe9bf3c42f Fix two-turn moves behaviour with no target (#3523) 2017-05-12 14:56:26 -04:00
The Immortal
343c014358 Random Battle: Prevent recovery moves with Leech Seed 2017-05-12 14:55:49 +04:00
MacChaeger
bc8054167d Update Random Doubles (#3520) 2017-05-12 00:10:53 +04:00
Guangcong Luo
6dd58b40d3 Refactor simulator into new sim/ directory
This is a surprisingly minor refactor considering how many files it
touches, but most of this is only renames.

In terms of file renames:
- `tools.js` is now `sim/dex.js`
- `battle-engine.js` is now `sim/index.js` and its three classes are
  in `sim/battle.js`, `sim/side.js`, and `sim/pokemon.js`
- `prng.js` is now `sim/prng.js`

In terms of variable renames:
- `Tools` is now `Dex`
- `BattleEngine` is now `Sim`
- `BattleEngine.Battle` is now `Sim.Battle`
- `BattleEngine.BattleSide` is now `Sim.Side`
- `BattleEngine.BattlePokemon` is now `Sim.Pokemon`
2017-05-05 16:48:38 -05:00
MacChaeger
7a1d06f626 Update Random Doubles Battle (#3498)
* Update Random Doubles Battle (part 1)

* Update Random Doubles Battle (part 2)

* Update Random Double Battle (part 3)

* Fix Syntax (#26)

* Fix move id typos

* Improve movepools
2017-05-05 11:52:55 +04:00
The Immortal
a017b74285 Random Battle updates 2017-05-02 13:45:09 +04:00
urkerab
e00c777158 Use Transformed species for Z-Move checks (#3495) 2017-05-01 23:43:15 -04:00
Kevin Lau
4b9733b42d Random Battle: Enforce Liquid Voice as needed (#3489) 2017-04-28 10:17:26 +04:00
urkerab
cce9c4e2db Moves with no PP can't be turned into Z-moves (#3486) 2017-04-26 16:48:26 -07:00
The Immortal
4b61a48dba Random Battle: Fix Linoone 2017-04-26 14:44:05 +04:00
The Immortal
02ea84fd59 Random Battle: Ability improvements 2017-04-25 17:13:31 +04:00
Kevin Lau
8970beac69 Random Battle: Allow Belly Drum Gluttony (#3472) 2017-04-24 20:47:11 +04:00
MacChaeger
8e75649a10 Random Battle: Correctly handle Hidden Power and Baton Pass (#3469)
Previously, `moveid` would contain the specific type of hidden power such as `'hiddenpowerfire'`, but the switch statement would check for `'hiddenpower'`, and thus Hidden Power would never be rejected.
2017-04-22 13:01:59 +04:00
QuiteQuiet
ca35d354ab Fix Prankster Magic Bounce interaction (#3456) 2017-04-15 17:57:47 -04:00
MacChaeger
a9de5080d2 Random Battle: Improve HP evs (#3445)
* Random Battle: Improve HP evs

This lets Zygarde-10% activate Power Construct in two subs, and also simplifies some unnecessarily complex code.

* Fix formatting (#19)

* Update scripts.js

It can't sub down to exactly half if it's got lefties, so don't give it less HP for no reason.
2017-04-11 05:34:38 +04:00
Kevin Lau
d190a9300b Random Battle: Do not give Choice Specs to Clear Smog users (#3444) 2017-04-10 14:28:48 -04:00
QuiteQuiet
73108f6a03 Fix Weather Ball Z-Move (#3432) 2017-04-05 19:37:22 -04:00
Kevin Lau
a59d7fdbc2 Random Battle: Support Light Clay Aurora Veil (#3422) 2017-04-05 15:06:51 -04:00
The Immortal
618456f909 Random Battle: Improvements 2017-04-01 16:06:14 +04:00
MacChaeger
00d995e58d Hackmons Cup: EV limit is only in gen 6 (#3362) 2017-03-15 22:48:51 -05:00
Marty-D
368e7b5aa2 End Illusion before preparing a Z-Move 2017-03-14 10:01:48 -04:00
Guangcong Luo
fc16f4fe4f Hacked Z-moves can't be Z-boosted 2017-02-27 01:14:35 -04:00
Guangcong Luo
0bf08c2ad3 Fix calling Z-move names
e.g. Z-Sleep Talk would previously call Z-Taunt, when it should be
calling Taunt.

This was only ever a text error; it never used Z-Taunt's Z-effect.
2017-02-27 01:06:54 -04:00
MacChaeger
19b0b48ac0 Random Battle: Improve level balancing (#3293) 2017-02-26 04:37:38 +04:00
urkerab
1d4ac35d37 Simplify the way the factory tier is chosen (#3286) 2017-02-25 06:16:55 -06:00
Ivo Julca
55641c2635 Fix regressions in random team generation and improve comments
The regressions affected information handling
- Seeds used for random teams were no longer being logged.
- The seed used for generating p2's team was also used for the battle itself.
2017-02-24 20:18:59 -05:00
HoeenHero
1551ec0e98 Battle Factory: Fix issue with sides having different tiered teams (#3285) 2017-02-24 15:28:43 -06:00
Guangcong Luo
6306b5979f Fix infinite looping Dancer 2017-02-24 06:54:13 -06:00
Guangcong Luo
bb7b168355 Fix crash in PRNG 2017-02-24 05:46:51 -05:00
Guangcong Luo
8ee23475e4 Fix Dancer + Petal Dance
Dancer Petal Dance shouldn't lock. This is a horrible hack but it fixes
the problem. A real fix would involve refactoring basically all locking
moves. Which I guess I should do one day...

Fixes #2974
2017-02-24 03:25:00 -06:00
Guangcong Luo
9200062819 Improve Dancer implementation
This doesn't fix the biggest issue with Dancer (Petal Dance locking),
but it does fix every other Dancer issue, by moving it from useMove
to runMove.

This also adds improved comments on runMove and useMove.
2017-02-24 03:17:37 -06:00
Kevin Lau
05f34da175 Random Battle: Reject Sheer Force Conkeldurr (#3277)
Sheer Force only boosting one of its moves is rather mediocre compared to
Iron Fist boosting most of its moves, or Guts for even more raw power.
2017-02-23 02:04:28 -06:00
Dan Pantry
56ba782966 refactor PRNG to its own class
This removes the 'deterministic test' tools by preventing action at a
distance (namely, preventing the modification of the `init` method in
`Battle` during tests). This action at a distance is incredibly
confusing.

All this action at a distance did was discard any parameters that were
passed to `Battle` that weren't the first three (which was probably a
mistake by the original author) and also hard code `this.seed` and
`this.startingSeed` in `Battle`.

This functionality has now been moved to the `PRNG` class, so instead
users should pass a `PRNG` to `Battle` as the 5th constructor argument.
Users can also pass one as the third argument to `common.createBattle`
or use `common.createBattleWithPRNG` with the PRNG as the first
argument.

The PRNG is just an encapsulation of the pseudo-random algorithm in a
class. It is stateful, so make sure to take a `clone()` of the PRNG if
you want to re-use it.
2017-02-22 20:44:20 -05:00
Guangcong Luo
0c98319d2b Don't add "Z-" to "Extreme Evoboost"
This uses a better rule for detecting for whether or not a move is a
status Z-move.

Closes #3268
2017-02-21 01:12:11 -06:00
Kevin Lau
b8d1f0b45e Random Doubles: Use Wishiwashi-School for calculating Wishiwashi level (#3266) 2017-02-20 02:34:32 -06:00
MacChaeger
25b0e0aae3 Challenge Cup: Fix Wishiwashi's level (#3246) 2017-02-19 01:26:51 -06:00
Guangcong Luo
825b4180cd Fix Prankster/Dark hint info leak 2017-02-10 17:10:15 -05:00
Kevin Lau
41f4727df1 Random Doubles: Implement some Doubles sets (#3219) 2017-02-07 23:56:13 +04:00
Kevin Lau
0ea4363cae Random Doubles: Fix Level Scaling for Parental Bond and Protean (#3216)
EV values are balanced now, so it's better to base it on the number of
attacks.
2017-02-06 21:50:08 +04:00
The Immortal
50074f0928 Update tiers 2017-02-06 17:28:36 +04:00
Kevin Lau
7c252d7ff1 Random Doubles: Preliminary Overhaul (#3204)
Most ability checks are up to date with Random Singles, as are some of the
item checks.
2017-02-04 11:35:21 +04:00
Marty-D
687b3ae8b7 Fix multi-hit self-drop moves 2017-02-03 19:06:22 -05:00
Marty-D
e51b5f1cce Fix multi-target self-drop moves 2017-02-01 18:11:33 -05:00
Kevin Lau
f466787851 Random Doubles: Switch to 84-all EV system like Random Singles (#3199)
EV generation is incredibly lopsided in random doubles and should be more
balanced.
2017-02-01 16:52:08 +04:00
cadaeic
45070569cd Refactor fainting from sacrificial moves (#3197) 2017-01-30 14:31:05 -05:00
Kevin Lau
1c5eb528ca Random Battle: Add possibility of Flyinium Z to Talonflame (#3194)
With the Gale Wings nerf, it appreciates being able to use one additional
super-heavy priority attack before Brave Bird takes it below Gale Wings
range.
2017-01-29 19:26:59 +04:00
Kevin Lau
8f9f7d2d1f Random Battle: Improve Sub/Reversal (#3193) 2017-01-29 15:43:13 +04:00
Kevin Lau
99283f5988 Random Battle: Update some Alolan Forme Pokemon (#3085) 2017-01-29 12:05:21 +04:00
The Immortal
ced6a88dde Pokemon Bank is released 2017-01-25 07:58:41 +04:00
urkerab
66e7789067 Fix interaction between Burn Up, Powder and Primordial Sea (#3103) 2017-01-23 20:13:45 -05:00
Kevin Lau
ab8a6ea9fb Random Battle: Improve move rejection for dual STAB issues (#3104)
Reject Hex entirely if Will-o-Wisp is not present, to prevent it on the
same set as Shadow Ball.

Reject Fire Blast with Flare Blitz.
2017-01-22 19:19:24 +08:00
ScarfWynaut
46b4666fcd Random Battle: Prevent generating teams with too many Uber Pokemon 2017-01-12 17:49:21 +04:00
The Immortal
b7cab47265 Random Battle: Prevent Psycho Cut with other Psychic-type moves 2017-01-11 06:05:01 +04:00
The Immortal
71e0250806 Random Battle updates 2017-01-09 22:17:45 +04:00
Kevin Lau
88475146d3 Random Battle: Reject Pursuit with Knock Off on non-Dark Pokemon (#3082) 2017-01-09 15:17:20 +04:00
Guangcong Luo
ef3b4965ea Fix Z-move priority interaction
Priority Z-moves exist (namely, Gale Wings Supersonic Skystrike).

Quick Guard now partially protects against priority Z-moves.

Psychic Terrain now fully protects against priority Z-moves.
2017-01-08 01:44:35 -05:00
Kevin Lau
56160b18cf Random Battle: Add possibility of Z-Conversion (#3078) 2017-01-07 00:02:23 +04:00
Guangcong Luo
58865f6039 Add hint for Dark being immune to Prankster 2017-01-06 04:28:29 -05:00
Kevin Lau
cd6ccba986 Random Battle: Reject Toxic with setup (#3075) 2017-01-05 23:49:47 +04:00
The Immortal
25299882a8 Random Battle: Set "Bank" Pokemon to UU level as well 2017-01-05 18:53:24 +04:00
The Immortal
983c40d955 Random Battle: Set "New" Pokemon to UU level
And remove unneeded levels because 75 is the default
2017-01-05 18:49:17 +04:00
Ridaz
0d364ab4be Properly animate Spectral Thief (#3072)
In case of boosts, the attacking animation would play 1st, stealing the
boosts last, instead of the other way around.
This approach was chosen since Spectral Thief is the only move that
steals boosts this way, for now
2017-01-02 22:53:13 -05:00
Kevin Lau
e7feb63f6c Random Battle: Fix Various Issues with Ubers (#3069) 2017-01-03 04:56:01 +04:00
Kevin Lau
207b966861 Random Battle: Update Tapu Guardians, Araquanid, Vanilluxe (#3052) 2016-12-31 13:23:34 +04:00
Guangcong Luo
9cc8f66ab5 Fix Taunt preventing Z-move activation 2016-12-31 02:31:09 -05:00
The Immortal
d8a29ecd4c Random Battle: Improve Primarina 2016-12-29 16:05:46 +04:00
Guangcong Luo
b931969e11 Fix Z move and target tracking issues
Encore and Disable now fail when used against Z-moves.

Encore and Disable now no longer prevent Z-moves from being used.

Instruct now repeats the selected target location.

Instruct Pursuit now repeats the switched out target location, if
activated.

This refactor also simplifies some previously unnecessarily-complicated
code.
2016-12-26 16:53:10 -05:00
Guangcong Luo
0b887560cd Fix Z-status targeting
Z-status moves weren't targeting correctly. This fixes that and also
simplifies some code.
2016-12-26 16:48:15 -05:00
The Immortal
d70d7918de Random Battle: Prevent Facade with RestTalk 2016-12-24 22:49:46 +04:00
Marty-D
c2005253fd Move Z-Power activation message 2016-12-20 09:40:27 -05:00
Marty-D
3c9d6c2687 Correct crit ratio boosting Z-Effect 2016-12-18 11:06:55 -05:00
Marty-D
5638680a50 Reorder Spectral Thief's effects 2016-12-17 10:49:49 -05:00
urkerab
c1829acf64 Z-Memento and Z-Parting Shot should tell the client about the Z-power (#3029) 2016-12-16 18:23:54 -08:00
Marty-D
e1c43d4bb4 Properly fix Emergency Exit and related effects 2016-12-15 09:57:06 -05:00
The Immortal
92a9a8b9a9 Random Battle updates 2016-12-07 19:45:52 +04:00
Guangcong Luo
04cd89ab45 Support sending target in zmove data 2016-12-07 05:20:40 -05:00
The Immortal
977d676c9a Random Battle: Reject Liquid Voice without Hyper Voice 2016-12-03 03:53:44 +04:00
Kevin Lau
682e22e406 Random Battle: Add possibility of Gluttony Linoone (#2959)
With the buffs to the healing berries that confuse if a Pokemon has a
conflicting nature, it is now possible for Linoone to use them as a
substitute for Sitrus Berry, if it has Gluttony as its ability.

In Random Battles, natures are always neutral, so the any of the berries
will serve this purpose.
2016-12-02 02:13:50 +04:00
The Immortal
232112d94f Fix Monotype Random Battle 2016-12-01 19:52:24 +04:00
The Immortal
850ab0f52e Random Doubles updates 2016-11-30 20:07:29 +04:00
The Immortal
d7434ecf97 Random Battle improvements 2016-11-29 16:17:57 +04:00
Guangcong Luo
83b9e82fc7 Support calling Z moves
Z status moves like Z-Metronome and Z-Nature Power now correctly
transform called Physical/Special moves into the corresponding
Z move.
2016-11-28 20:26:28 -06:00
The Immortal
49b4eb47aa Random Battle updates 2016-11-28 04:33:58 +04:00
Ivo Julca
7ea4eeac5b Z-Moves: Various decisions fixes
- Z-Moves are always single-target, even if based on spread moves.
- Z-Moves cannot be selected if the base move has no PP.
- Z-Moves can be selected if the base move is disabled.
2016-11-27 00:27:49 -05:00
Kevin Lau
d49ce0eb64 Random Battle: Add new Oricorio sets (#2951) 2016-11-27 02:38:09 +04:00
urkerab
7347086f6a Actually send correct -zpower minor (#2952) 2016-11-26 17:20:27 -05:00
The Immortal
ba814c5c01 Fix build error 2016-11-26 18:13:48 +04:00
The Immortal
ef946414e8 Remove Pumpkaboo-Super learnset
This is unneeded because they are just level up moves. Having this
means adding exceptions in multiple places.
2016-11-26 14:08:51 +04:00
The Immortal
6bef707583 Random Battle fixes 2016-11-26 14:07:09 +04:00
Guangcong Luo
5e413c3bef Revert "Refactor Protect/etc, fixing Z move penalty"
This reverts commit fed4fefd85.
2016-11-26 02:31:29 -05:00
Guangcong Luo
fed4fefd85 Refactor Protect/etc, fixing Z move penalty
Protect is now implemented in scripts.js:runProtect, for slightly less
duplicated code.
2016-11-25 22:20:01 -06:00