- Added the keyword "Flashback" which represents Flashback with cost equal to the cards mana cost.

- Added Snapcaster Mage.
This commit is contained in:
Sloth
2011-11-12 11:05:09 +00:00
parent ae09fec11f
commit 12d85dabff
6 changed files with 35 additions and 6 deletions

View File

@@ -2402,6 +2402,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|| (kw.get(i).startsWith("Dredge") && !sb.toString().contains("Dredge"))
|| (kw.get(i).startsWith("Madness") && !sb.toString().contains("Madness"))
|| (kw.get(i).startsWith("CARDNAME is ") && !sb.toString().contains("CARDNAME is "))
|| (kw.get(i).equals("Flashback") && !sb.toString().contains("Flashback"))
|| (kw.get(i).startsWith("Recover") && !sb.toString().contains("Recover"))) {
sb.append(kw.get(i).replace(":", " ")).append("\r\n");
}

View File

@@ -1783,8 +1783,17 @@ public class GameAction {
// for uncastables like lotus bloom, check if manaCost is blank
sa.setActivatingPlayer(human);
if (sa.canPlay() && (!sa.isSpell() || !sa.getManaCost().equals(""))) {
choices.add(sa.toString());
map.put(sa.toString(), sa);
if (c.hasKeyword("Flashback") && c.isInZone(Constant.Zone.Graveyard)
&& c.getSpells().get(0).equals(sa) && !c.hasStartOfKeyword("May be played")) {
SpellAbility flashback = sa.copy();
flashback.setSourceCard(c);
flashback.setFlashBackAbility(true);
choices.add(flashback.toString());
map.put(flashback.toString(), flashback);
} else {
choices.add(sa.toString());
map.put(sa.toString(), sa);
}
}
}

View File

@@ -899,6 +899,7 @@ public class CardFactoryUtil {
};
flashback.setPayCosts(fbCost);
flashback.getRestrictions().setZone(Constant.Zone.Graveyard);
final String costString = fbCost.toString().replace(":", ".");
@@ -2613,7 +2614,8 @@ public class CardFactoryUtil {
return true;
}
if (sa.isSpell() && !zone.is(Zone.Battlefield) && c.hasStartOfKeyword("May be played")
if (sa.isSpell() && !zone.is(Zone.Battlefield) && (c.hasStartOfKeyword("May be played")
|| (c.hasKeyword("Flashback") && zone.is(Zone.Graveyard)))
&& restrictZone.equals(Zone.Hand)) {
return true;
}
@@ -4480,7 +4482,7 @@ public class CardFactoryUtil {
}
} // TypeCycling
if (CardFactoryUtil.hasKeyword(card, "Flashback") != -1) {
if (CardFactoryUtil.hasKeyword(card, "Flashback:") != -1) {
final int n = CardFactoryUtil.hasKeyword(card, "Flashback");
if (n != -1) {
final String parse = card.getKeyword().get(n).toString();

View File

@@ -180,9 +180,11 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
// If Card is not in the default activating zone, do some additional
// checks
// Not a Spell, or on Battlefield, return false
if (!sa.isSpell() || cardZone.is(Zone.Battlefield)) {
if (!sa.isSpell() || cardZone.is(Zone.Battlefield) || !this.getZone().equals(Zone.Hand)) {
return false;
} else if (!c.hasStartOfKeyword("May be played") || !this.getZone().equals(Zone.Hand)) {
} else if (!c.hasStartOfKeyword("May be played")
&& !(c.hasKeyword("Flashback") && cardZone.is(Zone.Graveyard)
&& c.getSpells().get(0).equals(sa))) {
return false;
}
}