mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- More Phyrexian War Beast fixes.
This commit is contained in:
@@ -453,7 +453,41 @@ 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() {
|
||||
private static final long serialVersionUID = 2685832214519141903L;
|
||||
|
||||
@@ -17462,7 +17462,8 @@ public class CardFactory_Creatures {
|
||||
|
||||
public void resolve() {
|
||||
Card c = getTargetCard();
|
||||
AllZone.GameAction.sacrifice(c);
|
||||
if (c != null)
|
||||
AllZone.GameAction.sacrifice(c);
|
||||
AllZone.GameAction.addDamage(card.getController(), 1, card);
|
||||
}
|
||||
};
|
||||
@@ -17480,17 +17481,20 @@ public class CardFactory_Creatures {
|
||||
CardList choice = new CardList(play.getCards());
|
||||
choice = choice.getType("Land");
|
||||
|
||||
if (choice.size() > 0)
|
||||
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);
|
||||
ability.setTargetCard(choice.get(0));
|
||||
ability.setTargetCard(choice.get(0));
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
}
|
||||
else
|
||||
AllZone.Stack.add(ability);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user