From 62a6e8729776975e2491c468b2c9fbde589eea0a Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Thu, 5 Aug 2021 01:19:15 +0400 Subject: [PATCH] Added miss overflow protection --- Mage.Sets/src/mage/cards/r/RhoxFaithmender.java | 3 ++- Mage.Sets/src/mage/cards/u/UnboundFlourishing.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/r/RhoxFaithmender.java b/Mage.Sets/src/mage/cards/r/RhoxFaithmender.java index a66229913f..a9fbe0ec87 100644 --- a/Mage.Sets/src/mage/cards/r/RhoxFaithmender.java +++ b/Mage.Sets/src/mage/cards/r/RhoxFaithmender.java @@ -17,6 +17,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import mage.util.CardUtil; /** * @@ -72,7 +73,7 @@ class RhoxFaithmenderEffect extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { - event.setAmount(event.getAmount() * 2); + event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2)); return false; } diff --git a/Mage.Sets/src/mage/cards/u/UnboundFlourishing.java b/Mage.Sets/src/mage/cards/u/UnboundFlourishing.java index c791a8a7b0..526b17706d 100644 --- a/Mage.Sets/src/mage/cards/u/UnboundFlourishing.java +++ b/Mage.Sets/src/mage/cards/u/UnboundFlourishing.java @@ -18,6 +18,7 @@ import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.game.stack.StackAbility; import mage.players.Player; +import mage.util.CardUtil; import java.util.UUID; @@ -63,7 +64,7 @@ class UnboundFlourishingDoubleXEffect extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { - event.setAmount(event.getAmount() * 2); + event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2)); return false; }