mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
CardUtil overflow
This commit is contained in:
parent
c7db369eff
commit
34282dbd72
1 changed files with 2 additions and 1 deletions
|
@ -38,6 +38,7 @@ import mage.constants.CardType;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -72,7 +73,7 @@ class TargetPermanentPowerPlusToughnessCount implements DynamicValue {
|
|||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Permanent sourcePermanent = game.getPermanent(sourceAbility.getFirstTarget());
|
||||
if (sourcePermanent != null) {
|
||||
return game.addWithOverflowCheck(sourcePermanent.getPower().getValue(), sourcePermanent.getToughness().getValue());
|
||||
return CardUtil.addWithOverflowCheck(sourcePermanent.getPower().getValue(), sourcePermanent.getToughness().getValue());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue