Merge pull request #1847 from Northmoc/bro_anchor

BRO: The Temporal Anchor and support
This commit is contained in:
Paul Hammerton
2022-11-10 18:10:02 +00:00
committed by GitHub
6 changed files with 32 additions and 5 deletions

View File

@@ -2343,6 +2343,7 @@ public class GameAction {
// set up triggers (but not actually do them until later)
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromPlayer(p);
runParams.put(AbilityKey.ScryNum, numLookedAt);
runParams.put(AbilityKey.ScryBottom, toBottom.size());
game.getTriggerHandler().runTrigger(TriggerType.Scry, runParams, false);
}
}

View File

@@ -112,6 +112,7 @@ public enum AbilityKey {
Result("Result"),
RoomName("RoomName"),
Scheme("Scheme"),
ScryBottom("ScryBottom"),
ScryNum("ScryNum"),
Sides("Sides"),
Source("Source"),

View File

@@ -184,11 +184,15 @@ public class DigEffect extends SpellAbilityEffect {
}
final CardCollection top = 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++) {
top.add(sourceZone.get(i));
top.add(all.get(i));
}
if (!top.isEmpty()) {

View File

@@ -58,13 +58,20 @@ public class TriggerScry extends Trigger {
return false;
}
if (hasParam("ToBottom")) {
Integer numBottom = (Integer) runParams.get(AbilityKey.ScryBottom);
if (numBottom <= 0) {
return false;
}
}
return true;
}
/** {@inheritDoc} */
@Override
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

View File

@@ -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: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: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
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.

View 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.