* Implemeented consumable flag for asThoughtEffects and a player choice which effect to use if multiple consumable effects allow the same action.

This commit is contained in:
LevelX2 2020-08-21 20:49:43 +02:00
parent 8105d8b26c
commit 90c6637dc2
10 changed files with 78 additions and 18 deletions

View file

@ -17,16 +17,23 @@ import mage.players.Player;
public abstract class AsThoughEffectImpl extends ContinuousEffectImpl implements AsThoughEffect {
protected AsThoughEffectType type;
boolean consumable;
public AsThoughEffectImpl(AsThoughEffectType type, Duration duration, Outcome outcome) {
this(type, duration, outcome, false);
}
public AsThoughEffectImpl(AsThoughEffectType type, Duration duration, Outcome outcome, boolean consumable) {
super(duration, outcome);
this.type = type;
this.effectType = EffectType.ASTHOUGH;
this.consumable = consumable;
}
public AsThoughEffectImpl(final AsThoughEffectImpl effect) {
super(effect);
this.type = effect.type;
this.consumable = effect.consumable;
}
@Override
@ -93,4 +100,9 @@ public abstract class AsThoughEffectImpl extends ContinuousEffectImpl implements
return true;
}
@Override
public boolean isConsumable() {
return consumable;
}
}