- Changed "This card does not untap during your untap phase." keyword to "This card doesn't untap during your untap step.", and added "This card doesn't untap during your next untap step." keyword.

New cards: Dingus Egg, Dingus Staff, Proper Burial, Moonlit Wake, Fecundity, Goblin Sharpshooter, Dauthi Ghoul, Eternity Snare, Elvish Hunter (not implemented yet).
This commit is contained in:
jendave
2011-08-06 02:46:32 +00:00
parent fc45d9b745
commit ad50e3f2eb
5 changed files with 390 additions and 3 deletions

View File

@@ -1,3 +1,71 @@
Dingus Egg
4
Artifact
no text
Whenever a land is put into a graveyard from the battlefield, Dingus Egg deals 2 damage to that land's controller.
Dingus Staff
4
Artifact
no text
Whenever a creature is put into a graveyard from the battlefield, Dingus Egg deals 2 damage to that creature's controller.
Proper Burial
3 W
Enchantment
no text
Whenever a creature you control is put into a graveyard from the battlefield, you gain life equal to that creature's toughness.
Moonlit Wake
2 W
Enchantment
no text
Whenever a creature is put into a graveyard from the battlefield, you gain 1 life.
Fecundity
2 G
Enchantment
no text
Whenever a creature is put into a graveyard from the battlefield, that creature's controller may draw a card.
Goblin Sharpshooter
2 R
Creature Goblin
no text
1/1
abDamageCP T:1
This card doesn't untap during your untap step.
Whenever a creature is put into a graveyard from the battlefield, untap Goblin Sharpshooter.
Soulcatcher
1 W
Creature Bird Soldier
no text
1/1
Whenever a creature with flying is put into a graveyard from the battlefield, put a +1/+1 counter on Soulcatcher.
Flying
Dauthi Ghoul
1 B
Creature Dauthi Zombie
no text
1/1
Whenever a creature with shadow is put into a graveyard from the battlefield, put a +1/+1 counter on Dauthi Ghoul.
Shadow
Eternity Snare
4 U
Enchantment Aura
Enchanted creature doesn't untap during its controller's untap step.
When this card comes into play, draw a card.
Enchant creature
Elvish Hunter
1 G
Creature Elf Archer
no text
1/1
Merfolk Looter
1 U
Creature Merfolk Rogue
@@ -3669,7 +3737,7 @@ Basalt Monolith
3
Artifact
no text
This card does not untap during your untap phase.
This card doesn't untap during your untap step.
Untap:3
tap: add 3
@@ -3677,7 +3745,7 @@ Grim Monolith
2
Artifact
no text
This card does not untap during your untap phase.
This card doesn't untap during your untap step.
Untap:4
tap: add 3

View File

@@ -5445,6 +5445,109 @@ class CardFactory_Auras {
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
}//*************** END ************ END **************************
//*************** START *********** START **************************
if(cardName.equals("Eternity Snare"))
{
final SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = -1241918879720338838L;
public boolean canPlayAI()
{
CardList list = new CardList(AllZone.Human_Play.getCards());
list = list.filter(new CardListFilter()
{
public boolean addCard(Card c) {
return c.isCreature() && !c.getKeyword().contains("Vigilance");
}
});
if(list.isEmpty())
return false;
//else
CardListUtil.sortAttack(list);
CardListUtil.sortFlying(list);
for (int i=0;i<list.size();i++) {
if (CardFactoryUtil.canTarget(card, list.get(i)))
{
setTargetCard(list.get(i));
return true;
}
}
return false;
}//canPlayAI()
public void resolve()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(card);
Card c = getTargetCard();
if(AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c) )
{
card.enchantCard(c);
System.out.println("Enchanted: " +getTargetCard());
}
}//resolve()
};//SpellAbility
card.clearSpellAbility();
card.addSpellAbility(spell);
Command onEnchant = new Command()
{
private static final long serialVersionUID = -5795220371369091411L;
public void execute()
{
if (card.isEnchanting())
{
Card crd = card.getEnchanting().get(0);
crd.addExtrinsicKeyword("This card doesn't untap during its controller's untap step.");
}
}//execute()
};//Command
Command onUnEnchant = new Command()
{
private static final long serialVersionUID = -3856817134400315080L;
public void execute()
{
if (card.isEnchanting())
{
Card crd = card.getEnchanting().get(0);
crd.removeExtrinsicKeyword("This card doesn't untap during its controller's untap step.");
}
}//execute()
};//Command
Command onLeavesPlay = new Command()
{
private static final long serialVersionUID = 8243327573672256317L;
public void execute()
{
if (card.isEnchanting())
{
Card crd = card.getEnchanting().get(0);
card.unEnchantCard(crd);
}
}
};
card.addEnchantCommand(onEnchant);
card.addUnEnchantCommand(onUnEnchant);
card.addLeavesPlayCommand(onLeavesPlay);
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
}//*************** END ************ END **************************
return card;

View File

@@ -512,6 +512,28 @@ private Card getCurrentCard(int ID)
if (c.isEquipped())
skullClamp_destroy(c);
//destroy card effects:
PlayerZone comp = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer);
PlayerZone hum = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
CardList list = new CardList();
list.addAll(comp.getCards());
list.addAll(hum.getCards());
list = list.filter(new CardListFilter(){
public boolean addCard(Card c) {
ArrayList<String> keywords = c.getKeyword();
for (String kw : keywords)
{
if (kw.startsWith("Whenever") && kw.contains(" put into a graveyard from the battlefield,"))
return true;
}
return false;
}
});
for (int i=0;i<list.size();i++)
GameActionUtil.executeDestroyCardEffects(list.get(i), c);
if (persist){
c.setDamage(0);
c.untap();
@@ -573,6 +595,7 @@ private Card getCurrentCard(int ID)
GameActionUtil.executeVampiricEffects(crd);
}
}
this.sacrificeDestroy(c);
}

View File

@@ -1089,6 +1089,195 @@ public class GameActionUtil
}
}
public static void executeDestroyCardEffects(Card c, Card destroyed)
{
if (destroyed.isCreature())
executeDestroyCreatureCardEffects(c, destroyed);
else if (destroyed.isLand())
executeDestroyLandCardEffects(c, destroyed);
}
private static boolean showDialog(Card c)
{
String[] choices = { "Yes", "No" };
Object q = null;
q = AllZone.Display.getChoiceOptional("Use " + c.getName() + " effect?", choices);
if (q == null || q.equals("No"))
return false;
else
return true;
}
//***CREATURES START HERE***
public static void executeDestroyCreatureCardEffects(Card c, Card destroyed)
{
//if (AllZone.GameAction.isCardInPlay(c)){
if (c.getName().equals("Goblin Sharpshooter"))
destroyCreature_Goblin_Sharpshooter(c, destroyed);
else if (c.getName().equals("Dingus Staff"))
destroyCreature_Dingus_Staff(c, destroyed);
else if (c.getName().equals("Dauthi Ghoul") && destroyed.getKeyword().contains("Shadow"))
destroyCreature_Dauthi_Ghoul(c, destroyed);
else if (c.getName().equals("Soulcatcher") && destroyed.getKeyword().contains("Flying"))
destroyCreature_Soulcatcher(c, destroyed);
else if (c.getName().equals("Fecundity"))
destroyCreature_Fecundity(c, destroyed);
else if (c.getName().equals("Moonlit Wake"))
destroyCreature_Moonlit_Wake(c, destroyed);
else if (c.getName().equals("Proper Burial"))
destroyCreature_Proper_Burial(c, destroyed);
//}
}
//***
private static void destroyCreature_Goblin_Sharpshooter(Card c, Card destroyed)
{
//not using stack for this one
if (AllZone.GameAction.isCardInPlay(c) && c.isTapped())
c.untap();
}
private static void destroyCreature_Dingus_Staff(Card c, Card destroyed)
{
final Card crd = destroyed;
Ability ability = new Ability(c, "0")
{
public void resolve()
{
String player = crd.getController();
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
life.subtractLife(2);
}
};
ability.setStackDescription("Dingus Staff - Deals 2 damage to " +destroyed.getController() +".");
AllZone.Stack.add(ability);
}
private static void destroyCreature_Dauthi_Ghoul(Card c, Card destroyed)
{
final Card crd = c;
Ability ability = new Ability(c, "0")
{
public void resolve()
{
if (AllZone.GameAction.isCardInPlay(crd))
crd.addCounter(Counters.P1P1, 1);
}
};
if (AllZone.GameAction.isCardInPlay(c))
ability.setStackDescription("Dauthi Ghoul - gets a +1/+1 counter.");
AllZone.Stack.add(ability);
}
private static void destroyCreature_Soulcatcher(Card c, Card destroyed)
{
final Card crd = c;
Ability ability = new Ability(c, "0")
{
public void resolve()
{
if (AllZone.GameAction.isCardInPlay(crd))
crd.addCounter(Counters.P1P1, 1);
}
};
ability.setStackDescription("Soulcatcher - gets a +1/+1 counter.");
if (AllZone.GameAction.isCardInPlay(c))
AllZone.Stack.add(ability);
}
private static void destroyCreature_Fecundity(Card c, Card destroyed)
{
final Card crd = destroyed;
final Card crd2 = c;
Ability ability = new Ability(c, "0")
{
public void resolve()
{
String player = crd.getController();
if (player.equals(Constant.Player.Human)) {
if (showDialog(crd2))
AllZone.GameAction.drawCard(player);
}
else
AllZone.GameAction.drawCard(player); //computer
}
};
ability.setStackDescription("Fecundity - " + destroyed.getController() + " may draw a card.");
AllZone.Stack.add(ability);
}
private static void destroyCreature_Moonlit_Wake(Card c, Card destroyed)
{
final Card crd = c;
Ability ability = new Ability(c, "0")
{
public void resolve()
{
String player = crd.getController();
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
life.addLife(1);
}
};
ability.setStackDescription("Moonlit Wake - " + c.getController() +" gains 1 life.");
AllZone.Stack.add(ability);
}
private static void destroyCreature_Proper_Burial(Card c, Card destroyed)
{
final Card crd = c;
final Card crd2 = destroyed;
Ability ability = new Ability(c, "0")
{
public void resolve()
{
String player = crd.getController();
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
life.addLife(crd2.getNetDefense());
}
};
ability.setStackDescription("Proper Burial - " + c.getController() +" gains " + destroyed.getNetDefense() +" life.");
AllZone.Stack.add(ability);
}
//***CREATURES END HERE***
//***LANDS START HERE***
public static void executeDestroyLandCardEffects(Card c, Card destroyed)
{
if (c.getName().equals("Dingus Egg"))
destroyLand_Dingus_Egg(c, destroyed);
}
//***
private static void destroyLand_Dingus_Egg(Card c, Card destroyed)
{
final Card crd = destroyed;
Ability ability = new Ability(c, "0")
{
public void resolve()
{
String player = crd.getController();
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
life.subtractLife(2);
}
};
ability.setStackDescription("Dingus Egg - Deals 2 damage to " +destroyed.getController() +".");
AllZone.Stack.add(ability);
}
//***LANDS END HERE***
public static void executeLandfallEffects(Card c)
{

View File

@@ -50,8 +50,12 @@ public class Input_Untap extends Input
for(int i = 0; i < c.length; i++)
{
if(!c[i].getKeyword().contains("This card does not untap during your untap phase."))
if(!c[i].getKeyword().contains("This card doesn't untap during your untap step.") &&
!c[i].getKeyword().contains("This card doesn't untap during your next untap step."))
c[i].untap();
else
c[i].removeExtrinsicKeyword("This card doesn't untap during your next untap step.");
}
}//regularUntap()
}