From 9fbeebcb8a6e2450b70ca03057673d9ebbcd0880 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Tue, 10 Dec 2013 12:56:20 -0800 Subject: [PATCH] Ring Target only affects type-to-type immunities --- battle-engine.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/battle-engine.js b/battle-engine.js index 1a73ee57e2..b51ff9beb1 100644 --- a/battle-engine.js +++ b/battle-engine.js @@ -1105,12 +1105,15 @@ var BattlePokemon = (function() { return true; } if (this.negateImmunity[type]) return true; - if (!this.negateImmunity['Type'] && !this.battle.getImmunity(type, this)) { - this.battle.debug('natural immunity'); - if (message) { - this.battle.add('-immune', this, '[msg]'); + if (!(this.negateImmunity['Type'] && type in this.data.TypeChart)) { + // Ring Target not active + if (!this.battle.getImmunity(type, this)) { + this.battle.debug('natural immunity'); + if (message) { + this.battle.add('-immune', this, '[msg]'); + } + return false; } - return false; } var immunity = this.battle.runEvent('Immunity', this, null, null, type); if (!immunity) {