mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Slowtrips finally slayed.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
Name:Arcane Denial
|
||||
ManaCost:1 U
|
||||
Types:Instant
|
||||
A:SP$ Counter | Cost$ 1 U | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | SubAbility$ DBDraw | SpellDescription$ Counter target spell. Its controller may draw up to two cards at the beginning of the next turn's upkeep. You draw a card at the beginning of the next turn's upkeep.
|
||||
SVar:DBDraw:DB$Draw | NumCards$ 2 | NextUpkeep$ True | Defined$ TargetedController | OptionalDecider$ True | SubAbility$ DBDraw2
|
||||
SVar:DBDraw2:DB$Draw | NumCards$ 1 | NextUpkeep$ True | Defined$ You
|
||||
A:SP$ Counter | Cost$ 1 U | TargetType$ Spell | TgtPrompt$ Select target spell | RememberCountered$ True | ValidTgts$ Card | SubAbility$ DelTrigSlowtrip | SpellDescription$ Counter target spell. Its controller may draw up to two cards at the beginning of the next turn's upkeep. You draw a card at the beginning of the next turn's upkeep.
|
||||
SVar:DelTrigSlowtrip:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowtrip | SubAbility$ DelTrigDrawTwo | TriggerDescription$ Draw a card.
|
||||
SVar:DrawSlowtrip:DB$Draw | NumCards$ 1 | Defined$ You
|
||||
SVar:DelTrigDrawTwo:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawTwo | TriggerDescription$ Draw up to two card.
|
||||
SVar:DrawTwo:DB$Draw | NumCards$ 2 | Defined$ RememberedController | OptionalDecider$ True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/arcane_denial.jpg
|
||||
Oracle:Counter target spell. Its controller may draw up to two cards at the beginning of the next turn's upkeep.\nYou draw a card at the beginning of the next turn's upkeep.
|
||||
SetInfo:ALL Common x2
|
||||
@@ -3,8 +3,9 @@ ManaCost:1 U
|
||||
Types:Instant
|
||||
A:SP$ NameCard | Cost$ 1 U | Defined$ You | SubAbility$ DBMill | SpellDescription$ Name a card, then put the top card of target opponent's library into his or her graveyard. If that card is the named card, you draw a card. Draw a card at the beginning of the next turn's upkeep.
|
||||
SVar:DBMill:DB$ Mill | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | NumCards$ 1 | RememberMilled$ True | SubAbility$ DBDraw
|
||||
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBSlowDraw | References$ X
|
||||
SVar:DBSlowDraw:DB$ Draw | Defined$ You | NextUpkeep$ True | NumCards$ 1
|
||||
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DelTrigSlowtrip | References$ X
|
||||
SVar:DelTrigSlowtrip:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowtrip | TriggerDescription$ Draw a card.
|
||||
SVar:DrawSlowtrip:DB$Draw | NumCards$ 1 | Defined$ You
|
||||
SVar:X:Remembered$Valid Card.NamedCard
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/foreshadow.jpg
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
Name:Library of Lat-Nam
|
||||
ManaCost:4 U
|
||||
Types:Sorcery
|
||||
A:SP$ Charm | Cost$ 4 U | Chooser$ Opponent | Choices$ SlowDraw,Tutor | SpellDescription$ An opponent chooses one - You draw three cards at the beginning of the next turn's upkeep; or you search your library for a card, put that card into your hand, then shuffle your library.
|
||||
SVar:SlowDraw:DB$ Draw | NumCards$ 3 | Defined$ You | NextUpkeep$ True | SpellDescription$ You draw three cards at the beginning of the next turn's upkeep
|
||||
A:SP$ Charm | Cost$ 4 U | Chooser$ Opponent | Choices$ DelTrigSlowDraw,Tutor | SpellDescription$ An opponent chooses one - You draw three cards at the beginning of the next turn's upkeep; or you search your library for a card, put that card into your hand, then shuffle your library.
|
||||
SVar:DelTrigSlowDraw:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowThree | SpellDescription$ You draw three cards at the beginning of the next turn's upkeep
|
||||
SVar:DrawSlowThree:DB$Draw | NumCards$ 3 | Defined$ You
|
||||
SVar:Tutor:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Card | ChangeNum$ 1 | Mandatory$ True | SpellDescription$ You search your library for a card, put that card into your hand, then shuffle your library.
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/library_of_lat_nam.jpg
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
Name:Lodestone Bauble
|
||||
ManaCost:0
|
||||
Types:Artifact
|
||||
A:AB$ ChangeZone | Cost$ 1 T Sac<1/CARDNAME> | TargetMin$ 0 | TargetMax$ 4 | TargetsFromSingleZone$ True | Origin$ Graveyard | Destination$ Library | LibraryPosition$ 0 | TgtPrompt$ Choose target basic land card in a graveyard | ValidTgts$ Land.Basic | SubAbility$ DBDraw | SpellDescription$ Put up to four target basic land cards from a player's graveyard on top of his or her library in any order. That player draws a card at the beginning of the next turn's upkeep.
|
||||
SVar:DBDraw:DB$ Draw | NumCards$ 1 | NextUpkeep$ True | Defined$ TargetedController
|
||||
A:AB$ ChangeZone | Cost$ 1 T Sac<1/CARDNAME> | TargetMin$ 0 | TargetMax$ 4 | TargetsFromSingleZone$ True | Origin$ Graveyard | Destination$ Library | LibraryPosition$ 0 | TgtPrompt$ Choose target basic land card in a graveyard | ValidTgts$ Land.Basic | SubAbility$ DelTrigSlowtrip | SpellDescription$ Put up to four target basic land cards from a player's graveyard on top of his or her library in any order. That player draws a card at the beginning of the next turn's upkeep.
|
||||
SVar:DelTrigSlowtrip:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowtrip | TriggerDescription$ Draw a card.
|
||||
SVar:DrawSlowtrip:DB$Draw | NumCards$ 1 | Defined$ You
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/lodestone_bauble.jpg
|
||||
Oracle:{1}, {T}, Sacrifice Lodestone Bauble: Put up to four target basic land cards from a player's graveyard on top of his or her library in any order. That player draws a card at the beginning of the next turn's upkeep.
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
Name:Sapphire Charm
|
||||
ManaCost:U
|
||||
Types:Instant
|
||||
A:SP$ Charm | Cost$ U | Choices$ Draw,Pump,Phases | CharmNum$ 1 | SpellDescription$ Choose one - Target player draws a card at the beginning of the next turn's upkeep; or target creature gains flying until end of turn; or target creature an opponent controls phases out.
|
||||
SVar:Draw:DB$ Draw | ValidTgts$ Player | TgtPrompt$ Select target player | NumCards$ 1 | NextUpkeep$ True | SpellDescription$ Target player draws a card at the beginning of the next turn's upkeep.
|
||||
A:SP$ Charm | Cost$ U | Choices$ DelTrigSlowtrip,Pump,Phases | CharmNum$ 1 | SpellDescription$ Choose one - Target player draws a card at the beginning of the next turn's upkeep; or target creature gains flying until end of turn; or target creature an opponent controls phases out.
|
||||
SVar:DelTrigSlowtrip:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidTgts$ Player | RememberObjects$ Targeted | TgtPrompt$ Select target player | Execute$ DrawSlowtrip | TriggerDescription$ Target player draws a card at the beginning of the next turn's upkeep
|
||||
SVar:DrawSlowtrip:DB$Draw | NumCards$ 1 | Defined$ Remembered | SpellDescription$ Draw a card.
|
||||
SVar:Pump:DB$ Pump | ValidTgts$ Creature | KW$ Flying | TgtPrompt$ Select target creature | SpellDescription$ Target creature gains flying until end of turn.
|
||||
SVar:Phases:DB$ Phases | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | SpellDescription$ Target creature an opponent controls phases out.
|
||||
SVar:RemAIDeck:True
|
||||
|
||||
@@ -2,9 +2,10 @@ Name:Thermal Flux
|
||||
ManaCost:U
|
||||
Types:Instant
|
||||
A:SP$ Charm | Cost$ U | Choices$ ChooseFreeze,ChooseThaw | Defined$ You | SpellDescription$ Choose one - Target nonsnow permanent becomes snow until end of turn; or target snow permanent isn't snow until end of turn. Draw a card at the beginning of the next turn's upkeep.
|
||||
SVar:ChooseFreeze:DB$ Animate | ValidTgts$ Permanent.nonSnow | TgtPrompt$ Select target nonsnow permanent | Types$ Snow | SubAbility$ ThermalDraw | SpellDescription$ Target nonsnow permanent becomes snow until end of turn.
|
||||
SVar:ChooseThaw:DB$ Animate | ValidTgts$ Permanent.Snow | TgtPrompt$ Select target snow permanent | RemoveTypes$ Snow | SubAbility$ ThermalDraw | SpellDescription$ Target snow permanent isn't snow until end of turn.
|
||||
SVar:ThermalDraw:DB$ Draw | NumCards$ 1 | NextUpkeep$ True
|
||||
SVar:ChooseFreeze:DB$ Animate | ValidTgts$ Permanent.nonSnow | TgtPrompt$ Select target nonsnow permanent | Types$ Snow | SubAbility$ DelTrigSlowtrip | SpellDescription$ Target nonsnow permanent becomes snow until end of turn. Draw a card at the beginning of the next turn's upkeep.
|
||||
SVar:ChooseThaw:DB$ Animate | ValidTgts$ Permanent.Snow | TgtPrompt$ Select target snow permanent | RemoveTypes$ Snow | SubAbility$ DelTrigSlowtrip | SpellDescription$ Target snow permanent isn't snow until end of turn. Draw a card at the beginning of the next turn's upkeep.
|
||||
SVar:DelTrigSlowtrip:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowtrip | TriggerDescription$ Draw a card.
|
||||
SVar:DrawSlowtrip:DB$Draw | NumCards$ 1 | Defined$ You
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/thermal_flux.jpg
|
||||
Oracle:Choose one - Target nonsnow permanent becomes snow until end of turn; or target snow permanent isn't snow until end of turn.\nDraw a card at the beginning of the next turn's upkeep.
|
||||
|
||||
@@ -3,6 +3,7 @@ package forge.card.ability.effects;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import forge.card.ability.AbilityUtils;
|
||||
import forge.card.ability.SpellAbilityEffect;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.trigger.Trigger;
|
||||
@@ -37,6 +38,19 @@ public class DelayedTriggerEffect extends SpellAbilityEffect {
|
||||
mapParams.remove("SpellDescription");
|
||||
}
|
||||
|
||||
String triggerRemembered = null;
|
||||
|
||||
// Set Remembered
|
||||
if (sa.hasParam("RememberObjects")) {
|
||||
triggerRemembered = sa.getParam("RememberObjects");
|
||||
}
|
||||
|
||||
if (triggerRemembered != null) {
|
||||
for (final Object o : AbilityUtils.getDefinedObjects(sa.getSourceCard(), triggerRemembered, sa)) {
|
||||
sa.getSourceCard().addRemembered(o);
|
||||
}
|
||||
}
|
||||
|
||||
final Trigger delTrig = TriggerHandler.parseTrigger(mapParams, sa.getSourceCard(), true);
|
||||
|
||||
sa.getActivatingPlayer().getGame().getTriggerHandler().registerDelayedTrigger(delTrig);
|
||||
|
||||
@@ -74,10 +74,6 @@ public class DrawEffect extends SpellAbilityEffect {
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("Do you want to draw ").append(numCards).append(" cards(s)");
|
||||
|
||||
if (slowDraw) {
|
||||
sb.append(" next upkeep");
|
||||
}
|
||||
|
||||
sb.append("?");
|
||||
|
||||
if (!GuiDialog.confirm(sa.getSourceCard(), sb.toString())) {
|
||||
@@ -85,11 +81,9 @@ public class DrawEffect extends SpellAbilityEffect {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: remove this deprecation exception
|
||||
if (slowDraw) {
|
||||
for (int i = 0; i < numCards; i++) {
|
||||
p.addSlowtripList(source);
|
||||
}
|
||||
throw new RuntimeException("This api option is no longer supported. Please file a bug report with the card that threw this error.");
|
||||
} else {
|
||||
final List<Card> drawn = p.drawCards(numCards);
|
||||
if (sa.hasParam("Reveal")) {
|
||||
|
||||
@@ -348,11 +348,6 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
||||
|
||||
case UPKEEP:
|
||||
if (this.getPlayerTurn().hasKeyword("Skip your upkeep step.")) {
|
||||
// Slowtrips all say "on the next turn's upkeep" if there is no
|
||||
// upkeep next turn, the trigger will never occur.
|
||||
for (Player p : game.getPlayers()) {
|
||||
p.clearSlowtripList();
|
||||
}
|
||||
this.setPlayersPriorityPermission(false);
|
||||
} else {
|
||||
this.nUpkeepsThisTurn++;
|
||||
|
||||
@@ -84,7 +84,6 @@ public class Upkeep extends Phase {
|
||||
game.getStack().freezeStack();
|
||||
Upkeep.upkeepBraidOfFire(game);
|
||||
|
||||
Upkeep.upkeepSlowtrips(game); // for "Draw a card at the beginning of the next turn's upkeep."
|
||||
Upkeep.upkeepUpkeepCost(game); // sacrifice unless upkeep cost is paid
|
||||
Upkeep.upkeepEcho(game);
|
||||
|
||||
@@ -202,47 +201,6 @@ public class Upkeep extends Phase {
|
||||
}
|
||||
} // echo
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* upkeepSlowtrips. Draw a card at the beginning of the next turn's upkeep.
|
||||
* </p>
|
||||
*/
|
||||
private static void upkeepSlowtrips(final GameState game) {
|
||||
Player turnOwner = game.getPhaseHandler().getPlayerTurn();
|
||||
|
||||
// does order matter here?
|
||||
drawForSlowtrips(turnOwner, game);
|
||||
for (Player p : game.getPlayers()) {
|
||||
if (p == turnOwner) {
|
||||
continue;
|
||||
}
|
||||
drawForSlowtrips(p, game);
|
||||
}
|
||||
}
|
||||
|
||||
public static void drawForSlowtrips(final Player player, final GameState game) {
|
||||
List<Card> list = player.getSlowtripList();
|
||||
|
||||
for (Card card : list) {
|
||||
// otherwise another slowtrip gets added
|
||||
card.removeIntrinsicKeyword("Draw a card at the beginning of the next turn's upkeep.");
|
||||
|
||||
final Ability slowtrip = new Ability(card, ManaCost.ZERO) {
|
||||
@Override
|
||||
public void resolve() {
|
||||
player.drawCard();
|
||||
}
|
||||
};
|
||||
slowtrip.setStackDescription(card + " - Draw a card.");
|
||||
slowtrip.setDescription(card + " - Draw a card.");
|
||||
slowtrip.setActivatingPlayer(player);
|
||||
|
||||
game.getStack().addSimultaneousStackEntry(slowtrip);
|
||||
|
||||
}
|
||||
player.clearSlowtripList();
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* upkeepUpkeepCost.
|
||||
|
||||
@@ -134,9 +134,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
/** The num discarded this turn. */
|
||||
private int numDiscardedThisTurn = 0;
|
||||
|
||||
/** The slowtrip list. */
|
||||
private List<Card> slowtripList = new ArrayList<Card>();
|
||||
|
||||
/** A list of tokens not in play, but on their way.
|
||||
* This list is kept in order to not break ETB-replacement
|
||||
* on tokens. */
|
||||
@@ -1948,38 +1945,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
return old;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>slowtripList</code>.
|
||||
* </p>
|
||||
*
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
public final List<Card> getSlowtripList() {
|
||||
return this.slowtripList;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* clearSlowtripList.
|
||||
* </p>
|
||||
*/
|
||||
public final void clearSlowtripList() {
|
||||
this.slowtripList.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* addSlowtripList.
|
||||
* </p>
|
||||
*
|
||||
* @param card
|
||||
* a {@link forge.Card} object.
|
||||
*/
|
||||
public final void addSlowtripList(final Card card) {
|
||||
this.slowtripList.add(card);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* getTurn.
|
||||
|
||||
Reference in New Issue
Block a user