mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +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 (controller != null && object != null) {
|
||||||
if (super.applies(event, source, game) && event instanceof DamageEvent && event.getAmount() > 0) {
|
if (super.applies(event, source, game) && event instanceof DamageEvent && event.getAmount() > 0) {
|
||||||
if (wonFlip) {
|
if (wonFlip) {
|
||||||
event.setAmount(event.getAmount() * 2);
|
event.setAmount(game.addWithOverflowCheck(event.getAmount(), event.getAmount()));
|
||||||
this.discard();
|
this.discard();
|
||||||
} else {
|
} else {
|
||||||
preventDamageAction(event, source, game);
|
preventDamageAction(event, source, game);
|
||||||
|
|
Loading…
Reference in a new issue