From bf8cd69f80a415b0025ef5641f33c4ab245713f0 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Fri, 22 Dec 2017 22:13:10 +0100 Subject: [PATCH] Overflow check --- Mage.Sets/src/mage/cards/d/DesperateGambit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/d/DesperateGambit.java b/Mage.Sets/src/mage/cards/d/DesperateGambit.java index 1272b4c729..6e4f4b2f88 100644 --- a/Mage.Sets/src/mage/cards/d/DesperateGambit.java +++ b/Mage.Sets/src/mage/cards/d/DesperateGambit.java @@ -129,7 +129,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(event.getAmount() * 2); + event.setAmount(game.addWithOverflowCheck(event.getAmount(), event.getAmount())); this.discard(); } else { preventDamageAction(event, source, game);