mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Merge pull request #1847 from Northmoc/bro_anchor
BRO: The Temporal Anchor and support
This commit is contained in:
@@ -2343,6 +2343,7 @@ public class GameAction {
|
|||||||
// set up triggers (but not actually do them until later)
|
// set up triggers (but not actually do them until later)
|
||||||
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromPlayer(p);
|
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromPlayer(p);
|
||||||
runParams.put(AbilityKey.ScryNum, numLookedAt);
|
runParams.put(AbilityKey.ScryNum, numLookedAt);
|
||||||
|
runParams.put(AbilityKey.ScryBottom, toBottom.size());
|
||||||
game.getTriggerHandler().runTrigger(TriggerType.Scry, runParams, false);
|
game.getTriggerHandler().runTrigger(TriggerType.Scry, runParams, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ public enum AbilityKey {
|
|||||||
Result("Result"),
|
Result("Result"),
|
||||||
RoomName("RoomName"),
|
RoomName("RoomName"),
|
||||||
Scheme("Scheme"),
|
Scheme("Scheme"),
|
||||||
|
ScryBottom("ScryBottom"),
|
||||||
ScryNum("ScryNum"),
|
ScryNum("ScryNum"),
|
||||||
Sides("Sides"),
|
Sides("Sides"),
|
||||||
Source("Source"),
|
Source("Source"),
|
||||||
|
|||||||
@@ -184,11 +184,15 @@ public class DigEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
final CardCollection top = new CardCollection();
|
final CardCollection top = new CardCollection();
|
||||||
final CardCollection rest = new CardCollection();
|
final CardCollection rest = new CardCollection();
|
||||||
final PlayerZone sourceZone = p.getZone(srcZone);
|
CardCollection all = new CardCollection(p.getCardsIn(srcZone));
|
||||||
|
|
||||||
int numToDig = Math.min(digNum, sourceZone.size());
|
if (sa.hasParam("FromBottom")) {
|
||||||
|
Collections.reverse(all);
|
||||||
|
}
|
||||||
|
|
||||||
|
int numToDig = Math.min(digNum, all.size());
|
||||||
for (int i = 0; i < numToDig; i++) {
|
for (int i = 0; i < numToDig; i++) {
|
||||||
top.add(sourceZone.get(i));
|
top.add(all.get(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!top.isEmpty()) {
|
if (!top.isEmpty()) {
|
||||||
|
|||||||
@@ -58,13 +58,20 @@ public class TriggerScry extends Trigger {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hasParam("ToBottom")) {
|
||||||
|
Integer numBottom = (Integer) runParams.get(AbilityKey.ScryBottom);
|
||||||
|
if (numBottom <= 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public final void setTriggeringObjects(final SpellAbility sa, Map<AbilityKey, Object> runParams) {
|
public final void setTriggeringObjects(final SpellAbility sa, Map<AbilityKey, Object> runParams) {
|
||||||
sa.setTriggeringObjectsFrom(runParams, AbilityKey.Player, AbilityKey.ScryNum);
|
sa.setTriggeringObjectsFrom(runParams, AbilityKey.Player, AbilityKey.ScryNum, AbilityKey.ScryBottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ SVar:DBChooseCard:DB$ ChooseCard | Defined$ You | Choices$ Creature.RememberedPl
|
|||||||
SVar:DBExile:DB$ ChangeZoneAll | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card.IsRemembered
|
SVar:DBExile:DB$ ChangeZoneAll | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card.IsRemembered
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearChosenCard$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearChosenCard$ True
|
||||||
SVar:DBEffect:DB$ Effect | StaticAbilities$ PlayExile | SpellDescription$ Until end of turn, you may cast spells from among cards exiled with CARDNAME, and you may spend mana as though it were mana of any color to cast those spells.
|
SVar:DBEffect:DB$ Effect | StaticAbilities$ PlayExile | SpellDescription$ Until end of turn, you may cast spells from among cards exiled with CARDNAME, and you may spend mana as though it were mana of any color to cast those spells.
|
||||||
SVar:PlayExile:Mode$ Continuous | MayPlayIgnoreType$ True | MayPlayIgnoreColor$ True | MayPlay$ True | Affected$ Card.ExiledWithEffectSource+nonLand | AffectedZone$ Exile | Description$ You may play cards exiled with EFFECTSOURCE, and you may spend mana as though it were mana of any color to cast those spells.
|
SVar:PlayExile:Mode$ Continuous | MayPlayIgnoreType$ True | MayPlayIgnoreColor$ True | MayPlay$ True | Affected$ Card.ExiledWithEffectSource+nonLand | AffectedZone$ Exile | Description$ Until end of turn, you may cast spells from among cards exiled with EFFECTSOURCE, and you may spend mana as though it were mana of any color to cast those spells.
|
||||||
DeckHas:Ability$Mill
|
DeckHas:Ability$Mill
|
||||||
Oracle:(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)\nI — Each player mills four cards. Then you may exile a creature or planeswalker card from each graveyard.\nII, III — Until end of turn, you may cast spells from among cards exiled with King Narfi's Betrayal, and you may spend mana as though it were mana of any color to cast those spells.
|
Oracle:(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)\nI — Each player mills four cards. Then you may exile a creature or planeswalker card from each graveyard.\nII, III — Until end of turn, you may cast spells from among cards exiled with King Narfi's Betrayal, and you may spend mana as though it were mana of any color to cast those spells.
|
||||||
|
|||||||
14
forge-gui/res/cardsfolder/upcoming/the_temporal_anchor.txt
Normal file
14
forge-gui/res/cardsfolder/upcoming/the_temporal_anchor.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Name:The Temporal Anchor
|
||||||
|
ManaCost:3 U U U
|
||||||
|
Types:Legendary Artifact
|
||||||
|
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigScry | TriggerDescription$ At the beginning of your upkeep, scry 2.
|
||||||
|
SVar:TrigScry:DB$ Scry | ScryNum$ 2
|
||||||
|
T:Mode$ Scry | ValidPlayer$ You | ToBottom$ True | Execute$ TrigExile | TriggerDescription$ Whenever you choose to put one or more cards on the bottom of your library while scrying, exile that many cards from the bottom of your library.
|
||||||
|
SVar:TrigExile:DB$ Dig | DigNum$ X | ChangeNum$ All | FromBottom$ True | DestinationZone$ Exile | RememberChanged$ True
|
||||||
|
SVar:X:TriggerCount$ScryBottom
|
||||||
|
S:Mode$ Continuous | Condition$ PlayerTurn | MayPlay$ True | Affected$ Card.ExiledWithSource+IsRemembered | AffectedZone$ Exile | Description$ During your turn, you may play cards exiled with CARDNAME.
|
||||||
|
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ DBCleanup | Static$ True
|
||||||
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget
|
||||||
|
SVar:DBForget:DB$ Pump | ForgetObjects$ TriggeredCard
|
||||||
|
Oracle:At the beginning of your upkeep, scry 2.\nWhenever you choose to put one or more cards on the bottom of your library while scrying, exile that many cards from the bottom of your library.\nDuring your turn, you may play cards exiled with The Temporal Anchor.
|
||||||
Reference in New Issue
Block a user