- Fixed Sphinx of Jwar Isle

This commit is contained in:
swordshine
2014-01-07 05:35:58 +00:00
parent 5fe57fcb11
commit 673fd2dae3
3 changed files with 10 additions and 10 deletions

View File

@@ -4,6 +4,6 @@ Types:Creature Sphinx
PT:5/5 PT:5/5
K:Flying K:Flying
K:Shroud K:Shroud
A:ST$ Reveal | Cost$ 0 | RevealDefined$ TopOfLibrary | RevealToYourself$ True | Message$ Top card | Zone$ Library | SpellDescription$ You may look at the top card of your library. A:ST$ PeekAndReveal | Cost$ 0 | Defined$ You | NoReveal$ True | SpellDescription$ You may look at the top card of your library.
SVar:Picture:http://www.wizards.com/global/images/magic/general/sphinx_of_jwar_isle.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/sphinx_of_jwar_isle.jpg
Oracle:Flying, shroud\nYou may look at the top card of your library. (You may do this at any time.) Oracle:Flying, shroud\nYou may look at the top card of your library. (You may do this at any time.)

View File

@@ -3,6 +3,7 @@ package forge.ai.ability;
import forge.ai.SpellAbilityAi; import forge.ai.SpellAbilityAi;
import forge.game.player.Player; import forge.game.player.Player;
import forge.game.player.PlayerActionConfirmMode; import forge.game.player.PlayerActionConfirmMode;
import forge.game.spellability.AbilityStatic;
import forge.game.spellability.AbilitySub; import forge.game.spellability.AbilitySub;
import forge.game.spellability.SpellAbility; import forge.game.spellability.SpellAbility;
@@ -17,6 +18,9 @@ public class PeekAndRevealAi extends SpellAbilityAi {
*/ */
@Override @Override
protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) { protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) {
if (sa instanceof AbilityStatic) {
return false;
}
// So far this only appears on Triggers, but will expand // So far this only appears on Triggers, but will expand
// once things get converted from Dig + NoMove // once things get converted from Dig + NoMove
return true; return true;

View File

@@ -21,14 +21,13 @@ public class RevealEffect extends SpellAbilityEffect {
final Card host = sa.getSourceCard(); final Card host = sa.getSourceCard();
final boolean anyNumber = sa.hasParam("AnyNumber"); final boolean anyNumber = sa.hasParam("AnyNumber");
int cnt = sa.hasParam("NumCards") ? AbilityUtils.calculateAmount(host, sa.getParam("NumCards"), sa) : 1; int cnt = sa.hasParam("NumCards") ? AbilityUtils.calculateAmount(host, sa.getParam("NumCards"), sa) : 1;
final ZoneType zone = sa.hasParam("Zone") ? ZoneType.smartValueOf(sa.getParam("Zone")) : ZoneType.Hand;
final TargetRestrictions tgt = sa.getTargetRestrictions(); final TargetRestrictions tgt = sa.getTargetRestrictions();
for (final Player p : getTargetPlayers(sa)) { for (final Player p : getTargetPlayers(sa)) {
final Game game = p.getGame(); final Game game = p.getGame();
if (tgt == null || p.canBeTargetedBy(sa)) { if (tgt == null || p.canBeTargetedBy(sa)) {
final List<Card> cardsInHand = p.getZone(zone).getCards(); final List<Card> cardsInHand = p.getZone(ZoneType.Hand).getCards();
if (cardsInHand.isEmpty()) if (cardsInHand.isEmpty())
continue; continue;
@@ -69,12 +68,9 @@ public class RevealEffect extends SpellAbilityEffect {
revealed.addAll(p.getController().chooseCardsToRevealFromHand(min, cnt, valid)); revealed.addAll(p.getController().chooseCardsToRevealFromHand(min, cnt, valid));
} }
if (sa.hasParam("RevealToYourself")) {
String revealMessage = sa.hasParam("Message") ? sa.getParam("Message") : "Revealed cards";
game.getAction().reveal(revealMessage, revealed, p, false);
} else {
game.getAction().reveal(revealed, p); game.getAction().reveal(revealed, p);
}
if (sa.hasParam("RememberRevealed")) { if (sa.hasParam("RememberRevealed")) {
for (final Card rem : revealed) { for (final Card rem : revealed) {
host.addRemembered(rem); host.addRemembered(rem);