forked from External/mage
Overflow check
This commit is contained in:
parent
18661c2c4d
commit
02cb7145f2
1 changed files with 1 additions and 1 deletions
|
|
@ -91,7 +91,7 @@ class PhthisisEffect extends OneShotEffect {
|
|||
if (creature != null) {
|
||||
Player controller = game.getPlayer(creature.getControllerId());
|
||||
if (controller != null) {
|
||||
int lifeLoss = creature.getPower().getValue() + creature.getToughness().getValue();
|
||||
int lifeLoss = game.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