Allure of the Unknown should reveal first

This commit is contained in:
swordshine
2020-01-05 14:09:33 +08:00
parent 58fdd58e9a
commit 3d59f1832c
7 changed files with 27 additions and 15 deletions

View File

@@ -1,6 +1,8 @@
package forge.ai.ability;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import forge.ai.*;
import forge.game.Game;
import forge.game.ability.AbilityUtils;
@@ -157,6 +159,15 @@ public class DigAi extends SpellAbilityAi {
}
}
/* (non-Javadoc)
* @see forge.card.ability.SpellAbilityAi#chooseSinglePlayer(forge.game.player.Player, forge.card.spellability.SpellAbility, java.util.List)
*/
@Override
public Player chooseSinglePlayer(Player ai, SpellAbility sa, Iterable<Player> options) {
// an opponent choose a card from
return Iterables.getFirst(options, null);
}
/* (non-Javadoc)
* @see forge.card.ability.SpellAbilityAi#confirmAction(forge.card.spellability.SpellAbility, forge.game.player.PlayerActionConfirmMode, java.lang.String)
*/

View File

@@ -22,6 +22,7 @@ import forge.game.zone.PlayerZone;
import forge.game.zone.ZoneType;
import forge.util.Lang;
import forge.util.TextUtil;
import forge.util.collect.FCollectionView;
import forge.util.Localizer;
import java.util.*;
@@ -100,13 +101,6 @@ public class DigEffect extends SpellAbilityEffect {
final TargetRestrictions tgt = sa.getTargetRestrictions();
final List<Player> tgtPlayers = getTargetPlayers(sa);
if (sa.hasParam("Choser")) {
final List<Player> choosers = AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("Choser"), sa);
if (!choosers.isEmpty()) {
chooser = choosers.get(0);
}
}
CardZoneTable table = new CardZoneTable();
GameEntityCounterTable counterTable = new GameEntityCounterTable();
for (final Player p : tgtPlayers) {
@@ -165,7 +159,15 @@ public class DigEffect extends SpellAbilityEffect {
host.addRemembered(one);
}
}
if (sa.hasParam("Choser")) {
final FCollectionView<Player> choosers = AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("Choser"), sa);
if (!choosers.isEmpty()) {
chooser = player.getController().chooseSingleEntityForEffect(choosers, sa, "Choser:");
}
if (sa.hasParam("SetChosenPlayer")) {
host.setChosenPlayer(chooser);
}
}
if (!noMove) {
CardCollection movedCards;
rest.addAll(top);

View File

@@ -1,6 +1,6 @@
Name:Animal Magnetism
ManaCost:4 G
Types:Sorcery
A:SP$ Dig | Cost$ 4 G | DigNum$ 5 | Reveal$ True | ChangeNum$ 1 | ChangeValid$ Creature | DestinationZone$ Battlefield | DestinationZone2$ Graveyard | Choser$ Opponent | SpellDescription$ Reveal the top five cards of your library. An opponent chooses a creature card from among them. Put that card onto the battlefield and the rest into your graveyard.
A:SP$ Dig | Cost$ 4 G | DigNum$ 5 | Reveal$ True | ChangeNum$ 1 | ChangeValid$ Creature | DestinationZone$ Battlefield | DestinationZone2$ Graveyard | Choser$ Player.Opponent | SpellDescription$ Reveal the top five cards of your library. An opponent chooses a creature card from among them. Put that card onto the battlefield and the rest into your graveyard.
SVar:Picture:http://www.wizards.com/global/images/magic/general/animal_magnetism.jpg
Oracle:Reveal the top five cards of your library. An opponent chooses a creature card from among them. Put that card onto the battlefield and the rest into your graveyard.

View File

@@ -2,7 +2,7 @@ Name:Karn, Scion of Urza
ManaCost:4
Types:Legendary Planeswalker Karn
Loyalty:5
A:AB$ Dig | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | DigNum$ 2 | Reveal$ True | ChangeNum$ 1 | ChangeValid$ Card | DestinationZone$ Hand | DestinationZone2$ Exile | ExileWithCounter$ SILVER | Choser$ Opponent | SpellDescription$ Reveal the top two cards of your library. An opponent chooses one of them. Put that card into your hand and exile the other with a silver counter on it.
A:AB$ Dig | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | DigNum$ 2 | Reveal$ True | ChangeNum$ 1 | ChangeValid$ Card | DestinationZone$ Hand | DestinationZone2$ Exile | ExileWithCounter$ SILVER | Choser$ Player.Opponent | SpellDescription$ Reveal the top two cards of your library. An opponent chooses one of them. Put that card into your hand and exile the other with a silver counter on it.
A:AB$ ChangeZone | Cost$ SubCounter<1/LOYALTY> | Planeswalker$ True | Hidden$ True | Origin$ Exile | Destination$ Hand | ChangeType$ Card.YouOwn+counters_GE1_SILVER | StackDescription$ SpellDescription | SpellDescription$ Put a card you own with a silver counter on it from exile into your hand.
A:AB$ Token | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | Ultimate$ True | TokenScript$ c_0_0_a_construct_total_artifacts | TokenOwner$ You | LegacyImage$ c 0 0 a construct total artifacts dom | SpellDescription$ Create a 0/0 colorless Construct artifact creature token with "This creature gets +1/+1 for each artifact you control."
SVar:BuffedBy:Artifact

View File

@@ -1,6 +1,6 @@
Name:Murmurs from Beyond
ManaCost:2 U
Types:Instant Arcane
A:SP$ Dig | Cost$ 2 U | DigNum$ 3 | Reveal$ True | ChangeNum$ 1 | ChangeValid$ Card | DestinationZone$ Graveyard | DestinationZone2$ Hand | Choser$ Opponent | SpellDescription$ Reveal the top three cards of your library. An opponent chooses one of them. Put that card into your graveyard and the rest into your hand.
A:SP$ Dig | Cost$ 2 U | DigNum$ 3 | Reveal$ True | ChangeNum$ 1 | ChangeValid$ Card | DestinationZone$ Graveyard | DestinationZone2$ Hand | Choser$ Player.Opponent | SpellDescription$ Reveal the top three cards of your library. An opponent chooses one of them. Put that card into your graveyard and the rest into your hand.
SVar:Picture:http://www.wizards.com/global/images/magic/general/murmurs_from_beyond.jpg
Oracle:Reveal the top three cards of your library. An opponent chooses one of them. Put that card into your graveyard and the rest into your hand.

View File

@@ -1,7 +1,7 @@
Name:Phyrexian Portal
ManaCost:3
Types:Artifact
A:AB$ Dig | Cost$ 3 | DigNum$ 10 | RememberRevealed$ True | NoMove$ True | Choser$ Opponent | ConditionCheckSVar$ X | ConditionSVarCompare$ GE10 | SubAbility$ DBTwoPiles | SpellDescription$ If your library has ten or more cards in it, target opponent looks at the top ten cards of your library and separates them into two face-down piles. Exile one of those piles. Search the other pile for a card, put it into your hand, then shuffle the rest of that pile into your library. | StackDescription$ If your library has ten or more cards in it, target opponent looks at the top ten cards of your library and separates them into two face-down piles. Exile one of those piles. Search the other pile for a card, put it into your hand, then shuffle the rest of that pile into your library.
A:AB$ Dig | Cost$ 3 | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | DigNum$ 10 | RememberRevealed$ True | NoMove$ True | Choser$ Targeted | ConditionCheckSVar$ X | ConditionSVarCompare$ GE10 | SubAbility$ DBTwoPiles | SpellDescription$ If your library has ten or more cards in it, target opponent looks at the top ten cards of your library and separates them into two face-down piles. Exile one of those piles. Search the other pile for a card, put it into your hand, then shuffle the rest of that pile into your library. | StackDescription$ If your library has ten or more cards in it, target opponent looks at the top ten cards of your library and separates them into two face-down piles. Exile one of those piles. Search the other pile for a card, put it into your hand, then shuffle the rest of that pile into your library.
SVar:DBTwoPiles:DB$ TwoPiles | Defined$ You | DefinedCards$ Remembered | Separator$ Opponent | FaceDown$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE10 | ChosenPile$ DBHand | UnchosenPile$ DBExile | SubAbility$ DBCleanup
SVar:DBHand:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Hand | ChangeType$ Card | ChangeNum$ 1 | ChooseFromDefined$ True | Mandatory$ True | Shuffle$ True
SVar:DBExile:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Exile

View File

@@ -1,8 +1,7 @@
Name:Allure of the Unknown
ManaCost:3 B R
Types:Sorcery
A:SP$ ChoosePlayer | Cost$ 3 B R | Defined$ You | Choices$ Player.Opponent | SubAbility$ DBDig | ChoiceTitle$ Choose an opponent | SpellDescription$ Reveal the top six cards of your library. An opponent exiles a nonland card from among them, then you put the rest into your hand. That opponent may cast the exiled card without paying its mana cost. | StackDescription$ SpellDescription
SVar:DBDig:DB$ Dig | DigNum$ 6 | Reveal$ True | Choser$ Player.Chosen | ChangeNum$ 1 | ChangeValid$ Card.nonLand | AILogic$ BestCard | DestinationZone$ Exile | DestinationZone2$ Hand | RememberChanged$ True | SubAbility$ DBPlay
A:SP$ Dig | Cost$ 3 B R | DigNum$ 6 | Reveal$ True | Choser$ Player.Opponent | SetChosenPlayer$ True | ChangeNum$ 1 | ChangeValid$ Card.nonLand | AILogic$ BestCard | DestinationZone$ Exile | DestinationZone2$ Hand | RememberChanged$ True | SpellDescription$ Reveal the top six cards of your library. An opponent exiles a nonland card from among them, then you put the rest into your hand. That opponent may cast the exiled card without paying its mana cost. | StackDescription$ SpellDescription | SubAbility$ DBPlay
SVar:DBPlay:DB$ Play | WithoutManaCost$ True | Controller$ Player.Chosen | Optional$ True | OptionalDecider$ Player.Chosen | ValidZone$ Exile | Valid$ Card.IsRemembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearChosenPlayer$ True
Oracle:Reveal the top six cards of your library. An opponent exiles a nonland card from among them, then you put the rest into your hand. That opponent may cast the exiled card without paying its mana cost.