Adding similar cards
I have a new card to submit. It may be too late to get it in for the next release, we can always add it to the following release.
Add this to cards.txt:
The following replaces the code for Soul Feast (I am combining Soul Feast with the new spell Last Caress):
Add this to cards-pictures.txt:
.
Add this to cards.txt:
- Code: Select all
Last Caress
2 B
Sorcery
Target player loses 1 life and you gain 1 life. Draw a card.
Cantrip
The following replaces the code for Soul Feast (I am combining Soul Feast with the new spell Last Caress):
- Code: Select all
////////////////////////////////////////////////////////////
if (cardName.equals("Soul Feast") || cardName.equals("Last Caress"))
{
final SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = -8277174319360648715L;
public void resolve()
{
int n = 4;
if (cardName.equals("Last Caress"))
n = 1;
AllZone.GameAction.getPlayerLife(getTargetPlayer()).subtractLife(n);
PlayerLife life = AllZone.GameAction.getPlayerLife(card.getController());
life.addLife(n);
}//resolve()
};//SpellAbility
spell.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
card.clearSpellAbility();
card.addSpellAbility(spell);
return card;
}
//////////////////////////////////////////////////////////
Add this to cards-pictures.txt:
.
(You may pay an additional