mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
CardUtil overflow
This commit is contained in:
parent
ae6eb7f19e
commit
efe2331ec4
1 changed files with 2 additions and 1 deletions
|
@ -49,6 +49,7 @@ import mage.filter.FilterObject;
|
|||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetSource;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -129,7 +130,7 @@ class DesperateGambitEffect extends PreventionEffectImpl {
|
|||
if (controller != null && object != null) {
|
||||
if (super.applies(event, source, game) && event instanceof DamageEvent && event.getAmount() > 0) {
|
||||
if (wonFlip) {
|
||||
event.setAmount(game.addWithOverflowCheck(event.getAmount(), event.getAmount()));
|
||||
event.setAmount(CardUtil.addWithOverflowCheck(event.getAmount(), event.getAmount()));
|
||||
this.discard();
|
||||
} else {
|
||||
preventDamageAction(event, source, game);
|
||||
|
|
Loading…
Reference in a new issue