TypeCycling Keyword added.

Traumatic Visions, Fiery Fall, Absorb Vis, Ethereal Usher, Chartooth Cougar, Elvish Aberration, Noble Templar, Shoreline Ranger, Twisted Abomination, Wirewood Guardian, Valley Rannet, Sanctum Plowbeast, Pale Recluse, Jhessian Zombies, Igneous Pouncer were added.
This commit is contained in:
jendave
2011-08-06 02:58:20 +00:00
parent 7b361c4189
commit 1b2671626a
5 changed files with 243 additions and 8 deletions

View File

@@ -18,6 +18,20 @@ forest.jpg http://resources.wizards.com/magic/cards/unh/en-us/card73946.jpg
forest1.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=2748
forest2.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=587
forest3.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=586
traumatic_visions.jpg http://www.wizards.com/global/images/magic/general/traumatic_visions.jpg
fiery_fall.jpg http://www.wizards.com/global/images/magic/general/fiery_fall.jpg
absorb_vis.jpg http://www.wizards.com/global/images/magic/general/absorb_vis.jpg
ethereal_usher.jpg http://www.wizards.com/global/images/magic/general/ethereal_usher.jpg
elvish_aberration.jpg http://www.wizards.com/global/images/magic/general/elvish_aberration.jpg
noble_templar.jpg http://www.wizards.com/global/images/magic/general/noble_templar.jpg
shoreline_ranger.jpg http://www.wizards.com/global/images/magic/general/shoreline_ranger.jpg
twisted_abomination.jpg http://www.wizards.com/global/images/magic/general/twisted_abomination.jpg
wirewood_guardian.jpg http://www.wizards.com/global/images/magic/general/wirewood_guardian.jpg
valley_rannet.jpg http://www.wizards.com/global/images/magic/general/valley_rannet.jpg
sanctum_plowbeast.jpg http://www.wizards.com/global/images/magic/general/sanctum_plowbeast.jpg
pale_recluse.jpg http://www.wizards.com/global/images/magic/general/pale_recluse.jpg
jhessian_zombies.jpg http://www.wizards.com/global/images/magic/general/jhessian_zombies.jpg
igneous_pouncer.jpg http://www.wizards.com/global/images/magic/general/igneous_pouncer.jpg
drift_of_phantasms.jpg http://www.wizards.com/global/images/magic/general/drift_of_phantasms.jpg
dimir_infiltrator.jpg http://www.wizards.com/global/images/magic/general/dimir_infiltrator.jpg
tolaria_west.jpg http://www.wizards.com/global/images/magic/general/tolaria_west.jpg

View File

@@ -1,3 +1,122 @@
Traumatic Visions
3 U U
Instant
Counter target spell.
TypeCycling:Basic:1 B
Fiery Fall
5 R
Instant
no text
spDamageTgtC:5
TypeCycling:Basic:1 R
Absorb Vis
6 B
Sorcery
no text
spLoseLifeGainLife:4
TypeCycling:Basic:1 B
Ethereal Usher
5 U
Creature Spirit
no text
2/3
TgtKPump U T:Unblockable
Transmute:1 U U
Chartooth Cougar
5 R
Creature Cat Beast
no text
4/4
PTPump R:+1/+0
TypeCycling:Mountain:2
Elvish Aberration
5 G
Creature Elf Mutant
no text
4/5
tap: add G G G
TypeCycling:Forest:2
Noble Templar
5 W
Creature Human Cleric Soldier
no text
3/6
Vigilance
TypeCycling:Plains:2
Shoreline Ranger
5 U
Creature Bird Soldier
no text
3/4
Flying
TypeCycling:Island:2
Twisted Abomination
5 B
Creature Zombie Mutant
no text
5/3
RegenerateMe:B
TypeCycling:Swamp:2
Wirewood Guardian
5 G G
Creature Elf Mutant
no text
6/6
TypeCycling:Forest:2
Valley Rannet
4 R G
Creature Beast
no text
6/3
TypeCycling:Forest:2
TypeCycling:Mountain:2
Sanctum Plowbeast
4 W U
Artifact Creature Beast
no text
3/6
Defender
TypeCycling:Island:2
TypeCycling:Plains:2
Pale Recluse
4 G W
Creature Spider
no text
4/5
Reach
TypeCycling:Forest:2
TypeCycling:Plains:2
Jhessian Zombies
4 U B
Creature Zombie
no text
2/4
Fear
TypeCycling:Swamp:2
TypeCycling:Island:2
Igneous Pouncer
4 B R
Creature Elemental
no text
5/1
Haste
TypeCycling:Swamp:2
TypeCycling:Mountain:2
Dimir Infiltrator
U B
Creature Spirit
@@ -10171,13 +10290,6 @@ Creature Dragon
Flying
PTPump R:+1/+0
Chartooth Cougar
5 R
Creature Cat Beast
no text
4/4
PTPump R:+1/+0
Aven Flock
4 W
Creature Bird Soldier

View File

@@ -9304,7 +9304,7 @@ public class CardFactory implements NewConstants {
//*************** START *********** START **************************
else if(cardName.equals("Counterspell") || cardName.equals("Cancel") || cardName.equals("Last Word"))
else if(cardName.equals("Counterspell") || cardName.equals("Cancel") || cardName.equals("Last Word") || cardName.equals("Traumatic Visions"))
{
SpellAbility spell = new Spell(card)
{
@@ -17714,6 +17714,22 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
}
}//Cycling
while (hasKeyword(card, "TypeCycling") != -1)
{
int n = hasKeyword(card, "TypeCycling");
if (n != -1)
{
String parse = card.getKeyword().get(n).toString();
card.removeIntrinsicKeyword(parse);
String k[] = parse.split(":");
final String type = k[1];
final String manacost = k[2];
card.addSpellAbility(CardFactoryUtil.ability_typecycle(card, manacost,type));
}
}//TypeCycling
if (hasKeyword(card, "Transmute") != -1)
{
int n = hasKeyword(card, "Transmute");

View File

@@ -1191,6 +1191,74 @@ public class CardFactoryUtil
return cycle;
}//ability_cycle()
public static SpellAbility ability_typecycle(final Card sourceCard, final String cycleCost, final String type)
{
String description;
final SpellAbility cycle = new Ability_Hand(sourceCard, cycleCost)
{
private static final long serialVersionUID = -4960704261761785512L;
public boolean canPlayAI() {return false;}
// some AI code could be added (certain colored mana needs analyze method maybe)
public boolean canPlay()
{
if (super.canPlay())
return true;
else
return false;
}
public void resolve()
{
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, sourceCard.getController());
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, sourceCard.getController());
CardList cards = new CardList(lib.getCards());
CardList sameType = new CardList();
for (int i=0;i<cards.size();i++)
{
if( cards.get(i).getType().contains(type) )
{
sameType.add(cards.get(i));
}
}
if(sameType.size() == 0)
return;
Object o = AllZone.Display.getChoiceOptional("Select a card", sameType.toArray());
if(o != null)
{
//ability.setTargetCard((Card)o);
//AllZone.Stack.add(ability);
AllZone.GameAction.discard(sourceCard);
Card c1 = (Card)o;
lib.remove(c1);
hand.add(c1);
}
AllZone.GameAction.shuffle(sourceCard.getController());
}
};
if (type.contains("Basic"))
description="basic land";
else description=type;
cycle.setDescription(description+"cycling " +cycleCost +" (" +cycleCost +", Discard this card: Search your library for a " + description + " card, reveal it, and put it into your hand. Then shuffle your library.");
cycle.setStackDescription(sourceCard + " " + description +"cycling: Search your library for a " + description + " card.");
return cycle;
}//ability_typecycle()
public static SpellAbility ability_transmute(final Card sourceCard, final String transmuteCost)
{
final SpellAbility transmute = new Ability_Hand(sourceCard, transmuteCost)

View File

@@ -15,6 +15,15 @@ public class CardFactory_Creatures {
return -1;
}
public static int shouldTypeCycle(Card c) {
ArrayList<String> a = c.getKeyword();
for (int i = 0; i < a.size(); i++)
if (a.get(i).toString().startsWith("TypeCycling"))
return i;
return -1;
}
public static int shouldTransmute(Card c) {
ArrayList<String> a = c.getKeyword();
for (int i = 0; i < a.size(); i++)
@@ -18222,6 +18231,22 @@ public class CardFactory_Creatures {
}
}//Cycling
while (shouldTypeCycle(card) != -1)
{
int n = shouldTypeCycle(card);
if (n != -1)
{
String parse = card.getKeyword().get(n).toString();
card.removeIntrinsicKeyword(parse);
String k[] = parse.split(":");
final String type = k[1];
final String manacost = k[2];
card.addSpellAbility(CardFactoryUtil.ability_typecycle(card, manacost, type));
}
}//TypeCycling
if (shouldTransmute(card) != -1)
{
int n = shouldTransmute(card);