Added miss overflow protection

This commit is contained in:
Oleg Agafonov 2021-08-05 01:19:15 +04:00
parent 7a3521b02b
commit 62a6e87297
2 changed files with 4 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;
}