- AI will no longer cast Bolster with no creatures on the BF

- Manifest Ability can't be activated if the original card isn't a creature
This commit is contained in:
Sol
2015-01-18 17:00:03 +00:00
parent a87271f220
commit e576dbcf93
3 changed files with 17 additions and 9 deletions

View File

@@ -416,6 +416,8 @@ public class Card extends GameEntity implements Comparable<Card> {
// Turn Face Down (even if it's DFC).
ManaCost cost = this.getManaCost();
boolean isCreature = this.isCreature();
// Sometimes cards are manifested while already being face down
if (!turnFaceDown(true) && currentStateName != CardStateName.FaceDown) {
return null;
@@ -430,7 +432,7 @@ public class Card extends GameEntity implements Comparable<Card> {
c.setManifested(true);
// Add manifest demorph static ability for creatures?
c.addSpellAbility(CardFactoryUtil.abilityManifestFaceUp(c, cost));
c.addSpellAbility(CardFactoryUtil.abilityManifestFaceUp(c, cost, isCreature));
return c;
}

View File

@@ -166,7 +166,7 @@ public class CardFactoryUtil {
return morphUp;
}
public static AbilityStatic abilityManifestFaceUp(final Card sourceCard, final ManaCost manaCost) {
public static AbilityStatic abilityManifestFaceUp(final Card sourceCard, final ManaCost manaCost, final boolean canFlip) {
final Cost cost = new Cost(manaCost, false);
final AbilityStatic manifestUp = new AbilityStatic(sourceCard, cost, null) {
@@ -183,10 +183,10 @@ public class CardFactoryUtil {
@Override
public boolean canPlay() {
return sourceCard.getController().equals(this.getActivatingPlayer()) && sourceCard.isFaceDown()
&& sourceCard.isInPlay() && sourceCard.isManifested();
&& sourceCard.isInPlay() && sourceCard.isManifested() && canFlip;
}
}; // morph_up
}; // manifest_up
String costDesc = cost.toString();
// get rid of the ": " at the end