- Added slapshot5's Icy Manipulator.

- Fixed Nature's Cloak.
This commit is contained in:
jendave
2011-08-06 03:38:32 +00:00
parent 7542f8d8fb
commit 752cdb2ef2
3 changed files with 90 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
Icy Manipulator
4
Artifact
no text
Reprisal Reprisal
1 W 1 W
Instant Instant

View File

@@ -3880,7 +3880,15 @@ public class CardFactory implements NewConstants {
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController()); PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
list.addAll(play.getCards()); list.addAll(play.getCards());
if(cardName.equals("Nature's Cloak")) list = list.getColor("G"); if(cardName.equals("Nature's Cloak")) {
list = list.filter(new CardListFilter()
{
public boolean addCard(Card c)
{
return CardUtil.getColors(c).contains(Constant.Color.Green);
}
});
}
} }
if(cardName.equals("Magnify") || // All Creatures in Play if(cardName.equals("Magnify") || // All Creatures in Play
@@ -17599,6 +17607,32 @@ public class CardFactory implements NewConstants {
spell.setBeforePayMana(target); spell.setBeforePayMana(target);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*****************************START*******************************
if(cardName.equals("Icy Manipulator")) {
/* The Rules state that this can target a tapped card, but it won't do anything */
final Ability_Tap ability = new Ability_Tap(card, "1") {
private static final long serialVersionUID = 6349074398830621348L;
public boolean canPlayAI() {
return false;
}
public void chooseTargetAI() {
//setTargetCard(c);
}//chooseTargetAI()
public void resolve() {
if(AllZone.GameAction.isCardInPlay(getTargetCard())) {
getTargetCard().tap();
}
}
};//SpellAbility
card.addSpellAbility(ability);
ability.setDescription("1, tap: Tap target artifact, creature or land.");
ability.setBeforePayMana(CardFactoryUtil.input_targetType(ability, "Artifact;Creature;Land"));
}//end Icy Manipulator
//****************END*******END***********************
// Cards with Cycling abilities // Cards with Cycling abilities

View File

@@ -7,6 +7,7 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.Random; import java.util.Random;
import java.util.StringTokenizer;
public class CardFactoryUtil { public class CardFactoryUtil {
@@ -1611,6 +1612,7 @@ public class CardFactoryUtil {
}//input_discard() }//input_discard()
/*
//cardType is like "Creature", "Land", "Artifact", "Goblin", "Legendary" //cardType is like "Creature", "Land", "Artifact", "Goblin", "Legendary"
//cardType can also be "All", which will allow any permanent to be selected //cardType can also be "All", which will allow any permanent to be selected
public static Input input_targetType(final SpellAbility spell, final String cardType) { public static Input input_targetType(final SpellAbility spell, final String cardType) {
@@ -1642,7 +1644,55 @@ public class CardFactoryUtil {
}; };
return target; return target;
}//input_targetType() }//input_targetType()
*/
//****************copied from input_targetType*****************
//cardType is like "Creature", "Land", "Artifact", "Goblin", "Legendary", ";"-delimited
//cardType can also be "All", which will allow any permanent to be selected
public static Input input_targetType(final SpellAbility spell, final String cardTypeList) {
Input target = new Input() {
private static final long serialVersionUID = 6443658187985259709L;
public void showMessage() {
StringTokenizer st = new StringTokenizer(cardTypeList, ";");
if(cardTypeList.equals("All")) {
AllZone.Display.showMessage("Select target permanent");
}
else {
String toDisplay = "";
toDisplay += "Select target ";
while( st.hasMoreTokens() ) {
toDisplay += st.nextToken();
if( st.hasMoreTokens() ) {
toDisplay += " or ";
}
}
AllZone.Display.showMessage( toDisplay );
}
ButtonUtil.enableOnlyCancel();
}
public void selectButtonCancel() {stop();}
public void selectCard(Card card, PlayerZone zone) {
boolean foundCardType = false;
StringTokenizer st = new StringTokenizer(cardTypeList, ";");
if( cardTypeList.equals("All") ) {
foundCardType = true;
} else {
while( st.hasMoreTokens() ) {
if( card.getType().contains( st.nextToken() )) {
foundCardType = true;
}
}
}
if( foundCardType && zone.is(Constant.Zone.Play)) {
spell.setTargetCard(card);
stopSetNext(new Input_PayManaCost(spell));
}
}
};
return target;
}//input_targetType()
//***************end copy******************
public static Input input_targetCreature(final SpellAbility spell) { public static Input input_targetCreature(final SpellAbility spell) {
return input_targetCreature(spell, Command.Blank); return input_targetCreature(spell, Command.Blank);