mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
CardFactoryUtil: add Scavenge as Keyword
This commit is contained in:
@@ -1419,7 +1419,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
} else if (keyword.startsWith("Soulbond")) {
|
||||
sbLong.append(keyword + " (" + Keyword.getInstance(keyword).getReminderText() + ")");
|
||||
} else if (keyword.startsWith("Equip") || keyword.startsWith("Fortify") || keyword.startsWith("Outlast")
|
||||
|| keyword.startsWith("Unearth")) {
|
||||
|| keyword.startsWith("Unearth") || keyword.startsWith("Scavenge")) {
|
||||
// keyword parsing takes care of adding a proper description
|
||||
} else if (keyword.startsWith("CantBeBlockedBy")) {
|
||||
sbLong.append(getName()).append(" can't be blocked ");
|
||||
|
||||
@@ -2220,6 +2220,9 @@ public class CardFactoryUtil {
|
||||
// add ability to instrinic strings so copies/clones create the ability also
|
||||
card.getCurrentState().addUnparsedAbility(effect);
|
||||
}
|
||||
else if (keyword.startsWith("Scavenge")) {
|
||||
addSpellAbility(keyword, card, null);
|
||||
}
|
||||
else if (keyword.startsWith("Unearth")) {
|
||||
addSpellAbility(keyword, card, null);
|
||||
}
|
||||
@@ -2667,7 +2670,7 @@ public class CardFactoryUtil {
|
||||
abilityStr.append("- ");
|
||||
}
|
||||
abilityStr.append("| CostDesc$ " + cost.toSimpleString() + " ");
|
||||
abilityStr.append("| SpellDescription$ (" + cost.toSimpleString() + ", {T}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.)");
|
||||
abilityStr.append("| SpellDescription$ (" + Keyword.getInstance(keyword).getReminderText() + ")");
|
||||
final SpellAbility sa = AbilityFactory.getAbility(abilityStr.toString(), card);
|
||||
card.addSpellAbility(sa);
|
||||
// add ability to instrinic strings so copies/clones create the ability also
|
||||
@@ -3018,7 +3021,30 @@ public class CardFactoryUtil {
|
||||
public static void addSpellAbility(final String keyword, final Card card, final KeywordsChange kws) {
|
||||
final boolean intrinsic = kws == null;
|
||||
|
||||
if (keyword.startsWith("Unearth")) {
|
||||
if (keyword.startsWith("Scavenge")) {
|
||||
final String[] k = keyword.split(":");
|
||||
final String manacost = k[1];
|
||||
|
||||
String effect = "AB$ PutCounter | Cost$ " + manacost + " ExileFromGrave<1/CARDNAME> " +
|
||||
"| ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 " +
|
||||
"| CounterNum$ ScavengeX | SorcerySpeed$ True | References$ ScavengeX " +
|
||||
"| PrecostDesc$ Scavenge | | CostDesc$ " + ManaCostParser.parse(manacost) +
|
||||
"| SpellDescription$ (" + Keyword.getInstance("Scavenge:" + manacost).getReminderText() + ")";
|
||||
|
||||
card.setSVar("ScavengeX", "Count$CardPower");
|
||||
|
||||
final SpellAbility sa = AbilityFactory.getAbility(effect, card);
|
||||
if (!intrinsic) {
|
||||
sa.setTemporary(true);
|
||||
sa.setIntrinsic(false);
|
||||
//sa.setOriginalHost(hostCard);
|
||||
kws.addSpellAbility(sa);
|
||||
} else {
|
||||
// add ability to instrinic strings so copies/clones create the ability also
|
||||
card.getCurrentState().addUnparsedAbility(effect);
|
||||
}
|
||||
card.addSpellAbility(sa);
|
||||
} else if (keyword.startsWith("Unearth")) {
|
||||
final String[] k = keyword.split(":");
|
||||
final String manacost = k[1];
|
||||
|
||||
@@ -3046,6 +3072,9 @@ public class CardFactoryUtil {
|
||||
sa.setIntrinsic(false);
|
||||
//sa.setOriginalHost(hostCard);
|
||||
kws.addSpellAbility(sa);
|
||||
} else {
|
||||
// add ability to instrinic strings so copies/clones create the ability also
|
||||
card.getCurrentState().addUnparsedAbility(effect);
|
||||
}
|
||||
card.addSpellAbility(sa);
|
||||
}
|
||||
|
||||
@@ -99,6 +99,7 @@ public enum Keyword {
|
||||
SHADOW(SimpleKeyword.class, true, "This creature can block or be blocked by only creatures with shadow."),
|
||||
SHROUD(SimpleKeyword.class, true, "This can't be the target of spells or abilities."),
|
||||
SKULK(SimpleKeyword.class, true, "This creature can't be blocked by creatures with greater power."),
|
||||
SCAVENGE(KeywordWithCost.class, false, "%s, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery."),
|
||||
SOULBOND(SimpleKeyword.class, true, "You may pair this creature with another unpaired creature when either enters the battlefield. They remain paired for as long as you control both of them"),
|
||||
SOULSHIFT(KeywordWithAmount.class, false, "When this creature dies, you may return target Spirit card with converted mana cost %d or less from your graveyard to your hand."),
|
||||
SPLICE(KeywordWithCostAndType.class, false, "You may reveal this card from your hand as you cast a %s spell. If you do, copy this card's text box onto that spell and pay %s as an additional cost to cast that spell."),
|
||||
|
||||
@@ -2,7 +2,6 @@ Name:Deadbridge Goliath
|
||||
ManaCost:2 G G
|
||||
Types:Creature Insect
|
||||
PT:5/5
|
||||
A:AB$ PutCounter | Cost$ 4 G G ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:4 G G
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/deadbridge_goliath.jpg
|
||||
Oracle:Scavenge {4}{G}{G} ({4}{G}{G}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
|
||||
@@ -3,7 +3,6 @@ ManaCost:1 B G
|
||||
Types:Creature Plant Zombie
|
||||
PT:3/3
|
||||
K:Haste
|
||||
A:AB$ PutCounter | Cost$ 3 B G ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:3 B G
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/dreg_mangler.jpg
|
||||
Oracle:Haste\nScavenge {3}{B}{G} ({3}{B}{G}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
|
||||
@@ -2,7 +2,6 @@ Name:Drudge Beetle
|
||||
ManaCost:1 G
|
||||
Types:Creature Insect
|
||||
PT:2/2
|
||||
A:AB$ PutCounter | Cost$ 5 G ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:5 G
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/drudge_beetle.jpg
|
||||
Oracle:Scavenge {5}{G} ({5}{G}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
|
||||
@@ -3,7 +3,6 @@ ManaCost:3 G
|
||||
Types:Creature Elf Rogue
|
||||
PT:2/2
|
||||
K:All creatures able to block CARDNAME do so.
|
||||
A:AB$ PutCounter | Cost$ 3 G G ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:3 G G
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/golgari_decoy.jpg
|
||||
Oracle:All creatures able to block Golgari Decoy do so.\nScavenge {3}{G}{G} ({3}{G}{G}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
|
||||
@@ -3,7 +3,6 @@ ManaCost:2 G G
|
||||
Types:Creature Lizard
|
||||
PT:3/3
|
||||
K:Trample
|
||||
A:AB$ PutCounter | Cost$ 5 G G ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:5 G G
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/korozda_monitor.jpg
|
||||
Oracle:Trample\nScavenge {5}{G}{G} ({5}{G}{G}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
|
||||
@@ -3,7 +3,6 @@ ManaCost:2 B
|
||||
Types:Creature Zombie
|
||||
PT:2/1
|
||||
K:Swampwalk
|
||||
A:AB$ PutCounter | Cost$ 2 B ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:2 B
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sewer_shambler.jpg
|
||||
Oracle:Swampwalk (This creature can't be blocked as long as defending player controls a Swamp.)\nScavenge {2}{B} ({2}{B}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
|
||||
@@ -2,8 +2,7 @@ Name:Slitherhead
|
||||
ManaCost:BG
|
||||
Types:Creature Plant Zombie
|
||||
PT:1/1
|
||||
A:AB$ PutCounter | Cost$ 0 ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:0
|
||||
SVar:SacMe:1
|
||||
SVar:DiscardMe:1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/slitherhead.jpg
|
||||
|
||||
@@ -3,7 +3,6 @@ ManaCost:2 B G
|
||||
Types:Creature Scorpion
|
||||
PT:2/2
|
||||
K:Deathtouch
|
||||
A:AB$ PutCounter | Cost$ 1 B G ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:1 B G
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sluiceway_scorpion.jpg
|
||||
Oracle:Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)\nScavenge {1}{B}{G} ({1}{B}{G}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
|
||||
@@ -2,7 +2,6 @@ Name:Terrus Wurm
|
||||
ManaCost:6 B
|
||||
Types:Creature Zombie Wurm
|
||||
PT:5/5
|
||||
A:AB$ PutCounter | Cost$ 6 B ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:6 B
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/terrus_wurm.jpg
|
||||
Oracle:Scavenge {6}{B} ({6}{B}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
|
||||
@@ -3,7 +3,6 @@ ManaCost:3 G
|
||||
Types:Creature Plant Hound
|
||||
PT:3/3
|
||||
K:Reach
|
||||
A:AB$ PutCounter | Cost$ 4 G G ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:4 G G
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/thrashing_mossdog.jpg
|
||||
Oracle:Reach (This creature can block creatures with flying.)\nScavenge {4}{G}{G} ({4}{G}{G}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
|
||||
@@ -2,9 +2,7 @@ Name:Varolz, the Scar-Striped
|
||||
ManaCost:1 B G
|
||||
Types:Legendary Creature Troll Warrior
|
||||
PT:2/2
|
||||
S:Mode$ Continuous | Affected$ Creature.YouOwn | AffectedZone$ Graveyard | AddAbility$ VarolzScavenge | AddSVar$ VarolzX | Description$ Each creature card in your graveyard has scavenge. The scavenge cost is equal to its mana cost.
|
||||
SVar:VarolzScavenge:AB$ PutCounter | Cost$ CardManaCost ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ VarolzX | SorcerySpeed$ True | References$ VarolzX | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:VarolzX:Count$CardPower
|
||||
S:Mode$ Continuous | Affected$ Creature.YouOwn | AffectedZone$ Graveyard | AddKeyword$ Scavenge:CardManaCost | Description$ Each creature card in your graveyard has scavenge. The scavenge cost is equal to its mana cost.
|
||||
A:AB$ Regenerate | Cost$ Sac<1/Creature.Other/another creature> | SpellDescription$ Regenerate CARDNAME.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/varolz_the_scar_striped.jpg
|
||||
Oracle:Each creature card in your graveyard has scavenge. The scavenge cost is equal to its mana cost. (Exile a creature card from your graveyard and pay its mana cost: Put a number of +1/+1 counters equal to that card's power on target creature. Scavenge only as a sorcery.)\nSacrifice another creature: Regenerate Varolz, the Scar-Striped.
|
||||
|
||||
@@ -3,7 +3,6 @@ ManaCost:5 B
|
||||
Types:Creature Insect
|
||||
PT:3/3
|
||||
K:Flying
|
||||
A:AB$ PutCounter | Cost$ 2 B B ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SorcerySpeed$ True | References$ X | PrecostDesc$ Scavenge | SpellDescription$ Put a number of +1/+1 counter's equal to this card's power on target creature. Scavenge only as a sorcery.
|
||||
SVar:X:Count$CardPower
|
||||
K:Scavenge:2 B B
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/zanikev_locust.jpg
|
||||
Oracle:Flying\nScavenge {2}{B}{B} ({2}{B}{B}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)
|
||||
|
||||
Reference in New Issue
Block a user