Included overflow check methods

This commit is contained in:
Zzooouhh 2017-12-20 00:31:31 +01:00 committed by GitHub
parent 40561e900a
commit bf6939f45b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -887,7 +887,8 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
addCounters(CounterType.M1M1.createInstance(actualDamage), damageSourceAbility, game);
}
} else {
this.damage += actualDamage;
// this.damage += actualDamage;
this.damage = game.addWithOverflowCheck(this.damage, actualDamage);
}
game.fireEvent(new DamagedCreatureEvent(objectId, sourceId, controllerId, actualDamage, combat));
return actualDamage;