- Fixed Avenger of Zendikar (will put counters on changeling creatures).

- Added Rob's spLoseLife[Tgt] keyword, added the new cards / changed existing cards too. Commented out spLoseLifeGainLife.
This commit is contained in:
jendave
2011-08-06 03:30:15 +00:00
parent ab0f49e371
commit a81b695849
4 changed files with 191 additions and 39 deletions

View File

@@ -1,3 +1,50 @@
Absorb Vis
6 B
Sorcery
no text
spLoseLifeTgt:4:Drawback$YouGainLife/4:Target player loses 4 life and you gain 4 life.
TypeCycling:Basic:1 B
Last Caress
2 B
Sorcery
no text
spLoseLifeTgt:1:Drawback$YouGainLife/1:Target player loses 1 life and you gain 1 life.
Draw a card.
Soul Feast
3 B B
Sorcery
no text
spLoseLifeTgt:4:Drawback$YouGainLife/4:Target player loses 4 life and you gain 4 life.
Morsel Theft
2 B B
Tribal Sorcery Rogue
(NOTE: "Prowl" is not implemented.)
spLoseLifeTgt:3:Drawback$YouGainLife/3:Target player loses 3 life and you gain 3 life.:Morsel Theft - target player 3 loses life and you gain 3 life.
Exotic Disease
4 B
Sorcery
no text
spLoseLifeTgt:X:Drawback$YouGainLife/X:Domain - Target player loses X life and you gain X life, where X is the number of basic land types among lands you control.
SVar:X:Count$Domain
Stronghold Discipline
2 B B
Sorcery
no text
spLoseLife:X:Drawback$OppLoseLife/dX:Each player loses 1 life for each creature he or she controls.:Stronghold Discipline - each player loses life
SVar:X:Count$TypeYouCtrl.Creature
SVar:dX:Count$TypeOppCtrl.Creature
Syphon Life
1 B B
Sorcery
(NOTE: "Retrace" is not implemented.)
spLoseLifeTgt:2:Drawback$YouGainLife/2:Target player loses 2 life and you gain 2 life.:Syphone Life - target player loses life and you gain life
Exhume
1 B
Sorcery
@@ -2262,13 +2309,6 @@ 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
@@ -5845,25 +5885,6 @@ Legendary Creature Human Soldier
Creatures you control have horsemanship.
4/4
Last Caress
2 B
Sorcery
no text
spLoseLifeGainLife:1
Draw a card.
Morsel Theft
2 B B
Tribal Sorcery Rogue
(NOTE: "Prowl" is not implemented.)
spLoseLifeGainLife:3
Soul Feast
3 B B
Sorcery
no text
spLoseLifeGainLife:4
Shu Grain Caravan
2 W
Creature Human Soldier

View File

@@ -2737,6 +2737,7 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(spDraw);
}//spDrawCards
/*
//Spell gain life lose life cards (like Soul Feast)
if(hasKeyword(card, "spLoseLifeGainLife") != -1) {
int n = hasKeyword(card, "spLoseLifeGainLife");
@@ -2792,6 +2793,134 @@ public class CardFactory implements NewConstants {
return card;
}
}// spLoseLifeGainLife
*/
if (hasKeyword(card, "spLoseLife") != -1)
{
int n = hasKeyword(card, "spLoseLife");
if (n != -1)
{
String parse = card.getKeyword().get(n).toString();
card.removeIntrinsicKeyword(parse);
String k[] = parse.split(":");
final boolean Tgt[] = {false};
Tgt[0] = k[0].contains("Tgt");
final int NumLife[] = {-1};
final String NumLifeX[] = {"none"};
if (k[1].matches("X"))
{
String x = card.getSVar(k[1]);
if (x.startsWith("Count$"))
{
String kk[] = x.split("\\$");
NumLifeX[0] = kk[1];
}
}
else if (k[1].matches("[0-9][0-9]?"))
NumLife[0] = Integer.parseInt(k[1]);
// drawbacks and descriptions
final String DrawBack[] = {"none"};
final String spDesc[] = {"none"};
final String stDesc[] = {"none"};
if (k.length > 2)
{
if (k[2].contains("Drawback$"))
{
String kk[] = k[2].split("\\$");
DrawBack[0] = kk[1];
if (k.length > 3)
spDesc[0] = k[3];
if (k.length > 4)
stDesc[0] = k[4];
}
else
{
if (k.length > 2)
spDesc[0] = k[2];
if (k.length > 3)
stDesc[0] = k[3];
}
}
else
{
if (Tgt[0] == true)
{
spDesc[0] = "Target player loses " + NumLife[0] + " life.";
stDesc[0] = cardName + " - target player loses life";
}
else
{
spDesc[0] = "You lose " + NumLife[0] + " life.";
stDesc[0] = cardName + " - you lose life";
}
}
final SpellAbility spLoseLife = new Spell(card)
{
private static final long serialVersionUID = -8361697584661592092L;
public int getNumLife()
{
if (NumLife[0] != -1)
return NumLife[0];
if (! NumLifeX[0].equals("none"))
return CardFactoryUtil.xCount(card, NumLifeX[0]);
return 0;
}
public boolean canPlayAI()
{
if (Tgt[0] == true)
{
setTargetPlayer(Constant.Player.Human);
return true;
}
else // pretty much just for Stronghold Discipline...
{ // assumes there's a good Drawback$ that makes losing life worth it
int nlife = getNumLife();
if ((AllZone.Computer_Life.getLife() - nlife) > 10)
return true;
else
return false;
}
}
public void resolve()
{
int nlife = getNumLife();
String TgtPlayer;
if (Tgt[0] == true)
TgtPlayer = getTargetPlayer();
else
TgtPlayer = card.getController();
AllZone.GameAction.subLife(TgtPlayer, nlife);
if (!DrawBack[0].equals("none"))
CardFactoryUtil.doDrawBack(DrawBack[0], nlife, card.getController(), AllZone.GameAction.getOpponent(card.getController()), TgtPlayer, card, null);
}//resolve()
};//SpellAbility
if (Tgt[0] == true)
spLoseLife.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spLoseLife));
spLoseLife.setDescription(spDesc[0]);
spLoseLife.setStackDescription(stDesc[0]);
card.clearSpellAbility();
card.addSpellAbility(spLoseLife);
}
}
if(hasKeyword(card, "SearchRebel") != -1) {
int n = hasKeyword(card, "SearchRebel");
@@ -14125,8 +14254,7 @@ public class CardFactory implements NewConstants {
@Override
public boolean canPlay() {
CardList gobs = new CardList(
AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
CardList gobs = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
gobs = gobs.getType("Goblin");
return super.canPlay() && gobs.size() > 0;
@@ -14186,8 +14314,7 @@ public class CardFactory implements NewConstants {
@Override
public void resolve() {
if(card.getController().equals(Constant.Player.Computer)) {
CardList gobs = new CardList(
AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
CardList gobs = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
gobs = gobs.getType("Goblin");
if(gobs.size() > 0) {

View File

@@ -1091,14 +1091,17 @@ public class CardFactory_Creatures {
}
*/
List<Card> selection = AllZone.Display.getChoices("Select up to two swamps", swamp.toArray());
if (swamp.size() > 0)
{
List<Card> selection = AllZone.Display.getChoices("Select up to two swamps", swamp.toArray());
for(int i = 0; i < selection.size(); i++) {
Card c = selection.get(i);
for(int i = 0; i < selection.size(); i++) {
Card c = selection.get(i);
library.remove(c);
play.add(c);
c.tap();
library.remove(c);
play.add(c);
c.tap();
}
}
for(String effect:AllZone.StaticEffects.getStateBasedMap().keySet()) {

View File

@@ -3416,7 +3416,8 @@ public class GameActionUtil {
CardList plants = new CardList(play.getCards());
plants = plants.filter(new CardListFilter() {
public boolean addCard(Card card) {
return card.isCreature() && card.getType().contains("Plant");
return card.isCreature() && card.getType().contains("Plant") ||
card.getKeyword().contains("Changeling");
}
});