mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Fixed Sphinx of Jwar Isle
This commit is contained in:
@@ -4,6 +4,6 @@ Types:Creature Sphinx
|
||||
PT:5/5
|
||||
K:Flying
|
||||
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
|
||||
Oracle:Flying, shroud\nYou may look at the top card of your library. (You may do this at any time.)
|
||||
@@ -3,6 +3,7 @@ package forge.ai.ability;
|
||||
import forge.ai.SpellAbilityAi;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.player.PlayerActionConfirmMode;
|
||||
import forge.game.spellability.AbilityStatic;
|
||||
import forge.game.spellability.AbilitySub;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
|
||||
@@ -17,6 +18,9 @@ public class PeekAndRevealAi extends SpellAbilityAi {
|
||||
*/
|
||||
@Override
|
||||
protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) {
|
||||
if (sa instanceof AbilityStatic) {
|
||||
return false;
|
||||
}
|
||||
// So far this only appears on Triggers, but will expand
|
||||
// once things get converted from Dig + NoMove
|
||||
return true;
|
||||
|
||||
@@ -21,14 +21,13 @@ public class RevealEffect extends SpellAbilityEffect {
|
||||
final Card host = sa.getSourceCard();
|
||||
final boolean anyNumber = sa.hasParam("AnyNumber");
|
||||
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();
|
||||
|
||||
for (final Player p : getTargetPlayers(sa)) {
|
||||
final Game game = p.getGame();
|
||||
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())
|
||||
continue;
|
||||
|
||||
@@ -69,12 +68,9 @@ public class RevealEffect extends SpellAbilityEffect {
|
||||
|
||||
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")) {
|
||||
for (final Card rem : revealed) {
|
||||
host.addRemembered(rem);
|
||||
|
||||
Reference in New Issue
Block a user