- Added Travelers Cloak

This commit is contained in:
swordshine
2013-04-06 13:42:13 +00:00
parent 42c4797b49
commit f74e94b639
3 changed files with 29 additions and 4 deletions

1
.gitattributes vendored
View File

@@ -11258,6 +11258,7 @@ res/cardsfolder/t/traumatic_visions.txt svneol=native#text/plain
res/cardsfolder/t/traumatize.txt svneol=native#text/plain res/cardsfolder/t/traumatize.txt svneol=native#text/plain
res/cardsfolder/t/travel_preparations.txt -text res/cardsfolder/t/travel_preparations.txt -text
res/cardsfolder/t/travelers_amulet.txt -text res/cardsfolder/t/travelers_amulet.txt -text
res/cardsfolder/t/travelers_cloak.txt -text
res/cardsfolder/t/treacherous_link.txt svneol=native#text/plain res/cardsfolder/t/treacherous_link.txt svneol=native#text/plain
res/cardsfolder/t/treacherous_pit_dweller.txt -text res/cardsfolder/t/treacherous_pit_dweller.txt -text
res/cardsfolder/t/treacherous_urge.txt svneol=native#text/plain res/cardsfolder/t/treacherous_urge.txt svneol=native#text/plain

View File

@@ -0,0 +1,12 @@
Name:Traveler's Cloak
ManaCost:2 U
Types:Enchantment Aura
K:Enchant creature
A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature | AILogic$ Pump
K:ETBReplacement:Other:ChooseLT
SVar:ChooseLT:DB$ ChooseType | Defined$ You | Type$ Land | AILogic$ ChosenLandwalk | SpellDescription$ As CARDNAME enters the battlefield, choose a land type.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters the battlefield, draw a card.
SVar:TrigDraw:AB$ Draw | Cost$ 0 | NumCards$ 1
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ ChosenTypewalk | Description$ Enchanted creature has landwalk of the chosen type.
SVar:Picture:http://www.wizards.com/global/images/magic/general/travelers_cloak.jpg
SetInfo:INV Common

View File

@@ -186,10 +186,22 @@ public class ChooseTypeEffect extends SpellAbilityEffect {
valid = true; valid = true;
card.setChosenType(choice); card.setChosenType(choice);
} }
} else { } else {//AI
// TODO String choice = null;
// computer will need to choose a type if (sa.hasParam("AILogic")) {
card.setChosenType("Island"); final String logic = sa.getParam("AILogic");
if (logic.equals("ChosenLandwalk")) {
final List<Card> lands = p.getOpponent().getLandsInPlay();
final List<String> totallands = CardType.getLandTypes();
for (Card c : lands) {
if (!invalidTypes.contains(c.getName())) {
choice = c.getName();
break;
}
}
}
}
card.setChosenType(choice != null ? choice :"Island");
valid = true; valid = true;
} }
} }