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
02cb7145f2
commit
3fc7f0c513
1 changed files with 2 additions and 1 deletions
|
@ -126,7 +126,8 @@ class FarrelsMantleEffect extends OneShotEffect{
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent perm = game.getPermanent(source.getSourceId());
|
||||
DamageTargetEffect dmgEffect = new DamageTargetEffect(2+perm.getPower().getValue());
|
||||
int damage = game.addWithOverflowCheck(perm.getPower().getValue(), 2);
|
||||
DamageTargetEffect dmgEffect = new DamageTargetEffect(damage);
|
||||
return dmgEffect.apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue