added getCondtions to MagicPayManaCostTapEvent
parent
52e06423fb
commit
b36b51ccab
|
@ -12,6 +12,10 @@ public class MagicArtificialCondition implements MagicCondition {
|
|||
this.normalCondition=normalCondition;
|
||||
this.artificialCondition=artificialCondition;
|
||||
}
|
||||
|
||||
public MagicArtificialCondition(final MagicCondition artificialCondition) {
|
||||
this(MagicCondition.NONE, artificialCondition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(final MagicSource source) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import magic.model.condition.MagicCondition;
|
|||
|
||||
public class MagicPayManaCostEvent extends MagicEvent {
|
||||
|
||||
final MagicCondition[] conds = new MagicCondition[1];
|
||||
final MagicCondition[] conds;
|
||||
|
||||
public MagicPayManaCostEvent(final MagicSource source, final MagicManaCost cost) {
|
||||
this(source, source.getController(), cost);
|
||||
|
@ -27,7 +27,7 @@ public class MagicPayManaCostEvent extends MagicEvent {
|
|||
EVENT_ACTION,
|
||||
"Pay "+cost.getText()+"$."
|
||||
);
|
||||
conds[0] = cost.getCondition();
|
||||
conds = new MagicCondition[]{cost.getCondition()};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,8 +6,12 @@ import magic.model.MagicPlayer;
|
|||
import magic.model.MagicSource;
|
||||
import magic.model.action.MagicTapAction;
|
||||
import magic.model.choice.MagicPayManaCostChoice;
|
||||
import magic.model.condition.MagicCondition;
|
||||
|
||||
public class MagicPayManaCostTapEvent extends MagicEvent {
|
||||
|
||||
final MagicCondition[] conds;
|
||||
|
||||
public MagicPayManaCostTapEvent(final MagicSource source, final String cost) {
|
||||
this(source, source.getController(), MagicManaCost.create(cost));
|
||||
}
|
||||
|
@ -20,6 +24,10 @@ public class MagicPayManaCostTapEvent extends MagicEvent {
|
|||
EVENT_ACTION,
|
||||
"Pay "+cost.getText()+"$. Tap SN."
|
||||
);
|
||||
conds = new MagicCondition[] {
|
||||
cost.getCondition(),
|
||||
MagicCondition.CAN_TAP_CONDITION
|
||||
};
|
||||
}
|
||||
|
||||
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
|
||||
|
|
|
@ -13,7 +13,7 @@ import magic.model.condition.MagicConditionFactory;
|
|||
|
||||
public class MagicSacrificePermanentEvent extends MagicEvent {
|
||||
|
||||
final MagicCondition[] conds = new MagicCondition[1];
|
||||
final MagicCondition[] conds;
|
||||
|
||||
public MagicSacrificePermanentEvent(
|
||||
final MagicSource source,
|
||||
|
@ -33,7 +33,7 @@ public class MagicSacrificePermanentEvent extends MagicEvent {
|
|||
EVENT_ACTION,
|
||||
"Choose "+targetChoice.getTargetDescription()+"$."
|
||||
);
|
||||
conds[0] = MagicConditionFactory.HasOptions(targetChoice);
|
||||
conds = new MagicCondition[]{MagicConditionFactory.HasOptions(targetChoice)};
|
||||
}
|
||||
|
||||
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
|
||||
|
|
|
@ -10,6 +10,12 @@ import magic.model.condition.MagicCondition;
|
|||
import magic.model.target.MagicTapTargetPicker;
|
||||
|
||||
public abstract class MagicTapCreatureActivation extends MagicPermanentActivation {
|
||||
|
||||
public MagicTapCreatureActivation(
|
||||
final MagicActivationHints hints,
|
||||
final String text) {
|
||||
super(MagicActivation.NO_COND,hints,text);
|
||||
}
|
||||
|
||||
public MagicTapCreatureActivation(
|
||||
final MagicCondition[] conds,
|
||||
|
|
|
@ -11,6 +11,12 @@ import magic.model.condition.MagicCondition;
|
|||
import magic.model.target.MagicWeakenTargetPicker;
|
||||
|
||||
public abstract class MagicWeakenCreatureActivation extends MagicPermanentActivation {
|
||||
|
||||
public MagicWeakenCreatureActivation(
|
||||
final MagicActivationHints hints,
|
||||
final String text) {
|
||||
super(MagicActivation.NO_COND,hints,text);
|
||||
}
|
||||
|
||||
public MagicWeakenCreatureActivation(
|
||||
final MagicCondition[] conds,
|
||||
|
|
Loading…
Reference in New Issue