mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 15:32:08 -08:00
CardUtil overflow
This commit is contained in:
parent
2643f552e4
commit
c7db369eff
1 changed files with 2 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -91,7 +92,7 @@ class PhthisisEffect extends OneShotEffect {
|
|||
if (creature != null) {
|
||||
Player controller = game.getPlayer(creature.getControllerId());
|
||||
if (controller != null) {
|
||||
int lifeLoss = game.addWithOverflowCheck(creature.getPower().getValue(), creature.getToughness().getValue());
|
||||
int lifeLoss = CardUtil.addWithOverflowCheck(creature.getPower().getValue(), creature.getToughness().getValue());
|
||||
creature.destroy(source.getSourceId(), game, false);
|
||||
// the life loss happens also if the creature is indestructible or regenerated (legal targets)
|
||||
controller.loseLife(lifeLoss, game, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue