Commit Graph

321 Commits

Author SHA1 Message Date
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
Slayer95
e419e7595a Declare ´damagingid´ and ´damagingType´ in randbats builder 2014-04-16 22:00:42 -05:00
Relados
8186f86aa5 Allow Charizard Y and Mewtwonite Y in randoms
For Pokemon with multiple mega evolutions (Charizard and Mewtwo) it should randomly select either.
2014-04-16 15:31:05 -05:00
Relados
1178f275a5 Prevent Memento and recovery together
If a Pokemon has recovery, it plans to survive in the long-term and having a move that sacrifices itself is unwanted.

(This was found on probably the worst set ever seen in Random Battles:  Memento / Rest / Sleep Talk / Poison Jab)
2014-04-15 18:03:03 -05:00
Relados
e6bc89f7d3 Prevent Illusion in last on a random team
Illusion loses viability when it's on a Pokemon that's last on a team
2014-04-11 15:31:33 -05:00
Relados
fba6730251 Fix typo
The case 'u-turn' will never occur, it needs to be 'uturn'
2014-04-09 16:38:38 -05:00
Relados
7637636410 Prevent multiple statusing moves
Hypnosis, Stun Spore and Sleep Powder were not fully accounted for.
2014-04-06 09:31:05 -05:00
TalkTakesTime
158b5f3943 Genesect formes should have Techno Blast 2014-04-04 22:13:42 +13:00
Guangcong Luo
f4c854359d Merge pull request #788 from Relados/patch-42
Prevent Snow Warning Nature Power Aurorus
2014-04-03 11:01:19 -05:00
Relados
772b3d370d Prevent Snow Warning Nature Power Aurorus 2014-04-03 09:13:58 -05:00
Relados
f97dc7fdff Prevent Chesto Berry with Hydration + Rain Dance 2014-04-03 08:34:06 -05:00
Relados
0f802a61e7 Prevent Fire Blast and Lava Plume together
Similar reasoning as preventing Hydro Pump and Scald together
2014-04-02 10:09:15 -05:00
Guangcong Luo
fe97b3bc73 April Fool's 2014 is over 2014-04-02 01:25:17 -04:00
Guangcong Luo
a561cf4c67 April Fool's 2014 2014-03-31 23:36:43 -04:00
Relados
b404688cc5 Prevent various redundant moves
In particular, Morning Sun with other healing moves, or Focus Punch with Drain Punch
2014-03-31 18:37:14 -05:00
Relados
dc5efad439 Prevent U-Turn and Volt Switch together (again)
TI said to remove this segment previously, but evidently the problem still persists because I got 3 pokemon with both moves in the same battle, which was completely useless.
2014-03-30 20:35:36 -05:00
Relados
4069035014 Prevent multiple recovery moves 2014-03-26 20:31:51 -05:00
Relados
c59ca53b2a Allow Knock Off on setup pokemon
With new Knock Off mechanics, sets like Swords Dance Knock Off Weavile is useful
2014-03-26 09:43:30 -05:00
Relados
4ab16d4293 Prevent Moxie on Pokemon without physical moves
It's literally useless - even Unnerve is more useful in that case.
2014-03-25 18:54:42 -05:00
Relados
c0c756ae16 Make Gourgeist have proper probability to show up 2014-03-25 17:06:02 -05:00
Relados
0844a7ccb6 Prevent high bulk pokemon from having Focus Sash
I chose 300 as a sum of Defense, Special Defense and HP that would designate a high bulk Pokemon, due to being just below Dusknoir's sum of the three and I was getting Focus Sash Dusknoir, which is rather subpar.  The number could be changed if there's any better way to designate bulk.
2014-03-25 11:40:34 -05:00
V4Victini
d65812aa21 Pokemon cannot Mega Evolve while locked into a move 2014-03-25 11:18:21 -04:00
Relados
8bae051bb4 Prevent Unburden Normal Gem Explosion 2014-03-20 18:24:21 -05:00