replace constant MagicCondition for Charge counters with calls to static factory method

master
melvin 2013-02-27 09:34:13 +08:00
parent 3069e6f39e
commit 63a6b18388
35 changed files with 90 additions and 102 deletions

View File

@ -82,7 +82,7 @@
[
MagicCondition.SORCERY_CONDITION,
MagicCondition.ABILITY_ONCE_CONDITION,
MagicCondition.EIGHT_CHARGE_COUNTERS_CONDITION
MagicConditionFactory.ChargeCountersAtLeast(8)
],
new MagicActivationHints(MagicTiming.Main),
"Ultimate") {

View File

@ -40,7 +40,7 @@
[
MagicCondition.SORCERY_CONDITION,
MagicCondition.ABILITY_ONCE_CONDITION,
MagicCondition.THREE_CHARGE_COUNTERS_CONDITION
MagicConditionFactory.ChargeCountersAtLeast(3)
],
new MagicActivationHints(MagicTiming.Main),
"-3") {
@ -85,7 +85,7 @@
[
MagicCondition.SORCERY_CONDITION,
MagicCondition.ABILITY_ONCE_CONDITION,
MagicCondition.SIX_CHARGE_COUNTERS_CONDITION
MagicConditionFactory.ChargeCountersAtLeast(6)
],
new MagicActivationHints(MagicTiming.Main),
"-6") {

View File

@ -119,7 +119,7 @@ def PreventAllDamage = new MagicIfDamageWouldBeDealtTrigger(1) {
[
MagicCondition.SORCERY_CONDITION,
MagicCondition.ABILITY_ONCE_CONDITION,
MagicCondition.FIFTEEN_CHARGE_COUNTERS_CONDITION
MagicConditionFactory.ChargeCountersAtLeast(15)
],
new MagicActivationHints(MagicTiming.Main),
"-15") {

View File

@ -39,7 +39,7 @@
[
MagicCondition.SORCERY_CONDITION,
MagicCondition.ABILITY_ONCE_CONDITION,
MagicConditionFactory.ChargeCountersMoreThan(1)
MagicConditionFactory.ChargeCountersAtLeast(1)
],
new MagicActivationHints(MagicTiming.Main),
"-1") {
@ -79,7 +79,7 @@
[
MagicCondition.SORCERY_CONDITION,
MagicCondition.ABILITY_ONCE_CONDITION,
MagicConditionFactory.ChargeCountersMoreThan(10)
MagicConditionFactory.ChargeCountersAtLeast(10)
],
new MagicActivationHints(MagicTiming.Main),
"-10") {

View File

@ -11,6 +11,7 @@ import magic.model.action.MagicDealDamageAction;
import magic.model.action.MagicTargetAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPayManaCostEvent;
@ -23,7 +24,7 @@ import magic.model.target.MagicTarget;
public class Ancient_Hydra {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[] {
MagicCondition.CHARGE_COUNTER_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(1),
MagicManaCost.ONE.getCondition()},
new MagicActivationHints(MagicTiming.Removal),
"Damage") {

View File

@ -12,6 +12,7 @@ import magic.model.action.MagicChangeCountersAction;
import magic.model.action.MagicChangeLifeAction;
import magic.model.action.MagicDrawAction;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPayManaCostTapEvent;
@ -24,9 +25,11 @@ import magic.model.trigger.MagicWhenDamageIsDealtTrigger;
public class Angelheart_Vial {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.CAN_TAP_CONDITION,
MagicCondition.FOUR_CHARGE_COUNTERS_CONDITION,
MagicManaCost.TWO.getCondition()},
new MagicCondition[]{
MagicCondition.CAN_TAP_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(4),
MagicManaCost.TWO.getCondition()
},
new MagicActivationHints(MagicTiming.Draw),
"Draw") {

View File

@ -11,6 +11,7 @@ import magic.model.action.MagicDealDamageAction;
import magic.model.action.MagicTargetAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -36,7 +37,7 @@ public class Brimstone_Mage {
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.CHARGE_COUNTER_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(1),
MagicCondition.CAN_TAP_CONDITION
},
new MagicActivationHints(MagicTiming.Removal),

View File

@ -9,6 +9,7 @@ import magic.model.action.MagicPreventDamageAction;
import magic.model.action.MagicTargetAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -19,7 +20,7 @@ import magic.model.target.MagicTarget;
public class Defender_en_Vec {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.CHARGE_COUNTER_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(1)},
new MagicActivationHints(MagicTiming.Pump),
"Prevent"
) {

View File

@ -12,6 +12,7 @@ import magic.model.action.MagicCardOnStackAction;
import magic.model.action.MagicCopyCardOnStackAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPayManaCostTapEvent;
@ -36,7 +37,7 @@ public class Echo_Mage {
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.TWO_CHARGE_COUNTERS_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(2),
MagicCondition.CAN_TAP_CONDITION,MagicManaCost.BLUE_BLUE.getCondition()},
new MagicActivationHints(MagicTiming.Spell),
"Copy") {

View File

@ -8,6 +8,7 @@ import magic.model.MagicPlayer;
import magic.model.MagicSource;
import magic.model.action.MagicDrawAction;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicDiscardEvent;
import magic.model.event.MagicEvent;
@ -18,7 +19,7 @@ import magic.model.event.MagicTiming;
public class Enclave_Cryptologist {
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.CHARGE_COUNTER_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(1),
MagicCondition.CAN_TAP_CONDITION,
},
new MagicActivationHints(MagicTiming.Draw),

View File

@ -5,6 +5,7 @@ import magic.model.MagicManaType;
import magic.model.MagicPermanent;
import magic.model.MagicSource;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicEvent;
import magic.model.event.MagicManaActivation;
import magic.model.event.MagicRemoveCounterEvent;
@ -12,14 +13,13 @@ import magic.model.event.MagicSacrificeEvent;
import magic.model.event.MagicTapEvent;
public class Gemstone_Mine {
private static final MagicCondition[] CONDITIONS = {
MagicCondition.CAN_TAP_CONDITION,
MagicCondition.CHARGE_COUNTER_CONDITION
};
public static final MagicManaActivation MANA = new MagicManaActivation(
MagicManaType.ALL_TYPES,
CONDITIONS,
new MagicCondition[] {
MagicCondition.CAN_TAP_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(1)
},
2) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent permanent) {

View File

@ -11,6 +11,7 @@ import magic.model.action.MagicPlayTokenAction;
import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicSimpleMayChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -48,7 +49,7 @@ public class Golem_Foundry {
};
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.THREE_CHARGE_COUNTERS_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(3)},
new MagicActivationHints(MagicTiming.Token),
"Token") {
@Override

View File

@ -16,6 +16,7 @@ import magic.model.action.MagicChangeCountersAction;
import magic.model.action.MagicPlayCardAction;
import magic.model.action.MagicRemoveCardAction;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicDiscardEvent;
import magic.model.event.MagicEvent;
@ -79,8 +80,9 @@ public class Grimoire_of_the_Dead {
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.CAN_TAP_CONDITION,
MagicCondition.THREE_CHARGE_COUNTERS_CONDITION},
MagicCondition.CAN_TAP_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(3)
},
new MagicActivationHints(MagicTiming.Token),
"Reanimate") {
@Override

View File

@ -12,6 +12,7 @@ import magic.model.action.MagicChangeTurnPTAction;
import magic.model.action.MagicPermanentAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPayManaCostTapEvent;
@ -36,7 +37,7 @@ public class Guul_Draz_Assassin {
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.TWO_CHARGE_COUNTERS_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(2),
MagicCondition.CAN_TAP_CONDITION,
MagicManaCost.BLACK.getCondition()
},

View File

@ -10,6 +10,7 @@ import magic.model.action.MagicDrawAction;
import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicSimpleMayChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -48,7 +49,7 @@ public class Ior_Ruin_Expedition {
};
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.THREE_CHARGE_COUNTERS_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(3)},
new MagicActivationHints(MagicTiming.Draw),
"Draw") {
@Override

View File

@ -4,6 +4,7 @@ import magic.model.MagicCounterType;
import magic.model.MagicPermanent;
import magic.model.MagicSource;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -13,7 +14,7 @@ import magic.model.event.MagicTiming;
public class Jolting_Merfolk {
public static final MagicPermanentActivation A = new MagicTapCreatureActivation(
new MagicCondition[]{MagicCondition.CHARGE_COUNTER_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(1)},
new MagicActivationHints(MagicTiming.Tapping),
"Tap") {
@Override

View File

@ -10,6 +10,7 @@ import magic.model.MagicPowerToughness;
import magic.model.MagicSource;
import magic.model.action.MagicChangeTurnPTAction;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPayManaCostEvent;
@ -51,7 +52,7 @@ public class Kargan_Dragonlord {
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.EIGHT_CHARGE_COUNTERS_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(8),
MagicManaCost.RED.getCondition()
},
new MagicActivationHints(MagicTiming.Pump),

View File

@ -9,6 +9,7 @@ import magic.model.MagicPlayer;
import magic.model.MagicSource;
import magic.model.action.MagicPlayTokensAction;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -18,7 +19,7 @@ import magic.model.event.MagicTiming;
public class Kazandu_Tuskcaller {
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.TWO_CHARGE_COUNTERS_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(2),
MagicCondition.CAN_TAP_CONDITION,
},
new MagicActivationHints(MagicTiming.Token),

View File

@ -10,6 +10,7 @@ import magic.model.action.MagicChangeLifeAction;
import magic.model.action.MagicPlayerAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -20,8 +21,9 @@ import magic.model.event.MagicTiming;
public class Necrogen_Censer {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.CAN_TAP_CONDITION,
MagicCondition.CHARGE_COUNTER_CONDITION},
MagicCondition.CAN_TAP_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(1)
},
new MagicActivationHints(MagicTiming.Removal),
"Damage") {
@Override

View File

@ -9,6 +9,7 @@ import magic.model.MagicPowerToughness;
import magic.model.MagicSource;
import magic.model.action.MagicRegenerateAction;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPayManaCostEvent;
@ -32,7 +33,7 @@ public class Null_Champion {
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.FOUR_CHARGE_COUNTERS_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(4),
MagicCondition.CAN_REGENERATE_CONDITION,
MagicManaCost.BLACK.getCondition()
},

View File

@ -8,8 +8,8 @@ import magic.model.MagicPlayer;
import magic.model.MagicSource;
import magic.model.action.MagicChangeCountersAction;
import magic.model.action.MagicDrawAction;
import magic.model.condition.MagicArtificialCondition;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -19,10 +19,8 @@ import magic.model.event.MagicTiming;
public class Otherworld_Atlas {
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.CAN_TAP_CONDITION,
new MagicArtificialCondition(
MagicCondition.NONE,
MagicCondition.CHARGE_COUNTER_CONDITION)
MagicCondition.CAN_TAP_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(1)
},
new MagicActivationHints(MagicTiming.Draw),
"Draw") {

View File

@ -13,6 +13,7 @@ import magic.model.action.MagicExileUntilThisLeavesPlayAction;
import magic.model.action.MagicReturnExiledUntilThisLeavesPlayAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -25,7 +26,7 @@ public class Parallax_Nexus {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.SORCERY_CONDITION,
MagicCondition.CHARGE_COUNTER_CONDITION
MagicConditionFactory.ChargeCountersAtLeast(1)
},
new MagicActivationHints(MagicTiming.Main),
"Exile"

View File

@ -12,6 +12,7 @@ import magic.model.action.MagicPermanentAction;
import magic.model.action.MagicReturnExiledUntilThisLeavesPlayAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -22,14 +23,15 @@ import magic.model.trigger.MagicWhenLeavesPlayTrigger;
public class Parallax_Tide {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.CHARGE_COUNTER_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(1)},
new MagicActivationHints(MagicTiming.Pump),
"Exile") {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return new MagicEvent[]{
new MagicRemoveCounterEvent(source,MagicCounterType.Charge,1)};
new MagicRemoveCounterEvent(source,MagicCounterType.Charge,1)
};
}
@Override

View File

@ -12,6 +12,7 @@ import magic.model.action.MagicPermanentAction;
import magic.model.action.MagicReturnExiledUntilThisLeavesPlayAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -22,7 +23,7 @@ import magic.model.trigger.MagicWhenLeavesPlayTrigger;
public class Parallax_Wave {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.CHARGE_COUNTER_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(1)},
new MagicActivationHints(MagicTiming.Pump),
"Exile") {

View File

@ -7,6 +7,7 @@ import magic.model.MagicPermanent;
import magic.model.MagicSource;
import magic.model.action.MagicChangeTurnPTAction;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -15,7 +16,7 @@ import magic.model.event.MagicTiming;
public class Phyrexian_Prowler {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.CHARGE_COUNTER_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(1)},
new MagicActivationHints(MagicTiming.Pump),
"Pump") {

View File

@ -12,6 +12,7 @@ import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicSimpleMayChoice;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -25,14 +26,15 @@ import magic.model.trigger.MagicWhenDamageIsDealtTrigger;
public class Quest_for_the_Gemblades {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.CHARGE_COUNTER_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(1)},
new MagicActivationHints(MagicTiming.Pump),
"Pump") {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return new MagicEvent[]{
new MagicRemoveCounterEvent(source,MagicCounterType.Charge,1),
new MagicSacrificeEvent(source)};
new MagicSacrificeEvent(source)
};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {

View File

@ -11,6 +11,7 @@ import magic.model.action.MagicPlayTokenAction;
import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicSimpleMayChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -21,7 +22,7 @@ import magic.model.trigger.MagicWhenOtherPutIntoGraveyardFromPlayTrigger;
public class Quest_for_the_Gravelord {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.THREE_CHARGE_COUNTERS_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(3)},
new MagicActivationHints(MagicTiming.Token),
"Token") {
@Override

View File

@ -7,6 +7,7 @@ import magic.model.MagicPlayer;
import magic.model.MagicSource;
import magic.model.action.MagicSacrificeAction;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -21,7 +22,8 @@ public class Serrated_Arrows {
public static final MagicPermanentActivation A1 = new MagicWeakenCreatureActivation(
new MagicCondition[]{
MagicCondition.CAN_TAP_CONDITION,
MagicCondition.CHARGE_COUNTER_CONDITION},
MagicConditionFactory.ChargeCountersAtLeast(1)
},
new MagicActivationHints(MagicTiming.Removal),
"-1/-1") {
@Override

View File

@ -10,6 +10,7 @@ import magic.model.MagicSource;
import magic.model.action.MagicChangeCountersAction;
import magic.model.action.MagicDrawAction;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPayManaCostTapEvent;
@ -45,7 +46,7 @@ public class Serum_Tank {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.CHARGE_COUNTER_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(1),
MagicCondition.CAN_TAP_CONDITION,
MagicManaCost.THREE.getCondition()
},

View File

@ -7,6 +7,7 @@ import magic.model.MagicPermanent;
import magic.model.MagicSource;
import magic.model.action.MagicChangeLifeAction;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -19,7 +20,7 @@ public class Sunspring_Expedition {
public static final MagicWhenOtherComesIntoPlayTrigger T = Ior_Ruin_Expedition.T;
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.THREE_CHARGE_COUNTERS_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(3)},
new MagicActivationHints(MagicTiming.Pump),
"Life") {
@Override

View File

@ -9,6 +9,7 @@ import magic.model.action.MagicPermanentAction;
import magic.model.action.MagicTapAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -19,7 +20,10 @@ import magic.model.target.MagicTapTargetPicker;
public class Tumble_Magnet {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.CAN_TAP_CONDITION,MagicCondition.CHARGE_COUNTER_CONDITION},
new MagicCondition[]{
MagicCondition.CAN_TAP_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(1)
},
new MagicActivationHints(MagicTiming.Removal),
"Tap") {
@Override

View File

@ -12,6 +12,7 @@ import magic.model.action.MagicChangeTurnPTAction;
import magic.model.action.MagicPermanentAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
@ -24,7 +25,7 @@ import magic.model.trigger.MagicWhenDamageIsDealtTrigger;
public class Umezawa_s_Jitte {
// equipped creature gets +2/+2 until end of turn
public static final MagicPermanentActivation A1 = new MagicPermanentActivation(
new MagicCondition[] {MagicCondition.CHARGE_COUNTER_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(1)},
new MagicActivationHints(MagicTiming.Pump),
"+2/+2") {
@Override
@ -53,7 +54,7 @@ public class Umezawa_s_Jitte {
// target creature gets -1/-1 until end of turn
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[] {MagicCondition.CHARGE_COUNTER_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(1)},
new MagicActivationHints(MagicTiming.Removal),
"-1/-1") {
@Override
@ -87,9 +88,9 @@ public class Umezawa_s_Jitte {
// you gain 2 life
public static final MagicPermanentActivation A3 = new MagicPermanentActivation(
new MagicCondition[] {MagicCondition.CHARGE_COUNTER_CONDITION},
new MagicCondition[]{MagicConditionFactory.ChargeCountersAtLeast(1)},
new MagicActivationHints(MagicTiming.Pump),
"life + 2") {
"Life + 2") {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return new MagicEvent[]{

View File

@ -10,6 +10,7 @@ import magic.model.action.MagicDestroyAction;
import magic.model.action.MagicPermanentAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPayManaCostEvent;
@ -21,7 +22,7 @@ import magic.model.target.MagicDestroyTargetPicker;
public class Woodripper {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[] {
MagicCondition.CHARGE_COUNTER_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(1),
MagicManaCost.ONE.getCondition()
},
new MagicActivationHints(MagicTiming.Removal),

View File

@ -165,61 +165,12 @@ public interface MagicCondition {
}
};
MagicCondition CHARGE_COUNTER_CONDITION=new MagicCondition() {
public boolean accept(final MagicSource source) {
final MagicPermanent permanent=(MagicPermanent)source;
return permanent.getCounters(MagicCounterType.Charge)>0;
}
};
MagicCondition METALCRAFT_CONDITION=new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().getNrOfPermanentsWithType(MagicType.Artifact)>=3;
}
};
MagicCondition TWO_CHARGE_COUNTERS_CONDITION=new MagicCondition() {
public boolean accept(final MagicSource source) {
final MagicPermanent permanent=(MagicPermanent)source;
return permanent.getCounters(MagicCounterType.Charge)>=2;
}
};
MagicCondition THREE_CHARGE_COUNTERS_CONDITION=new MagicCondition() {
public boolean accept(final MagicSource source) {
final MagicPermanent permanent=(MagicPermanent)source;
return permanent.getCounters(MagicCounterType.Charge)>=3;
}
};
MagicCondition FOUR_CHARGE_COUNTERS_CONDITION=new MagicCondition() {
public boolean accept(final MagicSource source) {
final MagicPermanent permanent=(MagicPermanent)source;
return permanent.getCounters(MagicCounterType.Charge)>=4;
}
};
MagicCondition SIX_CHARGE_COUNTERS_CONDITION=new MagicCondition() {
public boolean accept(final MagicSource source) {
final MagicPermanent permanent=(MagicPermanent)source;
return permanent.getCounters(MagicCounterType.Charge)>=6;
}
};
MagicCondition EIGHT_CHARGE_COUNTERS_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
final MagicPermanent permanent = (MagicPermanent)source;
return permanent.getCounters(MagicCounterType.Charge) >= 8;
}
};
MagicCondition FIFTEEN_CHARGE_COUNTERS_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
final MagicPermanent permanent = (MagicPermanent)source;
return permanent.getCounters(MagicCounterType.Charge) >= 15;
}
};
MagicCondition CAN_REGENERATE_CONDITION=new MagicCondition() {
public boolean accept(final MagicSource source) {
final MagicPermanent permanent=(MagicPermanent)source;

View File

@ -5,6 +5,7 @@ import magic.model.MagicManaType;
import magic.model.MagicPermanent;
import magic.model.MagicSource;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
import java.util.List;
@ -12,7 +13,8 @@ public class MagicVividManaActivation extends MagicManaActivation {
private static final MagicCondition[] CONDITIONS= {
MagicCondition.CAN_TAP_CONDITION,
MagicCondition.CHARGE_COUNTER_CONDITION};
MagicConditionFactory.ChargeCountersAtLeast(1)
};
public MagicVividManaActivation(final List<MagicManaType> manaTypes) {
super(manaTypes,CONDITIONS,manaTypes.size() -1);