mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
fixed issue with TargetedPlayerCtrl in filterListByType
This commit is contained in:
@@ -3,8 +3,7 @@ ManaCost:4 R
|
|||||||
Types:Instant
|
Types:Instant
|
||||||
Text:no text
|
Text:no text
|
||||||
A:SP$ DealDamage | Cost$ 4 R | ValidTgts$ Player | NumDmg$ 4 | SubAbility$ DmgAll | SpellDescription$ CARDNAME deals 4 damage to target player and 1 damage to each creature that player controls.
|
A:SP$ DealDamage | Cost$ 4 R | ValidTgts$ Player | NumDmg$ 4 | SubAbility$ DmgAll | SpellDescription$ CARDNAME deals 4 damage to target player and 1 damage to each creature that player controls.
|
||||||
#SVar:DmgAll:DB$ DamageAll | Cost$ 0 | NumDmg$ 1 | ValidCards$ Creature.TargetedPlayerCtrl
|
SVar:DmgAll:DB$ DamageAll | Cost$ 0 | NumDmg$ 1 | ValidCards$ Creature.TargetedPlayerCtrl
|
||||||
SVar:DmgAll:DB$ DamageAll | Cost$ 0 | NumDmg$ 1 | ValidCards$ Creature | ValidPlayers$ Targeted
|
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/chandras_fury.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/chandras_fury.jpg
|
||||||
|
|||||||
@@ -2605,46 +2605,46 @@ public class AbilityFactory {
|
|||||||
type = type.replace("Triggered", "Card");
|
type = type.replace("Triggered", "Card");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (type.contains("Targeted")) {
|
} else if (type.startsWith("Targeted")) {
|
||||||
source = null;
|
source = null;
|
||||||
final SpellAbility parent = AbilityFactory.findParentsTargetedCard(sa);
|
final SpellAbility parent = AbilityFactory.findParentsTargetedCard(sa);
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
if (parent.getTarget() != null) {
|
if (parent.getTarget() != null) {
|
||||||
if (!parent.getTarget().getTargetCards().isEmpty()) {
|
if (!parent.getTarget().getTargetCards().isEmpty()) {
|
||||||
source = parent.getTarget().getTargetCards().get(0);
|
source = parent.getTarget().getTargetCards().get(0);
|
||||||
} else if (!parent.getTarget().getTargetSAs().isEmpty()) {
|
} else if (!parent.getTarget().getTargetSAs().isEmpty()) {
|
||||||
source = parent.getTarget().getTargetSAs().get(0).getSourceCard();
|
source = parent.getTarget().getTargetSAs().get(0).getSourceCard();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (source == null) {
|
}
|
||||||
return new CardList();
|
if (source == null) {
|
||||||
}
|
return new CardList();
|
||||||
|
}
|
||||||
|
|
||||||
if (type.startsWith("TargetedCard")) {
|
if (type.startsWith("TargetedCard")) {
|
||||||
type = type.replace("TargetedCard", "Card");
|
type = type.replace("TargetedCard", "Card");
|
||||||
} else {
|
} else {
|
||||||
type = type.replace("Targeted", "Card");
|
type = type.replace("Targeted", "Card");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (type.startsWith("Remembered")) {
|
} else if (type.startsWith("Remembered")) {
|
||||||
boolean hasRememberedCard = false;
|
boolean hasRememberedCard = false;
|
||||||
for (final Object object : source.getRemembered()) {
|
for (final Object object : source.getRemembered()) {
|
||||||
if (object instanceof Card) {
|
if (object instanceof Card) {
|
||||||
hasRememberedCard = true;
|
hasRememberedCard = true;
|
||||||
source = (Card) object;
|
source = (Card) object;
|
||||||
type = type.replace("Remembered", "Card");
|
type = type.replace("Remembered", "Card");
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!hasRememberedCard) {
|
if (!hasRememberedCard) {
|
||||||
return new CardList();
|
return new CardList();
|
||||||
}
|
}
|
||||||
} else if (type.equals("Card.AttachedBy")) {
|
} else if (type.equals("Card.AttachedBy")) {
|
||||||
source = source.getEnchantingCard();
|
source = source.getEnchantingCard();
|
||||||
type = type.replace("Card.AttachedBy", "Card.Self");
|
type = type.replace("Card.AttachedBy", "Card.Self");
|
||||||
}
|
}
|
||||||
|
|
||||||
String valid = type;
|
String valid = type;
|
||||||
if (valid.contains("EQX")) {
|
if (valid.contains("EQX")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user