- Gen 1 PP overflow makes a Pokemon stale
- Staleness warnings now specify the staleness source
- Half-staleness also warns, if another pokemon is already stale
Warning on half-staleness helps remind people who seem to think
they've beaten Endless Battle Clause after 5-ish turns, when it
takes 10-20 turns for some staleness verdics, especially if
there's a lot of switching going on.
Mainly follow-up for 1deedc595, but also fixes a few bugs.
- BW/GSC/RBY - randomSet: fixed and renamed slot argument.
- BW - randomTeam: crashlogger relative path was set incorrectly.
- BW - randomTeam: PotD Magikarp and Delibird used outdated randomBattleMoves data format.
- RBY - randomTeam: builder was too reject-happy regarding weaknesses (counters prematurely updated).
An improvement of 130% more op/s is observed for RBY randomCCTeam,
with no significative performance regression for randomTeam in any gen.
It currently deducts an extra PP on a switch. According to the comment,
PP is not deducted earlier, which is why it was being deducted here.
But this is incorrect. PP is deducted earlier on a switch.
Where as SmogDex does not list the NU tier, it is been a long-standing existing tier within Smogon and rby2k10 communities.
The NU tiering serves for Random Battle balance purposes mainly, as there is no UU format.
One could use the change to build a Gen 1 NU tier or similar, though.
The routine for burn and para drops is checked after applying boosts to the Pokémon whose turn is not, regardless of the target of the move, when a Pokémon uses a move that results in a stat change.
- The lock starts even if the move is blocked by Protect, misses, or the
target is immune
- The lock ends without causing confusion whenever the move cannot be
executed
- When the lock ends normally, confusion begins even if the user is
already confused, and there is no indication that confusion has started
- In Gen 1 the duration is 3-4 turns
In order to emulate Gen 1 perfectly and to let the metagame adapt to the correct mechanics, stat calculation has been refactored.
Burn and Paralyse drop are applied whenever a Pokémon switches in with the status.
Also whenever a Pokémon gets a stat boost, if the Pokémon whose turn is not has the status.
Stat boosts recalculate that stat, minus burn and para drops (that's why Agility ignores para drop and Rest keeps drops).
Additionally, Reflect and Light Screen are only calculated in damage calculation.
Part of this code has been added to battle-engine.js with a gen === 1 conditional to avoid a ton of code repetition that would have been necessary otherwise.
Keep in mind that .modifiedStats for a BattlePokemon and the modifyStat function must only be available for gen 1 games.
Unlike battle-engine.js, old gens did not check if move.ignoreImmunity was
undefined/false in their getDamage functions, causing crashes when numbers
were passed in to the function.
While move.affectedByImmunities was always a Boolean value to denote if
the move was affected by immunities, move.ignoreImmunity can be a Boolean
value if it ignores or is affected by all type immunities, but also can
act as an object such that !!move.ignoreImmunity[type] means it ignores
immunities of that type.
Put the functions in the order they are found in scripts.js and battle-engine.js.
Use main addQueue and runDecision options, minor past gens change are dealt with in there.
Add comments on what everything does and relevant Gen 1 mechanics for ease of understanding.
Make Tangela's set more variable, not using sleep powder as a staple.
Avoid Sleep Powder and Stun Spore together on the same set.
Make Growth be unable to be in the same set as Swords Dance.
Also note Staryu's proper tier in formats data.
Some wrap-move using Pokémon have a higher tier due to being better in a Wrap meta. Increase their level.
Staryu is tiered as LC but should have NFE level due to its typing, stats, and movepool.
Improve level scales.
Use Fire Blast as the main Fire-type attack.
Limit team to 2 Pokémon sharing the same main weakness (Thunderbolt, Surf, Psychic, Blizzard).
Change mandatory move to essential move, as it's not literally mandatory but a move without which the Pokémon is much worse in any format it plays.
Buff all shitmons to level 99.
Nerf Amnesia Mewtwo to level 68.
Update level scale for better balance.
Halve the chance to have two Pokémon of the same type.
Halve the chance to get more than 2 NFE/LC/UU Pokémon.
Forbid Slash and Swords Dance in the same set explicitly.
All shitmons grant now the chance to get both Ubers.
Update several movesets, including lowering the chance to get a partial trapping set since those make games longer but not funnier.
Some Pokémon with over 4 moves in the pool need a mandatory move.
Usually, this move makes a difference between them being decent and them being horrible.
The team selector will now bias teams.
You will now only get 0-1 LC Pokémon.
You are limited to either Mewtwo or Mew, if you get any, unless you get a Magikarp.
You're strictly limited to two Pokémon of the same type. This makes all teams type varied.
NFEs and UUs are less likely to be gotten after you have two of those (or LC).