- I have updated the spLoseLifeGainLife keyword. The keyword will now look for an additional 2 fields as the keyword is parsed. The third and fourth fields contain the spell description and the stack description.

- I had to create a test to see if the card is "Absorb Vis" and if it is the spLoseLifeGainLife code will add the basic landcycling. This was the only way I could get it to work. I tried
This commit is contained in:
jendave
2011-08-06 03:02:41 +00:00
parent db0c8d1ee6
commit a4b502a6e0
3 changed files with 42 additions and 18 deletions

View File

@@ -565,7 +565,7 @@ TypeCycling:Basic:1 R
Absorb Vis
6 B
Sorcery
Target player loses 4 life and you gain 4 life.
no text
spLoseLifeGainLife:4
TypeCycling:Basic:1 B
@@ -3590,8 +3590,8 @@ This creature cannot block
Vampiric Touch
2 B
Sorcery
Vampiric Touch deals 2 damage to target opponent and you gain 2 life.
spLoseLifeGainLife:2
no text
spLoseLifeGainLife:2:Vampiric Touch deals 2 damage to target opponent and you gain 2 life.
Wings of Hope
W U
@@ -4070,14 +4070,14 @@ Landfall
Kiss of Death
4 B B
Sorcery
Kiss of Death deals 4 damage to target opponent. You gain 4 life.
spLoseLifeGainLife:4
no text
spLoseLifeGainLife:4:Kiss of Death deals 4 damage to target opponent. You gain 4 life.
Stolen Grain
4 B B
Sorcery
Stolen Grain deals 5 damage to target opponent. You gain 5 life.
spLoseLifeGainLife:5
no text
spLoseLifeGainLife:5:Stolen Grain deals 5 damage to target opponent. You gain 5 life.
Privileged Position
2 GW GW GW
@@ -4135,20 +4135,20 @@ Creatures you control have horsemanship.
Last Caress
2 B
Sorcery
Target player loses 1 life and you gain 1 life. Draw a card.
Draw a card.
spLoseLifeGainLife:1
Cantrip
Morsel Theft
2 B B
Tribal Sorcery Rogue
Target player loses 3 life and you gain 3 life. (NOTE: "Prowl" is not implemented.)
(NOTE: "Prowl" is not implemented.)
spLoseLifeGainLife:3
Soul Feast
3 B B
Sorcery
Target player loses 4 life and you gain 4 life.
no text
spLoseLifeGainLife:4
Shu Grain Caravan

View File

@@ -1,6 +1,6 @@
program/mail=mtgerror@yahoo.com
program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26
program/version=Forge -- official beta: 09/11/25, SVN revision: 198
program/version=Forge -- official beta: 09/11/25, SVN revision: 199
tokens--file=AllTokens.txt

View File

@@ -1842,27 +1842,33 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(spDraw);
}//spDrawCards
//Spell gain life lose life cards (like Soul Feast)
//Spell gain life lose life cards (like Soul Feast)
if (hasKeyword(card, "spLoseLifeGainLife") != -1)
{
int n = hasKeyword(card, "spLoseLifeGainLife");
if (n != -1)
{
String parse = card.getKeyword().get(n).toString();
String parse = card.getKeyword().get(n).toString();
card.removeIntrinsicKeyword(parse);
card.clearSpellAbility();
String k[] = parse.split(":");
final String lfdmg = k[1];
final String spDesc[] = {"none"};
final String stDesc[] = {"none"};
if (k.length > 2)
spDesc[0] = k[2];
if (k.length > 3)
stDesc[0] = k[3];
final SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = -8277174319360648715L;
private static final long serialVersionUID = -8361697584661592092L;
public void resolve()
public void resolve()
{
final int n = Integer.parseInt(lfdmg);
final int n = Integer.parseInt(lfdmg);
AllZone.GameAction.getPlayerLife(getTargetPlayer()).subtractLife(n);
PlayerLife life = AllZone.GameAction.getPlayerLife(card.getController());
@@ -1873,9 +1879,27 @@ public class CardFactory implements NewConstants {
spell.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
if (spDesc[0].equals("none")) // create the card description
{
spDesc[0] = ("Target player loses " + lfdmg + " life and you gain " + lfdmg + " life.");
}
if (stDesc[0].equals("none")) // create the card stack description
{
stDesc[0] = (card.getName() + " - target loses life and you gain life.");
}
spell.setDescription(spDesc[0]);
spell.setStackDescription(stDesc[0]);
card.clearSpellAbility();
card.addSpellAbility(spell);
if (cardName.equals("Absorb Vis"))
{
card.addSpellAbility(CardFactoryUtil.ability_typecycle(card, "1 B","Basic"));
}
return card;
}
}// spLoseLifeGainLife