merge latest trunk

This commit is contained in:
myk
2013-03-15 03:15:24 +00:00
6 changed files with 48 additions and 6 deletions

View File

@@ -8869,6 +8869,10 @@ public class Card extends GameEntity implements Comparable<Card> {
if (this.hasProtectionFrom(sa.getSourceCard())) {
return false;
}
if (this.isPhasedOut()) {
return false;
}
if (this.getKeyword() != null) {
final Card source = sa.getSourceCard();

View File

@@ -802,7 +802,7 @@ public class AttachAi extends SpellAbilityAi {
}
});
if (attachSource.isAura()) {
if (attachSource.isAura() && !attachSource.getName().equals("Daybreak Coronet")) {
// TODO For Auras like Rancor, that aren't as likely to lead to
// card disadvantage, this check should be skipped
prefList = CardLists.filter(prefList, Predicates.not(Presets.ENCHANTED));

View File

@@ -137,12 +137,15 @@ public class ManaEffect extends SpellAbilityEffect {
abMana.setExpressChoice(choice);
}
else {
if (sa.hasParam("AILogic")) {
final String logic = sa.getParam("AILogic");
if (abMana.getExpressChoice().isEmpty()) {
final String logic = sa.hasParam("AILogic") ? sa.getParam("AILogic") : null;
String chosen = Constant.Color.BLACK;
if (logic.equals("MostProminentInComputerHand")) {
if (logic == null || logic.equals("MostProminentInComputerHand")) {
chosen = ComputerUtilCard.getMostProminentColor(act.getCardsIn(ZoneType.Hand));
}
if (chosen.equals("")) {
chosen = Constant.Color.GREEN;
}
GuiChoose.one("Computer picked: ", new String[]{chosen});
abMana.setExpressChoice(MagicColor.toShortString(chosen));
}