- 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

View File

@@ -186,10 +186,22 @@ public class ChooseTypeEffect extends SpellAbilityEffect {
valid = true;
card.setChosenType(choice);
}
} else {
// TODO
// computer will need to choose a type
card.setChosenType("Island");
} else {//AI
String choice = null;
if (sa.hasParam("AILogic")) {
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;
}
}