mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Harrow should be cascadable now.
- Set max life in fantasy quest to 30. - Fixed the 1.5 Java incompatibility for the basic landsearchers.
This commit is contained in:
@@ -17766,9 +17766,14 @@ public class CardFactory implements NewConstants {
|
|||||||
String player = card.getController();
|
String player = card.getController();
|
||||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
|
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
|
||||||
CardList choice = new CardList(play.getCards());
|
CardList choice = new CardList(play.getCards());
|
||||||
choice = choice.getType("Land");
|
choice = choice.getType("Land");
|
||||||
|
|
||||||
|
boolean free = false;
|
||||||
|
if (this.isFree())
|
||||||
|
free = true;
|
||||||
|
|
||||||
if (player.equals(Constant.Player.Human)) {
|
if (player.equals(Constant.Player.Human)) {
|
||||||
stopSetNext(CardFactoryUtil.input_sacrifice(spell, choice, "Select a land to sacrifice."));
|
stopSetNext(CardFactoryUtil.input_sacrifice(spell, choice, "Select a land to sacrifice.", free));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -454,6 +454,42 @@ public class CardFactoryUtil {
|
|||||||
return target;
|
return target;
|
||||||
}//input_sacrifice()
|
}//input_sacrifice()
|
||||||
|
|
||||||
|
public static Input input_sacrifice(final SpellAbility spell, final CardList choices, final String message, final boolean free) {
|
||||||
|
Input target = new Input() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 3391527854483291332L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showMessage() {
|
||||||
|
AllZone.Display.showMessage(message);
|
||||||
|
ButtonUtil.enableOnlyCancel();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void selectButtonCancel() {
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void selectCard(Card card, PlayerZone zone) {
|
||||||
|
if(choices.contains(card)) {
|
||||||
|
AllZone.getZone(card).remove(card);
|
||||||
|
AllZone.GameAction.moveToGraveyard(card);
|
||||||
|
|
||||||
|
if (free)
|
||||||
|
this.setFree(true);
|
||||||
|
|
||||||
|
if(spell.getManaCost().equals("0") || this.isFree()) {
|
||||||
|
this.setFree(false);
|
||||||
|
AllZone.Stack.add(spell, spell.getSourceCard().getManaCost().contains("X"));
|
||||||
|
stop();
|
||||||
|
} else stopSetNext(new Input_PayManaCost(spell));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return target;
|
||||||
|
}//input_sacrifice()
|
||||||
|
|
||||||
//this one is used for Phyrexian War Beast:
|
//this one is used for Phyrexian War Beast:
|
||||||
public static Input input_sacrificePermanent(final SpellAbility spell, final CardList choices, final String message) {
|
public static Input input_sacrificePermanent(final SpellAbility spell, final CardList choices, final String message) {
|
||||||
Input target = new Input() {
|
Input target = new Input() {
|
||||||
|
|||||||
@@ -1692,7 +1692,7 @@ public class GameAction {
|
|||||||
AllZone.Computer_Library.remove(firstLand);
|
AllZone.Computer_Library.remove(firstLand);
|
||||||
|
|
||||||
//branch 3
|
//branch 3
|
||||||
if(!Zone2.isEmpty() && (land.size() != 0)) {
|
if(Zone2.trim().length() != 0 && (land.size() != 0)) {
|
||||||
PlayerZone secondZone = AllZone.getZone(Zone2, Constant.Player.Computer);
|
PlayerZone secondZone = AllZone.getZone(Zone2, Constant.Player.Computer);
|
||||||
Card secondLand = land.remove(0);
|
Card secondLand = land.remove(0);
|
||||||
if (tapSecondLand)
|
if (tapSecondLand)
|
||||||
@@ -1727,7 +1727,7 @@ public class GameAction {
|
|||||||
firstZone.add(c);
|
firstZone.add(c);
|
||||||
|
|
||||||
}//if
|
}//if
|
||||||
if ((list.size() == 0) || Zone2.isEmpty()) return;
|
if ((list.size() == 0) || Zone2.trim().length() != 0) return;
|
||||||
//branch 3
|
//branch 3
|
||||||
o = AllZone.Display.getChoiceOptional("Choose second land", list.toArray());
|
o = AllZone.Display.getChoiceOptional("Choose second land", list.toArray());
|
||||||
if(o != null) {
|
if(o != null) {
|
||||||
|
|||||||
@@ -98,6 +98,8 @@ public class Gui_ElixirShop extends JFrame implements NewConstants{
|
|||||||
l = 250;
|
l = 250;
|
||||||
else if (questData.getLife() < 25)
|
else if (questData.getLife() < 25)
|
||||||
l = 500;
|
l = 500;
|
||||||
|
else
|
||||||
|
l = 750;
|
||||||
|
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
@@ -150,7 +152,7 @@ public class Gui_ElixirShop extends JFrame implements NewConstants{
|
|||||||
//ImageIcon icon = getIcon(fileName);
|
//ImageIcon icon = getIcon(fileName);
|
||||||
|
|
||||||
buyPotionButton.setEnabled(true);
|
buyPotionButton.setEnabled(true);
|
||||||
if (questData.getCredits() < getPrice())
|
if (questData.getCredits() < getPrice() || questData.getLife() >= 30)
|
||||||
buyPotionButton.setEnabled(false);
|
buyPotionButton.setEnabled(false);
|
||||||
|
|
||||||
quitButton.setBounds(new Rectangle(140, 297, 120, 50));
|
quitButton.setBounds(new Rectangle(140, 297, 120, 50));
|
||||||
|
|||||||
Reference in New Issue
Block a user