Fix the drain crash

This commit is contained in:
Guangcong Luo
2012-04-04 23:52:04 -04:00
parent c9381b18e1
commit d6395b30d1

View File

@@ -2195,8 +2195,11 @@ function Battle(roomid, format, rated)
damage = target.heal(damage, source, effect);
switch (effect.id) {
case 'leechseed':
break;
case 'rest':
selfB.add('-heal', target, target.hpChange(damage), '[silent]');
break;
case 'drain':
selfB.add('-heal', target, target.hpChange(damage), '[from] drain', '[of] '+source);
break;
default:
if (effect.effectType === 'Move')