- More Phyrexian War Beast fixes.

This commit is contained in:
jendave
2011-08-06 04:16:34 +00:00
parent b96f36e11a
commit 648f62c6f9
2 changed files with 42 additions and 4 deletions

View File

@@ -453,6 +453,40 @@ public class CardFactoryUtil {
return target; return target;
}//input_sacrifice() }//input_sacrifice()
//this one is used for Phyrexian War Beast:
public static Input input_sacrificePermanent(final SpellAbility spell, final CardList choices, final String message) {
Input target = new Input() {
private static final long serialVersionUID = 5927821262821559665L;
@Override
public void showMessage() {
if (choices.size()==0) {
stop();
}
else
{
AllZone.Display.showMessage(message);
ButtonUtil.disableAll();
}
}
@Override
public void selectCard(Card card, PlayerZone zone) {
if(choices.contains(card)) {
//AllZone.getZone(card).remove(card);
AllZone.GameAction.sacrifice(card);
stop();
if(spell.getManaCost().equals("0")) {
AllZone.Stack.add(spell);
stop();
} else stopSetNext(new Input_PayManaCost(spell));
}
}
};
return target;
}//input_sacrifice()
public static Input input_sacrificePermanent(final CardList choices, final String message) { public static Input input_sacrificePermanent(final CardList choices, final String message) {
Input target = new Input() { Input target = new Input() {

View File

@@ -17462,7 +17462,8 @@ public class CardFactory_Creatures {
public void resolve() { public void resolve() {
Card c = getTargetCard(); Card c = getTargetCard();
AllZone.GameAction.sacrifice(c); if (c != null)
AllZone.GameAction.sacrifice(c);
AllZone.GameAction.addDamage(card.getController(), 1, card); AllZone.GameAction.addDamage(card.getController(), 1, card);
} }
}; };
@@ -17483,14 +17484,17 @@ public class CardFactory_Creatures {
if (choice.size() > 0) if (choice.size() > 0)
{ {
if (player.equals(Constant.Player.Human)) if (player.equals(Constant.Player.Human))
AllZone.InputControl.setInput(CardFactoryUtil.input_sacrifice(ability,choice,"Select a land to sacrifice")); AllZone.InputControl.setInput(CardFactoryUtil.input_sacrificePermanent(ability, choice, "Select a land to sacrifice"));
else //compy else //compy
{ {
//AllZone.GameAction.sacrificePermanent(Constant.Player.Computer, ability, choice); //AllZone.GameAction.sacrificePermanent(Constant.Player.Computer, ability, choice);
ability.setTargetCard(choice.get(0)); ability.setTargetCard(choice.get(0));
AllZone.Stack.add(ability); AllZone.Stack.add(ability);
} }
} }
else
AllZone.Stack.add(ability);
} }
}; };