mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48: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/counterbalance.txt svneol=native#text/plain
|
||||||
res/cardsfolder/c/counterbore.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/counterintelligence.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/c/counterlash.txt -text
|
||||||
res/cardsfolder/c/counterspell.txt svneol=native#text/plain
|
res/cardsfolder/c/counterspell.txt svneol=native#text/plain
|
||||||
res/cardsfolder/c/countersquall.txt svneol=native#text/plain
|
res/cardsfolder/c/countersquall.txt svneol=native#text/plain
|
||||||
res/cardsfolder/c/countryside_crusher.txt -text
|
res/cardsfolder/c/countryside_crusher.txt -text
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Bone to Ash
|
|||||||
ManaCost:2 U U
|
ManaCost:2 U U
|
||||||
Types:Instant
|
Types:Instant
|
||||||
Text:no text
|
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:DBDraw:DB$Draw | NumCards$ 1
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/bone_to_ash.jpg
|
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);
|
source = (Card) (o);
|
||||||
type = type.replace("Triggered", "Card");
|
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")) {
|
} else if (type.startsWith("Remembered")) {
|
||||||
boolean hasRememberedCard = false;
|
boolean hasRememberedCard = false;
|
||||||
for (final Object o : source.getRemembered()) {
|
for (final Object o : source.getRemembered()) {
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ public final class AbilityFactoryPlay {
|
|||||||
} else {
|
} else {
|
||||||
sb.append(" ");
|
sb.append(" ");
|
||||||
}
|
}
|
||||||
|
sb.append("Play ");
|
||||||
ArrayList<Card> tgtCards;
|
ArrayList<Card> tgtCards;
|
||||||
|
|
||||||
final Target tgt = sa.getTarget();
|
final Target tgt = sa.getTarget();
|
||||||
@@ -199,17 +200,19 @@ public final class AbilityFactoryPlay {
|
|||||||
tgtCards = AbilityFactory.getDefinedCards(sa.getSourceCard(), params.get("Defined"), sa);
|
tgtCards = AbilityFactory.getDefinedCards(sa.getSourceCard(), params.get("Defined"), sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("Cast ");
|
if (params.containsKey("Valid")) {
|
||||||
// TODO Someone fix this Description when Copying Charms
|
sb.append("cards");
|
||||||
final Iterator<Card> it = tgtCards.iterator();
|
} else {
|
||||||
while (it.hasNext()) {
|
final Iterator<Card> it = tgtCards.iterator();
|
||||||
sb.append(it.next());
|
while (it.hasNext()) {
|
||||||
if (it.hasNext()) {
|
sb.append(it.next());
|
||||||
sb.append(", ");
|
if (it.hasNext()) {
|
||||||
|
sb.append(", ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (params.containsKey("WithoutManaCost")) {
|
if (params.containsKey("WithoutManaCost")) {
|
||||||
sb.append(" without paying its mana cost");
|
sb.append(" without paying the mana cost");
|
||||||
}
|
}
|
||||||
sb.append(".");
|
sb.append(".");
|
||||||
|
|
||||||
@@ -339,7 +342,7 @@ public final class AbilityFactoryPlay {
|
|||||||
zone = Zone.smartValueOf(params.get("ValidZone"));
|
zone = Zone.smartValueOf(params.get("ValidZone"));
|
||||||
}
|
}
|
||||||
tgtCards = AllZoneUtil.getCardsIn(zone);
|
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")) {
|
} else if (params.containsKey("Defined")) {
|
||||||
tgtCards = new CardList(AbilityFactory.getDefinedCards(sa.getSourceCard(), params.get("Defined"), sa));
|
tgtCards = new CardList(AbilityFactory.getDefinedCards(sa.getSourceCard(), params.get("Defined"), sa));
|
||||||
} else if (tgt != null) {
|
} else if (tgt != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user