Correctly detect damaging moves in Color Change

This commit is contained in:
Bill Meltsner
2012-03-24 20:03:19 -05:00
parent 56bf92a055
commit e7345643b9

View File

@@ -222,7 +222,7 @@ exports.BattleAbilities = {
"ColorChange": {
desc: "This Pokemon's type changes according to the type of the last move that hit this Pokemon.",
onAfterMoveSecondary: function(target, source, effect) {
if (effect && effect.effectType === 'Move' && target.lastDamage)
if (effect && effect.effectType === 'Move' && effect.category !== 'Status')
{
target.addVolatile('ColorChange', source, effect);
}