Commit Graph

1137 Commits

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