mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
fix Berserk stack description
This commit is contained in:
@@ -88,11 +88,11 @@ public class EndOfTurn implements java.io.Serializable
|
|||||||
final SpellAbility sac = new Ability(card, "0") {
|
final SpellAbility sac = new Ability(card, "0") {
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
if(AllZoneUtil.isCardInPlay(card)) AllZone.GameAction.sacrifice(card);
|
if(AllZoneUtil.isCardInPlay(card)) AllZone.GameAction.destroy(card);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("Sacrifice ").append(card);
|
sb.append("Destroy ").append(card);
|
||||||
sac.setStackDescription(sb.toString());
|
sac.setStackDescription(sb.toString());
|
||||||
|
|
||||||
AllZone.Stack.addSimultaneousStackEntry(sac);
|
AllZone.Stack.addSimultaneousStackEntry(sac);
|
||||||
@@ -133,7 +133,7 @@ public class EndOfTurn implements java.io.Serializable
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(raider.getName()).append(" deals 2 damage to controller.");
|
sb.append(raider).append(" deals 2 damage to controller.");
|
||||||
change.setStackDescription(sb.toString());
|
change.setStackDescription(sb.toString());
|
||||||
|
|
||||||
AllZone.Stack.addSimultaneousStackEntry(change);
|
AllZone.Stack.addSimultaneousStackEntry(change);
|
||||||
|
|||||||
@@ -374,43 +374,33 @@ public class GameActionUtil {
|
|||||||
public static void playCard_Vengevine(Card c) {
|
public static void playCard_Vengevine(Card c) {
|
||||||
if (c.isCreature() == true && (Phase.PlayerCreatureSpellCount == 2 || Phase.ComputerCreatureSpellCount == 2))
|
if (c.isCreature() == true && (Phase.PlayerCreatureSpellCount == 2 || Phase.ComputerCreatureSpellCount == 2))
|
||||||
{
|
{
|
||||||
final Player controller = c.getController();
|
final Player controller = c.getController();
|
||||||
final PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, controller);
|
final PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, controller);
|
||||||
CardList list = AllZoneUtil.getPlayerGraveyard(controller);
|
CardList list = AllZoneUtil.getPlayerGraveyard(controller);
|
||||||
list = list.getName("Vengevine");
|
list = list.getName("Vengevine");
|
||||||
if(list.size() > 0) {
|
if(list.size() > 0) {
|
||||||
for(int i = 0; i < list.size(); i++) {
|
for(int i = 0; i < list.size(); i++) {
|
||||||
final Card card = list.get(i);
|
final Card card = list.get(i);
|
||||||
Ability ability = new Ability(card, "0") {
|
Ability ability = new Ability(card, "0") {
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
if(controller.isHuman()){
|
if(controller.isComputer() || GameActionUtil.showYesNoDialog(card, "Return Vengevine from the graveyard?")){
|
||||||
Object[] possibleValues = {"Yes", "No"};
|
if(AllZoneUtil.isCardInPlayerGraveyard(controller, card)) {
|
||||||
Object q = JOptionPane.showOptionDialog(null, "Return Vengevine from the graveyard?", "Vengevine Ability",
|
AllZone.GameAction.moveTo(play, card);
|
||||||
JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
|
}
|
||||||
null, possibleValues, possibleValues[0]);
|
}
|
||||||
if(q.equals(0)) {
|
|
||||||
if(AllZoneUtil.isCardInPlayerGraveyard(controller, card)) {
|
|
||||||
AllZone.GameAction.moveTo(play, card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(AllZoneUtil.isCardInPlayerGraveyard(controller, card)) {
|
|
||||||
AllZone.GameAction.moveTo(play, card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}; // ability
|
}; // ability
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(card.getName()).append(" - ").append("Whenever you cast a spell, if it's the second creature ");
|
sb.append(card).append(" - ").append("Whenever you cast a spell, if it's the second creature ");
|
||||||
sb.append("spell you cast this turn, you may return Vengevine from your graveyard to the battlefield.");
|
sb.append("spell you cast this turn, you may return Vengevine from your graveyard to the battlefield.");
|
||||||
ability.setStackDescription(sb.toString());
|
ability.setStackDescription(sb.toString());
|
||||||
|
|
||||||
AllZone.Stack.addSimultaneousStackEntry(ability);
|
AllZone.Stack.addSimultaneousStackEntry(ability);
|
||||||
|
|
||||||
}//if
|
}
|
||||||
}
|
}//if
|
||||||
}
|
}
|
||||||
}//playCard_Vengevine()
|
}//playCard_Vengevine()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user