Make sure ability immunities go last

Specifically, abilities like Lightningrod should activate their
absorption effects after Protect, Magic Bounce, or anything like
that.
This commit is contained in:
Guangcong Luo 2013-04-06 15:22:32 -07:00
parent 2b1a5540ac
commit b7500a375a
2 changed files with 6 additions and 6 deletions

View File

@ -1121,7 +1121,7 @@ exports.BattleAbilities = {
shortDesc: "This Pokemon blocks certain status moves and uses the move itself.",
id: "magicbounce",
name: "Magic Bounce",
onTryHitOrder: 4,
onTryHitPriority: 1,
onTryHit: function(target, source, move) {
if (target === source) return;
if (move.hasBounced) return;
@ -2688,7 +2688,7 @@ exports.BattleAbilities = {
id: "rebound",
isNonstandard: true,
name: "Rebound",
onTryHitOrder: 4,
onTryHitPriority: 1,
onTryHit: function(target, source, move) {
if (this.effectData.target.activeTurns) return;

View File

@ -6786,7 +6786,7 @@ exports.BattleMovedex = {
onStart: function(target) {
this.add('-singleturn', target, 'move: Magic Coat');
},
onTryHitOrder: 3,
onTryHitPriority: 2,
onTryHit: function(target, source, move) {
if (target === source) return;
if (move.hasBounced) return;
@ -8460,7 +8460,7 @@ exports.BattleMovedex = {
onStart: function(target) {
this.add('-singleturn', target, 'Protect');
},
onTryHitOrder: 2,
onTryHitPriority: 3,
onTryHit: function(target, source, move) {
if (move.breaksProtect) {
target.removeVolatile('Protect');
@ -8799,7 +8799,7 @@ exports.BattleMovedex = {
onStart: function(target, source) {
this.add('-singleturn', source, 'Quick Guard');
},
onTryHitOrder: 1,
onTryHitPriority: 4,
onTryHit: function(target, source, effect) {
// Quick Guard only blocks moves with a natural positive priority
// (e.g. it doesn't block 0 priority moves boosted by Prankster)
@ -13152,7 +13152,7 @@ exports.BattleMovedex = {
onStart: function(target, source) {
this.add('-singleturn', source, 'Wide Guard');
},
onTryHitOrder: 1,
onTryHitPriority: 4,
onTryHit: function(target, source, effect) {
// Wide Guard blocks damaging spread moves
if (effect && (effect.category === 'Status' || (effect.target !== 'allAdjacent' && effect.target !== 'allAdjacentFoes'))) {