remove maximum activation limit from MagicActivationHints
parent
7b2dbbe650
commit
d124925f61
|
@ -3,7 +3,7 @@
|
|||
[
|
||||
MagicCondition.METALCRAFT_CONDITION
|
||||
],
|
||||
new MagicActivationHints(MagicTiming.Removal,1),
|
||||
new MagicActivationHints(MagicTiming.Removal),
|
||||
"Exile"
|
||||
) {
|
||||
@Override
|
||||
|
|
|
@ -19,7 +19,7 @@ def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
[MagicCondition.NOT_EXCLUDE_COMBAT_CONDITION],
|
||||
new MagicActivationHints(MagicTiming.Animate,1),
|
||||
new MagicActivationHints(MagicTiming.Animate),
|
||||
"Becomes"
|
||||
) {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ def equip = new MagicEquipActivation(MagicRegularCostEvent.build("{B}{B}"));
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
[MagicCondition.NOT_CREATURE_CONDITION],
|
||||
new MagicActivationHints(MagicTiming.Equipment,2),
|
||||
new MagicActivationHints(MagicTiming.Equipment),
|
||||
"Attach"
|
||||
) {
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Pump,true,1),
|
||||
new MagicActivationHints(MagicTiming.Pump, true),
|
||||
"X/X"
|
||||
) {
|
||||
@Override
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Pump,1),
|
||||
new MagicActivationHints(MagicTiming.Pump),
|
||||
"Color"
|
||||
) {
|
||||
@Override
|
||||
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
||||
return [
|
||||
new MagicPayManaCostEvent(source,"{1}"),
|
||||
new MagicPlayAbilityEvent(source)
|
||||
];
|
||||
}
|
||||
@Override
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Pump,1),
|
||||
new MagicActivationHints(MagicTiming.Pump),
|
||||
"Color"
|
||||
) {
|
||||
@Override
|
||||
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
||||
return [
|
||||
new MagicPayManaCostEvent(source,"{G}"),
|
||||
new MagicPlayAbilityEvent(source)
|
||||
];
|
||||
}
|
||||
@Override
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Pump,1),
|
||||
new MagicActivationHints(MagicTiming.Pump),
|
||||
"Pump"
|
||||
) {
|
||||
|
||||
@Override
|
||||
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
||||
return [
|
||||
new MagicPayManaCostEvent(source,"{B}{B}"),
|
||||
new MagicPayManaCostEvent(source,"{B}{B}")
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Removal,1),
|
||||
new MagicActivationHints(MagicTiming.Removal),
|
||||
"Exile"
|
||||
) {
|
||||
@Override
|
||||
|
|
|
@ -112,7 +112,6 @@ public class MagicGame {
|
|||
private boolean fastBlocker = false;
|
||||
private boolean hintTiming = true;
|
||||
private boolean hintPriority = true;
|
||||
private boolean hintMaximum = true;
|
||||
private boolean hintTarget = true;
|
||||
|
||||
public static MagicGame getInstance() {
|
||||
|
@ -212,7 +211,6 @@ public class MagicGame {
|
|||
//immediate
|
||||
//hintTiming
|
||||
//hintPriority
|
||||
//hintMaximum
|
||||
//hintTarget
|
||||
//skipTurnTill
|
||||
//mainPhaseCount
|
||||
|
@ -411,14 +409,6 @@ public class MagicGame {
|
|||
hintPriority = v;
|
||||
}
|
||||
|
||||
public boolean getHintMaximum() {
|
||||
return hintMaximum;
|
||||
}
|
||||
|
||||
public void setHintMaximum(final boolean v) {
|
||||
hintMaximum = v;
|
||||
}
|
||||
|
||||
public boolean getHintTarget() {
|
||||
return hintTarget;
|
||||
}
|
||||
|
|
|
@ -70,10 +70,6 @@ public abstract class MagicActivation<T extends MagicSource> implements MagicEve
|
|||
return false;
|
||||
}
|
||||
|
||||
if (isAI && game.getHintMaximum() && hints.isMaximum(source)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (source.isPermanent() && ((MagicPermanent)source).hasAbility(MagicAbility.CantActivateAbilities)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -7,27 +7,17 @@ public class MagicActivationHints {
|
|||
|
||||
/** timing */
|
||||
private final MagicTiming timing;
|
||||
|
||||
/** source independent */
|
||||
private final boolean independent;
|
||||
/** maximum number of ability activations each turn */
|
||||
private final int maximum;
|
||||
|
||||
public MagicActivationHints(final MagicTiming aTiming,final boolean aIndependent,final int aMaximum) {
|
||||
public MagicActivationHints(final MagicTiming aTiming, final boolean aIndependent) {
|
||||
timing = aTiming;
|
||||
independent = aIndependent;
|
||||
maximum = aMaximum;
|
||||
}
|
||||
|
||||
public MagicActivationHints(final MagicTiming timing,final int maximum) {
|
||||
this(timing,false,maximum);
|
||||
}
|
||||
|
||||
public MagicActivationHints(final MagicTiming timing,final boolean independent) {
|
||||
this(timing,independent,0);
|
||||
}
|
||||
|
||||
public MagicActivationHints(final MagicTiming timing) {
|
||||
this(timing,false, 0);
|
||||
this(timing, false);
|
||||
}
|
||||
|
||||
public MagicTiming getTiming() {
|
||||
|
@ -37,12 +27,4 @@ public class MagicActivationHints {
|
|||
public boolean isIndependent() {
|
||||
return independent;
|
||||
}
|
||||
|
||||
public boolean isMaximum(final MagicSource source) {
|
||||
if (maximum==0) {
|
||||
return false;
|
||||
}
|
||||
final MagicPermanent permanent=(MagicPermanent)source;
|
||||
return permanent.getAbilityPlayedThisTurn()>=maximum;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import magic.model.MagicPayedCost;
|
|||
import magic.model.MagicPermanent;
|
||||
import magic.model.action.AttachAction;
|
||||
import magic.model.action.MagicPermanentAction;
|
||||
import magic.model.action.PlayAbilityAction;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.condition.MagicCondition;
|
||||
import magic.model.target.MagicEquipTargetPicker;
|
||||
|
@ -32,7 +31,7 @@ public class MagicEquipActivation extends MagicPermanentActivation {
|
|||
MagicCondition.SORCERY_CONDITION,
|
||||
MagicCondition.NOT_CREATURE_CONDITION,
|
||||
},
|
||||
new MagicActivationHints(MagicTiming.Equipment,2),
|
||||
new MagicActivationHints(MagicTiming.Equipment),
|
||||
description
|
||||
);
|
||||
costs = aCosts;
|
||||
|
@ -44,6 +43,7 @@ public class MagicEquipActivation extends MagicPermanentActivation {
|
|||
for (final MagicMatchedCostEvent matched : costs) {
|
||||
costEvents.add(matched.getEvent(source));
|
||||
}
|
||||
costEvents.add(new MagicPlayAbilityEvent(source, MagicCondition.ABILITY_TWICE_CONDITION));
|
||||
return costEvents;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,6 @@ public class MagicEquipActivation extends MagicPermanentActivation {
|
|||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent creature) {
|
||||
game.doAction(new PlayAbilityAction(event.getPermanent()));
|
||||
game.doAction(new AttachAction(event.getPermanent(),creature));
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue