mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Vanishing, Soulshift keywords added.
Thief of Hope, Venerable Kumo, Thousand-legged Kami, Nightsoil Kami, Kami of the Palace Fields, Kami of Lunacy, Kami of Empty Graves, Gibbering Kami, Forked-Branch Garami, Crawling Filth, Body of Jukai, Promised Kannushi, Waning Wurm added. Torii Watchward's ability added and cards.txt corrected.
This commit is contained in:
@@ -18,6 +18,19 @@ 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
|
||||
promised_kannushi.jpg http://www.wizards.com/global/images/magic/general/promised_kannushi.jpg
|
||||
body_of_jukai.jpg http://www.wizards.com/global/images/magic/general/body_of_jukai.jpg
|
||||
crawling_filth.jpg http://www.wizards.com/global/images/magic/general/crawling_filth.jpg
|
||||
forked_branch_garami.jpg http://www.wizards.com/global/images/magic/general/forked_branch_garami.jpg
|
||||
gibbering_kami.jpg http://www.wizards.com/global/images/magic/general/gibbering_kami.jpg
|
||||
kami_of_empty_graves.jpg http://www.wizards.com/global/images/magic/general/kami_of_empty_graves.jpg
|
||||
kami_of_lunacy.jpg http://www.wizards.com/global/images/magic/general/kami_of_lunacy.jpg
|
||||
kami_of_the_palace_fields.jpg http://www.wizards.com/global/images/magic/general/kami_of_the_palace_fields.jpg
|
||||
nightsoil_kami.jpg http://www.wizards.com/global/images/magic/general/nightsoil_kami.jpg
|
||||
thousand_legged_kami.jpg http://www.wizards.com/global/images/magic/general/thousand_legged_kami.jpg
|
||||
venerable_kumo.jpg http://www.wizards.com/global/images/magic/general/venerable_kumo.jpg
|
||||
thief_of_hope.jpg http://www.wizards.com/global/images/magic/general/thief_of_hope.jpg
|
||||
waning_wurm.jpg http://www.wizards.com/global/images/magic/general/waning_wurm.jpg
|
||||
time_stretch.jpg http://www.wizards.com/global/images/magic/general/time_stretch.jpg
|
||||
veteran_armorsmith.jpg http://www.wizards.com/global/images/magic/general/veteran_armorsmith.jpg
|
||||
veteran_swordsmith.jpg http://www.wizards.com/global/images/magic/general/veteran_swordsmith.jpg
|
||||
|
||||
114
res/cards.txt
114
res/cards.txt
@@ -1,3 +1,110 @@
|
||||
Thief of Hope
|
||||
2 B
|
||||
Creature Spirit
|
||||
Whenever you play a Spirit or Arcane spell, target opponent loses 1 life and you gain 1 life.
|
||||
2/2
|
||||
Soulshift:2
|
||||
|
||||
Venerable Kumo
|
||||
4 G
|
||||
Creature Spirit
|
||||
no text
|
||||
2/3
|
||||
Reach
|
||||
Soulshift:4
|
||||
|
||||
Thousand-legged Kami
|
||||
6 G G
|
||||
Creature Spirit
|
||||
no text
|
||||
6/6
|
||||
Soulshift:7
|
||||
|
||||
Nightsoil Kami
|
||||
4 G G
|
||||
Creature Spirit
|
||||
no text
|
||||
6/4
|
||||
Soulshift:5
|
||||
|
||||
Kami of the Palace Fields
|
||||
5 W
|
||||
Creature Spirit
|
||||
no text
|
||||
3/2
|
||||
Flying
|
||||
First Strike
|
||||
Soulshift:5
|
||||
|
||||
Kami of Lunacy
|
||||
4 B B
|
||||
Creature Spirit
|
||||
no text
|
||||
4/1
|
||||
Flying
|
||||
Soulshift:5
|
||||
|
||||
Kami of Empty Graves
|
||||
3 B
|
||||
Creature Spirit
|
||||
no text
|
||||
4/1
|
||||
Soulshift:3
|
||||
|
||||
Gibbering Kami
|
||||
3 B
|
||||
Creature Spirit
|
||||
no text
|
||||
2/2
|
||||
Flying
|
||||
Soulshift:3
|
||||
|
||||
Forked-Branch Garami
|
||||
3 G G
|
||||
Creature Spirit
|
||||
no text
|
||||
4/4
|
||||
Soulshift:4
|
||||
Soulshift:4
|
||||
|
||||
Crawling Filth
|
||||
5 B
|
||||
Creature Spirit
|
||||
no text
|
||||
2/2
|
||||
Fear
|
||||
Soulshift:5
|
||||
|
||||
Body of Jukai
|
||||
7 G G
|
||||
Creature Spirit
|
||||
no text
|
||||
8/5
|
||||
Trample
|
||||
Soulshift:8
|
||||
|
||||
Promised Kannushi
|
||||
G
|
||||
Creature Human Druid
|
||||
no text
|
||||
1/1
|
||||
Soulshift:7
|
||||
|
||||
Torii Watchward
|
||||
4 W
|
||||
Creature Spirit
|
||||
no text
|
||||
3/3
|
||||
Vigilance
|
||||
Soulshift:4
|
||||
|
||||
Waning Wurm
|
||||
3 B
|
||||
Creature Zombie Wurm
|
||||
no text
|
||||
7/6
|
||||
Vanishing:2
|
||||
|
||||
Time Stretch
|
||||
8 U U
|
||||
Sorcery
|
||||
@@ -13744,13 +13851,6 @@ Radiant, Archangel gets +1/+1 for each creature with flying in play.
|
||||
Flying
|
||||
Vigilance
|
||||
|
||||
Torii Watchward
|
||||
4 W
|
||||
Creature Spirit
|
||||
(NOTE: "Soulshift" not implemented.)
|
||||
3/3
|
||||
Vigilance
|
||||
|
||||
Veteran Armorer
|
||||
1 W
|
||||
Creature Human Soldier
|
||||
|
||||
@@ -17777,6 +17777,41 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
|
||||
}
|
||||
}//transmute
|
||||
|
||||
while (hasKeyword(card,"Soulshift") != -1)
|
||||
{
|
||||
int n = hasKeyword(card,"Soulshift");
|
||||
if (n != -1)
|
||||
{
|
||||
String parse = card.getKeyword().get(n).toString();
|
||||
card.removeIntrinsicKeyword(parse);
|
||||
|
||||
String k[] = parse.split(":");
|
||||
final String manacost = k[1];
|
||||
|
||||
|
||||
card.addSpellAbility(CardFactoryUtil.soul_desc(card, manacost));
|
||||
card.addDestroyCommand(CardFactoryUtil.ability_Soulshift(card, manacost));
|
||||
}
|
||||
}//Soulshift
|
||||
|
||||
if (hasKeyword(card,"Vanishing") != -1)
|
||||
{
|
||||
int n = hasKeyword(card,"Vanishing");
|
||||
if (n != -1)
|
||||
{
|
||||
String parse = card.getKeyword().get(n).toString();
|
||||
card.removeIntrinsicKeyword(parse);
|
||||
|
||||
String k[] = parse.split(":");
|
||||
final int power = Integer.parseInt(k[1]);
|
||||
|
||||
|
||||
card.addComesIntoPlayCommand(CardFactoryUtil.vanishing(card, power));
|
||||
card.addSpellAbility(CardFactoryUtil.vanish_desc(card, power));
|
||||
}
|
||||
}//Vanishing
|
||||
|
||||
|
||||
return card;
|
||||
}//getCard2
|
||||
|
||||
|
||||
@@ -1449,6 +1449,119 @@ public class CardFactoryUtil
|
||||
return onUnEquip;
|
||||
}//vanila_unequip()
|
||||
|
||||
public static Command vanishing(final Card sourceCard, final int Power)
|
||||
{
|
||||
Command age = new Command()
|
||||
{
|
||||
private static final long serialVersionUID = 431920157968451817L;
|
||||
public boolean firstTime = true;
|
||||
public void execute()
|
||||
{
|
||||
|
||||
//testAndSet - only needed when comes into play.
|
||||
if(firstTime){
|
||||
sourceCard.setCounter(Counters.AGE, Power);
|
||||
}
|
||||
firstTime = false;
|
||||
}
|
||||
};
|
||||
return age;
|
||||
} // vanishing
|
||||
|
||||
public static SpellAbility vanish_desc(final Card sourceCard, final int power)
|
||||
{
|
||||
final SpellAbility desc = new Ability_Hand(sourceCard, "0")
|
||||
{
|
||||
private static final long serialVersionUID = -4960704261761785512L;
|
||||
|
||||
public boolean canPlay() {return false;}
|
||||
|
||||
public void resolve()
|
||||
{
|
||||
}
|
||||
};
|
||||
// Be carefull changing this description cause it's crucial for ability to work (see GameActionUtil - vanishing for it)
|
||||
desc.setDescription("Vanishing " + power + " (This permanent enters the battlefield with " +power+ " time counters on it. At the beginning of your upkeep, remove a time counter from it. When the last is removed, sacrifice it.)");
|
||||
return desc;
|
||||
}//vanish_desc()
|
||||
|
||||
public static Command ability_Soulshift(final Card sourceCard, final String Manacost)
|
||||
{
|
||||
final Command Soulshift = new Command()
|
||||
{
|
||||
private static final long serialVersionUID = -4960704261761785512L;
|
||||
|
||||
public void execute()
|
||||
{
|
||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Graveyard, sourceCard.getController());
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, sourceCard.getController());
|
||||
|
||||
|
||||
CardList cards = new CardList(lib.getCards());
|
||||
CardList sameCost = new CardList();
|
||||
int Cost = CardUtil.getConvertedManaCost(Manacost);
|
||||
for (int i=0;i<cards.size();i++)
|
||||
{
|
||||
if( (CardUtil.getConvertedManaCost(cards.get(i).getManaCost()) <= Cost) && (cards.get(i).getType().contains("Spirit") || cards.get(i).getType().contains("Changeling")) )
|
||||
{
|
||||
sameCost.add(cards.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(sameCost.size() == 0)
|
||||
return;
|
||||
|
||||
if (sourceCard.getController().equals(Constant.Player.Human)) {
|
||||
String[] choices =
|
||||
{ "Yes", "No" };
|
||||
Object choice = AllZone.Display.getChoice(
|
||||
sourceCard + " - Soulshift "+ Cost + "?", choices);
|
||||
if (choice.equals("Yes")) {
|
||||
Object o = AllZone.Display.getChoiceOptional("Select a card", sameCost.toArray());
|
||||
if(o != null)
|
||||
{
|
||||
//ability.setTargetCard((Card)o);
|
||||
//AllZone.Stack.add(ability);
|
||||
|
||||
Card c1 = (Card)o;
|
||||
lib.remove(c1);
|
||||
hand.add(c1);
|
||||
|
||||
|
||||
}}}
|
||||
else //Wiser choice should be here
|
||||
{
|
||||
Card choice = null;
|
||||
sameCost.shuffle();
|
||||
choice = sameCost.getCard(0);
|
||||
if (!(choice == null)) {
|
||||
lib.remove(choice);
|
||||
hand.add(choice);}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return Soulshift;
|
||||
}//ability_Soulshift()
|
||||
|
||||
public static SpellAbility soul_desc(final Card sourceCard, final String Manacost)
|
||||
{
|
||||
final SpellAbility desc = new Ability_Hand(sourceCard, "0")
|
||||
{
|
||||
private static final long serialVersionUID = -4960704261761785512L;
|
||||
|
||||
public boolean canPlay() {return false;}
|
||||
|
||||
public void resolve()
|
||||
{
|
||||
}
|
||||
};
|
||||
desc.setDescription("Soulshift " + Manacost +" - When this permanent is put into a graveyard from play, you may return target Spirit card with converted mana cost " + Manacost + "or less from your graveyard to your hand.");
|
||||
return desc;
|
||||
}//soul_desc()
|
||||
|
||||
|
||||
//CardList choices are the only cards the user can successful select
|
||||
public static Input input_targetSpecific(final SpellAbility spell, final CardList choices, final String message, final boolean targeted)
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
package forge;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
class CardFactory_Auras {
|
||||
|
||||
public static int shouldVanish(Card c) {
|
||||
ArrayList<String> a = c.getKeyword();
|
||||
for (int i = 0; i < a.size(); i++)
|
||||
if (a.get(i).toString().startsWith("Vanishing"))
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
public static Card getCard(final Card card, String cardName, String owner)
|
||||
{
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Epic Proportions"))
|
||||
{
|
||||
@@ -5772,6 +5785,22 @@ class CardFactory_Auras {
|
||||
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
return card;
|
||||
if (shouldVanish(card) != -1)
|
||||
{
|
||||
int n = shouldVanish(card);
|
||||
if (n != -1)
|
||||
{
|
||||
String parse = card.getKeyword().get(n).toString();
|
||||
card.removeIntrinsicKeyword(parse);
|
||||
|
||||
String k[] = parse.split(":");
|
||||
final int power = Integer.parseInt(k[1]);
|
||||
|
||||
card.addComesIntoPlayCommand(CardFactoryUtil.vanishing(card, power));
|
||||
card.addSpellAbility(CardFactoryUtil.vanish_desc(card, power));
|
||||
}
|
||||
}//Vanishing
|
||||
|
||||
return card;
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,25 @@ public class CardFactory_Creatures {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int shouldSoulshift(Card c) {
|
||||
ArrayList<String> a = c.getKeyword();
|
||||
for (int i = 0; i < a.size(); i++)
|
||||
if (a.get(i).toString().startsWith("Soulshift"))
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int shouldVanish(Card c) {
|
||||
ArrayList<String> a = c.getKeyword();
|
||||
for (int i = 0; i < a.size(); i++)
|
||||
if (a.get(i).toString().startsWith("Vanishing"))
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
public static Card getCard(final Card card, String cardName, String owner, CardFactory cf)
|
||||
{
|
||||
|
||||
@@ -18702,6 +18721,37 @@ public class CardFactory_Creatures {
|
||||
}
|
||||
}//Transmute
|
||||
|
||||
while (shouldSoulshift(card) != -1)
|
||||
{
|
||||
int n = shouldSoulshift(card);
|
||||
if (n != -1)
|
||||
{
|
||||
String parse = card.getKeyword().get(n).toString();
|
||||
card.removeIntrinsicKeyword(parse);
|
||||
|
||||
String k[] = parse.split(":");
|
||||
final String manacost = k[1];
|
||||
card.addSpellAbility(CardFactoryUtil.soul_desc(card, manacost));
|
||||
card.addDestroyCommand(CardFactoryUtil.ability_Soulshift(card, manacost));
|
||||
}
|
||||
}//Soulshift
|
||||
|
||||
if (shouldVanish(card) != -1)
|
||||
{
|
||||
int n = shouldVanish(card);
|
||||
if (n != -1)
|
||||
{
|
||||
String parse = card.getKeyword().get(n).toString();
|
||||
card.removeIntrinsicKeyword(parse);
|
||||
|
||||
String k[] = parse.split(":");
|
||||
final int power = Integer.parseInt(k[1]);
|
||||
|
||||
card.addComesIntoPlayCommand(CardFactoryUtil.vanishing(card, power));
|
||||
card.addSpellAbility(CardFactoryUtil.vanish_desc(card, power));
|
||||
}
|
||||
}//Vanishing
|
||||
|
||||
return card;
|
||||
}
|
||||
}
|
||||
@@ -64,6 +64,7 @@ public class GameActionUtil
|
||||
upkeep_Defense_of_the_Heart();
|
||||
upkeep_Mycoloth();
|
||||
upkeep_Spore_Counters();
|
||||
upkeep_Vanishing();
|
||||
upkeep_Aven_Riftwatcher();
|
||||
upkeep_Calciderm();
|
||||
upkeep_Blastoderm();
|
||||
@@ -93,6 +94,7 @@ public class GameActionUtil
|
||||
playCard_Dovescape(c); //keep this one top
|
||||
playCard_Demigod_of_Revenge(c);
|
||||
playCard_Halcyon_Glaze(c);
|
||||
playCard_Thief_of_Hope(c);
|
||||
playCard_Infernal_Kirin(c);
|
||||
playCard_Cloudhoof_Kirin(c);
|
||||
playCard_Bounteous_Kirin(c);
|
||||
@@ -663,6 +665,59 @@ public class GameActionUtil
|
||||
|
||||
}//Halcyon Glaze
|
||||
|
||||
public static void playCard_Thief_of_Hope(Card c)
|
||||
{
|
||||
final String controller = c.getController();
|
||||
|
||||
final PlayerZone play = AllZone.getZone(Constant.Zone.Play,
|
||||
controller);
|
||||
|
||||
CardList list = new CardList();
|
||||
list.addAll(play.getCards());
|
||||
|
||||
list = list.getName("Thief of Hope");
|
||||
|
||||
if (list.size() > 0){
|
||||
if (c.getType().contains("Spirit") || c.getType().contains("Arcane") || c.getIntrinsicKeyword().contains("Changeling"))
|
||||
{
|
||||
for (int i=0;i<list.size();i++)
|
||||
{
|
||||
final Card card = list.get(i);
|
||||
Ability ability2 = new Ability(card, "0")
|
||||
{
|
||||
public void resolve()
|
||||
{
|
||||
final String target;
|
||||
if (card.getController().contains("Human"))
|
||||
{
|
||||
String[] choices =
|
||||
{ "Opponent", "Yourself" };
|
||||
Object choice = AllZone.Display.getChoice(
|
||||
"Choose target player", choices);
|
||||
if (choice.equals("Opponent"))
|
||||
{
|
||||
target = "Computer"; // check for target of spell/abilities should be here
|
||||
}// if choice yes
|
||||
else target = "Human"; // check for target of spell/abilities should be here
|
||||
}
|
||||
else target = "Human"; // check for target of spell/abilities should be here
|
||||
AllZone.GameAction.getPlayerLife(target).subtractLife(1);
|
||||
PlayerLife life = AllZone.GameAction.getPlayerLife(card.getController());
|
||||
life.addLife(1);
|
||||
|
||||
} //resolve
|
||||
}; //ability
|
||||
ability2.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
|
||||
ability2.setBeforePayMana(CardFactoryUtil.input_targetPlayer(ability2));
|
||||
ability2.setStackDescription(card.getName() + " - "
|
||||
+ c.getController() + " played a Spirit or Arcane spell, target opponent loses 1 life and you gain 1 life.");
|
||||
AllZone.Stack.add(ability2);
|
||||
}
|
||||
}//if
|
||||
}
|
||||
|
||||
}//Thief of Hope
|
||||
|
||||
public static void playCard_Infernal_Kirin(Card c)
|
||||
{
|
||||
final String controller = c.getController();
|
||||
@@ -5637,6 +5692,39 @@ public class GameActionUtil
|
||||
}
|
||||
}
|
||||
|
||||
private static void upkeep_Vanishing()
|
||||
{
|
||||
final String player = AllZone.Phase.getActivePlayer();
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player);
|
||||
CardList list = new CardList(playZone.getCards());
|
||||
list = list.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card c) {
|
||||
SpellAbility[] sas = c.getSpellAbility();
|
||||
boolean hasRegen = false;
|
||||
for (SpellAbility sa : sas)
|
||||
{
|
||||
if(sa.toString().contains("At the beginning of your upkeep, remove a time counter from it. When the last is removed, sacrifice it.)")) //this is essentially ".getDescription()"
|
||||
hasRegen = true;
|
||||
}
|
||||
return hasRegen;
|
||||
}
|
||||
});
|
||||
if (list.size() > 0)
|
||||
{
|
||||
for (int i = 0; i < list.size(); i++)
|
||||
{
|
||||
Card card = list.get(i);
|
||||
card.setCounter(Counters.AGE,
|
||||
card.getCounters(Counters.AGE) - 1);
|
||||
if (card.getCounters(Counters.AGE) <= 0)
|
||||
{
|
||||
AllZone.GameAction.sacrifice(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void upkeep_Aven_Riftwatcher()
|
||||
{
|
||||
// get all Aven Riftwatcher in play under the control of this player
|
||||
|
||||
Reference in New Issue
Block a user