Commit Graph

939 Commits

Author SHA1 Message Date
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
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
Juanma Serrano
f86810d7dc Seasonal: Improve info command and remove immunity
Immunity seems to be overpowered after watching a tournament.
2015-05-04 13:11:16 -05:00
Juanma Serrano
43df4684f2 Implement new Seasonal, You are (not) prepared
More information: http://www.smogon.com/forums/threads/3491902/page-12#post-6202283
Seasonal finally uses a mod. This is for several reasons:
1. The formats were getting too extensive in formats.js, making it difficult to work with that file.
2. This allows to meet expectations of users who want better and more varying seasonals each month.
3. This allows for extra modification, making Seasonals more and more different and exciting.
4. This allows to test the limits of PS mod system.
2015-05-04 13:10:28 -05:00
Juanma Serrano
bd06448589 Gen 2: Make Rest sleep overwrite sleep origin side
Sleep Clause should not be activated if an asleep Pokémon uses Rest through Sleep Talk, as then the sleep is overriden.
2015-05-04 11:47:17 +02:00
Juanma Serrano
8c54dd8e76 Gen 1: Default to max Atk Stat Exp
If a weird attack stat exp is specified (ie. not minimised), we max it.
2015-05-04 11:29:41 +02:00
Juanma Serrano
f58378f365 Gen 1: Allow for minimum Attack Stat Exp and DVs
This change allows users to input less than perfect attack on their sets.
If they don't input any EVs or IVs, the game will max all of them.
Otherwise, it will check for the attack EVs and IVs set on the teambuilder to then calculate the proper stats, 30 atk being the minimum to max out the other stats.
A minimum of 1 DV is necessary to keep max HP.

This is just a temporary fix, once the gen 1 teambuilder is done we should just check for the proper limitations on acquiring Stat Exp.
Level of the Pokémon will be taken into account soon to calculate the min Atk Stat Exp as well.
2015-05-04 11:27:46 +02:00
Marty-D
6356f1ab33 Fix Rock Head against substitutes 2015-05-03 13:26:20 -04:00
Marty-D
a92e38547f Fix Rock Head
- Since Mummy exists, it is entirely possible not to have Rock Head by
the time recoil happens
2015-05-02 15:05:42 -04:00