forked from External/mage
* 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:
parent
8105d8b26c
commit
90c6637dc2
10 changed files with 78 additions and 18 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue