Commit Graph

343 Commits

Author SHA1 Message Date
Guangcong Luo
f99b4fe751 Fix randbat set generator being too reject-happy
So yeah, this is a major bug in the randbat set generator, but other
than performance issues and the random 3-move pokemon, it shouldn't
have any other implications.
2014-09-04 16:12:29 -04:00
The Immortal
c4f44ea0dd Update Random Battle
Added PU level
2014-09-02 22:27:33 +04:00
The Immortal
45903b2e90 Lower Xerneas' level in Randoms 2014-09-02 00:38:30 +04:00
Ivo Julca
300302cec3 Give Black Sludge back to Poison-types in randbats
Accidentally removed in f57e771e8
2014-08-29 17:50:20 -05:00
Guangcong Luo
cff9737680 Merge pull request #1167 from Slayer95/ruleset-modding
Properly load banlist tables for modded formats
2014-08-25 11:20:53 -05:00
Ivo Julca
f57e771e8c Refactor randbats set generators a bit
- Move some variable declarations outside of loops.
- Use single-line if statements wherever reasonable.
- Update a check for Hyper Fang to Gen 6.
- Fix Ghost types getting Chople Berries in Random Doubles Battles.
- Fix a typo intended to fix in d24b184b and another one introduced in the same commit.
2014-08-25 01:42:17 -05:00
Ivo Julca
b4ec88610f Properly load banlist tables for modded formats
They are no longer loaded in Tools.getFormat, which could be called from any modded tools and cached the bans.
2014-08-24 22:24:09 -05:00
Ivo Julca
9a1ad50574 Fix Quick Guard failing to protect from moves called by other moves 2014-08-23 20:05:50 -05:00
Ivo Julca
69254f0c25 Fix bug from random battle moves refactor 2014-08-13 19:07:31 -05:00
Guangcong Luo
c286e46177 Remove randomBetaTeam; April Fool's is long over 2014-08-13 17:04:05 -04:00
Guangcong Luo
ac7f1d22b4 viableMoves are now randomBattleMoves
randomBattleMoves is now an array, and has been renamed from
viableMoves since it no longer is used for anything other than
random battles.

This commit also does some cleanup of some code relating to
random battle moves, including fixing gen 1's randomSet function,
which apparently has never worked.
2014-08-13 17:03:21 -04:00
Guangcong Luo
af2026436a More style fixes and Gulpfile updates
JSHint is now a fair bit stricter, and is now correctly checking
files in `mods/`.

The code has been fixed to match the new stricter standards.

JSHint has now caught its second actual bug: Gen 5 Pinap Berry
was Ice instead of Grass.
2014-08-10 20:43:53 -04:00
Guangcong Luo
12b673bb49 Fix style errors; update gulpfile
I used a hack to make the multiple declaration errors go away,
so all that remained in jsHint were actual errors, which I've
now mostly fixed.

All this linting ended up uncovering one actual bug: Uproar's
message not showing. It's a very minor bug in a move no one uses,
so I'm going to fold it into this commit.
2014-08-10 18:06:44 -04:00
V4Victini
3e3505e673 Add fail message for forceSwitch moves.
If the opponent cannot be switched due to having no more available pokemon, the move should fail.
2014-08-07 18:41:26 -04:00
The Immortal
e6ae62f6e4 Fix mega evolution mechanics
In Hackmons, Mega Charizard Y can mega evolve into Mega Charizard X, for example
2014-08-03 23:35:09 +04:00
V4Victini
882dfe7d19 Flame Charge is not a valid STAB 2014-08-01 02:46:47 -04:00
V4Victini
41c46e67d4 Aeroblast is a valid STAB move
The one who committed that probably meant Sky Attack. Like Bounce it is also a 2-turn move. Aeroblast is a 100 BP Special Flying-Type attack. Very STAB-worthy.
2014-07-31 11:56:04 -04:00
Guangcong Luo
378aa9670f Nerf randbats Xernas slightly 2014-07-21 23:38:56 -04:00
Guangcong Luo
6e626048a2 Nerf randbats Sigilyph 2014-07-21 23:29:22 -04:00
Slayer95
802cde5a30 Make sure that sleep stops multihit moves
If a pokémon fell asleep due to Effect Spore while performing a multi-strike move called by Assist or Metronome, the move wouldn't be stopped.
2014-07-16 04:01:24 -05:00
Slayer95
828154a6e6 Move global events ´TryHitField´ and ´TryHitSide´ to ´tryMoveHit´ 2014-07-16 00:26:53 -05:00
Slayer95
c2966e1d51 Fix Protean for moves targetting the field 2014-07-15 20:18:40 -05:00
Slayer95
377345454f Shed Bell may be nullified by Sheer Force
Also remove 'AfterMove' global event from all gens, and 'AfterMoveSelf' from Gen 3 onwards.
2014-07-14 19:03:38 -05:00
Slayer95
684a2a4418 Fix more bugs with Protean
- Fix an issue introduced in 6539521adc, where Protean didn't activate if the target was immune to the move.
- Protean should not activate if the user fails a Detect/Protect, or the move is Fling or Natural Gift and the user has no item.
- Protean should not activate on the first turn of a Pledge Combo. Aditionally, fix Flash Fire/Storm Drain, etc being activated by the first move in the combo.
- Introduce event 'PrepareHit', which is ran after any move target is resolved but before immunity is checked.
2014-07-12 21:42:02 -05:00
Slayer95
4c8df32744 Merge branch 'triples' 2014-07-09 22:29:18 -05:00
小太
09e0503b25 Remove trailing whitespace 2014-07-05 19:02:39 +10:00
The Immortal
4436cd283a Randbats: Prevent Foul Play with setup 2014-06-28 18:10:39 +04:00
Relados
f457e99af3 Improve mega selection in randoms
Megas now have their own viable moves, so that more unique megas like Heracross, Charizard and Mewtwo can have their viable options.

Potential mega evolving candidates can now be selected without their mega stone.  For example, if the team has Gengar with Gengarite, Heracross without Heracronite can be added.

Make multiple mega evolution selection random

It mistakenly always picked the Y forme rather than randomly choosing either.

Reduce number of getTemplate() calls

Slayer95 pointed out that this is a better implementation.

Fix syntax error

Improve randoms mega selection

Simplifying the code by having the mega template stored in 'template'.  For abilities, the original template is stored in 'baseTemplate'.  Also added the improved mega selection for Random Doubles, which would be affected by giving viable moves to megas in formats-data.js.

Improve mega selection in randoms

Megas now have their own viable moves, so that more unique megas like
Heracross, Charizard and Mewtwo can have their viable options.  Potential
mega evolving candidates can now be selected without their mega stone.
For example, if the team has Gengar with Gengarite, Heracross without
Heracronite can be added.
2014-06-27 17:53:11 -05:00
Slayer95
a6287a0bbc Fix Shield Dust for multitarget moves 2014-06-21 21:26:41 -05:00
Slayer95
a7efa2c350 Make sure that moves restricted to adjacent targets have valid targets
Also Helping Hand's targetting is not hard-coded anymore.
2014-06-16 17:28:30 -05:00
Slayer95
6a48ce030d Tweaks for adjacency check methods 2014-06-12 02:02:37 -05:00
Guangcong Luo
fba2f9d64d Merge pull request #990 from Slayer95/multihit
Fix Gen 4 multihit chance
2014-06-08 21:53:29 -05:00
Guangcong Luo
75bb5dd186 Fix Explosion faint order 2014-06-08 22:37:38 -04:00
Slayer95
62f6f9167b Fix Gen 4 multihit chance 2014-06-08 21:04:22 -05:00
Relados
3f407dc842 Allow Weather Ball with Rain Dance in randbats
This should only apply to Castform, but it needs all the help it can get.
2014-05-28 08:24:32 -05:00
Slayer95
13800312a9 Fix megaevo abilities activating too early
Any message sent on ability start was being sent before the megaevo message.
2014-05-24 10:40:56 -05:00
Slayer95
5d82f38b41 Fix recoil for multihit moves
- Recoil for Parental Bond Double Edge, etc should happen after all the hits have finished.
- Also removed the event 'Secondary', currently unused in the codebase.
2014-05-14 13:30:12 -05:00
Slayer95
52961253ae Obviate -formechange in mega evolution 2014-05-10 01:29:04 -05:00
Slayer95
e164c7f540 MegaEvo: tell the client that the change is permanent 2014-05-09 22:50:43 -05:00
Slayer95
4adada6853 Fix some bugs with mega evolution graphics
- Don't play the forme change animation when switching in.
- Fix interaction with illusion in the base forme (http://replay.pokemonshowdown.com/almostanyability-117184227 Turn 11)
2014-05-06 15:35:12 -05:00
The Immortal
9c1ed75d83 Update tiers
- Added RU based on usage stats and placed the rest of the Pokemon in
Limbo/NFE/LC
- Added LC Uber for BW
2014-05-02 22:54:16 +04:00
Relados
c18336155f Make Memento faint user after use on Clear Body
Clear Body and White Smoke stop the stat drops of Memento, but the user still KOs itself (tested on cartridge).
2014-04-24 22:03:33 -05:00
V4Victini
2617d4ebd7 Correct RNG behavior
To mimic the game's RNG, get a random number on self-inflicted drops.
2014-04-22 15:30:39 -04:00
小太
5c8fc7b982 Space after function for anonymous functions 2014-04-22 01:58:16 +10:00
小太
6fb3bc332a Spaces around operators and === instead of == 2014-04-22 01:56:11 +10:00
小太
6c6f5c1eb4 Remove all trailling whitespace 2014-04-21 18:58:09 +10:00
Guangcong Luo
9f87e79e51 Merge pull request #836 from Slayer95/master
Remove some globals
2014-04-18 19:15:55 -05:00
Slayer95
3fc36ef80f 'clampIntRange is now a method of 'Tools' and no longer global 2014-04-18 15:14:54 -05:00
Guangcong Luo
64f6cc98a2 Refactor two-turn moves
They can no longer be redirected
2014-04-17 18:00:51 -04:00
Slayer95
75559362b4 Rename global config to Config 2014-04-17 01:12:28 -04:00