- 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;
}//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) {
Input target = new Input() {

View File

@@ -17462,6 +17462,7 @@ public class CardFactory_Creatures {
public void resolve() {
Card c = getTargetCard();
if (c != null)
AllZone.GameAction.sacrifice(c);
AllZone.GameAction.addDamage(card.getController(), 1, card);
}
@@ -17483,7 +17484,7 @@ public class CardFactory_Creatures {
if (choice.size() > 0)
{
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
{
//AllZone.GameAction.sacrificePermanent(Constant.Player.Computer, ability, choice);
@@ -17491,6 +17492,9 @@ public class CardFactory_Creatures {
AllZone.Stack.add(ability);
}
}
else
AllZone.Stack.add(ability);
}
};