- In accepting Shadow Ball + HP Fighting, ensure that it's HP Fighting
(relevant for Reuniclus, Chandelure, and Sylveon, which have Hidden
Power that aren't Fighting)
- If Hidden Power changes the IVs but is later removed by another
processing cycle, reset the IVs to 31 all
- Removed old check for "bulky" Pokemon as it would give Leftovers to
Pokemon that would prefer Life Orb or even Assault Vest. For example,
Kyurem-White and Goodra, respectively.
- If the Pokemon has three attacking moves, give Life Orb to those with
either setup or a recovery move, and give Leftovers to everything else.
- Give Keldeo HP Flying instead of HP Ghost
- Reject Hidden Power if the Pokemon has a special setup move and only
one other special attack
- Dark/Fighting is resisted by Fairy this generation and isn't a
"perfect" combination anymore
- Remove Feint from Pikachu/Raichu
- Replace Rock Blast with Rock Slide on Golem line
- Add Surf to Octillery
- Reject Strong Jaw without bite moves
- Update Iron Fist check to use the punch flag
- Give preference to Rock Slide over Head Smash
- Give preference to Discharge over Thunderbolt and Electroweb
- Modify Tyrantrum's moves
- Add bite moves counter for Strong Jaw
- Use punch flag for ironfist counter
- Give preference to Stone Edge over Head Smash
Mechanics Changes:
- Fire Rocket does less damage, cannot crit.
- Fire Rocket is no longer a bullet move (for Chesnaught)
- Only Li Shang can Train Recruits.
- Recruits start with lowered defenses as well.
- Edit Mushu's movepool.
Flavor Changes:
- Train Recruits now uses Bulk Up's animation.
- Fire Rocket now uses Eruption's animation. Backfires cause the animation
to strike the user instead!
- Use Searing Shot as Fire Rocket instead of Octazooka.
Unaware currently doesn't work because the ModifyMove event is fired on the move before each target is caculated in doubles and triples.
This means that the ModifyMove event should be fired for each target and the move not modified unless it fits the attacker-target.
It's easier and less expensive to use an ability property to check on attacker/target than to fire events.
This fixes Unaware in doubles/triples.
It takes account interaction with Mold Breaker, Gastro Acid, and other ability supressers.
Seasonal is based on Mulan, in honor of Chinese New Year.
General Shang must defeat the Huns, but his new recruits are weak! Over
time, however, they will get stronger over time by training (just like the
movie, they train during I'll Make A Man Out Of You.) Singing will also
make them train faster.
The Han Chinese also have powerful rockets at their disposal (select
Octazooka in battle). However, the rockets sometimes backfire on new
recruits, but as they train the chance of backfire goes down.
Added a counter that tracks Normal damaging moves for purposes of -ate
Abilities, in case it becomes important later. This counter also
future-proofs Aurorus in case it receives other viable Normal attacks
later.
- Rename randbats helper function `canMegaEvo` to `hasMegaEvo`.
- Move duplicate mega evolution possibility checks from `runMegaEvo` and BattlePokemon constructor to `canMegaEvo` battle script.
Stone Edge somehow was a case three times in the switch statement, meaning
only the first one would have been checked. This fix merges the three
checks into one.
If a Pokemon has a move that boosts speed (Rock Polish/Agility), reject
all modified-priority moves.
If a Pokemon has 4 Physical or 4 Special moves, reject Choice Scarf if the
Pokemon has a priority move.
Breloom is the only Pokemon that gets both and will get the better
ability with only one of them. Basically, no more Poison Heal Mach Punch
and no more Technician Focus Punch.
- Serene Grace is automatically rejected for Chansey and Blissey, who
prefer Natural Cure.
- Serene Grace works best with secondaries that have a high chance of
activating, so a seperate counter is used to check those specifically.
- Sheer Force doesn't need a secondaries chance check; both branches of
the check would have allowed Sheer Force to be used.
- Add Eviolite for NFEs
- Removed old and mostly unused custom levels
- Updated some Pokemon levels
- Removed all NFE Pokemon from Random Battle except for Chansey,
Doublade, Pikachu, Porygon2, and Scyther
- Acrobatics Pokemon have Flying Gem.
- Hawlucha no longer has Sky Attack in its random battle movepool, so we
remove references to that in the code.
- Double Random Battles only check for Fake Out on Unburden Pokemon (and
formerly Sky Attack on Hawlucha, which is removed, so there is no need
to cycle through all of their moves.
A series of changes to make sure battles are as balanced as possible.
Made Frodo Ground/Fairy.
Made Samwise Normal/Fairy.
Switched Gandalf and Saruman boosts.
Added Gollum for Mordor, which is pretty much annoying and Fighting-type move absorber.
Changed Swords Dance for Bulk Up on Aragorn to prevent unstoppable sweeps.
Added a SpD boost for Moses to be able to stand to the pharaoh. Also a cool sentence.
Made John Connor faster (slower but in TR) than Terminator T-1000 to give humans an even lead matchup.
Made Blissey on humans have a decent moveset. Including Barrier, yes.
Made specific sets for Hitmontop and Scrafty on humans, being able to take Robot hits.
Made electric attacks on sailors less likely, 66% instead of 100%.
This change makes 1/4 weak Pokémon survive four switch ins and 50% weak Pokémon survive two Switch-ins.
Belly Drum HP still takes precedence (having Charizard in mind kek).
- Groudon no longer has Water Absorb (relevant because of Hebrew
Seismitoad)
- Removed Hebrew LC mons (but not Egyptian ones)
- Limit one Yahweh/Arceus per team
- Removed the rediculous level boost to most Pokemon.
- Tweak EVs for Lucario, Swift Swimmers, and Shell Smashers.
- Removed all LC sailors and fishes, and added some new Pokemon.
- Remove Rain Dance from sailor sets (mostly Swampert)
- Prevent 2 Mega Pokemon on a team for the Sailor Scenario
Make Unburden Hitmonlee Reckless on Terminator battle.
Limit Lucario on megas too.
Improve zam's moveset on that battle as well.
Minimise speed on Terminator battle.
Make Chansey have Eviolite.
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.
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.
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.
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.
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.
- 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.
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.
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.
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.
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.
- 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.
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
- 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
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.
- 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.
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.
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.
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.
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.
- 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.
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.
- 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.
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)
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.
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.
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.
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
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.
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.
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.