forked from External/mage
Overflow check
This commit is contained in:
parent
c0fb7b5cf0
commit
95bde33ddb
1 changed files with 3 additions and 3 deletions
|
|
@ -131,8 +131,8 @@ class DracoplasmEffect extends ReplacementEffectImpl {
|
|||
for (UUID targetId : target.getTargets()) {
|
||||
Permanent targetCreature = game.getPermanent(targetId);
|
||||
if (targetCreature != null && targetCreature.sacrifice(source.getSourceId(), game)) {
|
||||
power += targetCreature.getPower().getValue();
|
||||
toughness += targetCreature.getToughness().getValue();
|
||||
power = game.addWithOverflowCheck(power, targetCreature.getPower().getValue());
|
||||
toughness = game.addWithOverflowCheck(toughness, targetCreature.getToughness().getValue());
|
||||
}
|
||||
}
|
||||
ContinuousEffect effect = new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b);
|
||||
|
|
@ -141,4 +141,4 @@ class DracoplasmEffect extends ReplacementEffectImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue