Overflow check

This commit is contained in:
Zzooouhh 2017-12-22 22:15:32 +01:00 committed by GitHub
parent 031eda86ab
commit 977f3d4e0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,7 @@ class GratuitousViolenceReplacementEffect extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(2 * event.getAmount());
event.setAmount(game.addWithOverflowCheck(event.getAmount(), event.getAmount()));
return false;
}
}