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
536f9732e4
commit
bf8cd69f80
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ class DesperateGambitEffect extends PreventionEffectImpl {
|
|||
if (controller != null && object != null) {
|
||||
if (super.applies(event, source, game) && event instanceof DamageEvent && event.getAmount() > 0) {
|
||||
if (wonFlip) {
|
||||
event.setAmount(event.getAmount() * 2);
|
||||
event.setAmount(game.addWithOverflowCheck(event.getAmount(), event.getAmount()));
|
||||
this.discard();
|
||||
} else {
|
||||
preventDamageAction(event, source, game);
|
||||
|
|
Loading…
Reference in a new issue