CardUtil overflow

This commit is contained in:
Zzooouhh 2017-12-23 23:38:52 +01:00 committed by GitHub
parent 331428b1ae
commit a35ee6837f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,7 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import mage.util.CardUtil;
/**
*
@ -126,7 +127,7 @@ class FarrelsMantleEffect extends OneShotEffect{
@Override
public boolean apply(Game game, Ability source) {
Permanent perm = game.getPermanent(source.getSourceId());
int damage = game.addWithOverflowCheck(perm.getPower().getValue(), 2);
int damage = CardUtil.addWithOverflowCheck(perm.getPower().getValue(), 2);
DamageTargetEffect dmgEffect = new DamageTargetEffect(damage);
return dmgEffect.apply(game, source);
}