From 95bde33ddb986b98095ff594e253d9021648b598 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Fri, 22 Dec 2017 22:54:25 +0100 Subject: [PATCH] Overflow check --- Mage.Sets/src/mage/cards/d/Dracoplasm.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/Dracoplasm.java b/Mage.Sets/src/mage/cards/d/Dracoplasm.java index e378fc79986..48d56455f1f 100644 --- a/Mage.Sets/src/mage/cards/d/Dracoplasm.java +++ b/Mage.Sets/src/mage/cards/d/Dracoplasm.java @@ -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; } -} \ No newline at end of file +}