mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Overflow check
This commit is contained in:
parent
8e2b397f1d
commit
c0fb7b5cf0
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ class TargetPermanentPowerPlusToughnessCount implements DynamicValue {
|
|||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Permanent sourcePermanent = game.getPermanent(sourceAbility.getFirstTarget());
|
||||
if (sourcePermanent != null) {
|
||||
return sourcePermanent.getPower().getValue() + sourcePermanent.getToughness().getValue();
|
||||
return game.addWithOverflowCheck(sourcePermanent.getPower().getValue(), sourcePermanent.getToughness().getValue());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue