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
3fc7f0c513
commit
8e2b397f1d
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ class SentinelEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent targetPermanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source));
|
||||
if (controller != null && targetPermanent != null) {
|
||||
int newToughness = targetPermanent.getPower().getValue() + 1;
|
||||
int newToughness = game.addWithOverflowCheck(targetPermanent.getPower().getValue(), 1);
|
||||
game.addEffect(new SetToughnessSourceEffect(new StaticValue(newToughness), Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue