mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 23:12:10 -08:00
CardUtil overflow
This commit is contained in:
parent
331428b1ae
commit
a35ee6837f
1 changed files with 2 additions and 1 deletions
|
|
@ -48,6 +48,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -126,7 +127,7 @@ class FarrelsMantleEffect extends OneShotEffect{
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent perm = game.getPermanent(source.getSourceId());
|
||||
int damage = game.addWithOverflowCheck(perm.getPower().getValue(), 2);
|
||||
int damage = CardUtil.addWithOverflowCheck(perm.getPower().getValue(), 2);
|
||||
DamageTargetEffect dmgEffect = new DamageTargetEffect(damage);
|
||||
return dmgEffect.apply(game, source);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue