Merge pull request #448 from Northmoc/nccSkywayRobber

NCC: Skyway Robber and support
This commit is contained in:
Agetian
2022-05-23 07:08:42 +03:00
committed by GitHub
2 changed files with 26 additions and 9 deletions

View File

@@ -1602,42 +1602,39 @@ public class AbilityUtils {
if (sa.hasParam("RememberCostCards") && !sa.getPaidHash().isEmpty()) { if (sa.hasParam("RememberCostCards") && !sa.getPaidHash().isEmpty()) {
List <Card> noList = Lists.newArrayList(); List <Card> noList = Lists.newArrayList();
Map<String, CardCollection> paidLists = sa.getPaidHash();
if (sa.hasParam("RememberCostExcept")) { if (sa.hasParam("RememberCostExcept")) {
noList.addAll(AbilityUtils.getDefinedCards(host, sa.getParam("RememberCostExcept"), sa)); noList.addAll(AbilityUtils.getDefinedCards(host, sa.getParam("RememberCostExcept"), sa));
} }
if (sa.getParam("Cost").contains("Exile")) { if (paidLists.containsKey("Exiled")) {
final CardCollection paidListExiled = sa.getPaidList("Exiled"); final CardCollection paidListExiled = sa.getPaidList("Exiled");
for (final Card exiledAsCost : paidListExiled) { for (final Card exiledAsCost : paidListExiled) {
if (!noList.contains(exiledAsCost)) { if (!noList.contains(exiledAsCost)) {
host.addRemembered(exiledAsCost); host.addRemembered(exiledAsCost);
} }
} }
} } else if (paidLists.containsKey("Sacrificed")) {
else if (sa.getParam("Cost").contains("Sac")) {
final CardCollection paidListSacrificed = sa.getPaidList("Sacrificed"); final CardCollection paidListSacrificed = sa.getPaidList("Sacrificed");
for (final Card sacrificedAsCost : paidListSacrificed) { for (final Card sacrificedAsCost : paidListSacrificed) {
if (!noList.contains(sacrificedAsCost)) { if (!noList.contains(sacrificedAsCost)) {
host.addRemembered(sacrificedAsCost); host.addRemembered(sacrificedAsCost);
} }
} }
} } else if (paidLists.containsKey("Tapped")) {
else if (sa.getParam("Cost").contains("tapXType")) {
final CardCollection paidListTapped = sa.getPaidList("Tapped"); final CardCollection paidListTapped = sa.getPaidList("Tapped");
for (final Card tappedAsCost : paidListTapped) { for (final Card tappedAsCost : paidListTapped) {
if (!noList.contains(tappedAsCost)) { if (!noList.contains(tappedAsCost)) {
host.addRemembered(tappedAsCost); host.addRemembered(tappedAsCost);
} }
} }
} } else if (paidLists.containsKey("Unattached")) {
else if (sa.getParam("Cost").contains("Unattach")) {
final CardCollection paidListUnattached = sa.getPaidList("Unattached"); final CardCollection paidListUnattached = sa.getPaidList("Unattached");
for (final Card unattachedAsCost : paidListUnattached) { for (final Card unattachedAsCost : paidListUnattached) {
if (!noList.contains(unattachedAsCost)) { if (!noList.contains(unattachedAsCost)) {
host.addRemembered(unattachedAsCost); host.addRemembered(unattachedAsCost);
} }
} }
} } else if (paidLists.containsKey("Discarded")) {
else if (sa.getParam("Cost").contains("Discard")) {
final CardCollection paidListDiscarded = sa.getPaidList("Discarded"); final CardCollection paidListDiscarded = sa.getPaidList("Discarded");
for (final Card discardedAsCost : paidListDiscarded) { for (final Card discardedAsCost : paidListDiscarded) {
if (!noList.contains(discardedAsCost)) { if (!noList.contains(discardedAsCost)) {

View File

@@ -0,0 +1,20 @@
Name:Skyway Robber
ManaCost:3 U
Types:Creature Bird Rogue
PT:3/3
K:Flying
K:Escape:3 U ExileFromGrave<5/Card.Other/other>
A:SP$ PermanentCreature | RememberCostCards$ True
SVar:AIPreference:ExileFromGraveCost$Artifact.YouOwn+Other+inZoneGraveyard,Instant.YouOwn+Other+inZoneGraveyard,Sorcery.YouOwn+Other+inZoneGraveyard
#R:Event$ Moved | ValidCard$ Card.Self+escaped | Destination$ Battlefield | ReplaceWith$ DBAnimate | Description$ CARDNAME escapes with "Whenever CARDNAME deals combat damage to a player, you may cast an artifact, instant, or sorcery spell from among cards exiled with CARDNAME without paying its mana cost."
K:ETBReplacement:Other:DBAnimate:Mandatory::Card.Self+escaped
SVar:DBAnimate:DB$ Animate | Triggers$ DamageTrig | Duration$ Permanent | SpellDescription$ CARDNAME escapes with "Whenever CARDNAME deals combat damage to a player, you may cast an artifact, instant, or sorcery spell from among cards exiled with CARDNAME without paying its mana cost."
SVar:DamageTrig:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigCast | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, you may cast an artifact, instant, or sorcery spell from among cards exiled with CARDNAME without paying its mana cost.
SVar:TrigCast:DB$ Play | ValidZone$ Exile | Valid$ Artifact.IsRemembered+ExiledWithSource,Instant.IsRemembered+ExiledWithSource,Sorcery.IsRemembered+ExiledWithSource | ValidSA$ Spell | Controller$ You | WithoutManaCost$ True | Amount$ 1 | Optional$ True
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigCleanup | Static$ True
SVar:TrigCleanup: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
DeckHas:Ability$Graveyard
DeckHints:Type$Artifact|Instant|Sorcery
Oracle:Flying\nEscape—{3}{U}, Exile five other cards from your graveyard. (You may cast this card from your graveyard for its escape cost.)\nSkyway Robber escapes with "Whenever Skyway Robber deals combat damage to a player, you may cast an artifact, instant, or sorcery spell from among cards exiled with Skyway Robber without paying its mana cost."