Fixed spDamgTgt to consider wither. TODO: Stuffy doll(which is supposed to selfdestruct when given wither).

This commit is contained in:
jendave
2011-08-06 02:46:23 +00:00
parent 2114d9eaed
commit fc45d9b745
3 changed files with 20 additions and 8 deletions

View File

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

View File

@@ -1421,6 +1421,9 @@ public class CardFactory implements NewConstants {
if(getTargetCard() != null)
{
if(AllZone.GameAction.isCardInPlay(getTargetCard()) && CardFactoryUtil.canTarget(card, getTargetCard()) ) {
if (card.getKeyword().contains("Wither"))
getTargetCard().addCounter(Counters.M1M1, dmg[0]);
else
getTargetCard().addDamage(dmg[0]);
if (card.getKeyword().contains("Lifelink"))
GameActionUtil.executeLifeLinkEffects(card, dmg[0]);
@@ -1466,6 +1469,9 @@ public class CardFactory implements NewConstants {
{
if(AllZone.GameAction.isCardInPlay(getTargetCard()) && CardFactoryUtil.canTarget(card, getTargetCard()) )
{
if (card.getKeyword().contains("Wither"))
getTargetCard().addCounter(Counters.M1M1, dmg[0]);
else
getTargetCard().addDamage(dmg[0]);
if (card.getKeyword().contains("Lifelink"))
GameActionUtil.executeLifeLinkEffects(card, dmg[0]);
@@ -1513,6 +1519,9 @@ public class CardFactory implements NewConstants {
if(getTargetCard() != null)
{
if(AllZone.GameAction.isCardInPlay(getTargetCard()) && CardFactoryUtil.canTarget(card, getTargetCard()) ) {
if (card.getKeyword().contains("Wither"))
getTargetCard().addCounter(Counters.M1M1, dmg[0]);
else
getTargetCard().addDamage(dmg[0]);
if (card.getKeyword().contains("Lifelink"))
GameActionUtil.executeLifeLinkEffects(card, dmg[0]);
@@ -16166,7 +16175,12 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
boolean undoable = true;
public void undo() {card.addCounter(Counters.CHARGE, 1);}
public String Mana() {return this.choices_made[0].toString();}
public boolean canPlay() {return super.canPlay() && card.getCounters(Counters.CHARGE) > 0;}
public boolean canPlay()
{
if(choices_made[0] == null)
choices_made[0] = "1";
return super.canPlay() && card.getCounters(Counters.CHARGE) > 0;
}
public void resolve(){card.subtractCounter(Counters.CHARGE, 1); super.resolve();}
};
retrieve.choices_made = new String[1];
@@ -16177,8 +16191,6 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
public void showMessage()
{
retrieve.choices_made[0] = Input_PayManaCostUtil.getColor2((String)AllZone.Display.getChoiceOptional("Select a Color", Constant.Color.onlyColors));
if(retrieve.choices_made[0] == null)
retrieve.choices_made[0] = "1";
AllZone.Stack.add(retrieve);
stop();
}