mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
CardUtil overflow
This commit is contained in:
parent
8acc38e24c
commit
8ea40bc385
1 changed files with 3 additions and 2 deletions
|
@ -41,6 +41,7 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
|
@ -124,7 +125,7 @@ class GiselaBladeOfGoldnightDoubleDamageEffect extends ReplacementEffectImpl {
|
|||
if (event.getTargetId().equals(source.getControllerId())) {
|
||||
preventDamage(event, source, source.getControllerId(), game);
|
||||
} else if (game.getOpponents(source.getControllerId()).contains(event.getTargetId())) {
|
||||
event.setAmount(game.addWithOverflowCheck(event.getAmount(), event.getAmount()));
|
||||
event.setAmount(CardUtil.addWithOverflowCheck(event.getAmount(), event.getAmount()));
|
||||
}
|
||||
break;
|
||||
case DAMAGE_CREATURE:
|
||||
|
@ -134,7 +135,7 @@ class GiselaBladeOfGoldnightDoubleDamageEffect extends ReplacementEffectImpl {
|
|||
if (permanent.getControllerId().equals(source.getControllerId())) {
|
||||
preventDamage(event, source, permanent.getId(), game);
|
||||
} else if (game.getOpponents(source.getControllerId()).contains(permanent.getControllerId())) {
|
||||
event.setAmount(game.addWithOverflowCheck(event.getAmount(), event.getAmount()));
|
||||
event.setAmount(CardUtil.addWithOverflowCheck(event.getAmount(), event.getAmount()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue