Commit Graph

728 Commits

Author SHA1 Message Date
Joimer
20ef5de780 Seasonal: Update shipwreck battle
Make a more even lead battle of Machamp VS Kyogre.
Machamp is now a Technician Life Orb mon with mixed attack.
Kyogre has now a specific Choice Scarf set.
To not to make Machamp too overwhelming, its level is 75.
This, alongside Life Orb, makes it manageable with Kyogre out.
A trade of hits will end up with either fainted and the other at 10% HP.
2015-01-06 15:17:08 +01:00
Joimer
591b29fcb8 Seasonal: Further user request changes
Gen 1's defenses were too low, raise them a little.
Change Bolt Strike for Fusion Bolt on sailors, this achieves an almost perfect balance.
Nerf Charizard-Y slightly on Red VS Blue battle. Too strong.
Nerf Hoopa-Unbound's level too, as it's too damn strong.
2015-01-06 14:45:27 +01:00
Joimer
c017521990 Improve Seasonal after user requests
Added a way to effectively dealing with Smaug on LOTR, adding Bard as a possibility.
Frodo now gets evasion thanks to the one ring, it's invisible after all.
Nerf Groudon slightly on Desert, it is able to sweep an entire team with bad luck on the Pokémon chosen.
Nerf slightly Alakazam on Red vs Blue battle, it can take on a team easily.
Nerf defenses on Gen 1 team so damage is closer to that of Gen 1 (more).
Swampert should not get any boost on sailor team, otherwise it's an insta-win.
2015-01-06 14:31:10 +01:00
Joimer
6bafeb1f84 Seasonal: Nerf Yveltal
Too strong if mega gallade is out
2015-01-05 23:59:20 +01:00
Joimer
8180e0d036 Implement new Seasonal, Spacetime Funtimes 2015-01-05 13:12:07 +01:00
The Immortal
d1b457e0c6 Increase non-mega Pinsir level in Random Battle 2014-12-30 14:29:10 +04:00
Marty-D
7977b2c3cd Fix unsuccessful two-turn moves
Previously, if an invulnerable move's second turn was prevented from
executing, the user would remain invulnerable until the end of the turn.
2014-12-29 14:08:25 -05:00
The Immortal
93b623cc1b Allow Sturdy with recoil + recovery in Random Battle 2014-12-24 23:19:04 +04:00
Freigeist
0e85da224d Reject Sleeptalk + Lunar Dance in random battles 2014-12-23 16:36:45 +01:00
Juanma Serrano
412bf38d75 Gen 2: Fix AfterMoveSelf events
Leech seed, etc., must be activated just after the Pokémon moves and even if asleep or FP.
2014-12-22 13:23:04 +01:00
The Immortal
14b63873a3 Move mega evolution message to client 2014-12-20 21:56:15 +04:00
The Immortal
41cc584d16 Make Random Battle changes
- Prevent Oblivion Wing + Hurricane Yveltal
- Increase non-mega Banette's level
2014-12-20 21:15:14 +04:00
Juanma Serrano
6b3a5e8e18 Random Double Battles: reject Chlorophyll unless the Pokémon itself has Sunny Day
See: http://www.smogon.com/forums/threads/joims-to-do-list.3486934/page-3#post-5895492
2014-12-19 14:17:40 +01:00
The Immortal
e20060fa10 Update Random Battle 2014-12-19 00:46:21 +04:00
Guangcong Luo
2b80496baf Revert "Reject Rock Head with less than two recoil moves"
This reverts commit 4bc29710b4.
2014-12-18 15:35:29 -05:00
Guangcong Luo
132d55f840 Revert "Update Random Battle"
Don't remove Balloon Rotom-Fan without asking, that's just rude.
:|

This reverts commit fcaee25009.
2014-12-18 15:32:52 -05:00
Juanma Serrano
0114ad3dae Improve Seasonal with user suggestions
Improved the set maker to avoid bad sets due to Present.
Made the mountain 500 meters shorter.
Made the chance to hit an obstacle slightly lower.
Added weight to the sleigh that is lowered by throwing Presents and makes you faster.
2014-12-17 17:08:49 +01:00
The Immortal
4bc29710b4 Reject Rock Head with less than two recoil moves
in Random Battle
2014-12-17 13:41:59 +04:00
The Immortal
fcaee25009 Update Random Battle
- Added moves to Cherrim
- Changed levels
2014-12-17 13:33:32 +04:00
ascriptmaster
ad8a820d5b Update Balloon Fan Rotom (Rotom-Spin)
- Modified level scale so that it's less bad
- Removed Trick from its movepool because it's useless with Balloon
2014-12-17 00:18:10 -08:00
ascriptmaster
eb847519a3 Nerf Articuno in Random Battles
Reduced to Level 82.
2014-12-17 00:18:09 -08:00
ascriptmaster
6797a7b245 Reject Head Smash with Sturdy
Donphan is mostly going to have Sturdy, so we also remove it from its move
set and replace it with some better stuff.
2014-12-17 00:18:08 -08:00
ascriptmaster
469641c05e Don't give Normal Gem to Pokemon with Rapid Spin 2014-12-16 01:14:19 -08:00
Guangcong Luo
a95f2bcbe7 Merge pull request #1353 from asgdf/patch-12
Fix MRay to count as a mega in randbats team
2014-12-12 01:19:59 -06:00
asgdf
98cc285002 Fix MRay to count as a mega in randbats team 2014-12-12 02:22:41 +01:00
Juanma Serrano
608086189d Improve Seasonal Sleigh Showdown
Eliminate megas from teams.
Make freeze from event make you unable to move that turn.
Freeze thawing was meant to be when hit, not after a turn after all. Fixed comment.
2014-12-11 13:50:32 +01:00
asgdf
13139b4ec3 fix moves[] containing non-id move names 2014-12-10 20:45:47 +01:00
Juanma Serrano
1b75007647 Implement new Seasonal Ladder, Sleigh Showdown 2014-12-10 18:01:39 +01:00
Marty-D
8c2b18c622 Fix forced switch mechanics.
- Red Card and Eject Button do not activate if the holder is being
forced out.
- Circle Throw, Dragon Tail, Roar, and Whirlwind cannot attempt to force
out a Pokemon with no inactive unfainted allies.
2014-12-06 11:53:26 -05:00
The Immortal
b64287b64f Prevent Flare Blitz with Fire Blast in Random Battle 2014-12-06 16:31:15 +04:00
The Immortal
37fd088915 Random Battle updates 2014-12-06 16:25:00 +04:00
Guangcong Luo
151b7ea61a Merge pull request #1334 from ascriptmaster/primal
Ability refactor - Abilities now receive End events properly
2014-12-03 16:43:29 -06:00
ascriptmaster
e79e64e3fc Ability Refactor: Abilities now listen for End events
Added functionality for setAbility to send End events to abilities.

Fixed bug with Mold Breaker negating all Battle#singleEvent ability calls,
even those that don't involve damage calculation.

Fixed Skill Swap to now use End and Start events in the right order:
send the End events, then change the abilities, then send Start events.
If the same ability is swapped, don't send End events (the game simply
re-activates the abilities in question)

Moved SwitchOut/Faint events from weather to ability so the weather
can interact properly with Cloud Nine or Air Lock.

Primal weathers persist if a Pokemon with the relevant ability is
on-field, even if the originator switches out.
2014-12-03 12:22:21 -08:00
Ivo Julca
01de2eadf9 Magician's handler is now purely a global event
Reverts 3b5d455
2014-12-02 20:25:02 -05:00
Joimer
d3b233d8ac Update the Mega Pokemon check
There is no need to store whether the team has a mega anymore.
With the general use of pokemon.canMegaEvo and it being set to false for
the whole team after a mega evolution, it is what we need to check to avoid
more than one mega evolution or banned mega evolutions.
2014-11-29 23:58:27 +01:00
ascriptmaster
b6fcb793dc Mega Evolution now ends primal weathers from base form
Sends an EndAbility event when you mega evolve so the weather can check.
2014-11-26 12:58:56 -08:00
The Immortal
e2af6d65cc Fix Travis CI errors 2014-11-22 19:25:33 +04:00
The Immortal
bcf19608c9 Update Mega Rayquaza
Rayquaza does not have a mega stone; it can mega evolve with the move
Dragon Ascent.
2014-11-21 16:26:56 +04:00
The Immortal
1b302c7117 Random Battle: Prevent Flame Charge with Tailwind 2014-11-15 23:53:08 +04:00
Juanma Serrano
26c03e50f3 Update Seasonal Strikes Back: Add safeguard against hash collision
There's an improbable chance that a nickname gets a hash collision.
In such a case, the player gets five instead of six Pokémon.
This safeguard prevents that improbable event from happening at all.
2014-11-11 18:30:59 +01:00
ascriptmaster
15b04f0a8a Fix every error in the Travis CI Build / npm test 2014-11-10 10:57:38 -08:00
Joimer
2ff379f51e Implement november seasonal, Seasonal Strikes Back
Seasonal format is a random battle format that changes its rules monthly.
It often includes limited Pokmon pools, wacky mechanics you'd never encounter in game, and other fun stuff.
2014-11-10 11:34:12 +01:00
Joimer
6b10f3961d Exclude Magikarp's Revenge from Smeargle's movepool in Challenge Cup 2014-11-10 01:02:30 +01:00
Ivo Julca
d5b7034da1 Remove unnecessary checks for sound immunity
As of ecbc9bfd62, no effect provides an "immunity" to sound.
2014-11-05 21:26:25 -05:00
Audiosurfer
3d66859182 edit to random doubles item generation 2014-10-29 21:06:41 -05:00
The Immortal
e304345fe1 Modify Articuno's Random Battle level 2014-10-23 02:39:14 +04:00
Guangcong Luo
ffcce9d746 Randbats ORAS level-balance update
Groudon-Primal, Kyogre-Primal, and Rayquaza-Mega are now level
70 in randbats
2014-10-21 16:43:11 -04:00
Guangcong Luo
fd23027573 Fix level scaling for unreleased megas
Reverts f4cd04a651
2014-10-21 02:38:30 -04:00
Guangcong Luo
623ff87f74 Merge pull request #1265 from ascriptmaster/skydrop-patch
Sky Drop refactor and bug fixes
2014-10-19 23:23:53 -05:00
ascriptmaster
2ffaf0fc77 Sky Drop refactor and bug fixes
- Changed Sky Drop to use onTryHit on its first hit as well as its second,
  allowing it to check for Protect and Fly naturally.

- Added messages when a Pokemon is freed from Sky Drop.

- Allow Flying-type Pokemon to be hit by Sky Drop if their Ground immunity
  has been removed.

- Added BeforeMovePriority to allow Sky Drop to interact with Stance
  Change properly.

- Prevent a Pokemon trapped by Sky Drop from Mega Evolving.

- Added onRedirectTarget to allow Sky Drop to interact with Ally Switch
  properly.
2014-10-19 20:15:16 -07:00
The Immortal
26e882c976 Set even HP for Belly Drum + Sitrus Berry Pokemon in Random Battle 2014-10-20 01:07:17 +04:00
The Immortal
f4cd04a651 Set unreleased forms to the same level as the regular form in Random Battle 2014-10-19 17:06:16 +04:00
The Immortal
f3acd8bbd4 Fix crash 2014-10-18 19:18:05 +04:00
The Immortal
a72edc4ad1 Implement Primal Reversion 2014-10-18 19:10:17 +04:00
The Immortal
69e9d3d52f Fix Primal formes in Random Battle 2014-10-18 17:33:33 +04:00
The Immortal
db24264fae Change Lightningrod to Lightning Rod
It has been changed in ORAS.
2014-10-16 15:15:15 +04:00
Audiosurfer
38d915c7e3 resist berries only chosen for 4x weak in randdubs
made it so that shuca berry and chople berry will only be selected in randdubs in the case of a 4x weakness as opposed to being potential item picks for 2x or 4x weaknesses
2014-10-07 23:49:05 -05:00
Relados
cee46bb34c Prevent Life Orb with HP reliant attacking moves
Pokemon that have Eruption or Water Spout should not generate with Life Orb in random battles.
2014-10-07 00:24:40 -04:00
Ivo Julca
64f22e4fd4 Fix Mega check in b078d698 2014-10-03 13:36:28 -05:00
Ivo Julca
12bafc7036 Merge pull request #1223 from Audiosurfer/master
Conflicts:
	data/scripts.js
2014-10-03 13:31:34 -05:00
Audiosurfer
b078d698fe changes to random doubles item generation
- added charti & occa for 4x weaknesses
- made yache only for 4x weaknesses
- made it so you cant have fake out & sheer force (9-21-14)
- changed it so shuca berry and chople berry won't be added to
immunities
- unburden mons only have normal gem if they have fake out as opposed to
any normal attacking move
- made life orb more common over expert belt

fixed error in shuca generation

typoed, but fixed it so now it should only give shuca berry to pokemon
without a ground immunity

fixed broken indentation

fixed issues pointed out by slayer95

should have fixed the indentation and edited the  immunity check
2014-10-02 17:27:32 -05:00
The Immortal
c09498b58f Give Belly Drum Pokemon Sitrus Berry in Random Battle 2014-10-03 01:09:18 +04:00
The Immortal
84fedef174 Prevent Fake Out with setup in Random Battle 2014-10-01 20:05:44 +04:00
The Immortal
250c2e6af2 Prevent Spacial Rend with Draco Meteor in Random Battle 2014-10-01 18:54:44 +04:00
Guangcong Luo
80f8ff8dcd Merge pull request #1217 from kotarou3/style
Add some extra style checks to jshint and fix them in the files
2014-09-30 13:29:08 -07:00
The Immortal
72b36653dc Prevent Rest / Sleep Talk with speed boosting moves in Random Battle 2014-09-30 22:20:23 +04:00
小太
fe37f3b6a7 Apply jscs to the data files as well 2014-09-30 18:34:16 +10:00
小太
5027be79fb Add jscs as a style checker, and add some extra jshint options 2014-09-29 18:38:01 +10:00
The Immortal
53c4d953eb Modify Lopunny in Random Battle
Added the possibility of Klutz + Assault Vest + Switcheroo to
perma-taunt an opposing Pokemon.
2014-09-27 01:37:32 +04:00
The Immortal
4ab1090017 Update Random Battle
- Fix #1226
- Remove HP Electric from Empoleon
- Prevent Drain Punch with Superpower
2014-09-26 00:46:51 +04:00
The Immortal
8ca3da8f0a Prevent Flare Blitz with Sacred Fire in Random Battle 2014-09-19 20:25:00 +04:00
Relados
33b15dc383 Prevent Sacred Fire with Will-o-Wisp in randoms
Like Lava Plume, having Will-o-Wisp with Sacred Fire is redundant and the Pokemon would be better off with another move.
2014-09-16 23:12:56 -04:00
The Immortal
67dd902bc5 More Random Battle changes 2014-09-16 02:02:43 +04:00
The Immortal
bbeee481a1 Allow Volt Switch with another Electric move in Random Battle
This should solve the three moves bug on certain Pokemon.
2014-09-16 00:52:43 +04:00
The Immortal
265378088e Update Random Battle set generator
- Fixed repeated cases in moves
- Prevent Thunder Wave with setup
2014-09-15 23:32:19 +04:00
The Immortal
9bf54a127a Change Choice Scarf range in Random Battle 2014-09-15 23:04:41 +04:00
The Immortal
f32d331e8a Prevent Expert Belt with Fake Out / Return in Random Battle 2014-09-12 17:01:17 +04:00
The Immortal
313d144139 Prevent Defog with setup in Random Battle 2014-09-12 16:37:37 +04:00
The Immortal
f9a2407b8b Reject Gluttony in Random Battle
Every Pokemon that has Gluttony has a better alternative
2014-09-12 13:17:43 +04:00
The Immortal
040add20ac Prevent Air Balloon with Solid Rock in Random Battle 2014-09-11 20:34:59 +04:00
The Immortal
7c20a3854d Reduce Expert Belt in Random Battle
In favor of Choice Scarf. Expert Belt is now limited to mixed attackers.
2014-09-11 20:07:55 +04:00
The Immortal
77c889f612 Update Random Battle generator 2014-09-11 19:19:07 +04:00
The Immortal
9e05dbd15e Make sure Bisharp gets Defiant in Random Battle 2014-09-11 00:11:30 +04:00
The Immortal
09fd38776a Update Random Battle generator
Prevent Reversal + Leftovers
2014-09-10 20:32:13 +04:00
Guangcong Luo
8c631590b8 Fix multiple Hidden Powers in random battle 2014-09-06 13:26:53 -04:00
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
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
Relados
823793367d Prevent Stone Edge and Rock Blast on same set 2014-03-19 18:43:45 -05:00
Relados
c5c1c55420 Prevent Life Orb and Sturdy on the same set
Life orb renders Sturdy a next to useless ability.
2014-03-19 17:07:58 -05:00
Relados
1f74d5bbf3 Prevent Psychic and Stored Power on the same set
If you have stored power, you have the boosting moves to make it viable, and having psychic as well is redundant.
2014-03-14 06:56:31 -05:00
Relados
564ded1523 Prevent Tinted Lens and Wonder Skin on Sigilyph
Sigilyph's randoms moveset is built solely for use with Magic Guard, and without being able to automatically pass on status, Tinted Lens Sigilyph is pretty much just a free switch in and set-up fodder for a dark type.  Wonder Skin is even worse in that it reduces the need for Psycho Shift.
2014-03-13 18:36:32 -05:00
Relados
2251fa53b6 Prevent Sturdy and Life Orb on same set in randoms
It effectively negates the ability to have both together.
2014-03-12 16:03:29 -05:00
Relados
8032d0ece6 Remove U-turn rejection 2014-03-11 11:55:04 -05:00
Relados
8d06420d04 Prevent Volt Switch and U-Turn on same random set
There's little reason to have both.
2014-03-11 11:11:45 -05:00
Juanma Serrano
0ac16153f1 Delete Seasonal
This was the last Seasonal.
New OM Theorymon ladder it's going to take its place.
2014-03-04 10:01:11 +01:00
The Immortal
21af385043 Fix previous commit 2014-02-27 02:12:39 +04:00
Relados
cc06c1db9f Prevent Bulldoze and EQ on same set in randoms
Must've accidentally misclicked or something on the last request >_>
2014-02-26 16:07:08 -06:00
Guangcong Luo
aa11e73178 Merge pull request #681 from TalkTakesTime/patch-1
Update Doubles randbats team creation
2014-02-25 10:41:15 -06:00
Relados
0373475959 Remove mega Lati@s from random battles
Mega Lati@s should not be usable right now.  (I've also gotten reports of them in hackmons, not sure how that should be dealt with)
2014-02-23 20:39:57 -06:00
TalkTakesTime
5deaa594c6 Prevent AfterMoveSecondary from activating if the move hits a sub 2014-02-23 16:59:56 +13:00
TalkTakesTime
b6d8d850b6 Update Doubles randbats team creation 2014-02-23 15:08:56 +13:00
V4Victini
7511d8ef05 Revert "Prevent AfterMoveSecondary from activating if the attack is taken by a Substitute"
This reverts commit 4c15f252e9.
2014-02-22 13:26:00 -05:00
TalkTakesTime
4c15f252e9 Prevent AfterMoveSecondary from activating if the attack is taken by a Substitute 2014-02-22 18:27:46 +13:00
The Immortal
f0f78cc609 Randbats generator changes
Poison types with Air Balloon prevents them from absorbing Toxic Spikes
2014-02-21 22:34:56 +04:00
The Immortal
6b8339d7a4 selfdestruct faints in gen 6 2014-02-18 20:06:19 +04:00
Relados
393c02e1f0 Remove Limber as randbats ability for Stunfisk
Limber on Stunfisk is completely useless and shouldn't occur.
2014-02-17 15:52:56 -06:00
The Immortal
bad541a276 Revert previous change
Apparently Rotom doesn't need the moves
2014-02-15 22:47:49 +04:00
The Immortal
2c1cb9cd1c Rotom formes require their special move 2014-02-15 15:46:08 +04:00
V4Victini
1009bd789e Update scripts.js 2014-02-12 23:10:41 -05:00
V4Victini
faafc592a4 Remove redundancy in moveKeys
If any of the following moves are in the list of viable moves already, do not add Protect to the list.
- Protect
- Detect
- King's Shield
- Spiky Shield
2014-02-12 22:32:43 -05:00
Joimer
b723a3c5c8 Fix possible bug in Random Doubles Battles team maker 2014-02-12 20:18:31 +01:00
Juanma Serrano
e4afb28c8f Random Battles: Limit status on tn the same moveset
One moveset should only have one status.
Priority is as follows:
Sleep is the most important. Next comes paralysis, then burn, then toxic.
2014-02-11 14:07:52 +01:00
Relados
fa00e44628 Making Mega Mawile start with Intimidate
Forcing a Mawile with the Mawilite to have Intimidate rather than Sheer Force
2014-02-10 19:56:24 -06:00
Juanma Serrano
5f6f82eaf9 Random Doubles Battle: Add an EV allocation fallback 2014-02-10 14:45:51 +01:00
Juanma Serrano
99e9b8cece Random Doubles battle: Allocate EVs properly 2014-02-10 14:41:57 +01:00
Juanma Serrano
43a5be411c Implement Random Doubles Battle
This commit implements the Random Doubles Battle format,
a format awaited by hundreds of players.
This first version uses singles viable moves for the movepool
while Doubles team works on the project of gathering viable
moves for all Doubles Pokémon.

The team maker and set maker are slightly different,
choosing items and abilities more useful in doubles, capitalising
less on tiering and more on BST, and changing move priorities.

This is a first version that should be kept updated with new
and better mechanics for its own Team Making algorithms.
2014-02-10 14:28:16 +01:00
TalkTakesTime
cc9d0b2711 Fix randbats allowing sets with no damaging moves 2014-01-31 22:36:36 +13:00
Juanma Serrano
c00e274e0f Implement new Seasonal, Fabulous Febrruary 2014-01-30 14:26:33 +01:00
Guangcong Luo
d9a077a62e Fix some stray bugs with move redirection 2014-01-28 20:16:10 -08:00
Guangcong Luo
9260027571 Stop ally-target moves from redirecting on faint
Moves targeting allies would retarget on faint in doubles; this
commit fixes that.
2014-01-28 19:00:34 -08:00
Guangcong Luo
468be24e14 Slight refactor of move target change code
Mostly this updates the comments to make it clear why target updating
happens twice.
2014-01-28 20:43:52 -05:00
TalkTakesTime
51121fde78 Correct randbats chances for Genesect/Arceus 2014-01-28 15:09:30 +13:00
TalkTakesTime
3ba5c66e2a Remove whitespace 2014-01-23 23:22:46 +13:00
TalkTakesTime
c41cc6aff0 Fix randbats allowing multiple formes of one species 2014-01-23 23:19:33 +13:00
Juanma Serrano
9701f7c528 Pokémon cannot mega evolve while recharging 2014-01-21 13:50:24 +01:00
Guangcong Luo
c8f3c5ef2e Knock Off activates after Weakness Policy 2014-01-19 20:36:14 -08:00
Joimer
22648434da Random Battles: Forbid Trick Room with Agility as well 2014-01-14 14:11:19 +01:00
Joimer
17e363a100 Random Battle: Reject Trick Room on Rock Polish sets for mons with both 2014-01-14 10:02:25 +01:00
Joimer
a7b0e634fc Random Battles: Forbid HP Ice if Icy Wind is on the moveset 2014-01-14 10:01:03 +01:00
Guangcong Luo
7255f8e4f9 Remove CAPs from Random Battle 2014-01-12 00:15:28 -08:00
V4Victini
1052b211f3 Power Gem is now considered a valid STAB move
80 Base Power in Gen 6
2014-01-09 10:01:25 -05:00
Guangcong Luo
7997058188 Randbat: Make Red Card the fallback Unburden item 2014-01-08 12:22:50 -08:00
Joimer
6eb472162d Fix typo on previous commit 2014-01-08 16:49:28 +01:00
Joimer
911e7147db Random Battles: Add Eviolite to Dusclops
It's useless without it and it's tiered higher than Dusknoir thanks to it.
2014-01-08 16:35:09 +01:00
Joimer
53566ecab4 Random Battles: Add Weakness Policy
Add Weakness Policy item for those Pokémon that are hit super effectively
but have enough bulk to withstand it.
2014-01-08 16:34:21 +01:00
Joimer
9145acb106 Random Battles: Added Assault Vest
Assault Vest is given on mid to low priority to Pokémon with four
attacking moves and a combined defenses base stats of over 179.
2014-01-08 16:28:55 +01:00
Joimer
2b39c85f96 Update Random Battles set maker
Give Rocky Helmet to Rough Skin users on a medium priority.
Add more comments.
Remove Custap Berry as it's unreleased.
Add leftovers as the item of choice for Spiritomb as a defensive mon.
2014-01-08 16:24:31 +01:00
Joimer
5fe6c57914 Random Battles: Remove Gems from the set make but Normal Gem 2014-01-08 16:12:34 +01:00
Joimer
ef5cc4ef13 Random Battle: Add Spe EVs for TR and Gyro Ball users
Trick Room mons are on disadvantage unless this is active.
Trick Room needs a set up turn.
If no EVs are given, Trick Room and Gyro Ball mons are simply at
disadvantage. Even if Gyro Ball hits hard, it's at the mercy of OHKOs
or switch-in 2HKOs.
2014-01-08 15:50:18 +01:00
Joimer
0ae545476d Random Battles: Limit Mega formes to one per team 2014-01-08 15:34:00 +01:00
Joimer
2b3868a7a7 Random Battles: Make Brave Bird the Flying-type move of preference 2014-01-08 15:26:35 +01:00
Guangcong Luo
1acb1562a3 Randbat: Power Herb Geomancy, more level adjustments 2014-01-08 03:06:17 -08:00
Guangcong Luo
deba981c28 Randbat level adjustments 2014-01-08 03:03:22 -08:00
Guangcong Luo
e22303184b Update randbat level scaling exceptions for gen 6 2014-01-08 02:54:50 -08:00
Guangcong Luo
191a53417e Random Battle: Give Mega Stones were appropriate 2014-01-08 02:54:50 -08:00
Guangcong Luo
71b357194b Upgrade formats-data to gen 6 tiers
Randbats have also been updated for them
2014-01-08 02:54:50 -08:00
V4Victini
3bfc21c12e Set canMegaEvo flags false after Mega-Evolution 2014-01-06 13:56:00 -05:00
Joimer
ad8b89b124 Implement new Seasonal: Winter's Wont 2014-01-03 17:37:53 +01:00
Guangcong Luo
99461de893 Fix Parental Bond Snore 2013-12-10 19:29:25 -08:00
Joimer
ace822cf12 Implement new Seasonal, Christmas Charade 2013-12-04 10:46:44 +01:00
Joimer
3b5d45590a Add the possibility for abilities to run onHit events for both attackers
Just as with moves, add the same possibility to abilities so onHit is
run on both sides, allowing new ability effects to be added.
2013-11-27 17:01:01 +01:00
Juanma Serrano
25c56a0293 Nerf Talonflame in Seasonal
Lower its level as it is too powerful.
2013-11-19 17:30:59 +01:00
Slayer95
d94323f3b4 Properly make unattacking pkmn unlikely in randoms 2013-11-15 21:00:51 -05:00
Joimer
b418a84e7e Implement "new" Seasonal, Thankless Thanksgiving 2013-11-04 10:46:22 +01:00
Slayer95
b2909e5398 In CC, properly reduce chance for getting Mega Stone 2013-11-03 00:34:13 -05:00
Guangcong Luo
683dac63f1 Upgrade a bunch of formats to gen 6 2013-10-30 16:09:46 -07:00
The Immortal
ce4519f0e3 Add accurate Mega Evolution message
Needs to be added to the client in the future, in addition to (using
Blastoise as an example):

The opposing Blastoise has Mega Evolved into Mega Blastoise!

- It doesn't mention X/Y for Charizard/Mewtwo
2013-10-29 19:41:53 +04:00
Joimer
0ba0df3141 GP 1/2 comment in randbat team generator 2013-10-28 09:53:17 +01:00
Guangcong Luo
2354305bf9 Mega evolution ability change is permanent 2013-10-24 20:41:15 -07:00
Bill Meltsner
6df6d3c8d9 Implement Terrain, and update Camouflage and Nature Power accordingly.
Terrain is basically a copy/paste of weather code right now.
2013-10-24 02:09:45 -07:00
Bill Meltsner
45f0821eb7 clearer logic for blocking gen 6 from randbats 2013-10-24 00:00:47 -07:00
Bill Meltsner
c3ea68d75b Fix random battles. 2013-10-23 23:56:06 -07:00
Slayer95
9945badaa2 Improve sixth gen check in random team builder
Since tier classification has begun, being in Limbo is not a necessary condition for being in 6th gen anymore.
2013-10-23 16:18:00 -05:00
Bill Meltsner
57f5772f69 Update moves and abilities with changed names, including High Jump Kick and Feint Attack.
This probably won't blow up in our faces.
2013-10-22 23:56:03 -07:00
Guangcong Luo
d595c5ae15 Properly activate abilities after Transform 2013-10-19 18:45:57 -07:00
Guangcong Luo
31fd8ea76a Implement mega evolution 2013-10-19 16:08:54 -07:00
The Immortal
3576508db4 Change "Dream World" to "hidden" abilities
- Removed dreamWorldRelease and added unreleasedHidden
- Replaced maleOnlyDreamWorld with maleOnlyHidden
- Replace 'DW' ability with 'H' ability
- Changed isDW variable to isHidden
2013-10-19 00:25:02 +04:00
Slayer95
0ae8775686 Check for Limbo and CAP tiers in team building. 2013-10-11 17:46:08 -05:00
Guangcong Luo
3cc455f275 Default gen is now 6 2013-10-11 09:22:03 -07:00
Slayer95
f543568d90 Remove a variable not needed anymore 2013-10-08 01:24:19 -05:00
Slayer95
174abedf22 Fix Octoberfest set builder
Pokémon could lack Trick if they would have gotten it as their third movement from randomSet. This is now properly dealt with. (Note that no OF-pokémon gets Present from randomSet.)
2013-10-08 01:18:00 -05:00
Joimer
febcdf2233 Add checkAbilities function to scripts
This function checks the selected abilities against default abilities.
It's used on Ability Exchange.
2013-10-01 12:11:51 +02:00
Joimer
72ab2ec5b3 Add new October Seasonal: Octoberfest 2013-10-01 11:57:04 +02:00
Guangcong Luo
b5fc8c7032 Fix three-move Jolteon 2013-09-28 22:02:23 -07:00
Slayer95
5e2c665b1c Fix typo in random set builder 2013-09-06 19:07:54 -05:00
Joimer
9d92b0ab5c Seasonal Ladder: Improve default team for repeated Pokémon
Improve the default team when there's a repeated Pokémon so
players aren't in disadvantage due to a system flaw.
Also use a better way to not to repeat Pokémon formes.
2013-09-04 13:07:12 +02:00
Joimer
606081644c Seasonal: Change variable name 2013-09-04 09:28:56 +02:00
Joimer
28a1462c77 Seasonal: Improve team maker 2013-09-04 09:24:31 +02:00
Joimer
8bdc090fc8 New Seasonal: Don't let team maker repeat Pokémon 2013-09-01 11:54:41 +02:00
Joimer
f33ff063ab New seasonal: Make sure templates with baseSpecies resort to it
Make sure in case of repeated numbers of species with formes
the baseSpecies is chosen.
2013-09-01 11:48:27 +02:00
Joimer
b6e48e283f Add new Seasonal, School Schemes 2013-09-01 11:26:56 +02:00
小太
f2f973fe29 Obliterate trailing whitespace 2013-08-18 21:33:15 +10:00
Joim
588df751dd Improve seasonal team maker
Imrpove Average August's team maker taking into account player's feedback on the Seasonal.
2013-08-05 09:54:07 +02:00
Joim
cf29c4ab0c Improve balance and move choose in Average August
The balance right now allows to Kyogre's pirates to win more easily. Fix that and make sure moves are correct.
2013-08-01 13:27:45 +02:00
Joimer
baad1dff93 Add new Seasonal, Average August
The previous month's Seasonal, Jolly July, has joined the orphan branch of old-seasonals while we welcome the new Seasonal for the month of August.
2013-08-01 13:01:09 +02:00
Guangcong Luo
ba2610825d Encore shouldn't change target if move isn't changed 2013-07-29 00:30:20 -07:00
Guangcong Luo
4cff590d6a Crash more gracefully when a bad name is passed to randomSet 2013-07-04 15:33:11 -07:00
Joimer
cb5b1b6aa3 Seasonal: Remove illegal Pokémon
Castform-Sunny forme and Darmanitan-Zen do not have random sets and are illegal, defaulting in Unown, thus shall be removed.
2013-07-05 00:24:58 +02:00
Joimer
723920e260 Add new Seasonal, Jolly July
Add the new Seasonal for this month, Jolly July, which features summer and independence days as well as a world travel.
2013-07-04 23:58:19 +02:00
Guangcong Luo
10a69642f7 Fix crash in old Substitute system 2013-07-01 19:54:06 -07:00
Jay2645
c46ea5da3a Circle Throw is treated like Dragon Tail 2013-06-29 23:57:39 -07:00
Jay2645
2098ea8c7f Random Battle Choice Scarf fix 2013-06-29 23:15:40 -07:00
Jay2645
129be4e91a Fixed case where a Pokemon could get Baton Pass without having anything to pass. Also added check for recoil moves before adding Focus Sash and allowed Choice Band/Choice Specs to be considered if you have Trick or Switcheroo and 3 attacking moves of the same category. 2013-06-29 22:08:59 -07:00
Jay2645
7584a01634 Removed unnecessary code, removed unreliable check, cleaned up section of code. 2013-06-29 13:15:08 -07:00
Jay2645
5a3515846f Removed two lines from an older commit that were no longer being used. 2013-06-29 11:27:57 -07:00
Jay2645
a4965e4062 Updated Random Battle set generation with more comments and system to try and find STAB moves. 2013-06-29 02:58:18 -07:00
Jay2645
41f7a99c4a Added check to make sure sets have a STAB move (if possible) before being added. 2013-06-28 15:39:58 -07:00
Jay2645
789b10672e Corrected another typo in comments for Basculin. 2013-06-25 18:17:15 -07:00
Jay2645
a2ec73e549 Corrected typo in comments for Basculin. 2013-06-25 18:13:46 -07:00
Guangcong Luo
93d22073a8 Refactor randbat team generator
The main difference here is that the evolution family restriction
has been replaced with a 'limit one of each type combo' restriction.

Every other change is just refactoring.
2013-06-25 17:47:00 -07:00
Guangcong Luo
cd47fccf6d Revise random battle changes for PS coding style 2013-06-25 17:09:08 -07:00
Jay2645
e4399f3d19 Fixed formatting in Random Battle changes. 2013-06-25 16:52:25 -07:00
Jay2645
0d1b47344a Modified Random Battle code to prevent unfair teams. 2013-06-25 15:40:05 -07:00
Guangcong Luo
b80cf3b945 Fix Baton Pass failing 2013-06-23 13:05:21 -07:00
Guangcong Luo
8b5e94e06f Fix an obscure Substitute-related crash 2013-06-20 06:22:30 -05:00
Marty-D
5e0acfb56b Correct previous commit. 2013-06-19 21:28:50 -04:00
Marty-D
5d1db9bb71 Remove redundant force-switch fail message.
- Suction Cups, Ingrain, and Soundproof have their own messages.
2013-06-19 20:41:15 -04:00
Guangcong Luo
0c53bd7e98 Fix self-secondaries not activating 2013-06-19 17:57:27 -05:00
Guangcong Luo
fc9725efad Show a fail message when force-switch moves fail 2013-06-19 17:29:01 -05:00
Guangcong Luo
d66e619f79 Fix some redundant failure messages 2013-06-17 11:08:47 -05:00
Guangcong Luo
b43ff0b645 Nearly all move failures now display a message 2013-06-16 03:41:00 -07:00
Cathy J. Fitzpatrick
f885d64601 Struggle does not require PP 2013-06-11 17:44:14 -06:00
Cathy J. Fitzpatrick
0aadcf0243 Correct mechanics when trying to use a 0 PP move
There are two cases where a pokemon might attempt to execute a move
with zero PP:

- a move which had PP when selected, but whose PP was subsequently
  reduced to 0 by Spite; and

- a case where a pokemon has multiple copies of the same move, in
  which case it will always be possible to select the move, but it
  will not be executed if it has 0 PP.

Attempting to use a move with zero PP should not succeed.
2013-06-11 02:15:26 -06:00
The Immortal
cbf9f36d65 Correct "Swift Swift" mistake 2013-06-04 01:31:00 +04:00
Joimer
cc0efcbc47 June Jubilee: Add Hariyama and Aggron to the Pokémon pool
Added Hariyama with Surf and Aggron with Surf to the list of summer Pokémon to June Jubilee as per player request.
2013-06-03 15:15:09 +02:00
Marty-D
cd9e7ae25b Missed one typo. 2013-06-01 16:30:57 -04:00
Marty-D
60baa43235 Fix Seasonal Pokemon list, take 1v1 out of debug. 2013-06-01 16:18:37 -04:00
Joimer
2031e3f1de June Jubilee: Fix grammatical mistakes and name mistakes 2013-06-01 20:39:47 +02:00
Joimer
59def7689b Add new Seasonal: June Jubilee
June has a new Seasonal, June Jubilee, which features the coming of summer with all fire type Pokémon, its swarms of bugs, and a little Delibird story.
2013-06-01 20:15:20 +02:00
Antar1011
d4f5143e22 Bugfix: Basculin doubly represented in randbats
Because there's basculin and then there's basculinbluestripe
2013-06-01 13:51:30 -03:00
Guangcong Luo
1ea49e7376 Don't crash if Substitute intercepted a status move
This is a condition which should never happen in non-modded games
2013-05-27 16:32:52 -07:00
The Immortal
82c52d0ef6 Randbats script update
- Add Blaze, Overgrow, Swarm, and Torrent counters
- Prevent Dragon Tail with Roar / Whirlwind
- Allow Simple with Stockpile
- Give Substitute + Reversal a Gem instead of Leftovers
2013-05-06 01:32:29 +04:00
Guangcong Luo
c3a497e341 Remove a redundant check 2013-05-02 02:56:45 -07:00
Guangcong Luo
35ba7b70a2 Fix crash against Substitute 2013-05-01 19:22:12 -07:00
Joimer
f8e3ad9c19 Add new Seasonal Ladder, May Mayhem. 2013-04-30 13:10:41 +02:00
Joimer
af23038f54 Delete old Seasonals and unused suspect test formats 2013-04-30 12:58:41 +02:00
Guangcong Luo
782b497d3c Fix Encore + Mental Herb interaction
This fix involves overhauling how changeDecision works, which also
fixes priority order (and speed ties) getting rerolled when Encore
hits.
2013-04-23 17:21:58 -07:00
Cathy J. Fitzpatrick
cbfc3e5e16 Working implementation of sending exact damage for own pokemon
This isn't as elegant as I might like, but it does appear to work.
2013-04-09 03:46:45 -06:00
Guangcong Luo
462a387831 Fix Outrage+Substitute 2013-04-07 10:46:33 -07:00
Guangcong Luo
5039bcea6f Fix Heal Bell 2013-04-07 10:41:52 -07:00
Guangcong Luo
df7b3d785e Move results passed up to useMove
Move results are now passed all the way up to the useMove script.

It's now possible to tell from within useMove whether or not the move
succeeded.

This fixes a bug where successful Memento and Healing Wish were
considered to have failed and so didn't cause the user to faint.
2013-04-06 19:03:59 -07:00
Guangcong Luo
c663b5eaa5 Fix Substitute for new hit system 2013-04-06 18:27:20 -07:00
Guangcong Luo
3ef4b5c785 Ugly hack to fix burn+Explosion damage
Currently, if a burned Pokemon explodes in doubles, all targets except
the first will take full damage, because it's fainted (and no longer
burned) by the time those damage calculations are done.

The correct solution is to do all damage calculations before dealing
any damage, which I will do someday. Today is not that day.

Today, we move fainting the Explosion user to after damage is dealt.
Which, aside from making the faint order wrong, doesn't really have
any other consequences, and is better than the current buggy
damage calculation.
2013-04-06 16:11:15 -07:00
Guangcong Luo
2b1a5540ac Fix SR for new move hit system
Specifically, the TryFieldHit event no longer exists.

Instead, Magic Bounce has separate event handlers for TryHit and
TryHitSide.

This also fixes it so Magic Coat/Bounce happen before ability
absoption (like Water Absorb).
2013-04-06 14:35:31 -07:00
Guangcong Luo
fe2da359e9 Refactor when accuracy is calculated
Accuracy is now checked after immunities and certain other effects,
rather than before.
2013-04-06 12:55:38 -07:00
Guangcong Luo
55362a8f81 Gem activation conditions fix 2013-04-06 08:47:21 -07:00
Marty-D
5370068ed7 Make sure Gems don't activate with Status moves. 2013-04-06 10:47:00 -04:00
Guangcong Luo
b0cfddcede Fix Gems and spread moves
Gems now boost all hits of a spread move.

This introduces a new event BasePowerMultiplier, so that gems actually
activate at the right time now.

The name is similar to basePowerModifier but they do the same thing
anyway. We should probably figure something out for their naming,
though.
2013-04-05 23:13:26 -07:00
The Immortal
a14b34864a Randbats script update
- Add Hustle counter
- Prevent a few move combinations
- Prevent Simple without a boosting move
- Prevent Swift Swim/Chlorophyll without Rain Dance/Sunny Day
- Set Combee's ability to always be Honey Gather
- Set Deoxys-D and Deoxys-S to level 74
2013-04-02 22:35:07 +04:00
Cathy J. Fitzpatrick
e45652180b Remove use of some obsolete functions 2013-03-29 01:27:49 -06:00
The Immortal
0ee5661e1f Randbats changes 2013-03-26 00:51:59 +04:00
Marty-D
78b489c217 Fix 'selfdestruct' moves again.
- Healing Wish and Lunar Dance fail correctly when the user is the last
Pokemon.
- Final Gambit and Memento don't faint the user when used against a
Protecting target.
2013-03-23 23:19:31 -04:00
The Immortal
42118ab5d0 Update Randbats script
- Add Adaptability counter
- Prevent a few combinations
2013-03-23 01:56:18 +04:00
Marty-D
b745012c70 Set moveUsed before running useMove.
- This fixes Cursed Body, among other things.
2013-03-20 17:22:51 -04:00
Joim
e0c35c85b9 Add April Seasonal random team making script
Add the random team maker for the new April Seasonal, Fools Festival.
2013-03-19 12:06:13 +01:00
The Immortal
8e4c14bebb Randbat script update
- Prevent Baton Pass with Switcheroo/Trick
- Prevent Fiery Dance with Fire Blast (Volcarona)
- Prevent SolarBeam without Sun
- Prevent Bolt Strike with Fusion Bolt (Zekrom)
2013-03-17 01:54:46 +04:00
The Immortal
5a60ea4ce1 Randbat script changes
- Prevent Cotton Guard with Reflect
- Prevent Light Screen with Calm Mind
- Prevent Choice Scarf with Status moves
2013-03-10 00:17:06 +04:00
Marty-D
a32da9a1f5 Fix Spit Up, tidy up Stockpile. 2013-03-05 15:16:33 -05:00
Guangcong Luo
ce0ffe654e movedThisTurn overhaul:
- now named 'moveThisTurn' and contains the moveid
- this fixes the Outrage issue
2013-03-05 11:27:49 -08:00
Joim
d2745c445b Bug fixes on Seasonal Ladder Spring Forward
Avoid Softboiled being repeated in Chansey and Blissey.
Gems should always be Grass Gem due to Sceptile, and 
Barrage and Egg Bomb being Grass-type.
2013-03-03 17:56:38 +01:00
Joim
93973cdc4f Fix two bugs in Seasonal Spring Forward
Add a better item for Toxic Orb Breloom, since no Poison Heal.
Random scripts for Gender is not ready.
2013-03-03 10:32:58 +01:00
Marty-D
0906f7c880 Make sure Challenge Cup Pokemon have a Nature. 2013-03-02 14:11:12 -05:00
Joim
b7af28f566 Add new random team maker for new Seasonal
Add the new Random Team maker for the new Seasonal Ladder 
for March, Spring Forward
2013-03-01 14:47:16 +01:00
Bill Meltsner
32d9826862 Fix Smeargle's moveset in Challenge Cup. 2013-02-20 22:48:21 -08:00
Guangcong Luo
24db004538 Multi-hit moves now stopped by Sleep
(this is an obscure interaction with Effect Spore)
2013-02-20 13:44:13 -08:00
Guangcong Luo
e7e0f8ffec Berries can now activate between hits of multihit moves 2013-02-20 13:20:58 -08:00
Cathy J. Fitzpatrick
e436d41a49 Fix selfdestruct status moves 2013-02-17 12:47:12 -07:00
Bill Meltsner
f7b3a757fa Fix No Guard missing against Pokemon in the middle of Fly/Dig/Dive/Shadow Force 2013-02-17 11:41:01 -08:00
Guangcong Luo
53d62da175 Describe the event system in comments
also add a few other comments
2013-02-16 22:37:31 -08:00
Guangcong Luo
67b063f910 Fix base power 0
Now it actually means 'don't deal damage' rather than 'deal 0 damage'
this removes the need to specialcase secondaries and status moves, too
2013-02-16 21:34:30 -08:00
The Immortal
ed1bd85dd1 Randbat script update 2013-02-17 01:14:09 +04:00
Marty-D
144b97af80 Add support for both types of 'miss' messages. 2013-02-14 16:04:23 -05:00
The Immortal
da3bdadff8 Randbats script updates
- Add a few move combinations to be prevented
- If legal, set Swift Swim for Pokemon with Rain Dance
2013-02-14 23:22:02 +04:00
Marty-D
6a10746c34 Fix Jynx for Seasonal Ladder. 2013-02-07 21:45:35 -05:00
Guangcong Luo
cc99883311 Fixes to the seasonal ladder 2013-02-05 14:19:16 -08:00
Joim
277ca65641 Adding Valentine Venture random team selection
Added the random team selection for the new Seasonal ladder for 
February Valentine Venture (randomSeasonalVVTeam).
It's a doubles ladder that chooses three couples for each player.
2013-02-05 08:33:17 +01:00
Guangcong Luo
561393658b Fix Spite 2013-01-29 14:55:24 -08:00
Guangcong Luo
a475ea5901 Fix Beat Up crash 2013-01-28 10:27:01 -08:00
Guangcong Luo
3b0ddd2b4d Implement Pledges
This introduces a new function battle.prioritizeQueue which
will move a decision to the front of the queue
2013-01-26 09:22:04 -08:00
Marty-D
0a7dd3cfe4 Add the Pay Day message. 2013-01-25 20:09:48 -05:00
TheImmortal
cbb65b6583 Add isAdjacent function
Used to check if two allies are adjacent and have not fainted
2013-01-25 21:07:39 +04:00
Guangcong Luo
b67454743b Hidden Power fix:
- Random battles and automatic detection sets Hidden Power IVs correctly
- Hidden Power now always does damage based on user's IVs
- User's Hidden Power base power is now reported
2013-01-24 15:03:04 -08:00
Joim
27acbf931f Pichu-Spiky-eared shouldn't appear in random teams
Pichu-Spiky-eared has been excluded from the random team forming as it is not available in BW2.
2013-01-23 18:19:36 +01:00
Marty-D
88caef8914 Make sure multi-hit moves count each hit's damage separately. 2013-01-22 19:37:58 -05:00
TheImmortal
136c78cce5 Fix error in previous scripts.js commit 2013-01-20 17:32:51 +04:00
TheImmortal
4e5137b78a Randbats script updates
- Reject Relic Song with setup
- Reject Encore/Pursuit/Stealth Rock/Sucker Punch with RestTalk
- Reject Hydro Pump with Razor Shell/Scald
- Reject Flamethrower with Blue Flare
- Reject Bonemerang/Earth Power with Earthquake
- Make Wynaut/Wobbuffet get Custap Berry 50% of the time with Destiny Bond
- Add the possibility of getting Lum Berry with Outrage
2013-01-19 21:17:03 +04:00
TheImmortal
0e25b08412 Randbats: Prevent Shed Skin + Chesto with Rest 2013-01-15 02:08:54 +04:00
Guangcong Luo
e37792dcf8 Fix bug in spread hit damage calculation 2013-01-11 17:13:00 -08:00
Guangcong Luo
f6f2d0febc Properly fix spread hits and damage reduction 2013-01-11 16:03:51 -08:00
Guangcong Luo
4827a10931 Spread hits only get damage reduction if they spread 2013-01-11 15:57:39 -08:00