mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
add Spell Blast (from original base Alpha) thanks to Sol's work for targeting in AF_CounterMagic
This commit is contained in:
@@ -792,8 +792,20 @@ public class AbilityFactory {
|
||||
}
|
||||
|
||||
else if (calcX[0].startsWith("Targeted")){
|
||||
SpellAbility saTargeting = (ability.getTarget() == null) ? findParentsTargetedCard(ability) : ability;
|
||||
list = new CardList(saTargeting.getTarget().getTargetCards().toArray());
|
||||
Target t = ability.getTarget();
|
||||
ArrayList<Object> all = t.getTargets();
|
||||
if(!all.isEmpty() && all.get(0) instanceof SpellAbility) {
|
||||
SpellAbility saTargeting = (t == null) ? findParentsTargetedSpellAbility(ability) : ability;
|
||||
list = new CardList();
|
||||
ArrayList<SpellAbility> sas = saTargeting.getTarget().getTargetSAs();
|
||||
for(SpellAbility sa : sas) {
|
||||
list.add(sa.getSourceCard());
|
||||
}
|
||||
}
|
||||
else {
|
||||
SpellAbility saTargeting = (t == null) ? findParentsTargetedCard(ability) : ability;
|
||||
list = new CardList(saTargeting.getTarget().getTargetCards().toArray());
|
||||
}
|
||||
}
|
||||
else if (calcX[0].startsWith("Triggered")) {
|
||||
list = new CardList();
|
||||
|
||||
@@ -133,7 +133,7 @@ public class AbilityFactory_PermanentState {
|
||||
Iterator<Card> it = tgtCards.iterator();
|
||||
while(it.hasNext()) {
|
||||
sb.append(it.next());
|
||||
if(it.hasNext()) sb.append(" ");
|
||||
if(it.hasNext()) sb.append(", ");
|
||||
}
|
||||
|
||||
sb.append(".");
|
||||
@@ -491,7 +491,7 @@ public class AbilityFactory_PermanentState {
|
||||
Iterator<Card> it = tgtCards.iterator();
|
||||
while(it.hasNext()) {
|
||||
sb.append(it.next());
|
||||
if(it.hasNext()) sb.append(" ");
|
||||
if(it.hasNext()) sb.append(", ");
|
||||
}
|
||||
|
||||
sb.append(".");
|
||||
@@ -1205,7 +1205,7 @@ public class AbilityFactory_PermanentState {
|
||||
Iterator<Card> it = tgtCards.iterator();
|
||||
while(it.hasNext()) {
|
||||
sb.append(it.next());
|
||||
if(it.hasNext()) sb.append(" ");
|
||||
if(it.hasNext()) sb.append(", ");
|
||||
}
|
||||
|
||||
sb.append(".");
|
||||
|
||||
Reference in New Issue
Block a user