mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Added Counterlash.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1689,6 +1689,7 @@ res/cardsfolder/c/counsel_of_the_soratami.txt svneol=native#text/plain
|
||||
res/cardsfolder/c/counterbalance.txt svneol=native#text/plain
|
||||
res/cardsfolder/c/counterbore.txt svneol=native#text/plain
|
||||
res/cardsfolder/c/counterintelligence.txt svneol=native#text/plain
|
||||
res/cardsfolder/c/counterlash.txt -text
|
||||
res/cardsfolder/c/counterspell.txt svneol=native#text/plain
|
||||
res/cardsfolder/c/countersquall.txt svneol=native#text/plain
|
||||
res/cardsfolder/c/countryside_crusher.txt -text
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Bone to Ash
|
||||
ManaCost:2 U U
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$ Counter | Cost$ 2 U U | TargetType$ Spell | TgtPrompt$ Select target Creature spell | ValidTgts$ Creature | SubAbility$ DBDraw | SpellDescription$ Counter target creature spell. Draw a card
|
||||
A:SP$ Counter | Cost$ 2 U U | TargetType$ Spell | TgtPrompt$ Select target Creature spell | ValidTgts$ Creature | SubAbility$ DBDraw | SpellDescription$ Counter target creature spell. Draw a card.
|
||||
SVar:DBDraw:DB$Draw | NumCards$ 1
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/bone_to_ash.jpg
|
||||
|
||||
11
res/cardsfolder/c/counterlash.txt
Normal file
11
res/cardsfolder/c/counterlash.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Counterlash
|
||||
ManaCost:4 U U
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$ Counter | Cost$ 4 U U | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | SubAbility$ DBPlay | SpellDescription$ Counter target spell. You may cast a nonland card in your hand that shares a card type with that spell without paying its mana cost.
|
||||
SVar:DBPlay:DB$ Play | Valid$ Targeted.sharesTypeWith+nonLand+YouCtrl | ValidZone$ Hand | WithoutManaCost$ True | Optional$ True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/counterlash.jpg
|
||||
SetInfo:DKA|Rare|http://magiccards.info/scans/en/dka/33.jpg
|
||||
Oracle:Counter target spell. You may cast a nonland card in your hand that shares a card type with that spell without paying its mana cost.
|
||||
End
|
||||
@@ -2445,6 +2445,22 @@ public class AbilityFactory {
|
||||
|
||||
source = (Card) (o);
|
||||
type = type.replace("Triggered", "Card");
|
||||
} else if (type.contains("Targeted")) {
|
||||
source = null;
|
||||
final SpellAbility parent = AbilityFactory.findParentsTargetedCard(sa);
|
||||
if (parent != null) {
|
||||
if (parent.getTarget() != null) {
|
||||
if (!parent.getTarget().getTargetCards().isEmpty()) {
|
||||
source = parent.getTarget().getTargetCards().get(0);
|
||||
} else if (!parent.getTarget().getTargetSAs().isEmpty()) {
|
||||
source = parent.getTarget().getTargetSAs().get(0).getSourceCard();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source == null) {
|
||||
return new CardList();
|
||||
}
|
||||
type = type.replace("Targeted", "Card");
|
||||
} else if (type.startsWith("Remembered")) {
|
||||
boolean hasRememberedCard = false;
|
||||
for (final Object o : source.getRemembered()) {
|
||||
|
||||
@@ -190,6 +190,7 @@ public final class AbilityFactoryPlay {
|
||||
} else {
|
||||
sb.append(" ");
|
||||
}
|
||||
sb.append("Play ");
|
||||
ArrayList<Card> tgtCards;
|
||||
|
||||
final Target tgt = sa.getTarget();
|
||||
@@ -199,8 +200,9 @@ public final class AbilityFactoryPlay {
|
||||
tgtCards = AbilityFactory.getDefinedCards(sa.getSourceCard(), params.get("Defined"), sa);
|
||||
}
|
||||
|
||||
sb.append("Cast ");
|
||||
// TODO Someone fix this Description when Copying Charms
|
||||
if (params.containsKey("Valid")) {
|
||||
sb.append("cards");
|
||||
} else {
|
||||
final Iterator<Card> it = tgtCards.iterator();
|
||||
while (it.hasNext()) {
|
||||
sb.append(it.next());
|
||||
@@ -208,8 +210,9 @@ public final class AbilityFactoryPlay {
|
||||
sb.append(", ");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (params.containsKey("WithoutManaCost")) {
|
||||
sb.append(" without paying its mana cost");
|
||||
sb.append(" without paying the mana cost");
|
||||
}
|
||||
sb.append(".");
|
||||
|
||||
@@ -339,7 +342,7 @@ public final class AbilityFactoryPlay {
|
||||
zone = Zone.smartValueOf(params.get("ValidZone"));
|
||||
}
|
||||
tgtCards = AllZoneUtil.getCardsIn(zone);
|
||||
tgtCards = tgtCards.getValidCards(params.get("Valid"), controller, source);
|
||||
tgtCards = AbilityFactory.filterListByType(tgtCards, params.get("Valid"), sa);
|
||||
} else if (params.containsKey("Defined")) {
|
||||
tgtCards = new CardList(AbilityFactory.getDefinedCards(sa.getSourceCard(), params.get("Defined"), sa));
|
||||
} else if (tgt != null) {
|
||||
|
||||
Reference in New Issue
Block a user