Commit Graph

946 Commits

Author SHA1 Message Date
Guangcong Luo
066b1d6828 Merge pull request #1865 from ascriptmaster/move-fixes
Battle refactor: No longer reset ignore in Battle#update
2015-05-27 01:11:34 +00:00
Juanma Serrano
98dcac1d8b Gen 1: Fix (de)boost behaviour
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.
2015-05-26 18:12:06 +02:00
Juanma Serrano
825fc4b92e Gen 1: Fix bug with stat modifiers over +2 2015-05-26 17:58:37 +02:00
Guangcong Luo
590ebf9730 Merge pull request #1898 from ascriptmaster/tests
Un-hardcode Rock Head in favor of an onDamage handler
2015-05-26 01:25:06 +00:00
Marty-D
1e5b241c0d Gen I, II: Fix rampage moves
- 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
2015-05-22 14:30:44 -04:00
Kevin Lau
17724c59f0 Un-hardcode Rock Head in favor of an onDamage handler
Instead of having a hardcode in scripts.js that people needed to
reference, it seemed more intuitive to take advantage of the Damage
event instead, and have Rock Head negate damage within the event.

Fixed a bug in Gen-NEXT Rock Head exhibiting the same behavior that
was causing the original Rock Head + Mummy glitch.
2015-05-21 13:52:02 -07:00
Marty-D
0581a47431 Fix rampage-ending confusion message 2015-05-21 14:54:37 -04:00
Juanma Serrano
c8f1b8c150 Gen 1: Articuno and Jolteon are OU 2015-05-21 09:55:20 +02:00
Guangcong Luo
1824125753 Merge pull request #1887 from SolarisFox/patch-5
Style fix: indexOf() comparisons
2015-05-20 18:59:18 +00:00
Marty-D
0e2606b9b9 Fix failure message showing for self effects 2015-05-20 10:45:17 -04:00
Marty-D
c1a1ce85df Fix failure message showing for secondary effects 2015-05-19 15:49:45 -04:00
Kevin Lau
12be51b262 Battle refactor: New functions ignoringItem() and ignoringAbility()
BattlePokemon#ignoringItem and BattlePokemon#ignoringAbility are
hardcodedto return true for any situation where pokemon.ignore['Item']
or pokemon.ignore['Ability'] respectively would have been true.
2015-05-18 19:17:41 -07:00
SolarisFox
29b961ff69 Style fix: indexOf() comparisons 2015-05-18 15:55:57 -07:00
Marty-D
5d0beee8ac Fix partial trapping end messages 2015-05-18 15:08:52 -04:00
Marty-D
a8daa10618 Gen II: Correct Low Kick 2015-05-14 16:07:13 -04:00
Juanma Serrano
9e119fa279 Gen 1: Fix status and stats interaction
Stats are recalculated from 0 with a boost, status ignored.
Status drops only applied if status is successfully set.
2015-05-14 10:47:24 +02:00
Juanma Serrano
c3a28abc61 Gen 2: Proper chain breeding learnset check
This is quite complex.
In gen 2, the egg moves pass through father and species through mother.
Therefore, we must check that:
1. Two egg moves come from the same father or are learned in another way.
2. If two egg moves come from the same father, check if the father can learn those two as well.
Also, we must keep track of the state of egg and machine moves in the learnset in order to properly reject them when the problem is found.

Related commits: 17e8515486 and 33cc1e09eb
2015-05-13 16:45:23 +02:00
Juanma Serrano
124ffd0ab0 Gen 1: Implement Rage bug properly 2015-05-13 11:05:44 +02:00
Juanma Serrano
0f99628d00 Stadium: Apply proper stat modifying mechanics
As gen 1, Stadium has its own stat modifying mechanics.
It's basically an extension of gen 1's, only it changes the approach and runs a recalculation on all changes only for the proper Pokémon.
2015-05-13 10:31:39 +02:00
Joimer
ede8c2da7c Fix crash in Gen 1 2015-05-12 18:57:09 +02:00
Juanma Serrano
14cc0ce5fb Gen 1: Refactor stat calculation
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.
2015-05-12 17:58:00 +02:00
Juanma Serrano
4f246f7032 Gen 2: Remove unused code
All this code was done before the main battle-engine was reworked to have exceptions for past gens.
Furthermore, due to how inheritance works, it was messing up team preview in Stadium formats.
All what was dealt with this code is now dealt with in battle-engine.js and all future gen 2 exceptions should be there.
2015-05-12 09:50:56 +02:00
Juanma Serrano
21b1ee7107 Stadium: Update Standard Clauses 2015-05-12 09:50:56 +02:00
Juanma Serrano
a38692a937 Seasonal: Balance patch
Slow Down now also reduces damage done by 15%.
Add a new full defensive moveset for Tanks.
Change Evasion for new move, Sacred Shield, for support.
Add an extra moveset for support.
Update information.
2015-05-11 10:30:58 +02:00
Juanma Serrano
00b8e897ba Merge pull request #1876 from xfix/ohko-randbats
Disallow Fissure with Horn Drill in Gen1 randbats.
2015-05-11 08:57:05 +02:00
The Immortal
5d4b5ee8fa Update OU Theorymon 2015-05-11 10:12:29 +04:00
Marty-D
334b9d16b9 Gen III: Fix Flail/Reversal power 2015-05-10 12:32:20 -04:00
Konrad Borowski
2e8e0e0620 Disallow Fissure with Horn Drill in Gen1 randbats. 2015-05-10 18:25:26 +02:00
Marty-D
4b0d938b57 Gen III: Fix Sleep Talk while locked 2015-05-09 13:38:13 -04:00
Marty-D
e76c220fae Gen IV: Fix Sleep Talk while locked
- In Gen 3 and 4, Sleep Talk always fails when the move is forced to be
used
2015-05-09 13:16:52 -04:00
Marty-D
787a8ba53f Gen IV: Fix Lunar Dance 2015-05-09 13:12:26 -04:00
Marty-D
f9bc7594ce Gen II: Stalling moves fail behind a substitute 2015-05-09 12:30:55 -04:00
Marty-D
46adbb8f45 Gen II: Correct Counter/Mirror Coat priority 2015-05-09 12:20:36 -04:00
Marty-D
b3c0f60239 Gen II: Fix critical hit ratios
- High crit moves start at stage 2 (stage 0 being normal moves)
- Focus Energy adds 1 stage
- Lucky Punch and Stick set the stage at 2 and skip the other effects
- Sky Attack is not a high crit move
- Also fix Razor Wind's accuracy
2015-05-08 12:20:51 -04:00
Marty-D
af280660bb Gen II: Fix Dig and Fly
- Fissure can hit Dig and Whirlwind can hit Fly
- Use BasePower instead of ModifyDamage for doubled power moves
- Also correct current-gen Fly to modify damage instead of base power
2015-05-07 11:09:35 -04:00
Marty-D
15caa1a323 Gen II: Sketch cannot copy certain moves
It also doesn't do anything in Link Battles.
2015-05-06 13:40:26 -04:00
Marty-D
7edad419f3 Gen II-IV: Correct moves that cannot be encored 2015-05-06 13:19:44 -04:00
Juanma Serrano
2863d6d810 Seasonal: Nerf Mutilate
Make its base power just 27 so you're forced to cause bleed/poison.
2015-05-06 10:30:45 +02:00
Rhythms
35c46f3356 Seasonal: More changes.
- add the new /seasonaldata alias to the beginning message
- change all single quotes surrounding the move animations into double
qoutes (just because it was like that in the Mar+Apr Seasonal)
- remove unnecessary line at the end of the seasonal's moves.js
2015-05-05 20:26:14 -06:00
Marty-D
dca8a8c81a Gen I: Fix explosions on subs with immunity 2015-05-05 16:56:26 -04:00
Juanma Serrano
a924acdb70 Seasonal: balance patch
Nerf slightly spread moves.
Make all Pokémon more resilient to damage.
Add EVs to make each Pokémon flavour unique to its character.
Randomise damage slightly more.
Eliminate all immunities.
2015-05-05 11:38:18 +02:00
Juanma Serrano
ce3e678bf9 Merge pull request #1861 from ascriptmaster/seasonal
Seasonal: Add move animations, bug fix
2015-05-05 10:56:53 +02:00
Juanma Serrano
125144e07e Gen 1: Fix self-destructing moves on immunity
Forgot to mention this change for c53d022e4b
2015-05-05 10:48:56 +02:00
Kevin Lau
c2f074e24c Seasonal: Add move animations, bug fix
Don't call the Damage event in getDamage -- it is already called in
Battle#damage and would therefore cause doubled events for Barkskin, etc.
2015-05-05 01:43:07 -07:00
Guangcong Luo
4f708b1240 Merge pull request #1849 from ascriptmaster/move-fixes
Refactor disabling moves, other miscellaneous bug fixes
2015-05-05 05:36:06 +00:00
Kevin Lau
b06b5513b6 Fix Generation 4 Heal Block
Heal Block only blocked the HP recovery from draining moves and Leech Seed
in Generation 4.
2015-05-04 21:17:04 -07:00
Kevin Lau
0ec4ff912a Battle Engine Refactor: Add a DisableMove event
The intention for this event is to remove the move disabling code away
from ModifyPokemon and to an event that can be run a fewer number of
times. Since the disabledMoves index is used to gray-out moves that cannot
be used, and not for any other purpose, there is no need for the related
code to be run at the ModifyPokemon timing, instead working better as a
once per turn event.
2015-05-04 21:17:00 -07:00
Guangcong Luo
10a6911d43 Merge pull request #1860 from Rhythms88/master
Seasonal: Changes
2015-05-04 20:12:06 +00:00
Rhythms
4af47e44a7 Seasonal: Changes
- add an alias for /seasonaldata
- add a check in /seasonaldata if there is no target
- change quotes in formats.js and add the same alias
- fix some missed instances of followe
2015-05-04 13:28:53 -06:00
Joimer
8bb5e54ecc Fix typos in Seasonal 2015-05-04 21:15:21 +02:00