mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
* fix nullpointer bugs
* fix for Eldrazi shuffle whole graveyard
This commit is contained in:
@@ -246,7 +246,7 @@ CARDNAME can't be countered.
|
|||||||
Flying
|
Flying
|
||||||
Protection from colored spells
|
Protection from colored spells
|
||||||
Annihilator 6
|
Annihilator 6
|
||||||
When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and shuffle it into its owner's library instead.
|
When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and its owner shuffles his or her graveyard into his or her library.
|
||||||
|
|
||||||
Great Sable Stag
|
Great Sable Stag
|
||||||
1 G G
|
1 G G
|
||||||
@@ -320,7 +320,7 @@ Legendary Creature Eldrazi
|
|||||||
When you cast Kozilek, Butcher of Truth, draw four cards.
|
When you cast Kozilek, Butcher of Truth, draw four cards.
|
||||||
12/12
|
12/12
|
||||||
Annihilator 4
|
Annihilator 4
|
||||||
When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and shuffle it into its owner's library instead.
|
When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and its owner shuffles his or her graveyard into his or her library.
|
||||||
|
|
||||||
Legacy Weapon
|
Legacy Weapon
|
||||||
7
|
7
|
||||||
@@ -350,7 +350,7 @@ When you cast Ulamog, the Infinite Gyre, destroy target permanent.
|
|||||||
10/10
|
10/10
|
||||||
Indestructible
|
Indestructible
|
||||||
Annihilator 4
|
Annihilator 4
|
||||||
When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and shuffle it into its owner's library instead.
|
When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and its owner shuffles his or her graveyard into his or her library.
|
||||||
|
|
||||||
Mnemonic Wall
|
Mnemonic Wall
|
||||||
4 U
|
4 U
|
||||||
|
|||||||
@@ -4048,26 +4048,28 @@ public class CardFactory implements NewConstants {
|
|||||||
color = "B";
|
color = "B";
|
||||||
} else if(player.equals(Constant.Player.Human)) {
|
} else if(player.equals(Constant.Player.Human)) {
|
||||||
Object q = AllZone.Display.getChoiceOptional("Select type of creature", choices);
|
Object q = AllZone.Display.getChoiceOptional("Select type of creature", choices);
|
||||||
if(q.equals("Citizen")) {
|
if(q != null){
|
||||||
type = "Citizen";
|
if(q.equals("Citizen")) {
|
||||||
imageName = "W 1 1 Citizen";
|
type = "Citizen";
|
||||||
color = "W";
|
imageName = "W 1 1 Citizen";
|
||||||
} else if(q.equals("Camarid")) {
|
color = "W";
|
||||||
type = "Camarid";
|
} else if(q.equals("Camarid")) {
|
||||||
imageName = "U 1 1 Camarid";
|
type = "Camarid";
|
||||||
color = "U";
|
imageName = "U 1 1 Camarid";
|
||||||
} else if(q.equals("Thrull")) {
|
color = "U";
|
||||||
type = "Thrull";
|
} else if(q.equals("Thrull")) {
|
||||||
imageName = "B 1 1 Thrull";
|
type = "Thrull";
|
||||||
color = "B";
|
imageName = "B 1 1 Thrull";
|
||||||
} else if(q.equals("Goblin")) {
|
color = "B";
|
||||||
type = "Goblin";
|
} else if(q.equals("Goblin")) {
|
||||||
imageName = "R 1 1 Goblin";
|
type = "Goblin";
|
||||||
color = "R";
|
imageName = "R 1 1 Goblin";
|
||||||
} else if(q.equals("Saproling")) {
|
color = "R";
|
||||||
type = "Saproling";
|
} else if(q.equals("Saproling")) {
|
||||||
imageName = "G 1 1 Saproling";
|
type = "Saproling";
|
||||||
color = "G";
|
imageName = "G 1 1 Saproling";
|
||||||
|
color = "G";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
card.setChosenType(type);
|
card.setChosenType(type);
|
||||||
@@ -21003,6 +21005,7 @@ public class CardFactory implements NewConstants {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Cards with Cycling abilities
|
// Cards with Cycling abilities
|
||||||
// -1 means keyword "Cycling" not found
|
// -1 means keyword "Cycling" not found
|
||||||
if(hasKeyword(card, "Cycling") != -1) {
|
if(hasKeyword(card, "Cycling") != -1) {
|
||||||
|
|||||||
@@ -34,6 +34,18 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is("Graveyard")
|
||||||
|
&& c.getKeyword().contains("When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and its owner shuffles his or her graveyard into his or her library."))
|
||||||
|
{
|
||||||
|
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, c.getOwner());
|
||||||
|
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, c.getOwner());
|
||||||
|
lib.add(c);
|
||||||
|
lib.add(grave);
|
||||||
|
grave.reset();
|
||||||
|
AllZone.GameAction.shuffle(c.getOwner());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (c.isUnearthed() && (is("Graveyard") || is("Hand")))
|
if (c.isUnearthed() && (is("Graveyard") || is("Hand")))
|
||||||
{
|
{
|
||||||
PlayerZone removed = AllZone.getZone(Constant.Zone.Removed_From_Play, c.getOwner());
|
PlayerZone removed = AllZone.getZone(Constant.Zone.Removed_From_Play, c.getOwner());
|
||||||
|
|||||||
@@ -2789,7 +2789,7 @@ public class GameActionUtil {
|
|||||||
String[] choices = {"Yes", "No, target a creature instead"};
|
String[] choices = {"Yes", "No, target a creature instead"};
|
||||||
|
|
||||||
Object q = AllZone.Display.getChoiceOptional("Select computer as target?", choices);
|
Object q = AllZone.Display.getChoiceOptional("Select computer as target?", choices);
|
||||||
if(q.equals("Yes")) AllZone.GameAction.getPlayerLife(Constant.Player.Computer).subtractLife(
|
if(q != null && q.equals("Yes")) AllZone.GameAction.getPlayerLife(Constant.Player.Computer).subtractLife(
|
||||||
1);
|
1);
|
||||||
else {
|
else {
|
||||||
CardList cards = new CardList(oppPlay.getCards());
|
CardList cards = new CardList(oppPlay.getCards());
|
||||||
@@ -6656,7 +6656,7 @@ public class GameActionUtil {
|
|||||||
String[] choices = {"Yes", "No"};
|
String[] choices = {"Yes", "No"};
|
||||||
|
|
||||||
Object q = AllZone.Display.getChoiceOptional("Return Nether Spirit to play?", choices);
|
Object q = AllZone.Display.getChoiceOptional("Return Nether Spirit to play?", choices);
|
||||||
if(q.equals("Yes")) returnNether = true;
|
if(q != null && q.equals("Yes")) returnNether = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(player.equals(Constant.Player.Computer) || returnNether) {
|
if(player.equals(Constant.Player.Computer) || returnNether) {
|
||||||
@@ -8388,7 +8388,7 @@ public class GameActionUtil {
|
|||||||
String[] choices = {"Yes", "No, target a creature instead"};
|
String[] choices = {"Yes", "No, target a creature instead"};
|
||||||
|
|
||||||
Object q = AllZone.Display.getChoiceOptional("Select computer as target?", choices);
|
Object q = AllZone.Display.getChoiceOptional("Select computer as target?", choices);
|
||||||
if(q.equals("Yes")) AllZone.GameAction.getPlayerLife(Constant.Player.Computer).subtractLife(
|
if(q != null && q.equals("Yes")) AllZone.GameAction.getPlayerLife(Constant.Player.Computer).subtractLife(
|
||||||
hondlist.size());
|
hondlist.size());
|
||||||
else {
|
else {
|
||||||
CardList cards = new CardList(oppPlay.getCards());
|
CardList cards = new CardList(oppPlay.getCards());
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ public class Phase extends MyObservable
|
|||||||
String[] choices = {"Yes", "No"};
|
String[] choices = {"Yes", "No"};
|
||||||
Object q = null;
|
Object q = null;
|
||||||
q = AllZone.Display.getChoiceOptional("Untap " + crd + "?", choices);
|
q = AllZone.Display.getChoiceOptional("Untap " + crd + "?", choices);
|
||||||
if(q.equals("Yes")) {
|
if("Yes".equals(q)) {
|
||||||
//AllZone.Stack.add(ability);
|
//AllZone.Stack.add(ability);
|
||||||
humanExtraTurns--;
|
humanExtraTurns--;
|
||||||
crd.untap();
|
crd.untap();
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public class ListChooser<T> {
|
|||||||
d.setVisible(true);
|
d.setVisible(true);
|
||||||
d.dispose();
|
d.dispose();
|
||||||
value = (Integer) p.getValue();
|
value = (Integer) p.getValue();
|
||||||
if(value != OK_OPTION) jList.clearSelection();
|
if(value == null || value != OK_OPTION) jList.clearSelection();
|
||||||
//can't stop closing by ESC, so repeat if cancelled
|
//can't stop closing by ESC, so repeat if cancelled
|
||||||
} while(minChoices != 0 && value != OK_OPTION);
|
} while(minChoices != 0 && value != OK_OPTION);
|
||||||
//this assert checks if we really don't return on a cancel if input is mandatory
|
//this assert checks if we really don't return on a cancel if input is mandatory
|
||||||
|
|||||||
Reference in New Issue
Block a user