CardUtil overflow

This commit is contained in:
Zzooouhh 2017-12-23 23:37:10 +01:00 committed by GitHub
parent 4f8bcc3ce6
commit 43cffd1054
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,6 +50,7 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetControlledPermanent;
import mage.util.CardUtil;
/**
*
@ -131,8 +132,8 @@ class DracoplasmEffect extends ReplacementEffectImpl {
for (UUID targetId : target.getTargets()) {
Permanent targetCreature = game.getPermanent(targetId);
if (targetCreature != null && targetCreature.sacrifice(source.getSourceId(), game)) {
power = game.addWithOverflowCheck(power, targetCreature.getPower().getValue());
toughness = game.addWithOverflowCheck(toughness, targetCreature.getToughness().getValue());
power = CardUtil.addWithOverflowCheck(power, targetCreature.getPower().getValue());
toughness = CardUtil.addWithOverflowCheck(toughness, targetCreature.getToughness().getValue());
}
}
ContinuousEffect effect = new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b);