mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Added miss overflow protection
This commit is contained in:
parent
57e9af1a29
commit
d77d885c5a
2 changed files with 6 additions and 8 deletions
|
@ -58,7 +58,7 @@ class AlhammarretsArchiveEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(event.getAmount() * 2);
|
||||
event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
|
@ -13,17 +11,17 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public final class BoonReflection extends CardImpl {
|
||||
|
||||
public BoonReflection(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}");
|
||||
|
||||
// If you would gain life, you gain twice that much life instead.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoonReflectionEffect()));
|
||||
|
@ -62,7 +60,7 @@ class BoonReflectionEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(event.getAmount() * 2);
|
||||
event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue