mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Overflow check
This commit is contained in:
parent
78bf442674
commit
123190bfa3
1 changed files with 2 additions and 2 deletions
|
@ -115,13 +115,13 @@ class DictateOfTheTwinGodsEffect extends ReplacementEffectImpl {
|
|||
if (damageEvent.getType() == EventType.DAMAGE_PLAYER) {
|
||||
Player targetPlayer = game.getPlayer(event.getTargetId());
|
||||
if (targetPlayer != null) {
|
||||
targetPlayer.damage(damageEvent.getAmount() * 2, damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects());
|
||||
targetPlayer.damage(game.addWithOverflowCheck(damageEvent.getAmount(), damageEvent.getAmount()), damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects());
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
Permanent targetPermanent = game.getPermanent(event.getTargetId());
|
||||
if (targetPermanent != null) {
|
||||
targetPermanent.damage(damageEvent.getAmount() * 2, damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects());
|
||||
targetPermanent.damage(game.addWithOverflowCheck(damageEvent.getAmount(), damageEvent.getAmount()), damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue