mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Rework Shared Fate (#8215)
This commit is contained in:
@@ -1191,6 +1191,8 @@ public class AbilityUtils {
|
|||||||
if (sa.getHostCard().wasCast()) {
|
if (sa.getHostCard().wasCast()) {
|
||||||
players.add((sa.getHostCard().getCastSA().getActivatingPlayer()));
|
players.add((sa.getHostCard().getCastSA().getActivatingPlayer()));
|
||||||
}
|
}
|
||||||
|
} else if (defined.equals("Exiler")) {
|
||||||
|
players.add(card.getExiledBy());
|
||||||
} else if (defined.equals("ActivePlayer")) {
|
} else if (defined.equals("ActivePlayer")) {
|
||||||
players.add(game.getPhaseHandler().getPlayerTurn());
|
players.add(game.getPhaseHandler().getPlayerTurn());
|
||||||
} else if (defined.equals("You")) {
|
} else if (defined.equals("You")) {
|
||||||
|
|||||||
@@ -1355,9 +1355,6 @@ public class CardFactoryUtil {
|
|||||||
final String[] k = keyword.split(":");
|
final String[] k = keyword.split(":");
|
||||||
String n = k[1];
|
String n = k[1];
|
||||||
|
|
||||||
// The exiled card gains ‘Any player who has controlled the permanent that exiled this card may look at this card in the exile zone.’
|
|
||||||
// this is currently not possible because the StaticAbility currently has no information about the OriginalHost
|
|
||||||
|
|
||||||
List<Trigger> triggers = Lists.newArrayList();
|
List<Trigger> triggers = Lists.newArrayList();
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Secondary$ True | ");
|
sb.append("Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Secondary$ True | ");
|
||||||
|
|||||||
@@ -466,10 +466,12 @@ public final class StaticAbilityContinuous {
|
|||||||
if (params.containsKey("MayLookAt")) {
|
if (params.containsKey("MayLookAt")) {
|
||||||
String look = params.get("MayLookAt");
|
String look = params.get("MayLookAt");
|
||||||
if ("True".equals(look)) {
|
if ("True".equals(look)) {
|
||||||
look = "You";
|
// shortcut when combined with MayPlay
|
||||||
}
|
mayLookAt = new PlayerCollection();
|
||||||
|
} else {
|
||||||
mayLookAt = AbilityUtils.getDefinedPlayers(hostCard, look, stAb);
|
mayLookAt = AbilityUtils.getDefinedPlayers(hostCard, look, stAb);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (params.containsKey("MayPlay")) {
|
if (params.containsKey("MayPlay")) {
|
||||||
controllerMayPlay = true;
|
controllerMayPlay = true;
|
||||||
if (params.containsKey("MayPlayWithoutManaCost")) {
|
if (params.containsKey("MayPlayWithoutManaCost")) {
|
||||||
@@ -870,10 +872,6 @@ public final class StaticAbilityContinuous {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mayLookAt != null && (!affectedCard.getOwner().getTopXCardsFromLibrary(1).contains(affectedCard) || game.getTopLibForPlayer(affectedCard.getOwner()) == null || game.getTopLibForPlayer(affectedCard.getOwner()) == affectedCard)) {
|
|
||||||
affectedCard.addMayLookAt(se.getTimestamp(), mayLookAt);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (controllerMayPlay && (mayPlayLimit == null || stAb.getMayPlayTurn() < mayPlayLimit)) {
|
if (controllerMayPlay && (mayPlayLimit == null || stAb.getMayPlayTurn() < mayPlayLimit)) {
|
||||||
String mayPlayAltCost = mayPlayAltManaCost;
|
String mayPlayAltCost = mayPlayAltManaCost;
|
||||||
|
|
||||||
@@ -891,6 +889,10 @@ public final class StaticAbilityContinuous {
|
|||||||
mayPlayAltCost != null ? new Cost(mayPlayAltCost, false, affectedCard.equals(hostCard)) : null, mayPlayWithFlash,
|
mayPlayAltCost != null ? new Cost(mayPlayAltCost, false, affectedCard.equals(hostCard)) : null, mayPlayWithFlash,
|
||||||
mayPlayGrantZonePermissions, stAb);
|
mayPlayGrantZonePermissions, stAb);
|
||||||
|
|
||||||
|
if (mayLookAt != null && mayLookAt.isEmpty()) {
|
||||||
|
mayLookAt.add(mayPlayController);
|
||||||
|
}
|
||||||
|
|
||||||
// If the MayPlay effect only affected itself, check if it is in graveyard and give other player who cast Shaman's Trance MayPlay
|
// If the MayPlay effect only affected itself, check if it is in graveyard and give other player who cast Shaman's Trance MayPlay
|
||||||
if (stAb.hasParam("Affected") && stAb.getParam("Affected").equals("Card.Self") && affectedCard.isInZone(ZoneType.Graveyard)) {
|
if (stAb.hasParam("Affected") && stAb.getParam("Affected").equals("Card.Self") && affectedCard.isInZone(ZoneType.Graveyard)) {
|
||||||
for (final Player p : game.getPlayers()) {
|
for (final Player p : game.getPlayers()) {
|
||||||
@@ -902,6 +904,10 @@ public final class StaticAbilityContinuous {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mayLookAt != null && (!affectedCard.getOwner().getTopXCardsFromLibrary(1).contains(affectedCard) || game.getTopLibForPlayer(affectedCard.getOwner()) == null || game.getTopLibForPlayer(affectedCard.getOwner()) == affectedCard)) {
|
||||||
|
affectedCard.addMayLookAt(se.getTimestamp(), mayLookAt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return affectedCards;
|
return affectedCards;
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ ManaCost:2 B B
|
|||||||
Types:Legendary Creature Aetherborn Rogue
|
Types:Legendary Creature Aetherborn Rogue
|
||||||
PT:2/3
|
PT:2/3
|
||||||
K:Deathtouch
|
K:Deathtouch
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ When CARDNAME enters, look at the top four cards of target opponent's library, exile one of them face down, then put the rest on the bottom of that library in a random order. For as long as that card remains exiled, you may look at it, you may cast it, and you may spend mana as though it were mana of any type to cast that spell.
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ When CARDNAME enters, look at the top four cards of target opponent's library, exile one of them face down, then put the rest on the bottom of that library in a random order. You may cast that card for as long as it remains exiled, and mana of any type can be spent to cast that spell.
|
||||||
SVar:TrigDig:DB$ Dig | ValidTgts$ Opponent | DigNum$ 4 | ChangeNum$ 1 | DestinationZone$ Exile | DestinationZone2$ Library | LibraryPosition$ -1 | RestRandomOrder$ True | ExileFaceDown$ True | WithMayLook$ True | ChangeValid$ Card | RememberChanged$ True | SubAbility$ DBEffect
|
SVar:TrigDig:DB$ Dig | ValidTgts$ Opponent | DigNum$ 4 | ChangeNum$ 1 | DestinationZone$ Exile | DestinationZone2$ Library | LibraryPosition$ -1 | RestRandomOrder$ True | ExileFaceDown$ True | WithMayLook$ True | ChangeValid$ Card | RememberChanged$ True | SubAbility$ DBEffect
|
||||||
SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STPlay | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
|
SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STPlay | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
|
||||||
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreType$ True | Affected$ Card.IsRemembered+nonLand | AffectedZone$ Exile | Description$ You may look at the card, you may cast it, and you may spend mana as though it were mana of any type to cast that spell.
|
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreType$ True | Affected$ Card.IsRemembered+nonLand | AffectedZone$ Exile | Description$ You may cast that card for as long as it remains exiled, and mana of any type can be spent to cast that spell.
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
SVar:PlayMain1:TRUE
|
SVar:PlayMain1:TRUE
|
||||||
Oracle:Deathtouch\nWhen Gonti, Lord of Luxury enters, look at the top four cards of target opponent's library, exile one of them face down, then put the rest on the bottom of that library in a random order. You may look at and cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any type to cast that spell.
|
Oracle:Deathtouch\nWhen Gonti, Lord of Luxury enters, look at the top four cards of target opponent's library, exile one of them face down, then put the rest on the bottom of that library in a random order. You may cast that card for as long as it remains exiled, and mana of any type can be spent to cast that spell.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:6 B B
|
|||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ ChangeZoneAll | Origin$ Battlefield | Destination$ Exile | ChangeType$ Creature | RememberChanged$ True | SubAbility$ DBEffect | SpellDescription$ Exile all creatures. For each card exiled this way, you may play that card for as long as it remains exiled, and mana of any type can be spent to cast that spell. Exile CARDNAME.
|
A:SP$ ChangeZoneAll | Origin$ Battlefield | Destination$ Exile | ChangeType$ Creature | RememberChanged$ True | SubAbility$ DBEffect | SpellDescription$ Exile all creatures. For each card exiled this way, you may play that card for as long as it remains exiled, and mana of any type can be spent to cast that spell. Exile CARDNAME.
|
||||||
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STPlay | SubAbility$ DBChange | ForgetOnMoved$ Exile | Duration$ Permanent
|
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STPlay | SubAbility$ DBChange | ForgetOnMoved$ Exile | Duration$ Permanent
|
||||||
SVar:STPlay:Mode$ Continuous | MayLookAt$ You | MayPlay$ True | MayPlayIgnoreType$ True | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play the cards exiled with EFFECTSOURCE for as long as they remain exiled, and mana of any type can be spent to cast those spells.
|
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreType$ True | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play the cards exiled with EFFECTSOURCE for as long as they remain exiled, and mana of any type can be spent to cast those spells.
|
||||||
SVar:DBChange:DB$ ChangeZone | Origin$ Stack | Destination$ Exile | SubAbility$ DBCleanup
|
SVar:DBChange:DB$ ChangeZone | Origin$ Stack | Destination$ Exile | SubAbility$ DBCleanup
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
Oracle:Exile all creatures. For each card exiled this way, you may play that card for as long as it remains exiled, and mana of any type can be spent to cast that spell. Exile CARDNAME.
|
Oracle:Exile all creatures. For each card exiled this way, you may play that card for as long as it remains exiled, and mana of any type can be spent to cast that spell. Exile CARDNAME.
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S
|
|||||||
SVar:TrigSearch:DB$ ChangeZone | ChangeNum$ 1 | ChangeType$ Card | Mandatory$ True | SubAbility$ DBEffect | Origin$ Library | Destination$ Exile | ExileFaceDown$ True | RememberChanged$ True
|
SVar:TrigSearch:DB$ ChangeZone | ChangeNum$ 1 | ChangeType$ Card | Mandatory$ True | SubAbility$ DBEffect | Origin$ Library | Destination$ Exile | ExileFaceDown$ True | RememberChanged$ True
|
||||||
SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STPlay | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
|
SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STPlay | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
|
||||||
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayLookAt$ You | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ For as long as that card remains exiled, you may play it.
|
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayLookAt$ You | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ For as long as that card remains exiled, you may play it.
|
||||||
S:Mode$ Continuous | Affected$ Card.YouCtrl+wasCastFromExile | AffectedZone$ Stack | AddKeyword$ Convoke | Description$ Spells you cast from exile have convoke.
|
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
S:Mode$ Continuous | Affected$ Card.YouCtrl+wasCastFromExile | AffectedZone$ Stack | AddKeyword$ Convoke | Description$ Spells you cast from exile have convoke.
|
||||||
Oracle:Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for {1} or one mana of that creature's color.)\nFlying\nWhen Hoarding Broodlord enters, search your library for a card, exile it face down, then shuffle. For as long as that card remains exiled, you may play it.\nSpells you cast from exile have convoke.
|
Oracle:Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for {1} or one mana of that creature's color.)\nFlying\nWhen Hoarding Broodlord enters, search your library for a card, exile it face down, then shuffle. For as long as that card remains exiled, you may play it.\nSpells you cast from exile have convoke.
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ Name:Release to the Wind
|
|||||||
ManaCost:2 U
|
ManaCost:2 U
|
||||||
Types:Instant
|
Types:Instant
|
||||||
A:SP$ ChangeZone | ValidTgts$ Permanent.nonLand | TgtPrompt$ Select target nonland permanent | Origin$ Battlefield | SubAbility$ DBEffect | Destination$ Exile | SpellDescription$ Exile target nonland permanent. For as long as that card remains exiled, its owner may cast it without paying its mana cost.
|
A:SP$ ChangeZone | ValidTgts$ Permanent.nonLand | TgtPrompt$ Select target nonland permanent | Origin$ Battlefield | SubAbility$ DBEffect | Destination$ Exile | SpellDescription$ Exile target nonland permanent. For as long as that card remains exiled, its owner may cast it without paying its mana cost.
|
||||||
SVar:DBEffect:DB$ Effect | RememberObjects$ ParentTarget | EffectOwner$ TargetedOwner | StaticAbilities$ STPlay1,STPlay2 | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
|
SVar:DBEffect:DB$ Effect | RememberObjects$ ParentTarget | EffectOwner$ TargetedOwner | StaticAbilities$ STPlay | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
|
||||||
SVar:STPlay1:Mode$ Continuous | MayLookAt$ You | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ For as long as that card remains exiled, its owner may cast it without paying its mana cost.
|
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayWithoutManaCost$ True | Affected$ Card.IsRemembered+nonLand | AffectedZone$ Exile | Description$ For as long as that card remains exiled, its owner may cast it without paying its mana cost.
|
||||||
SVar:STPlay2:Mode$ Continuous | MayPlay$ True | MayPlayWithoutManaCost$ True | Affected$ Card.IsRemembered | AffectedZone$ Exile | Secondary$ True
|
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
Oracle:Exile target nonland permanent. For as long as that card remains exiled, its owner may cast it without paying its mana cost.
|
Oracle:Exile target nonland permanent. For as long as that card remains exiled, its owner may cast it without paying its mana cost.
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
Name:Shared Fate
|
Name:Shared Fate
|
||||||
ManaCost:4 U
|
ManaCost:4 U
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:If a player would draw a card, that player exiles the top card of one of their opponents' libraries face down instead. Each player may look at cards they exiled with CARDNAME, and they may play lands and cast spells from among those cards.
|
R:Event$ Draw | ReplaceWith$ DBChooseOpp | Description$ If a player would draw a card, that player exiles the top card of one of their opponents' libraries face down instead.
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigEffects | Static$ True
|
SVar:DBChooseOpp:DB$ ChoosePlayer | Defined$ ReplacedPlayer | ChoiceTitle$ Choose an opponent whose top library card to exile | Choices$ Player.OpponentOf ReplacedPlayer | AILogic$ Curse | SubAbility$ DBExile | DontNotify$ True
|
||||||
# Create an effect for each player. The effect contains both Shared Fate's abilities.
|
SVar:DBExile:DB$ Dig | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | ExileFaceDown$ True | Defined$ Player.Chosen | DefinedExiler$ ReplacedPlayer
|
||||||
SVar:TrigEffects:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBEffect
|
S:Mode$ Continuous | MayPlayPlayer$ Exiler | MayLookAt$ True | MayPlay$ True | Affected$ Card.ExiledWithSource | AffectedZone$ Exile | Description$ Each player may look at cards they exiled with CARDNAME, and they may play lands and cast spells from among those cards.
|
||||||
SVar:DBEffect:DB$ Effect | EffectOwner$ Remembered | StaticAbilities$ STPlay | ReplacementEffects$ RDraw | Duration$ UntilHostLeavesPlay | ForgetOnMoved$ Exile
|
|
||||||
SVar:RDraw:Event$ Draw | ActiveZones$ Command | ValidPlayer$ You | ReplaceWith$ DBChooseOpp | Description$ If you would draw a card, exile the top card of an opponent's library face down instead.
|
|
||||||
SVar:DBChooseOpp:DB$ ChoosePlayer | ChoiceTitle$ Choose an opponent whose top library card to exile | Choices$ Player.Opponent | AILogic$ Curse | SubAbility$ DBExile | DontNotify$ True
|
|
||||||
SVar:DBExile:DB$ Dig | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | ExileFaceDown$ True | Defined$ Player.Chosen | RememberChanged$ True
|
|
||||||
SVar:STPlay:Mode$ Continuous | MayLookAt$ You | MayPlay$ True | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may look at and play cards exiled with EFFECTSOURCE.
|
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
Oracle:If a player would draw a card, that player exiles the top card of one of their opponents' libraries face down instead.\nEach player may look at cards they exiled with Shared Fate, and they may play lands and cast spells from among those cards.
|
Oracle:If a player would draw a card, that player exiles the top card of one of their opponents' libraries face down instead.\nEach player may look at cards they exiled with Shared Fate, and they may play lands and cast spells from among those cards.
|
||||||
|
|||||||
@@ -491,6 +491,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
|||||||
min = 0;
|
min = 0;
|
||||||
}
|
}
|
||||||
GameEntityViewMap<Card, CardView> gameCacheExile = GameEntityView.getMap(list);
|
GameEntityViewMap<Card, CardView> gameCacheExile = GameEntityView.getMap(list);
|
||||||
|
// CR 406.4 technically if you can't see their face some randomness should be involved
|
||||||
List<CardView> views = controller.getGui().many(
|
List<CardView> views = controller.getGui().many(
|
||||||
Localizer.getInstance().getMessage("lblChooseAnExiledCardPutIntoGraveyard"),
|
Localizer.getInstance().getMessage("lblChooseAnExiledCardPutIntoGraveyard"),
|
||||||
Localizer.getInstance().getMessage("lblToGraveyard"), min, c, CardView.getCollection(list), CardView.get(source));
|
Localizer.getInstance().getMessage("lblToGraveyard"), min, c, CardView.getCollection(list), CardView.get(source));
|
||||||
|
|||||||
Reference in New Issue
Block a user