*Added keyword

"When enchanted creature becomes the target of a spell or ability, <sacrifice/destroy/exile> <that creature/CARDNAME>.( It can't be regenerated.)"
*Added
	Blood Tithe
	Crystallization
	Goblin Tunneler
	Spinal Graft
This commit is contained in:
jendave
2011-08-06 14:11:41 +00:00
parent 31300a1141
commit ad5b9268de
6 changed files with 117 additions and 0 deletions

4
.gitattributes vendored
View File

@@ -542,6 +542,7 @@ res/cardsfolder/blood_cultist.txt -text svneol=native#text/plain
res/cardsfolder/blood_knight.txt -text svneol=native#text/plain
res/cardsfolder/blood_pet.txt -text svneol=native#text/plain
res/cardsfolder/blood_rites.txt -text svneol=native#text/plain
res/cardsfolder/blood_tithe.txt -text svneol=native#text/plain
res/cardsfolder/blood_vassal.txt -text svneol=native#text/plain
res/cardsfolder/bloodbraid_elf.txt -text svneol=native#text/plain
res/cardsfolder/bloodcurdling_scream.txt -text svneol=native#text/plain
@@ -1058,6 +1059,7 @@ res/cardsfolder/crystal_quarry.txt -text svneol=native#text/plain
res/cardsfolder/crystal_rod.txt -text svneol=native#text/plain
res/cardsfolder/crystal_vein.txt -text svneol=native#text/plain
res/cardsfolder/crystalline_sliver.txt -text svneol=native#text/plain
res/cardsfolder/crystallization.txt -text svneol=native#text/plain
res/cardsfolder/cudgel_troll.txt -text svneol=native#text/plain
res/cardsfolder/culling_sun.txt -text svneol=native#text/plain
res/cardsfolder/cultivate.txt -text svneol=native#text/plain
@@ -2059,6 +2061,7 @@ res/cardsfolder/goblin_spelunkers.txt -text svneol=native#text/plain
res/cardsfolder/goblin_spy.txt -text svneol=native#text/plain
res/cardsfolder/goblin_striker.txt -text svneol=native#text/plain
res/cardsfolder/goblin_trenches.txt -text svneol=native#text/plain
res/cardsfolder/goblin_tunneler.txt -text svneol=native#text/plain
res/cardsfolder/goblin_war_buggy.txt -text svneol=native#text/plain
res/cardsfolder/goblin_war_paint.txt -text svneol=native#text/plain
res/cardsfolder/goblin_war_strike.txt -text svneol=native#text/plain
@@ -4622,6 +4625,7 @@ res/cardsfolder/spikeshot_goblin.txt -text svneol=native#text/plain
res/cardsfolder/spiketail_drake.txt -text svneol=native#text/plain
res/cardsfolder/spiketail_drakeling.txt -text svneol=native#text/plain
res/cardsfolder/spiketail_hatchling.txt -text svneol=native#text/plain
res/cardsfolder/spinal_graft.txt -text svneol=native#text/plain
res/cardsfolder/spinal_villain.txt -text svneol=native#text/plain
res/cardsfolder/spincrusher.txt -text svneol=native#text/plain
res/cardsfolder/spindrift_drake.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,9 @@
Name:Blood Tithe
ManaCost:3 B
Types:Sorcery
Text:no text
A:SP$LoseLife | Cost$ 3 B | Defined$ Opponent | LifeAmount$ 3 | SubAbility$SVar=DBGainLife | SpellDescription$ Each opponent loses 3 life. You gain life equal to the life lost this way.
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ 3
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/blood_tithe.jpg
End

View File

@@ -0,0 +1,10 @@
Name:Crystallization
ManaCost:GU W
Types:Enchantment Aura
Text:no text
K:Enchant Creature
K:enPumpCurse:HIDDEN CARDNAME can't attack or block.
K:When enchanted creature becomes the target of a spell or ability, exile that creature.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/crystallization.jpg
End

View File

@@ -0,0 +1,9 @@
Name:Goblin Tunneler
ManaCost:1 R
Types:Creature Goblin Rogue
Text:no text
PT:1/1
A:AB$Pump | Cost$ T | ValidTgts$ Creature.powerLE2 | TgtPrompt$ Select target creature with power 2 or less. | KW$ HIDDEN Unblockable. | SpellDescription$ Target creature with power 2 or less is unblockable this turn.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_tunneler.jpg
End

View File

@@ -0,0 +1,10 @@
Name:Spinal Graft
ManaCost:1 B
Types:Enchantment Aura
Text:no text
K:Enchant Creature
K:enPump:+3/+3
K:When enchanted creature becomes the target of a spell or ability, destroy that creature. It can't be regenerated.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/spinal_graft.jpg
End

View File

@@ -4527,6 +4527,81 @@ public class CardFactoryUtil {
AllZone.Stack.add(ability);
}
//When enchanted creature becomes the target of a spell or ability, <destroy/exile/sacrifice> <that creature/CARDNAME>. (It can't be regenerated.)
ArrayList<Card> auras = c.getEnchantedBy();
for(int a=0;a<auras.size();a++)
{
final Card aura = auras.get(a);
ArrayList<String> keywords = aura.getKeyword();
for(int i=0;i<keywords.size();i++)
{
final String keyword = keywords.get(i);
if(keyword.startsWith("When enchanted creature becomes the target of a spell or ability, "))
{
final String action[] = new String[1];
action[0] = keyword.substring(66);
String stackDesc = action[0];
stackDesc = stackDesc.replace("that", "enchanted");
stackDesc = stackDesc.substring(0,1).toUpperCase().concat(stackDesc.substring(1));
stackDesc = aura.getName().concat(" (").concat(Integer.toString(aura.getUniqueNumber())).concat(") - ").concat(stackDesc);
Ability saTrigger = new Ability(aura,"0") {
public void resolve()
{
Card target = null;
boolean noRegen = false;
if(action[0].endsWith(" It can't be regenerated."))
{
noRegen = true;
action[0] = action[0].substring(0,action[0].length()-25);
}
if(action[0].endsWith("CARDNAME."))
{
target = aura;
}
else if(action[0].endsWith("that creature."))
{
target = c;
}
else
{
throw new IllegalArgumentException("There is a problem in the keyword " + keyword + "for card \"" + c.getName() + "\"");
}
if(action[0].startsWith("exile"))
{
AllZone.GameAction.exile(target);
}
else if(action[0].startsWith("destroy"))
{
if(noRegen)
{
AllZone.GameAction.destroyNoRegeneration(target);
}
else
{
AllZone.GameAction.destroy(target);
}
}
else if(action[0].startsWith("sacrifice"))
{
AllZone.GameAction.sacrifice(target);
}
else
{
throw new IllegalArgumentException("There is a problem in the keyword " + keyword + "for card \"" + c.getName() + "\"");
}
}
};
saTrigger.setStackDescription(stackDesc);
AllZone.Stack.add(saTrigger);
}
}
}
//}
}