Commit Graph

1118 Commits

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