mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Losing will subtract 15 credits in quest mode.
- Fixed Drowned Catacombs and Glacial Fortress bugs.
This commit is contained in:
@@ -319,7 +319,7 @@ Drowned Catacomb
|
||||
no cost
|
||||
Land
|
||||
no text
|
||||
CARDNAME enters the battlefield tapped unless you control an Island or a Swamp.
|
||||
CARDNAME enters the battlefield tapped unless you control a Island or a Swamp.
|
||||
tap: add U
|
||||
tap: add B
|
||||
|
||||
|
||||
@@ -204,12 +204,18 @@ public class CardFactory implements NewConstants {
|
||||
}
|
||||
});
|
||||
}//if "Comes into play tapped."
|
||||
if (hasKeyword(card, "CARDNAME enters the battlefield tapped unless you control a ") != -1)
|
||||
if (hasKeyword(card, "CARDNAME enters the battlefield tapped unless you control") != -1)
|
||||
{
|
||||
int n = hasKeyword(card, "CARDNAME enters the battlefield tapped unless you control a ");
|
||||
int n = hasKeyword(card, "CARDNAME enters the battlefield tapped unless you control");
|
||||
String parse = card.getKeyword().get(n).toString();
|
||||
|
||||
final String types[] = parse.substring(60, parse.length() - 1).split(" or a ");
|
||||
String splitString;
|
||||
if (parse.contains(" or a "))
|
||||
splitString = " or a ";
|
||||
else
|
||||
splitString = " or an ";
|
||||
|
||||
final String types[] = parse.substring(60, parse.length() - 1).split(splitString);
|
||||
|
||||
card.addComesIntoPlayCommand(new Command()
|
||||
{
|
||||
|
||||
@@ -203,6 +203,11 @@ public class Gui_WinLose extends JFrame {
|
||||
JOptionPane.showMessageDialog(null, "You have earned " + creds + " credits.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
quest.subtractCredits(15);
|
||||
JOptionPane.showMessageDialog(null, "You FAIL! You have lost 15 credits.");
|
||||
}
|
||||
|
||||
winLose.reset();
|
||||
|
||||
|
||||
@@ -484,6 +484,8 @@ public class QuestData implements NewConstants {
|
||||
public void subtractCredits(long c)
|
||||
{
|
||||
credits-=c;
|
||||
if (credits < 0)
|
||||
credits = 0;
|
||||
}
|
||||
|
||||
public long getCredits() {
|
||||
|
||||
Reference in New Issue
Block a user