Added TargetedCard to getDefinedCards() and to the filtered options in getDefinedPlayers()

This commit is contained in:
Xavier
2022-07-08 00:26:27 -04:00
parent d1e1adf46d
commit 6bd5ad8a06
2 changed files with 4 additions and 6 deletions

View File

@@ -162,17 +162,15 @@ public class AbilityUtils {
return cards;
}
}
else if (defined.equals("Targeted") && sa instanceof SpellAbility) {
else if ((defined.equals("Targeted") || defined.equals("TargetedCard")) && sa instanceof SpellAbility) {
for (TargetChoices tc : ((SpellAbility)sa).getAllTargetChoices()) {
Iterables.addAll(cards, tc.getTargetCards());
}
}
else if (defined.equals("TargetedSource") && sa instanceof SpellAbility) {
for (TargetChoices tc : ((SpellAbility)sa).getAllTargetChoices()) {
for (SpellAbility s : tc.getTargetSpells()) {
for (TargetChoices tc : ((SpellAbility)sa).getAllTargetChoices()) for (SpellAbility s : tc.getTargetSpells()) {
cards.add(s.getHostCard());
}
}
}
else if (defined.equals("ThisTargetedCard") && sa instanceof SpellAbility) { // do not add parent targeted
if (((SpellAbility)sa).getTargets() != null) {
@@ -972,7 +970,7 @@ public class AbilityUtils {
final Player player = sa instanceof SpellAbility ? ((SpellAbility)sa).getActivatingPlayer() : card.getController();
if (defined.equals("Self") || defined.equals("ThisTargetedCard") || defined.startsWith("Valid") || getPaidCards(sa, defined) != null) {
if (defined.equals("Self") || defined.equals("TargetedCard") || defined.equals("ThisTargetedCard") || defined.startsWith("Valid") || getPaidCards(sa, defined) != null) {
// do nothing, Self is for Cards, not Players
} else if (defined.equals("TargetedOrController")) {
players.addAll(getDefinedPlayers(card, "Targeted", sa));

View File

@@ -5,7 +5,7 @@ PT:3/3
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ DBSelectRecipient | TriggerDescription$ At the beginning of your end step, target opponent gains control of up to one target creature you control.
SVar:DBSelectRecipient:DB$ Pump | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | SubAbility$ DBDonate
SVar:DBDonate:DB$ GainControl | ValidTgts$ Creature.YouCtrl | TargetMin$ 0 | TargetMax$ 1 | TgtPrompt$ Select up to one target creature you control | NewController$ ParentTarget | SubAbility$ DBPutCounters
SVar:DBPutCounters:DB$ PutCounter | Defined$ Targeted | CounterType$ P1P1 | CounterNum$ 2 | SubAbility$ DBTap
SVar:DBPutCounters:DB$ PutCounter | Defined$ TargetedCard | CounterType$ P1P1 | CounterNum$ 2 | SubAbility$ DBTap | Description$ Test
SVar:DBTap:DB$ Tap | Defined$ Targeted | SubAbility$ DBGoad
SVar:DBGoad:DB$ Goad | Defined$ Targeted | Duration$ Permanent | SubAbility$ DBDisableSacing
SVar:DBDisableSacing:DB$ Animate | Defined$ Targeted | staticAbilities$ SCantSac | Duration$ Permanent