mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Added TargetedCard to getDefinedCards() and to the filtered options in getDefinedPlayers()
This commit is contained in:
@@ -162,18 +162,16 @@ public class AbilityUtils {
|
|||||||
return cards;
|
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()) {
|
for (TargetChoices tc : ((SpellAbility)sa).getAllTargetChoices()) {
|
||||||
Iterables.addAll(cards, tc.getTargetCards());
|
Iterables.addAll(cards, tc.getTargetCards());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (defined.equals("TargetedSource") && sa instanceof SpellAbility) {
|
else if (defined.equals("TargetedSource") && sa instanceof SpellAbility) {
|
||||||
for (TargetChoices tc : ((SpellAbility)sa).getAllTargetChoices()) {
|
for (TargetChoices tc : ((SpellAbility)sa).getAllTargetChoices()) for (SpellAbility s : tc.getTargetSpells()) {
|
||||||
for (SpellAbility s : tc.getTargetSpells()) {
|
|
||||||
cards.add(s.getHostCard());
|
cards.add(s.getHostCard());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (defined.equals("ThisTargetedCard") && sa instanceof SpellAbility) { // do not add parent targeted
|
else if (defined.equals("ThisTargetedCard") && sa instanceof SpellAbility) { // do not add parent targeted
|
||||||
if (((SpellAbility)sa).getTargets() != null) {
|
if (((SpellAbility)sa).getTargets() != null) {
|
||||||
Iterables.addAll(cards, ((SpellAbility)sa).getTargets().getTargetCards());
|
Iterables.addAll(cards, ((SpellAbility)sa).getTargets().getTargetCards());
|
||||||
@@ -972,7 +970,7 @@ public class AbilityUtils {
|
|||||||
|
|
||||||
final Player player = sa instanceof SpellAbility ? ((SpellAbility)sa).getActivatingPlayer() : card.getController();
|
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
|
// do nothing, Self is for Cards, not Players
|
||||||
} else if (defined.equals("TargetedOrController")) {
|
} else if (defined.equals("TargetedOrController")) {
|
||||||
players.addAll(getDefinedPlayers(card, "Targeted", sa));
|
players.addAll(getDefinedPlayers(card, "Targeted", sa));
|
||||||
|
|||||||
@@ -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.
|
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: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: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:DBTap:DB$ Tap | Defined$ Targeted | SubAbility$ DBGoad
|
||||||
SVar:DBGoad:DB$ Goad | Defined$ Targeted | Duration$ Permanent | SubAbility$ DBDisableSacing
|
SVar:DBGoad:DB$ Goad | Defined$ Targeted | Duration$ Permanent | SubAbility$ DBDisableSacing
|
||||||
SVar:DBDisableSacing:DB$ Animate | Defined$ Targeted | staticAbilities$ SCantSac | Duration$ Permanent
|
SVar:DBDisableSacing:DB$ Animate | Defined$ Targeted | staticAbilities$ SCantSac | Duration$ Permanent
|
||||||
|
|||||||
Reference in New Issue
Block a user