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

1
.gitattributes vendored
View File

@@ -6393,6 +6393,7 @@ res/cardsfolder/spectral_procession.txt -text svneol=native#text/plain
res/cardsfolder/spectral_searchlight.txt -text svneol=native#text/plain
res/cardsfolder/spectral_shield.txt svneol=native#text/plain
res/cardsfolder/spectral_sliver.txt svneol=native#text/plain
res/cardsfolder/spell_blast.txt svneol=native#text/plain
res/cardsfolder/spell_contortion.txt -text svneol=native#text/plain
res/cardsfolder/spell_pierce.txt -text svneol=native#text/plain
res/cardsfolder/spell_snare.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,17 @@
Name:Spell Blast
ManaCost:X U
Types:Instant
Text:no text
A:SP$Counter | Cost$ X U | TargetType$ Spell | ValidTgts$ Card | SpellDescription$ Counter target spell with converted mana cost X.
SVar:X:Targeted$CardManaCost
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/spell_blast.jpg
SetInfo:TMP|Common|http://magiccards.info/scans/en/tp/89.jpg
SetInfo:LEB|Common|http://magiccards.info/scans/en/be/80.jpg
SetInfo:5ED|Common|http://magiccards.info/scans/en/5e/126.jpg
SetInfo:4ED|Common|http://magiccards.info/scans/en/4e/103.jpg
SetInfo:6ED|Common|http://magiccards.info/scans/en/6e/100.jpg
SetInfo:3ED|Common|http://magiccards.info/scans/en/rv/82.jpg
SetInfo:2ED|Common|http://magiccards.info/scans/en/un/80.jpg
End

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