diff --git a/.gitattributes b/.gitattributes index 0ad12ff413b..1e6091ddb7a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -250,7 +250,7 @@ src/forge/SpellAbilityUtil.java svneol=native#text/plain src/forge/Spell_Evoke.java svneol=native#text/plain src/forge/Spell_Permanent.java svneol=native#text/plain src/forge/StackObserver.java svneol=native#text/plain -src/forge/StateBasedEffects.java -text svneol=native#text/plain +src/forge/StaticEffects.java -text svneol=native#text/plain src/forge/TableModel.java -text svneol=native#text/plain src/forge/TableSorter.java svneol=native#text/plain src/forge/TempRun.java svneol=native#text/plain diff --git a/res/cards.txt b/res/cards.txt index d77fb3fdb6d..15558dc1d17 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,15 @@ +Loam Lion +W +Creature Cat +Loam Lion gets +1/+2 as long as you control a Forest. +1/1 + +Hada Freeblade +W +Creature Humand Soldier Ally +Whenever Hada Freeblade or another Ally enters the battlefield under your control, you may put a +1/+1 counter on Hada Freeblade. +0/1 + Gatekeeper of Malakir B B Creature Vampire Warrior @@ -6530,7 +6542,7 @@ When this card is put into a graveyard from anywhere, reveal this card and shuff Darksteel Colossus 11 -Artifact Creature +Artifact Creature Golem no text 11/11 Trample diff --git a/res/main.properties b/res/main.properties index 81a44634cf1..b6e195cc400 100644 --- a/res/main.properties +++ b/res/main.properties @@ -1,6 +1,6 @@ program/mail=mtgerror@yahoo.com program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26 -program/version=Forge -- official beta: 10/01/17, SVN revision: 301 +program/version=Forge -- official beta: 10/01/17, SVN revision: 302 tokens--file=AllTokens.txt diff --git a/src/forge/Ability_Mana.java b/src/forge/Ability_Mana.java index e56e4266368..3e31cc3230d 100644 --- a/src/forge/Ability_Mana.java +++ b/src/forge/Ability_Mana.java @@ -23,63 +23,79 @@ abstract public class Ability_Mana extends SpellAbility implements java.io.Seria cost = cost.replaceAll("tap", "T"); return (cost.contains("T")); } - public Ability_Mana(Card sourceCard, String orig) - { - super(isTapAbility(orig) ? SpellAbility.Ability_Tap : SpellAbility.Ability, sourceCard); - this.orig=orig; - setDescription(orig); - if(isBasic())//lowers memory usage drastically - { - Mana = "" + orig.charAt(9); - setManaCost("0"); - return; - } - String[] parts = orig.split(":"); - Mana=parts[1]; - Mana = Mana.replaceAll(" add ", ""); - setStackDescription("Add "+ Mana +" to your mana pool."); - Mana = Mana.replaceAll(" ", ""); - String cost=parts[0]; - cost = cost.replaceAll("tap", "T"); - //cost = cost.replaceAll("T, ", ""); - setManaCost(cost.replaceAll("T", "").split(",")[0]); - if (getManaCost().equals("")) setManaCost("0"); - //pain lands - ArrayList pain = new ArrayList(); - pain.add("Battlefield Forge"); - pain.add("Caves of Koilos"); - pain.add("Llanowar Wastes"); - pain.add("Shivan Reef"); - pain.add("Yavimaya Coast"); - pain.add("Adarkar Wastes"); - pain.add("Brushland"); - pain.add("Karplusan Forest"); - pain.add("Underground River"); - pain.add("Sulfurous Springs"); - if(pain.contains(sourceCard.getName()) && !Mana.equals("1")) - runcommands.add(new Command() - { - /** - * - */ - private static final long serialVersionUID = -5904507275105961979L; - - public void execute(){ - - AllZone.GameAction.getPlayerLife(getController()).subtractLife(1); - }}); - //parseCosts(); - /*for(String subcost : cost.split(",")) - { - subcost.trim(); - if (subcost.equals("") || subcost.equals("T") || - subcost.equals(getManaCost())) continue; - if (subcost.startsWith("Sacrifice a")){ - String sactype= subcost.substring(12).trim();//will remove both "Sac a " and "Sac an" :P - Input bpM_old = getBeforePayMana(); - } - }*/ + public Ability_Mana(Card sourceCard, String orig) + { + super(isTapAbility(orig) ? SpellAbility.Ability_Tap : SpellAbility.Ability, sourceCard); + + /* + if (orig.contains("$")) + { + String[] k = orig.split(":"); + String mana = k[1]; + int count = CardFactoryUtil.xCount(sourceCard, k[2]); + StringBuilder sb = new StringBuilder(); + sb.append("tap: add "); + for (int i=0;i pain = new ArrayList(); + pain.add("Battlefield Forge"); + pain.add("Caves of Koilos"); + pain.add("Llanowar Wastes"); + pain.add("Shivan Reef"); + pain.add("Yavimaya Coast"); + pain.add("Adarkar Wastes"); + pain.add("Brushland"); + pain.add("Karplusan Forest"); + pain.add("Underground River"); + pain.add("Sulfurous Springs"); + if(pain.contains(sourceCard.getName()) && !Mana.equals("1")) + runcommands.add(new Command() + { + /** + * + */ + private static final long serialVersionUID = -5904507275105961979L; + + public void execute(){ + + AllZone.GameAction.getPlayerLife(getController()).subtractLife(1); + }}); + //parseCosts(); + /*for(String subcost : cost.split(",")) + { + subcost.trim(); + if (subcost.equals("") || subcost.equals("T") || + subcost.equals(getManaCost())) continue; + if (subcost.startsWith("Sacrifice a")){ + String sactype= subcost.substring(12).trim();//will remove both "Sac a " and "Sac an" :P + Input bpM_old = getBeforePayMana(); + } + }*/ } public boolean equals(Object o)//Mana abilities with equal descriptions are considered equal, please take this into account {return (o instanceof Ability_Mana ? ((Ability_Mana)o).orig.equals(orig) : (o instanceof String ? o.toString().equals(orig) : false )) ;} diff --git a/src/forge/AllZone.java b/src/forge/AllZone.java index 13b7cd54244..2a7a35f1496 100644 --- a/src/forge/AllZone.java +++ b/src/forge/AllZone.java @@ -24,7 +24,7 @@ public class AllZone implements NewConstants { public static final MagicStack Stack = new MagicStack(); public static final InputControl InputControl = new InputControl(); public static final GameAction GameAction = new GameAction(); - public static final StateBasedEffects StateBasedEffects = new StateBasedEffects(); + public static final StaticEffects StateBasedEffects = new StaticEffects(); public static final GameInfo GameInfo = new GameInfo(); //initialized at Runtime since it has to be the last object constructed diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 5acf2f0a3cd..2821257171d 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -2335,7 +2335,10 @@ public class CardFactory implements NewConstants { }); CardList choices = allCards.getValidCards(Tgts); - stopSetNext(CardFactoryUtil.input_targetSpecific(spDstryTgt, choices, Selec, true)); + boolean free = false; + if (this.isFree()) + free = true; + stopSetNext(CardFactoryUtil.input_targetSpecific(spDstryTgt, choices, Selec, true, free)); } };//InGetTarget @@ -3474,91 +3477,6 @@ public class CardFactory implements NewConstants { }//*************** END ************ END ************************** -/* - //contributed code - //*************** START *********** START ************************** - if(cardName.equals("Dark Banishing")) - { - final SpellAbility spell = new Spell(card) - { - private static final long serialVersionUID = -5621665629586583879L; - - Card check; - - public boolean canPlayAI() - { - check = getNonBlackCreature(); - return check != null; - } - - public void chooseTargetAI() - { - Card c = getNonBlackCreature(); - if((c == null) || (! check.equals(c))) - throw new RuntimeException(card +" error in chooseTargetAI() - Card c is " +c +", Card check is " +check); - - setTargetCard(c); - }//chooseTargetAI() - - Card getNonBlackCreature() - { - int maxAttack = 0; - Card bestCard = null; - CardList nonBlackCards = CardFactoryUtil.AI_getHumanCreature(card, true); - - for(int i = 0; i < nonBlackCards.size(); i++) - if(!CardUtil.getColors(nonBlackCards.get(i)).contains(Constant.Color.Black)) - if(nonBlackCards.get (i).getNetAttack() > maxAttack) - { - maxAttack = nonBlackCards.get(i).getNetAttack(); - bestCard = nonBlackCards.get(i); - } - - return bestCard; - } - - public void resolve() - { - if(AllZone.GameAction.isCardInPlay(getTargetCard()) && CardFactoryUtil.canTarget(card,getTargetCard())) - { - AllZone.GameAction.destroyNoRegeneration(getTargetCard()); - } - }//resolve() - };//SpellAbility - card.clearSpellAbility(); - card.addSpellAbility(spell); - - //target - Input target = new Input() - { - private static final long serialVersionUID = -3155643868640376193L; - - public void showMessage() - { - AllZone.Display.showMessage("Select target non-black creature for " +spell.getSourceCard()); - ButtonUtil.enableOnlyCancel(); - } - public void selectButtonCancel() {stop();} - public void selectCard(Card c, PlayerZone zone) - { - if (!CardFactoryUtil.canTarget(card, c)) - { - AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?)."); - } - else if((!CardUtil.getColors(c).contains(Constant.Color.Black)) - && c.isCreature() - && zone.is(Constant.Zone.Play)) - { - spell.setTargetCard(c); - stopSetNext(new Input_PayManaCost(spell)); - } - } - };//SpellAbility - target - - spell.setBeforePayMana(target); - }//*************** END ************ END ************************** -*/ - //*************** START *********** START ************************** else if(cardName.equals("Pyrohemia")) @@ -4280,164 +4198,8 @@ public class CardFactory implements NewConstants { card.addSpellAbility(spell); }//*************** END ************ END ************************** - -/* - //*************** START *********** START ************************** - else if(cardName.equals("Terminate")) - { - final SpellAbility spell = new Spell(card) - { - private static final long serialVersionUID = 3334967250557638367L; - - public boolean canPlayAI() - { - return (getCreature().size() != 0) && (AllZone.Phase.getTurn() > 4); - } - public void chooseTargetAI() - { - Card best = CardFactoryUtil.AI_getBestCreature(getCreature()); - setTargetCard(best); + - CardList human = CardFactoryUtil.AI_getHumanCreature(AllZone.Computer_Life.getLife() - 1, card, true); - CardListUtil.sortAttack(human); - - if(0 < human.size()) - setTargetCard(human.get(0)); - - } - CardList getCreature() - { - return CardFactoryUtil.AI_getHumanCreature(card, true); - }//getCreature() - public void resolve() - { - if (AllZone.GameAction.isCardInPlay(getTargetCard()) && CardFactoryUtil.canTarget(card, getTargetCard())) - AllZone.GameAction.destroyNoRegeneration(getTargetCard()); - }//resolve() - }; - - card.clearSpellAbility(); - spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell)); - card.addSpellAbility(spell); - }//*************** END ************ END ************************** -*/ - -/* - //*************** START *********** START ************************** - else if(cardName.equals("Kinsbaile Borderguard")) - { - final SpellAbility ability = new Ability(card, "0") - { - public void resolve() - { - card.addCounter(Counters.P1P1, countKithkin()); - //System.out.println("all counters: " +card.sumAllCounters()); - }//resolve() - - public int countKithkin() - { - PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController()); - CardList kithkin = new CardList(play.getCards()); - kithkin = kithkin.filter(new CardListFilter() - { - - public boolean addCard(Card c) - { - return (c.getType().contains("Kithkin") || c.getKeyword().contains("Changeling"))&& !c.equals(card); - } - - }); - return kithkin.size(); - - } - @SuppressWarnings("unused") // makeToken - public void makeToken() - { - Card c = new Card(); - - c.setOwner(card.getController()); - c.setController(card.getController()); - - c.setName("Kithkin Soldier"); - c.setImageName("W 1 1 Kithkin Soldier"); - c.setManaCost("W"); - c.setToken(true); - - c.addType("Creature"); - c.addType("Kithkin"); - c.addType("Soldier"); - - c.setBaseAttack(1); - c.setBaseDefense(1); - - PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController()); - play.add(c); - } - }; - Command intoPlay = new Command() - { - private static final long serialVersionUID = -7067218066522935060L; - - public void execute() - { - ability.setStackDescription("Kinsbaile Borderguard comes into play with a +1/+1 counter on it for each other Kithkin you control."); - AllZone.Stack.add(ability); - } - }; - - final SpellAbility ability2 = new Ability(card, "0") - { - public void resolve() - { - for (int i=0;i 1 && CardFactoryUtil.AI_isMainPhase(); } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(a1, all, "Select target basic land", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a1, all, "Select target basic land", true, false)); } }; a1.setBeforePayMana(runtime); @@ -16242,7 +15921,7 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase(); { AllZone.GameAction.sacrifice(card); } - }, true)); + }, true, false)); } }; @@ -16802,7 +16481,11 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase(); choice.addAll(AllZone.Human_Play.getCards()); choice = choice.getType("Artifact"); - stopSetNext(CardFactoryUtil.input_targetSpecific(spell, choice, "Select artifact to sacrifice.", false)); + boolean free = false; + if (this.isFree()) + free = true; + + stopSetNext(CardFactoryUtil.input_targetSpecific(spell, choice, "Select artifact to sacrifice.", false, free)); } }; spell.setBeforePayMana(runtime); @@ -16924,7 +16607,7 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase(); } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, arts, "Select a non-token Artifact to sacrifice", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, arts, "Select a non-token Artifact to sacrifice", false, false)); }//showMessage() };//Input @@ -17800,8 +17483,12 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase(); return c.isPermanent() && !c.getName().equals("Mana Pool"); } }); - - stopSetNext(CardFactoryUtil.input_targetSpecific(spell, perms, "Select a permanent you control", true)); + + boolean free = false; + if (this.isFree()) + free = true; + + stopSetNext(CardFactoryUtil.input_targetSpecific(spell, perms, "Select a permanent you control", true, free)); }//showMessage() };//Input diff --git a/src/forge/CardFactoryUtil.java b/src/forge/CardFactoryUtil.java index f2aa851b244..140fef3c090 100644 --- a/src/forge/CardFactoryUtil.java +++ b/src/forge/CardFactoryUtil.java @@ -1388,7 +1388,7 @@ public class CardFactoryUtil list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -1567,13 +1567,13 @@ public class CardFactoryUtil }//soul_desc() //CardList choices are the only cards the user can successful select - public static Input input_targetSpecific(final SpellAbility spell, final CardList choices, final String message, final boolean targeted) + public static Input input_targetSpecific(final SpellAbility spell, final CardList choices, final String message, final boolean targeted, final boolean free) { - return input_targetSpecific(spell, choices, message, Command.Blank, targeted); + return input_targetSpecific(spell, choices, message, Command.Blank, targeted, free); } //CardList choices are the only cards the user can successful select - public static Input input_targetSpecific(final SpellAbility spell, final CardList choices, final String message, final Command paid, final boolean targeted) + public static Input input_targetSpecific(final SpellAbility spell, final CardList choices, final String message, final Command paid, final boolean targeted, final boolean free) { Input target = new Input() { @@ -1596,7 +1596,7 @@ public class CardFactoryUtil spell.setTargetCard(card); if(spell instanceof Ability_Tap && spell.getManaCost().equals("0")) stopSetNext(new Input_NoCost_TapAbility((Ability_Tap)spell)); - else if(spell.getManaCost().equals("0") || this.isFree()) + else if(spell.getManaCost().equals("0") || free) { this.setFree(false); AllZone.Stack.add(spell); @@ -2445,8 +2445,8 @@ public class CardFactoryUtil //parser for non-mana X variables public static int xCount(Card c, String s) { - int n = 0; - + int n = 0; + String cardController = c.getController(); String oppController = AllZone.GameAction.getOpponent(cardController); diff --git a/src/forge/CardFactory_Auras.java b/src/forge/CardFactory_Auras.java index 4e72ebe06a0..365af2d07bd 100644 --- a/src/forge/CardFactory_Auras.java +++ b/src/forge/CardFactory_Auras.java @@ -3483,7 +3483,7 @@ class CardFactory_Auras { CardList cars = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); cars = cars.getType("Caribou"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, cars, "Select a Caribou to sacrifice.", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, cars, "Select a Caribou to sacrifice.", false, false)); } }; @@ -3515,7 +3515,7 @@ class CardFactory_Auras { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(spell, land, "Select target land you control", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(spell, land, "Select target land you control", true, false)); } }; spell.setBeforePayMana(runtime2); @@ -3669,7 +3669,7 @@ class CardFactory_Auras { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(spell, land, "Select target land", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(spell, land, "Select target land", true, false)); } }; spell.setBeforePayMana(runtime); @@ -3821,7 +3821,7 @@ class CardFactory_Auras { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(spell, land, "Select target land", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(spell, land, "Select target land", true, false)); } }; spell.setBeforePayMana(runtime); @@ -3897,7 +3897,7 @@ class CardFactory_Auras { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(spell, land, "Select target land", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(spell, land, "Select target land", true, false)); } }; spell.setBeforePayMana(runtime); diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index 9fab8efe2e5..1f4e765ba39 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -834,7 +834,7 @@ public class CardFactory_Creatures { (!c.getType().contains("Legendary")); } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select target creature to copy that is not legendary.", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select target creature to copy that is not legendary.", true, false)); } };//Input ability.setStackDescription("Kiki-Jiki - copy card."); @@ -1099,7 +1099,7 @@ public class CardFactory_Creatures { CardList slivers = new CardList(AllZone.getZone(Constant.Zone.Play, opponent).getCards()); slivers = slivers.getType("Sliver"); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability2, slivers, "Select a Sliver", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability2, slivers, "Select a Sliver", true, false)); } }); @@ -1954,7 +1954,7 @@ public class CardFactory_Creatures { perms.addAll(human.getCards()); perms.addAll(comp.getCards()); - stopSetNext(CardFactoryUtil.input_targetSpecific(a1, perms, "Select target permanent.", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a1, perms, "Select target permanent.", true, false)); } }; @@ -2199,7 +2199,7 @@ public class CardFactory_Creatures { CardList kith = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); kith = kith.getType("Kithkin"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, kith, "Select a Kithkin to sacrifice.", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, kith, "Select a Kithkin to sacrifice.", true, false)); } }; @@ -5081,7 +5081,7 @@ public class CardFactory_Creatures { { CardList choice = (CardList)getCreature.execute(); - stopSetNext(CardFactoryUtil.input_targetSpecific(abilityComes, choice, "Select Elemental to remove from the game", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(abilityComes, choice, "Select Elemental to remove from the game", false, false)); ButtonUtil.disableAll(); } @@ -5223,7 +5223,7 @@ public class CardFactory_Creatures { { CardList choice = (CardList)getCreature.execute(); - stopSetNext(CardFactoryUtil.input_targetSpecific(abilityComes, choice, "Select Elf to remove from the game", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(abilityComes, choice, "Select Elf to remove from the game", false, false)); ButtonUtil.disableAll(); //target this card means: sacrifice this card } }; @@ -5425,7 +5425,7 @@ public class CardFactory_Creatures { { CardList choice = (CardList)getCreature.execute(); - stopSetNext(CardFactoryUtil.input_targetSpecific(abilityComes, choice, "Select creature to remove from the game", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(abilityComes, choice, "Select creature to remove from the game", false, false)); ButtonUtil.disableAll(); } }; @@ -5561,7 +5561,7 @@ public class CardFactory_Creatures { { CardList choice = (CardList)getBlackPerm.execute(); - stopSetNext(CardFactoryUtil.input_targetSpecific(abilityComes, choice, "Select target black permanent to remove from the game", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(abilityComes, choice, "Select target black permanent to remove from the game", true, false)); ButtonUtil.disableAll();//to disable the Cancel button } }; @@ -5690,7 +5690,7 @@ public class CardFactory_Creatures { { CardList choice = (CardList)getCreature.execute(); - stopSetNext(CardFactoryUtil.input_targetSpecific(abilityComes, choice, "Select target creature to remove from the game", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(abilityComes, choice, "Select target creature to remove from the game", true, false)); ButtonUtil.disableAll();//to disable the Cancel button } }; @@ -6261,7 +6261,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, creats, "Select a creature", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, creats, "Select a creature", false, false)); } }); card.addSpellAbility(ability); @@ -6908,7 +6908,7 @@ public class CardFactory_Creatures { }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, slivers, "Select a tapped non-black creature", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, slivers, "Select a tapped non-black creature", true, false)); } }); @@ -7208,7 +7208,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, all, "Destroy target enchanted creature.", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, all, "Destroy target enchanted creature.", true, false)); } }; ability.setBeforePayMana(runtime); @@ -7329,7 +7329,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, all, "Choose target creature or enchantment.", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, all, "Choose target creature or enchantment.", true, false)); } }; ability.setBeforePayMana(runtime); @@ -8031,7 +8031,7 @@ public class CardFactory_Creatures { { PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController()); CardList choice = new CardList(play.getCards()); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select a permanent you control.", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select a permanent you control.", true, false)); } }; card.addSpellAbility(ability); @@ -9348,7 +9348,7 @@ public class CardFactory_Creatures { { AllZone.GameAction.sacrifice(card); } - }, true)); + }, true, false)); }//showMessage() };//Input @@ -10724,7 +10724,7 @@ public class CardFactory_Creatures { CardList rats = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); rats = rats.getType("Rat"); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, rats, "Select a Rat to sacrifice.", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, rats, "Select a Rat to sacrifice.", false, false)); } }; @@ -11214,7 +11214,7 @@ public class CardFactory_Creatures { if (all.size() != 0) { if(card.getController().equals(Constant.Player.Human)) { - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all, "Select target permanent to tap/untap.", true)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all, "Select target permanent to tap/untap.", true, false)); ButtonUtil.enableAll(); } else if (card.getController().equals(Constant.Player.Computer)) { @@ -11282,7 +11282,7 @@ public class CardFactory_Creatures { if (all.size() != 0) { if(card.getController().equals(Constant.Player.Human)) { - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all, "Select target permanent to destroy.", true)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all, "Select target permanent to destroy.", true, false)); ButtonUtil.disableAll(); } else if (card.getController().equals(Constant.Player.Computer)) { @@ -12081,7 +12081,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, land, "Select a Plains or Forest to sacrifice.", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, land, "Select a Plains or Forest to sacrifice.", false, false)); } }; ability.setBeforePayMana(runtime); @@ -12277,7 +12277,7 @@ public class CardFactory_Creatures { CardList saps = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); saps = saps.getType("Saproling"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, saps, "Select a Saproling to sacrifice.", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, saps, "Select a Saproling to sacrifice.", false, false)); } }; @@ -12382,7 +12382,7 @@ public class CardFactory_Creatures { CardList saps = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); saps = saps.getType("Saproling"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, saps, "Select a Saproling to sacrifice.", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, saps, "Select a Saproling to sacrifice.", false, false)); } }; @@ -12442,7 +12442,7 @@ public class CardFactory_Creatures { CardList saps = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); saps = saps.getType("Saproling"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, saps, "Select a Saproling to sacrifice.", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, saps, "Select a Saproling to sacrifice.", false, false)); } }; @@ -12488,7 +12488,7 @@ public class CardFactory_Creatures { CardList walls = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); walls = walls.getType("Wall"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, walls, "Select a Wall to sacrifice.", false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, walls, "Select a Wall to sacrifice.", false, false)); } }; @@ -13218,7 +13218,7 @@ public class CardFactory_Creatures { } } } - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, targets, "Select target blocking or blocked by Cromat.", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, targets, "Select target blocking or blocked by Cromat.", true, false)); } }; card.addSpellAbility(a2); @@ -13426,7 +13426,7 @@ public class CardFactory_Creatures { { PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController()); CardList choice = new CardList(play.getCards()); - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, choice, "Select a permanent you control.", false)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, choice, "Select a permanent you control.", false, false)); ButtonUtil.disableAll(); }//execute() @@ -13497,7 +13497,7 @@ public class CardFactory_Creatures { //Object o = AllZone.Display.getChoiceOptional("Select a creature card to bounce", blackBlue.toArray()); - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, redGreen, "Select a red or green creature you control.", false)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, redGreen, "Select a red or green creature you control.", false, false)); ButtonUtil.disableAll(); }//execute() @@ -13567,7 +13567,7 @@ public class CardFactory_Creatures { } } - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, whiteBlue, "Select a white or blue creature you control.", false)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, whiteBlue, "Select a white or blue creature you control.", false, false)); ButtonUtil.disableAll(); }//execute() @@ -13640,7 +13640,7 @@ public class CardFactory_Creatures { //Object o = AllZone.Display.getChoiceOptional("Select a creature card to bounce", blackBlue.toArray()); - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, greenWhite, "Select a green or white creature you control.",false)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, greenWhite, "Select a green or white creature you control.", false, false)); ButtonUtil.disableAll(); }//execute() @@ -13719,7 +13719,7 @@ public class CardFactory_Creatures { //Object o = AllZone.Display.getChoiceOptional("Select a creature card to bounce", blackBlue.toArray()); - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, creatures, "Select a creature you control.", false)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, creatures, "Select a creature you control.", false, false)); ButtonUtil.disableAll(); }//execute() @@ -13811,7 +13811,7 @@ public class CardFactory_Creatures { //Object o = AllZone.Display.getChoiceOptional("Select a creature card to bounce", blackBlue.toArray()); - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, blackBlue, "Select blue or black creature you control.", false)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, blackBlue, "Select blue or black creature you control.", false, false)); ButtonUtil.disableAll(); }//execute() @@ -13956,7 +13956,7 @@ public class CardFactory_Creatures { CardList saps = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); saps = saps.getType("Saproling"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, saps, "Select a Saproling to sacrifice.",false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, saps, "Select a Saproling to sacrifice.", false, false)); } }; a1.setDescription("2G: Put a 1/1 green Saproling creature token into play."); @@ -14034,7 +14034,7 @@ public class CardFactory_Creatures { CardList creats = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); creats = creats.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, creats, "Select a creature to sacrifice.",false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, creats, "Select a creature to sacrifice.", false, false)); } }; @@ -14109,7 +14109,7 @@ public class CardFactory_Creatures { CardList creats = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); creats = creats.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, creats, "Select a creature to sacrifice.",false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, creats, "Select a creature to sacrifice.",false, false)); } }; @@ -14169,7 +14169,7 @@ public class CardFactory_Creatures { CardList creats = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); creats = creats.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, creats, "Select a creature to sacrifice.",false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, creats, "Select a creature to sacrifice.", false, false)); } }; @@ -14225,7 +14225,7 @@ public class CardFactory_Creatures { if (all.size() != 0) { if(card.getController().equals(Constant.Player.Human)) { - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all, "Select target artifact.", true)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all, "Select target artifact.", true, false)); ButtonUtil.disableAll(); } else if (card.getController().equals(Constant.Player.Computer)) { @@ -14303,7 +14303,7 @@ public class CardFactory_Creatures { if (all.size() != 0) { if(card.getController().equals(Constant.Player.Human)) { - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all, "Select target artifact.", true)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all, "Select target artifact.", true, false)); ButtonUtil.disableAll(); } else if (card.getController().equals(Constant.Player.Computer)) { @@ -14378,7 +14378,7 @@ public class CardFactory_Creatures { if (all.size() != 0) { if(card.getController().equals(Constant.Player.Human)) { - AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all, "Select target enchantment.", true)); + AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all, "Select target enchantment.", true, false)); ButtonUtil.disableAll(); } else if (card.getController().equals(Constant.Player.Computer)) { @@ -15224,7 +15224,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(a1, all, "Return target permanent", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a1, all, "Return target permanent", true, false)); } }; a1.setBeforePayMana(runtime); @@ -15442,7 +15442,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(a1, all, "Destroy target artifact or enchantment.", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a1, all, "Destroy target artifact or enchantment.", true, false)); } }; a1.setBeforePayMana(runtime); @@ -15994,9 +15994,7 @@ public class CardFactory_Creatures { private static final long serialVersionUID = -9155272432379335551L; public void resolve() { - /*CardList list = new CardList(AllZone.getZone(Constant.Zone.Play, Constant.Player.Human).getCards()); - list = list.getName("Mana Pool");*/ - Card mp = AllZone.ManaPool;//list.getCard(0); + Card mp = AllZone.ManaPool; PlayerZone hum = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human); PlayerZone comp = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer); @@ -16033,6 +16031,28 @@ public class CardFactory_Creatures { }//*************** END ************ END ************************** + /* + //*************** START *********** START ************************** + if (cardName.equals("Priest of Titania")) + { + + String countString = "Count$TypeOnBattlefield.Elf"; + + SpellAbility ability = new Ability_Mana(card, "tap: add G:"+countString) + { + private static final long serialVersionUID = -5461196759660196802L; + }; + + + + ability.setDescription("tap: add G to your mana pool for each Elf in play."); + ability.setStackDescription(cardName + " adds G to your mana pool for each Elf in play."); + //card.clearSpellAbility(); + card.addSpellAbility(ability); + + return card; + }//*************** END ************ END ************************** + */ //*************** START ************ START ************************** if (cardName.equals("Rats of Rath")) { @@ -16049,7 +16069,7 @@ public class CardFactory_Creatures { CardList choices = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); choices.filter(new CardListFilter(){public boolean addCard(Card c){ return c.isArtifact() || c.isCreature() || c.isLand();}}); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choices, "Select an artifact, creature, or land you control", true));} + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choices, "Select an artifact, creature, or land you control", true, false));} }); ability.setDescription("B: Destroy target artifact, creature, or land you control."); card.addSpellAbility(ability); @@ -16678,7 +16698,7 @@ public class CardFactory_Creatures { CardList creats = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); creats = creats.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(a2, creats, "Select a creature to sacrifice.",false)); + stopSetNext(CardFactoryUtil.input_targetSpecific(a2, creats, "Select a creature to sacrifice.", false, false)); } }; @@ -16899,7 +16919,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select target Merfolk creature", Command.Blank,true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select target Merfolk creature", Command.Blank, true, false)); }//showMessage() };//Input @@ -16990,7 +17010,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select target Dwarf creature", Command.Blank,true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select target Dwarf creature", Command.Blank, true, false)); }//showMessage() };//Input @@ -17652,7 +17672,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select an Artifact or Enchantment", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select an Artifact or Enchantment", true, false)); } }); card.addSpellAbility(ability); @@ -17730,7 +17750,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select an Artifact or Enchantment", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select an Artifact or Enchantment", true, false)); } }); card.addSpellAbility(ability); @@ -17808,7 +17828,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select target Enchantment", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select target Enchantment", true, false)); } }); card.addSpellAbility(ability); @@ -17889,7 +17909,7 @@ public class CardFactory_Creatures { } }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select an Artifact or Enchantment", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, "Select an Artifact or Enchantment", true, false)); } }); card.addSpellAbility(ability); @@ -18301,7 +18321,7 @@ public class CardFactory_Creatures { CardList creats = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards()); creats = creats.getType("Merfolk"); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, creats, "Select a target Merfolk",true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, creats, "Select a target Merfolk",true, false)); } }; ability.setDescription("1 W: Target Merfolk you control gains protection from the color of your choice until end of turn."); diff --git a/src/forge/CardFactory_Equipment.java b/src/forge/CardFactory_Equipment.java index 1bf48fa7ae5..c4d0d1102fe 100644 --- a/src/forge/CardFactory_Equipment.java +++ b/src/forge/CardFactory_Equipment.java @@ -118,7 +118,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -238,7 +238,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -359,7 +359,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -474,7 +474,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -591,7 +591,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -703,7 +703,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -818,7 +818,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -937,7 +937,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -1056,7 +1056,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -1176,7 +1176,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -1294,7 +1294,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -1504,7 +1504,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -1623,7 +1623,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -1705,7 +1705,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input @@ -1999,7 +1999,7 @@ class CardFactory_Equipment { list.addAll(AllZone.Human_Play.getCards()); list = list.getType("Creature"); - stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(equip, list, "Select target creature to equip", true, false)); } };//Input diff --git a/src/forge/CardFactory_Lands.java b/src/forge/CardFactory_Lands.java index cffa6b13ddf..974f26439a7 100644 --- a/src/forge/CardFactory_Lands.java +++ b/src/forge/CardFactory_Lands.java @@ -1121,7 +1121,7 @@ class CardFactory_Lands { }); //System.out.println("size of choice: " + choice.size()); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select target Legendary creature:", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select target Legendary creature:", true, false)); } }; @@ -1223,7 +1223,7 @@ class CardFactory_Lands { }); //System.out.println("size of choice: " + choice.size()); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select target 1/1 Creature:", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select target 1/1 Creature:", true, false)); } }; @@ -1325,7 +1325,7 @@ class CardFactory_Lands { }); //System.out.println("size of choice: " + choice.size()); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select target legendary Creature:", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select target legendary Creature:", true, false)); } }; @@ -1391,7 +1391,7 @@ class CardFactory_Lands { }); //System.out.println("size of choice: " + choice.size()); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select target Elf", true)); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select target Elf", true, false)); } }; diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 119820e95ae..f7d50a0c4f7 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -196,7 +196,7 @@ public class GameActionUtil } } } - else + else //computer { ArrayList choices = cascadedCard.getBasicSpells(); @@ -3254,7 +3254,8 @@ public class GameActionUtil { if (c.getName().equals("Kazandu Blademaster") || c.getName().equals("Makindi Shieldmate") || c.getName().equals("Nimana Sell-Sword") || c.getName().equals("Oran-Rief Survivalist") || - c.getName().equals("Tuktuk Grunts") || c.getName().equals("Umara Raptor")) + c.getName().equals("Tuktuk Grunts") || c.getName().equals("Umara Raptor") || + c.getName().equals("Hada Freeblade") ) ally_Generic_P1P1(c); else if (c.getName().equals("Turntimber Ranger")) ally_Turntimber_Ranger(c); @@ -11152,6 +11153,49 @@ public class GameActionUtil } }; + public static Command Loam_Lion = new Command() + { + private static final long serialVersionUID = -6996623102170747897L; + + public void execute() + { + // get all creatures + CardList list = new CardList(); + list.addAll(AllZone.Human_Play.getCards()); + list.addAll(AllZone.Computer_Play.getCards()); + list = list.getName("Loam Lion"); + + for (int i = 0; i < list.size(); i++) + { + Card c = list.get(i); + if (hasForest(c)) + { + c.setBaseAttack(2); + c.setBaseDefense(3); + } + else + { + c.setBaseAttack(1); + c.setBaseDefense(1); + } + } + }// execute() + + private boolean hasForest(Card c) + { + PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController()); + + CardList land = new CardList(); + land.addAll(play.getCards()); + + land = land.getType("Forest"); + if (land.size()>0) + return true; + else + return false; + } + }; + public static Command Vexing_Beetle = new Command() { @@ -16332,6 +16376,7 @@ public class GameActionUtil commands.put("Dauntless_Dourbark", Dauntless_Dourbark); commands.put("Vexing_Beetle", Vexing_Beetle); commands.put("Kird_Ape", Kird_Ape); + commands.put("Loam_Lion", Loam_Lion); commands.put("Sedge_Troll", Sedge_Troll); commands.put("Hedge_Troll", Hedge_Troll); commands.put("Wild_Nacatl", Wild_Nacatl); diff --git a/src/forge/StateBasedEffects.java b/src/forge/StaticEffects.java similarity index 97% rename from src/forge/StateBasedEffects.java rename to src/forge/StaticEffects.java index bd7596b3361..4e56c2600fd 100644 --- a/src/forge/StateBasedEffects.java +++ b/src/forge/StaticEffects.java @@ -2,7 +2,7 @@ package forge; import java.util.*; -public class StateBasedEffects +public class StaticEffects { //this is used to keep track of all state-based effects in play: private HashMap stateBasedMap = new HashMap(); @@ -10,7 +10,7 @@ public class StateBasedEffects //this is used to define all cards that are state-based effects, and map the corresponding commands to their cardnames private static HashMap cardToEffectsList = new HashMap(); - public StateBasedEffects() + public StaticEffects() { initStateBasedEffectsList(); } @@ -56,6 +56,7 @@ public class StateBasedEffects cardToEffectsList.put("Korlash, Heir to Blackblade", new String[] {"Korlash"}); cardToEffectsList.put("Dauntless Dourbark", new String[] {"Dauntless_Dourbark"}); cardToEffectsList.put("Vexing Beetle", new String[] {"Vexing_Beetle"}); + cardToEffectsList.put("Loam Lion", new String[] {"Loam_Lion"}); cardToEffectsList.put("Kird Ape", new String[] {"Kird_Ape"}); cardToEffectsList.put("Sedge Troll", new String[] {"Sedge_Troll"}); cardToEffectsList.put("Hedge Troll", new String[] {"Hedge_Troll"});