Commit Graph

1027 Commits

Author SHA1 Message Date
Marty-D
aadef53c75 Gen IV: Fix Leaf Guard 2015-07-24 21:23:12 -04:00
Marty-D
94e4027505 Gen IV: Fix Flower Gift 2015-07-24 21:21:51 -04:00
Kevin Lau
0bbd3650b7 Normalize ModifySpe calculations with the other Modify-Stat events
The current implementation of ModifyAtk, ModifyDef, etc. is to pass the
actual stat into the event, have event handlers run battle.chainModify(),
ModifySpe passes in a modifier variable, calls battle.chain(), and then
ends with battle.modify() using the modifier variable. The way chainModify
is implemented within the event system also means that it chains together
modifiers in the same manner and finishes with battle.modify(), meaning
that there is no need for ModifySpe to use battle.chain() and
battle.modify() manually.

This also fixes the effect of BattlePokemon#getStat on stats other than
speed.
2015-07-24 12:19:42 -07:00
Guangcong Luo
5d3cd8263c More updates to Endless Battle Clause
- 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.
2015-07-24 03:33:28 -04:00
Juanma Serrano
d32815c764 Gen 1 RandBats: Update Paras family essential
An attacking move is going to be more important.
Additionally, sometimes the user will prefer other status ailment to spore.
2015-07-23 13:43:58 +02:00
Marty-D
cff37c69db Gen V: Actually fix Skill Swap messages 2015-07-22 21:32:50 -04:00
Guangcong Luo
23378149eb Fix gen 5 Skill Swap message 2015-07-22 17:43:01 -04:00
Guangcong Luo
c8c03ad92d Update Endless Battle Clause
The full description is in the comments of the Endless Battle
Clause entry in rulesets.js.

This update fixes a lot of the issues with yesterday's version.

Also included: A minor refactor of deductPP, which did not need
a success variable.
2015-07-22 03:41:43 -04:00
Guangcong Luo
9bf3517f2e Implement New Endless Battle Clause
The new Endless Battle Clause attempts to ban endless battles by
detecting situations in which a battle could become endless.

This approach bans endless battles without banning Leppacycling.

The exact formulation is:

A Pokémon is considered cornered if:

- it has no available moves other than Struggle
- OR a stale Pokémon used Assist Whirlwind on it
- OR it has been hit by a Struggle from a stale Pokémon on the turn
  it switched in

(at the beginning of a turn, if you have available moves other than
Struggle, you are no longer cornered)

A Pokémon is considered stale if:

- it has gained a Leppa berry through any means besides starting
  with one (including but not limited to Harvest, Recycle, Pickup,
  Symbiosis, Bestow, Thief, Switcheroo, and Magician)
- OR it has been targeted with Fling Leppa Berry
- OR it is cornered and begins a turn with more HP than it the last
  turn it began
- OR it is cornered and begins a turn with as much HP as the last
  turn it began, and was not fully paralyzed, loafing around from
  Truant, or immobilized from Attract
- OR it uses Transform/Imposter against a stale Pokémon

(a Pokémon that becomes stale stays stale for the rest of the match)

If all active Pokémon are stale, the player whose team originally
started with a Leppa Berry loses. If both or neither team started
with a Leppa Berry, the team that had the first stale Pokémon wins.
2015-07-21 06:38:22 -04:00
Ivo Julca
40c4c91af6 Fix future move gem boost message 2015-07-19 12:21:14 -05:00
Marty-D
b77e3795b5 Gen III: Reset sleep's skippedTime counter properly 2015-07-19 12:21:04 -05:00
Marty-D
f1ae041707 Fix Endeavor showing two failure messages 2015-07-17 21:31:28 -04:00
Guangcong Luo
0eb6f4b244 Merge pull request #2006 from ascriptmaster/move-fixes-2
Fix PP deduction interactions with Pressure
2015-07-17 13:40:19 -05:00
Kevin Lau
b0e1fd5789 Fix Pressure's interaction with multi-target moves and Follow Me
Implement new function getMoveTargets to list all move targets given a
user and a move. Refactor Battle system to remove redundancies with
checking move targets. Run the RedirectTarget in this function instead of
later after TryMove, since technically single-target moves changing
targets should occur before the move is attempted.

Refactor the DeductPP event to be a singleEvent that targets the Pokemon's
ability instead of a global event. Run this event on the move's targets as
calculated by BattlePokemon#getMoveTargets.
2015-07-17 01:47:55 -07:00
Ivo Julca
15b925f7e4 RBY-GSC Randbats: Fix high incidence of later gen Pokémon 2015-07-16 13:33:42 -05:00
Ivo Julca
6d189221c0 Make BW random team builder fully deterministic
This was supposed to be done in baadd0a, but somehow most Math.random() calls remained unnoticed.
2015-07-16 12:36:05 -05:00
Ivo Julca
baadd0a92f Overhaul old-gen random team builders
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.
2015-07-16 12:03:14 -05:00
Ivo Julca
207cb41957 Remove indeterminacy from moves
Gen 1 Disable and Gen-NEXT Night Daze now use the battle RNG.
2015-07-16 12:03:12 -05:00
The Immortal
96af9c6625 Past gens: Add Munchlax event
Forgot to do this in c7cc620527.
2015-07-14 01:00:02 +04:00
Guangcong Luo
803c202c5f Actually fix gen 4 Custap 2015-07-12 15:14:59 -04:00
Guangcong Luo
a226bec668 Fix gen 4 Custap 2015-07-12 04:27:18 -04:00
Guangcong Luo
2ea5907f65 Refactor battle turn order
Instead of automatically sorting the queue, the queue is now only
sorted manually when committing decisions.
2015-07-11 18:10:11 -04:00
Marty-D
a9b724223b Merge pull request #2041 from Guernouille/patch-8
Stadium: Full paralysis chance is 63/256
2015-07-10 14:35:00 -04:00
Marty-D
86d03d898b Merge pull request #2042 from Guernouille/patch-9
Gen 1: Full paralysis chance is 63/256
2015-07-10 14:34:50 -04:00
Marty-D
5282b770de Gen I: Fix Mimic
- Mimic can copy any move
- Mimic can be used while Transformed
- Mimic uses its own PP for copied moves, even if its current PP is
greater than the maximum PP of the copied move
2015-07-10 14:33:43 -04:00
Guernouille
4e5df4e77c Gen 1: Haze fix
Haze removes the volatiles from both players.
2015-07-10 02:21:58 +02:00
Marty-D
0f7f238a10 Gen I: Prevent Cosplay Pikachu from appearing in Challenge Cup 2015-07-08 20:27:09 -04:00
Guernouille
ff2ad0f8fd Gen 1: Full paralysis chance is 63/256
https://github.com/iimarckus/pokered/blob/master/engine/battle/core.asm#L3504
2015-07-08 18:37:41 +02:00
Guernouille
7addf845ff Full paralysis chance is 63/256
http://datacrystal.romhacking.net/wiki/Pok%C3%A9mon_Stadium:ROM_map#Full_Paralysis_check
2015-07-08 18:29:10 +02:00
The Immortal
f27e55dce9 Theorymon: Add new changes 2015-07-08 05:17:44 +04:00
Marty-D
c85622391f Gen III: Fix sleep count interaction with Sleep Talk/Snore
- Basically, a counter separate from the sleep counter starts at 0, and
attempting to use Sleep Talk or Snore while asleep increments it by 1.
- If the Pokemon attempts to use any other move while asleep, this
counter is reset to 0.
- If the Pokemon switches out while asleep, the current value of the
counter is added to the sleep counter.
2015-07-07 20:30:39 -04:00
Ivo Julca
b791a86325 Mix and Mega: display the megaevo item/move rather than the species
Fixes unintended empirical demonstration of Stroop Effect.
2015-07-05 23:29:26 -05:00
Ivo Julca
d0b59f5cca Mix and Mega: remove Mega-Rayquaza theorybans
- Its exact implementation method is ultimately theorymon-based and policy-dependent.
- Keeping the current implementation is furthermore a maintenance burden.
2015-07-05 23:16:02 -05:00
Ivo Julca
41e6aad4e4 Gen 1: residual damage fixes
- Fix Poison/Burn displaying the opponent as source of the damage.
- Fixes inconsistent volatile state after Haze usage.
- Closes #2010
2015-07-05 23:00:52 -05:00
Ivo Julca
029846a6b7 Update Mix and Mega
- Dragonite has been banned from holding stones.
- Baton Pass Clause has been added.
- Mawile and Medicham can hold Medichamite and Mawilite respectively.
2015-07-05 19:01:35 -05:00
Marty-D
0739d7eea5 Gen III, IV: Fix Taunt 2015-07-05 13:40:30 -04:00
Marty-D
e8991f8573 Gen I: Fix fast asleep message showing every sleep turn 2015-07-04 11:14:51 -04:00
Ivo Julca
261f246357 Update GSC Drain+Subs mechanic hint to use -hint 2015-07-03 19:30:56 -05:00
Guangcong Luo
9f8829197b Note that gen 2 drain-substitute mechanic is not a bug 2015-07-03 20:19:56 -04:00
Ivo Julca
e33ec413df Mix and Mega: update weight restriction
Minimum weight is no longer required on set validation, and it's instead automatically set on mega evolution.
2015-07-03 05:36:49 -05:00
Ivo Julca
b060a30ab3 Update Mix and Mega
- Gengarite is banned.
- Regigigas is not allowed to hold any mega stone or orb.
- Remove megastone indicator on switch out. Relevant for Baton Pass.
- Type change information is now sent silently.
2015-07-02 20:35:55 -05:00
Ivo Julca
7810613776 Fix formats getting corrupted if loaded as rules from different mods 2015-07-02 07:48:54 -05:00
Ivo Julca
b8e9d237b5 Mix and Mega updates
- Fix secondary type changes
- Suppress a crash in formats that inappropriately run the mod.
2015-07-02 06:02:54 -05:00
Ivo Julca
abed3f8b62 Implement Mix and Mega 2015-07-01 23:34:47 -05:00
The Immortal
7eacc892fc Update OM of the Month
- New OMotMs are Mix and Mega + Protean Palace
- Seasonal is outdated and is being removed until a new version is made
2015-07-01 19:05:22 +04:00
Kevin Lau
cbef63343a Fix OHKO moves' interaction with accuracy-changing abilities/effects
Add a new event ModifyAccuracy that affects all moves other than OHKO
moves and switched many event handlers that originally used the Accuracy
event to ModifyAccuracy instead.
2015-06-29 17:22:42 -07:00
Marty-D
1d7f27c655 Gen II: Smoochum can't legally learn Lovely Kiss
- There are no males in the Human-Like group that can pass it down
2015-06-26 15:04:04 -04:00
Marty-D
d32b69f48d Fix Attract end messages 2015-06-25 12:29:30 -04:00
Guernouille
437a777fe4 Gen 1: Mimic can copy Transform.
Tested in Link Battle
2015-06-20 17:27:56 +02:00
Marty-D
25a670dc25 Gen II: Steel types can become poisoned 2015-06-18 15:33:39 -04:00