Commit Graph

733 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
Guangcong Luo
b7aa629703 Merge pull request #1889 from ascriptmaster/move-fixes-2
Battle refactor: New function isGrounded(), bug fixes
2015-05-26 07:09:19 +00: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
c40fdef413 Remove Yawn tag when the effect ends 2015-05-23 14:48:13 -04:00
Kevin Lau
61996d3f6e Battle refactor: New function isGrounded(), bug fixes
Added BattlePokemon#isGrounded to check for the grounded-ness of a
Pokemon. Also BattlePokemon#isSemiInvulnerable for whether a Pokemon is
in the first turn of a two-turn move that makes them semi-invulnerable.

Fixed Terrain bugs involving Pokemon in a semi-invulnerable state.

Changed OHKO move check to use BattlePokemon#isSemiInvulnerable, fixing a
graphical bug that would display an immunity message when a Pokemon
attempted an OHKO move on a higher-leveled Pokemon that was being held by
the effect of Sky Drop.

Fixed Misty Terrain bug that was causing Rest and the effect of Yawn to
put Pokemon to sleep.

Fixed Misty Terrain bug that was causing Yawn to fail.

Fixed Electric Terrain bug that was causing Yawn to succeed.
2015-05-21 16:54:44 -07: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
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
724ae5e0ea Add Endure activation message 2015-05-17 12:58:23 -04:00
Marty-D
420e3458e7 Fix Aromatherapy's interaction with Sap Sipper 2015-05-16 19:47:37 -04:00
Kevin Lau
54f9383a2c Fix Imprison bugs
Imprison was not blocking moves the turn it was used.
2015-05-14 14:18:41 -07:00
Marty-D
e9057cff4d Fix Perish Song tagging Soundproof Pokemon 2015-05-13 09:40:30 -04:00
Marty-D
022dc59767 Remove Attract tag when unneeded 2015-05-12 11:05:20 -04:00
Marty-D
a570a29eac Fix Foresight and Miracle Eye interaction 2015-05-11 11:41:52 -04:00
Marty-D
f9bc7594ce Gen II: Stalling moves fail behind a substitute 2015-05-09 12:30:55 -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
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
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
Kevin Lau
8f33492d8b Fix Gravity's interaction with Fly and Bounce
Without removing the 'twoturnmove' volatile, it was forcing Pokemon to
re-select Fly if Gravity was used while the Pokemon was in midair.
2015-05-04 21:16:56 -07:00
Marty-D
6356f1ab33 Fix Rock Head against substitutes 2015-05-03 13:26:20 -04:00
Marty-D
1974360fa8 Fix Feint properly
- Multiple protection effects could be active for the same target
2015-04-29 18:13:09 -04:00
Marty-D
9d0f83ba76 Fix Feint
- All forms of protection can be broken by allies in Gen 6
2015-04-29 17:28:46 -04:00
Marty-D
4570f3b6df Add Lock-On/Mind Reader message 2015-04-28 19:56:55 -04:00
Ivo Julca
00f6c0faf7 Style fixes 2015-04-26 00:26:13 -05:00
Guangcong Luo
e71a287775 Properly show message when status is blocked by Sub 2015-04-25 22:05:42 -05:00
Guangcong Luo
4db053befe Revert "Show fail message when status is blocked by Sub"
This was implemented exactly the wrong way and showed fail messages
in a lot of situations they shouldn't show up, such as when
Close Combat's Def/SpD drops didn't happen.

This reverts commit 1edc40f936.
2015-04-25 21:58:09 -05:00
The Immortal
1edc40f936 Show fail message when status is blocked by Sub 2015-04-17 03:31:30 +04:00
The Immortal
339233c3b0 Fix Me First and Mirror Move against Substitute
Also changed `target` to `pokemon` for Nature Power because it makes
more sense as it targets `self`.
2015-04-17 02:31:15 +04:00
The Immortal
9af2a3df12 Fix Nature Power against Substitute 2015-04-16 22:36:12 +04:00
Guangcong Luo
54947b665f Merge pull request #1728 from ascriptmaster/move-fixes
Move refactor: moves/items that ignore immunity/effectiveness
2015-04-14 17:05:22 +00:00
Kevin Lau
6e2458bc4e Fix interaction between Curse and Protean
The relation is hard-coded because no other move changes based on the
user's type the way Curse does, and the alternative would require
refactoring some things with the event ordering.
2015-04-12 13:55:05 -07:00
Marty-D
c3fcc834b8 Fix Struggle
- No longer leaks information that the opponent has no moves left
whether or not they actually attack with Struggle
- Now shows the correct recoil message
- Gen 3 and earlier now have the correct accuracy
2015-04-08 23:43:39 -04:00
Kevin Lau
2e56120ad9 Move refactor: affectedByImmunities -> ignoreImmunity
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.
2015-04-08 00:17:12 -07:00
Marty-D
dfbf0daf27 Use gravity flag for Gravity
Pending a ModifyPokemon refactor, the disabling part can keep its list.
2015-04-04 20:28:25 -04:00
The Immortal
1c9fb89988 Remove isTwoTurnMove property and use charge flag 2015-04-05 03:27:32 +04:00
The Immortal
7e9c1030ec Remove notSubBlocked move property
Use the authentic flag instead. Also combined the Infiltrator properties
into one.
2015-04-04 01:22:21 +04:00
Marty-D
815f9d8689 Remove thawsUser move property 2015-04-03 15:39:46 -04:00
The Immortal
70c780f96a Remove isNotProtectable move property
Use flags instead.
2015-04-03 22:07:50 +04:00
The Immortal
ea888ae7d5 Fix Mist
Infiltrator does not bypass Mist on the same side in Doubles. Fixed the
message showing multiple times.
2015-04-03 21:11:58 +04:00
The Immortal
633bd55d4b Fix Safeguard in Doubles
Infiltrator does not bypass Safeguard on the same side. Removed
hardcoded Toxic Spikes as well.
2015-04-03 19:54:07 +04:00
The Immortal
d4a22bb1e6 Remove isContact property from moves
Use flags instead.
2015-04-03 16:59:53 +04:00
The Immortal
a916a80a63 Update viable Hidden Powers
Almost everything learns Hidden Power. Fire and Ice are the most common types used competitively so choose to show them only in the Teambuilder as "usable".
2015-03-28 16:39:48 +04:00
Guangcong Luo
67c8df4da0 Merge pull request #1665 from ascriptmaster/move-fixes
Fix Foresight and Miracle Eye to use ModifyBoost
2015-03-26 16:08:20 -05:00
Kevin Lau
c5bc1a60d1 Fix Foresight and Miracle Eye to use ModifyBoost
Also deprecates move.ignorePositiveEvasion
2015-03-26 13:00:51 -07:00
The Immortal
e02bde05c0 Fix Wish crash 2015-03-26 22:08:13 +04:00
The Immortal
ba2e463ef5 Update Teambuilder's "usable moves"
More stricter than my previous update. These moves are used on a very
small percent of the Pokemon that actually learn them, or not used at
all.
2015-03-26 02:51:28 +04:00
galbia
c121c4af73 Updated some viablemoves in teambuilder
Moves such as Teeter Dance and Stockpile are just awful on everything,
Searing shot is not viable on the only Pokemon that gets it sadly,
Infestation is not good on anything simply and should get close to
zero usage. Retailate is a wasted moveslot on everything. @xfix said
that me doing this was fine :)
2015-03-25 22:45:53 +01:00
Juanma Serrano
d71d3737bd Fix bug in Focus Punch stopped by hit on Sub
Fixes the bug introduced in 555bae44d1 in which Focus Punch is stopped by hitting a Substitute, totally breaking the somewhat common SubPunch tactic.
It also now takes into account that damage should be higher than 0 if existing.
2015-03-25 13:45:18 +01:00
The Immortal
e7c23b70c5 Fix Aromatherapy
It does not work on Pokemon with a Substitute in gen 6.
2015-03-25 04:34:58 +04:00