mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
LCI – ReplaceExplore cards and support
This commit is contained in:
@@ -14,6 +14,8 @@ import forge.game.card.CardCollection;
|
||||
import forge.game.card.CardZoneTable;
|
||||
import forge.game.card.CounterEnumType;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.replacement.ReplacementResult;
|
||||
import forge.game.replacement.ReplacementType;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.trigger.TriggerType;
|
||||
import forge.game.zone.Zone;
|
||||
@@ -53,6 +55,11 @@ public class ExploreEffect extends SpellAbilityEffect {
|
||||
moveParams.put(AbilityKey.LastStateBattlefield, sa.getLastStateBattlefield());
|
||||
moveParams.put(AbilityKey.LastStateGraveyard, sa.getLastStateGraveyard());
|
||||
for (final Card c : getTargetCards(sa)) {
|
||||
|
||||
if (game.getReplacementHandler().run(ReplacementType.Explore, AbilityKey.mapFromAffected(c)) != ReplacementResult.NotReplaced) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// revealed land card
|
||||
boolean revealedLand = false;
|
||||
final Player pl = c.getController();
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package forge.game.replacement;
|
||||
|
||||
import forge.game.ability.AbilityKey;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class ReplaceExplore extends ReplacementEffect {
|
||||
|
||||
public ReplaceExplore(final Map<String, String> params, final Card host, final boolean intrinsic) {
|
||||
super(params, host, intrinsic);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReplace(Map<AbilityKey, Object> runParams) {
|
||||
if (!matchesValidParam("ValidExplorer", runParams.get(AbilityKey.Affected))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReplacingObjects(Map<AbilityKey, Object> runParams, SpellAbility sa) {
|
||||
sa.setReplacingObject(AbilityKey.Card, runParams.get(AbilityKey.Affected));
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ public enum ReplacementType {
|
||||
Discard(ReplaceDiscard.class),
|
||||
Draw(ReplaceDraw.class),
|
||||
DrawCards(ReplaceDrawCards.class),
|
||||
Explore(ReplaceExplore.class),
|
||||
GainLife(ReplaceGainLife.class),
|
||||
GameLoss(ReplaceGameLoss.class),
|
||||
Learn(ReplaceLearn.class),
|
||||
|
||||
11
forge-gui/res/cardsfolder/upcoming/topography_tracker.txt
Normal file
11
forge-gui/res/cardsfolder/upcoming/topography_tracker.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Topography Tracker
|
||||
ManaCost:2 G
|
||||
Types:Creature Merfolk Scout
|
||||
PT:2/2
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, create a Map token. (It's an artifact with "{1}, {T}, Sacrifice this artifact: Target creature you control explores. Activate only as a sorcery.")
|
||||
SVar:TrigToken:DB$ Token | TokenScript$ c_a_map_sac_explore
|
||||
R:Event$ Explore | ValidExplorer$ Creature.YouCtrl | ReplaceWith$ Explore1 | Description$ If a creature you control would explore, instead it explores, then it explores again.
|
||||
SVar:Explore1:DB$ Explore | Defined$ ReplacedCard | SubAbility$ Explore2
|
||||
SVar:Explore2:DB$ Explore | Defined$ ReplacedCard
|
||||
DeckHas:Ability$Token|Sacrifice & Type$Map|Artifact
|
||||
Oracle:When Topography Tracker enters the battlefield, create a Map token. (It's an artifact with "{1}, {T}, Sacrifice this artifact: Target creature you control explores. Activate only as a sorcery.")\nIf a creature you control would explore, instead it explores, then it explores again.
|
||||
@@ -0,0 +1,21 @@
|
||||
Name:Twists and Turns
|
||||
ManaCost:G
|
||||
Types:Enchantment
|
||||
R:Event$ Explore | ValidExplorer$ Creature.YouCtrl | ReplaceWith$ DBScry | Description$ If a creature you control would explore, instead you scry 1, then that creature explores.
|
||||
SVar:DBScry:DB$ Scry | SubAbility$ DBExplore
|
||||
SVar:DBExplore:DB$ Explore | Defined$ ReplacedCard
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExplore | TriggerDescription$ When CARDNAME enters the battlefield, target creature you control explores.
|
||||
SVar:TrigExplore:DB$ Explore | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl | TriggerZones$ Battlefield | CheckSVar$ Count$Valid Land.YouCtrl | SVarCompare$ GE7 | Execute$ TrigTransform | TriggerDescription$ When a land enters the battlefield under your control, if you control seven or more lands, transform CARDNAME.
|
||||
SVar:TrigTransform:DB$ SetState | Mode$ Transform
|
||||
AlternateMode:DoubleFaced
|
||||
Oracle:If a creature you control would explore, instead you scry 1, then that creature explores.\nWhen Twists and Turns enters the battlefield, target creature you control explores.\nWhen a land enters the battlefield under your control, if you control seven or more lands, transform Twists and Turns.
|
||||
|
||||
ALTERNATE
|
||||
|
||||
Name:Mycoid Maze
|
||||
ManaCost:no cost
|
||||
Types:Land Cave
|
||||
A:AB$ Mana | Cost$ T | Produced$ G | SpellDescription$ Add {G}.
|
||||
A:AB$ Dig | Cost$ 3 G T | ForceRevealToController$ True | DigNum$ 4 | ChangeNum$ 1 | Optional$ True | ChangeValid$ Creature | RestRandomOrder$ True | SpellDescription$ Look at the top four cards of your library. You may reveal a creature card from among them and put them into your hand. Put the rest on the bottom of your library in a random order.
|
||||
Oracle:(Transforms from Twists and Turns.)\n{T}: Add {G}.\n{3}{G}, {T}: Look at the top four cards of your library. You may reveal a creature card from among them and put that card into your hand. Put the rest on the bottom of your library in a random order.
|
||||
@@ -1,5 +1,5 @@
|
||||
Name:Map Token
|
||||
ManaCost:no cost
|
||||
Types:Artifact Treasure
|
||||
A:AB$ Explore | Cost$ 1 T Sac<1/CARDNAME/this artifact> | TgtPrompt Select target creature you control | ValidTgts$ Creature.YouCtrl | SorcerySpeed$ True | SpellDescription$ Target creature you control explores. Activate only as a sorcery. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on that creature, then put the card back or put it into your graveyard.)."
|
||||
Oracle:{1}, {T}, Sacrifice this artifact: Target creature you control explores. Activate only as a sorcery. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on that creature, then put the card back or put it into your graveyard.)."
|
||||
A:AB$ Explore | Cost$ 1 T Sac<1/CARDNAME/this artifact> | TgtPrompt$ Select target creature you control | ValidTgts$ Creature.YouCtrl | SorcerySpeed$ True | SpellDescription$ Target creature you control explores. Activate only as a sorcery. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on that creature, then put the card back or put it into your graveyard.)
|
||||
Oracle:{1}, {T}, Sacrifice this artifact: Target creature you control explores. Activate only as a sorcery. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on that creature, then put the card back or put it into your graveyard.)
|
||||
|
||||
Reference in New Issue
Block a user