From b4aee11d3fa2cdb0d8ad220650042336d9e472b0 Mon Sep 17 00:00:00 2001 From: melvin Date: Mon, 21 Nov 2011 22:08:13 +0800 Subject: [PATCH] added enters charged, enters +1/+1, enters -1/-1, tap drain add mana --- src/magic/model/MagicAbility.java | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/magic/model/MagicAbility.java b/src/magic/model/MagicAbility.java index 539a308f18..9a8caae7a6 100644 --- a/src/magic/model/MagicAbility.java +++ b/src/magic/model/MagicAbility.java @@ -18,6 +18,7 @@ import magic.model.event.MagicPingActivation; import magic.model.event.MagicLevelUpActivation; import magic.model.event.MagicManaActivation; import magic.model.event.MagicTapManaActivation; +import magic.model.event.MagicVividManaActivation; import magic.model.event.MagicSacrificeTapManaActivation; import magic.model.event.MagicGainActivation; @@ -51,6 +52,7 @@ import magic.model.trigger.MagicDieDrawCardTrigger; import magic.model.trigger.MagicThiefTrigger; import magic.model.trigger.MagicVeteranTrigger; import magic.model.trigger.MagicFromGraveyardToLibraryTrigger; +import magic.model.trigger.MagicEntersChargedTrigger; public enum MagicAbility { @@ -78,6 +80,24 @@ public enum MagicAbility { card.add(MagicTappedIntoPlayTrigger.create()); } }, + EntersCharged("enters charged", 0) { + public void addAbilityImpl(final MagicCardDefinition card, final String arg) { + final int n = Integer.parseInt(arg); + card.add(new MagicComesIntoPlayWithCounterTrigger(MagicCounterType.Charge,"charge",n)); + } + }, + EntersPlus("enters +1/+1", 0) { + public void addAbilityImpl(final MagicCardDefinition card, final String arg) { + final int n = Integer.parseInt(arg); + card.add(new MagicComesIntoPlayWithCounterTrigger(MagicCounterType.PlusOne,"+1/+1",n)); + } + }, + EntersMinus("enters -1/-1", 0) { + public void addAbilityImpl(final MagicCardDefinition card, final String arg) { + final int n = Integer.parseInt(arg); + card.add(new MagicComesIntoPlayWithCounterTrigger(MagicCounterType.MinusOne,"-1/-1",n)); + } + }, EntersTappedUnlessTwo("enters tapped unless two", -10) { public void addAbilityImpl(final MagicCardDefinition card, final String arg) { card.add(MagicTappedIntoPlayUnlessTwoTrigger.create()); @@ -312,6 +332,12 @@ public enum MagicAbility { card.add(new MagicTapManaActivation(manatype, manatype.size() - 1)); } }, + TapDrainAddMana("tap drain add mana",10) { + public void addAbilityImpl(final MagicCardDefinition card, final String arg) { + final List manatype = MagicManaType.getList(arg); + card.add(new MagicVividManaActivation(manatype)); + } + }, SacAddManaAny("sac add mana any",10) { public void addAbilityImpl(final MagicCardDefinition card, final String arg) { card.add(new MagicSacrificeTapManaActivation(MagicManaType.ALL_TYPES));