add Spell Blast (from original base Alpha) thanks to Sol's work for targeting in AF_CounterMagic

This commit is contained in:
jendave
2011-08-06 22:45:30 +00:00
parent fd4072e364
commit c0310f60d2
4 changed files with 35 additions and 5 deletions

View File

@@ -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();

View File

@@ -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(".");