mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
getCardsfromTargets: Add sanity check
This commit is contained in:
committed by
Hans Mackowiak
parent
17352940ab
commit
e6c60f389f
@@ -241,8 +241,8 @@ public abstract class SpellAbilityEffect {
|
|||||||
|
|
||||||
protected final static List<Card> getCardsfromTargets(final SpellAbility sa) {
|
protected final static List<Card> getCardsfromTargets(final SpellAbility sa) {
|
||||||
List<Card> cards = getTargetCards(sa);
|
List<Card> cards = getTargetCards(sa);
|
||||||
List<SpellAbility> spells = getTargetSpells(sa);
|
// some card effects can also target a spell
|
||||||
for (SpellAbility s : spells) {
|
for (SpellAbility s : sa.getTargets().getTargetSpells()) {
|
||||||
cards.add(s.getHostCard());
|
cards.add(s.getHostCard());
|
||||||
}
|
}
|
||||||
return cards;
|
return cards;
|
||||||
|
|||||||
Reference in New Issue
Block a user