diff --git a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java index 04e7cc793b4..47c408d8c79 100644 --- a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java @@ -251,6 +251,10 @@ public class ChangeZoneAi extends SpellAbilityAi { if (ai.getGame().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_DAMAGE)) { return false; } + + if (ai.getGame().getCombat() == null) { + return false; + } List attackers = ai.getGame().getCombat().getUnblockedAttackers(); boolean lowerCMC = false; for (Card attacker : attackers) { diff --git a/forge-game/src/main/java/forge/game/GameView.java b/forge-game/src/main/java/forge/game/GameView.java index 2e272988890..0aad79f5cba 100644 --- a/forge-game/src/main/java/forge/game/GameView.java +++ b/forge-game/src/main/java/forge/game/GameView.java @@ -1,9 +1,6 @@ package forge.game; -import java.util.List; - import com.google.common.collect.Iterables; - import forge.LobbyPlayer; import forge.deck.Deck; import forge.game.GameOutcome.AnteResult; @@ -22,6 +19,8 @@ import forge.trackable.TrackableObject; import forge.trackable.TrackableProperty; import forge.util.collect.FCollectionView; +import java.util.List; + public class GameView extends TrackableObject { private static final long serialVersionUID = 8522884512960961528L; @@ -127,7 +126,9 @@ public class GameView extends TrackableObject { void updateGameOver(final Game game) { set(TrackableProperty.GameOver, game.isGameOver()); set(TrackableProperty.MatchOver, game.getMatch().isMatchOver()); - set(TrackableProperty.WinningPlayerName, game.getOutcome().getWinningLobbyPlayer().getName()); + if (game.getOutcome() != null && game.getOutcome().getWinningLobbyPlayer() != null) { + set(TrackableProperty.WinningPlayerName, game.getOutcome().getWinningLobbyPlayer().getName()); + } set(TrackableProperty.WinningTeam, game.getOutcome() == null ? -1 : game.getOutcome().getWinningTeam()); } diff --git a/forge-gui/res/formats/Historic/DCI/Legacy/2018-07-06.txt b/forge-gui/res/formats/Historic/DCI/Legacy/2018-07-06.txt new file mode 100644 index 00000000000..01766a2b756 --- /dev/null +++ b/forge-gui/res/formats/Historic/DCI/Legacy/2018-07-06.txt @@ -0,0 +1,7 @@ +[format] +Name:Legacy, 07/06/18 +Type:Historic +Subtype:Legacy +Effective:2018-07-06 +Sets:LEB, 2ED, ARN, DRC94, ATQ, 3ED, LEG, DRK, ARENA, FEM, WW, SHC, FS, 4ED, ICE, CHR, HML, ALL, MIR, VIS, 5ED, WTH, TMP, STH, EXO, USG, ULG, 6ED, UDS, MMQ, NMS, PCY, INV, PLS, 7ED, APC, ODY, TOR, JUD, ONS, LGN, SCG, 8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, POR, PO2, PTK, S99, S00, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, MOR, SHM, EVE, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, ORI, BFZ, OGW, W16, SOI, EMN, KLD, AER, W17, AKH, HOU, XLN, RIX, DOM +Banned:Amulet of Quoz, Ancestral Recall, Balance, Bazaar of Baghdad, Black Lotus, Bronze Tablet, Channel, Chaos Orb, Contract from Below, Darkpact, Deathrite Shaman, Demonic Attorney, Demonic Consultation, Demonic Tutor, Dig Through Time, Earthcraft, Falling Star, Fastbond, Flash, Frantic Search, Gitaxian Probe, Goblin Recruiter, Gush, Hermit Druid, Imperial Seal, Jeweled Bird, Library of Alexandria, Mana Crypt, Mana Drain, Mana Vault, Memory Jar, Mental Misstep, Mind Twist, Mind's Desire, Mishra's Workshop, Mox Emerald, Mox Jet, Mox Pearl, Mox Ruby, Mox Sapphire, Mystial Tutor, Necropotence, Oath of Druids, Rebirth, Sensei's Divining Top, Shahrazad, Skullclamp, Sol Ring, Strip Mine, Survival of the Fittest, Tempest Efreet, Time Vault, Time Walk, Timetwister, Timmerian Fiends, Tinker, Tolarian Academy, Treasure Cruise, Vampiric Tutor, Wheel of Fortune, Windfall, Yawgmoth's Bargain, Yawgmoth's Will \ No newline at end of file diff --git a/forge-gui/res/formats/Historic/DCI/Legacy/2018-07-14.txt b/forge-gui/res/formats/Historic/DCI/Legacy/2018-07-14.txt new file mode 100644 index 00000000000..7e2e6603f0d --- /dev/null +++ b/forge-gui/res/formats/Historic/DCI/Legacy/2018-07-14.txt @@ -0,0 +1,7 @@ +[format] +Name:Legacy, Core Set 2019 +Type:Historic +Subtype:Legacy +Effective:2018-07-14 +Sets:LEB, 2ED, ARN, DRC94, ATQ, 3ED, LEG, DRK, ARENA, FEM, WW, SHC, FS, 4ED, ICE, CHR, HML, ALL, MIR, VIS, 5ED, WTH, TMP, STH, EXO, USG, ULG, 6ED, UDS, MMQ, NMS, PCY, INV, PLS, 7ED, APC, ODY, TOR, JUD, ONS, LGN, SCG, 8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, POR, PO2, PTK, S99, S00, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, MOR, SHM, EVE, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, ORI, BFZ, OGW, W16, SOI, EMN, KLD, AER, W17, AKH, HOU, XLN, RIX, DOM, M19 +Banned:Amulet of Quoz, Ancestral Recall, Balance, Bazaar of Baghdad, Black Lotus, Bronze Tablet, Channel, Chaos Orb, Contract from Below, Darkpact, Deathrite Shaman, Demonic Attorney, Demonic Consultation, Demonic Tutor, Dig Through Time, Earthcraft, Falling Star, Fastbond, Flash, Frantic Search, Gitaxian Probe, Goblin Recruiter, Gush, Hermit Druid, Imperial Seal, Jeweled Bird, Library of Alexandria, Mana Crypt, Mana Drain, Mana Vault, Memory Jar, Mental Misstep, Mind Twist, Mind's Desire, Mishra's Workshop, Mox Emerald, Mox Jet, Mox Pearl, Mox Ruby, Mox Sapphire, Mystial Tutor, Necropotence, Oath of Druids, Rebirth, Sensei's Divining Top, Shahrazad, Skullclamp, Sol Ring, Strip Mine, Survival of the Fittest, Tempest Efreet, Time Vault, Time Walk, Timetwister, Timmerian Fiends, Tinker, Tolarian Academy, Treasure Cruise, Vampiric Tutor, Wheel of Fortune, Windfall, Yawgmoth's Bargain, Yawgmoth's Will \ No newline at end of file diff --git a/forge-gui/res/formats/Historic/DCI/Legacy/2018-10-06.txt b/forge-gui/res/formats/Historic/DCI/Legacy/2018-10-06.txt new file mode 100644 index 00000000000..551753dca8a --- /dev/null +++ b/forge-gui/res/formats/Historic/DCI/Legacy/2018-10-06.txt @@ -0,0 +1,7 @@ +[format] +Name:Legacy, Guilds of Ravnica +Type:Historic +Subtype:Legacy +Effective:2018-10-06 +Sets:LEB, 2ED, ARN, DRC94, ATQ, 3ED, LEG, DRK, ARENA, FEM, WW, SHC, FS, 4ED, ICE, CHR, HML, ALL, MIR, VIS, 5ED, WTH, TMP, STH, EXO, USG, ULG, 6ED, UDS, MMQ, NMS, PCY, INV, PLS, 7ED, APC, ODY, TOR, JUD, ONS, LGN, SCG, 8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, POR, PO2, PTK, S99, S00, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, MOR, SHM, EVE, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, ORI, BFZ, OGW, W16, SOI, EMN, KLD, AER, W17, AKH, HOU, XLN, RIX, DOM, M19, GRN +Banned:Amulet of Quoz, Ancestral Recall, Balance, Bazaar of Baghdad, Black Lotus, Bronze Tablet, Channel, Chaos Orb, Contract from Below, Darkpact, Deathrite Shaman, Demonic Attorney, Demonic Consultation, Demonic Tutor, Dig Through Time, Earthcraft, Falling Star, Fastbond, Flash, Frantic Search, Gitaxian Probe, Goblin Recruiter, Gush, Hermit Druid, Imperial Seal, Jeweled Bird, Library of Alexandria, Mana Crypt, Mana Drain, Mana Vault, Memory Jar, Mental Misstep, Mind Twist, Mind's Desire, Mishra's Workshop, Mox Emerald, Mox Jet, Mox Pearl, Mox Ruby, Mox Sapphire, Mystial Tutor, Necropotence, Oath of Druids, Rebirth, Sensei's Divining Top, Shahrazad, Skullclamp, Sol Ring, Strip Mine, Survival of the Fittest, Tempest Efreet, Time Vault, Time Walk, Timetwister, Timmerian Fiends, Tinker, Tolarian Academy, Treasure Cruise, Vampiric Tutor, Wheel of Fortune, Windfall, Yawgmoth's Bargain, Yawgmoth's Will \ No newline at end of file diff --git a/forge-gui/res/formats/Historic/DCI/Modern/2018-07-14.txt b/forge-gui/res/formats/Historic/DCI/Modern/2018-07-14.txt new file mode 100644 index 00000000000..46c93c8216b --- /dev/null +++ b/forge-gui/res/formats/Historic/DCI/Modern/2018-07-14.txt @@ -0,0 +1,7 @@ +[format] +Name:Modern, Core Set 2019 +Type:Historic +Subtype:Modern +Effective:2018-07-14 +Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, POR, PO2, PTK, S99, S00, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, MOR, SHM, EVE, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, ORI, BFZ, OGW, W16, SOI, EMN, KLD, AER, W17, AKH, HOU, XLN, RIX, DOM, M19 +Banned:Ancient Den; Birthing Pod; Blazing Shoal; Chrome Mox; Cloudpost; Dark Depths; Deathrite Shaman; Dig Through Time; Dread Return; Eye of Ugin; Gitaxian Probe; Glimpse of Nature; Golgari Grave-Troll; Great Furnace; Green Sun's Zenith; Hypergenesis; Mental Misstep; Ponder; Preordain; Punishing Fire; Rite of Flame; Seat of the Synod; Second Sunrise; Seething Song; Sensei's Divining Top; Skullclamp; Splinter Twin; Stoneforge Mystic; Summer Bloom; Treasure Cruise; Tree of Tales; Umezawa's Jitte; Vault of Whispers \ No newline at end of file diff --git a/forge-gui/res/formats/Historic/DCI/Modern/2018-10-06.txt b/forge-gui/res/formats/Historic/DCI/Modern/2018-10-06.txt new file mode 100644 index 00000000000..655edb25cf7 --- /dev/null +++ b/forge-gui/res/formats/Historic/DCI/Modern/2018-10-06.txt @@ -0,0 +1,7 @@ +[format] +Name:Modern, Guilds of Ravnica +Type:Historic +Subtype:Modern +Effective:2018-10-06 +Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, POR, PO2, PTK, S99, S00, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, MOR, SHM, EVE, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, ORI, BFZ, OGW, W16, SOI, EMN, KLD, AER, W17, AKH, HOU, XLN, RIX, DOM, M19, GRN +Banned:Ancient Den; Birthing Pod; Blazing Shoal; Chrome Mox; Cloudpost; Dark Depths; Deathrite Shaman; Dig Through Time; Dread Return; Eye of Ugin; Gitaxian Probe; Glimpse of Nature; Golgari Grave-Troll; Great Furnace; Green Sun's Zenith; Hypergenesis; Mental Misstep; Ponder; Preordain; Punishing Fire; Rite of Flame; Seat of the Synod; Second Sunrise; Seething Song; Sensei's Divining Top; Skullclamp; Splinter Twin; Stoneforge Mystic; Summer Bloom; Treasure Cruise; Tree of Tales; Umezawa's Jitte; Vault of Whispers \ No newline at end of file diff --git a/forge-gui/res/formats/Historic/DCI/Standard/2018-07-14.txt b/forge-gui/res/formats/Historic/DCI/Standard/2018-07-14.txt new file mode 100644 index 00000000000..1fa39763228 --- /dev/null +++ b/forge-gui/res/formats/Historic/DCI/Standard/2018-07-14.txt @@ -0,0 +1,7 @@ +[format] +Name:Standard, Core Set 2019 +Type:Historic +Subtype:Standard +Effective:2018-04-27 +Sets:KLD, AER, W17, AKH, HOU, XLN, RIX, DOM, M19 +Banned:Aetherworks Marvel; Attune with Aether; Felidar Guardian; Rampaging Ferocidon; Ramunap Ruins; Rogue Refiner; Smuggler's Copter \ No newline at end of file diff --git a/forge-gui/res/formats/Historic/DCI/Standard/2018-10-06.txt b/forge-gui/res/formats/Historic/DCI/Standard/2018-10-06.txt new file mode 100644 index 00000000000..b46d23c5530 --- /dev/null +++ b/forge-gui/res/formats/Historic/DCI/Standard/2018-10-06.txt @@ -0,0 +1,7 @@ +[format] +Name:Standard, Guilds of Ravnica +Type:Historic +Subtype:Standard +Effective:2018-10-06 +Sets:XLN, RIX, DOM, M19, GRN +Banned:Rampaging Ferocidon \ No newline at end of file diff --git a/forge-gui/res/formats/Historic/DCI/Vintage/2018-07-14.txt b/forge-gui/res/formats/Historic/DCI/Vintage/2018-07-14.txt new file mode 100644 index 00000000000..983de9d0a19 --- /dev/null +++ b/forge-gui/res/formats/Historic/DCI/Vintage/2018-07-14.txt @@ -0,0 +1,8 @@ +[format] +Name:Vintage, Core Set 2019 +Type:Historic +Subtype:Vintage +Effective:2018-07-06 +Sets:LEB, 2ED, ARN, DRC94, ATQ, 3ED, LEG, DRK, ARENA, FEM, WW, SHC, FS, 4ED, ICE, CHR, HML, ALL, MIR, VIS, 5ED, WTH, TMP, STH, EXO, USG, ULG, 6ED, UDS, MMQ, NMS, PCY, INV, PLS, 7ED, APC, ODY, TOR, JUD, ONS, LGN, SCG, 8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, POR, PO2, PTK, S99, S00, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, MOR, SHM, EVE, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, ORI, BFZ, OGW, W16, SOI, EMN, KLD, AER, W17, AKH, HOU, XLN, RIX, DOM, M19 +Restricted:Ancestral Recall, Balance, Black Lotus, Brainstorm, Chalice of the Void, Channel, Demonic Consultation, Demonic Tutor, Dig Through Time, Fastbond, Flash, Gifts Ungiven, Gitaxian Probe, Gush, Imperial Seal, Library of Alexandria, Lion's Eye Diamond, Lodestone Golem, Lotus Petal, Mana Crypt, Mana Vault, Memory Jar, Merchant Scroll, Mind's Desire, Monastery Mentor, Mox Emerald, Mox Pearl, Mox Ruby, Mox Sapphire, Mox Jet, Mystical Tutor, Necropotence, Ponder, Sol Ring, Strip Mine, Thorn of Amethyst, Timetwister, Time Vault, Time Walk, Tinker, Tolarian Academy, Trinisphere, Vampiric Tutor, Wheel of Fortune, Windfall, Yawgmoth's Will +Banned:Amulet of Quoz, Bronze Tablet, Chaos Orb, Contract from Below, Darkpact, Demonic Attorney, Falling Star, Jeweled Bird, Rebirth, Shahrazad, Stroke of Genius, Tempest Efreet, Timmerian Fiends \ No newline at end of file diff --git a/forge-gui/res/formats/Historic/DCI/Vintage/2018-10-06.txt b/forge-gui/res/formats/Historic/DCI/Vintage/2018-10-06.txt new file mode 100644 index 00000000000..f4baed68ee0 --- /dev/null +++ b/forge-gui/res/formats/Historic/DCI/Vintage/2018-10-06.txt @@ -0,0 +1,8 @@ +[format] +Name:Vintage, Guilds of Ravnica +Type:Historic +Subtype:Vintage +Effective:2018-10-06 +Sets:LEB, 2ED, ARN, DRC94, ATQ, 3ED, LEG, DRK, ARENA, FEM, WW, SHC, FS, 4ED, ICE, CHR, HML, ALL, MIR, VIS, 5ED, WTH, TMP, STH, EXO, USG, ULG, 6ED, UDS, MMQ, NMS, PCY, INV, PLS, 7ED, APC, ODY, TOR, JUD, ONS, LGN, SCG, 8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, POR, PO2, PTK, S99, S00, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, MOR, SHM, EVE, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, ORI, BFZ, OGW, W16, SOI, EMN, KLD, AER, W17, AKH, HOU, XLN, RIX, DOM, M19 +Restricted:Ancestral Recall, Balance, Black Lotus, Brainstorm, Chalice of the Void, Channel, Demonic Consultation, Demonic Tutor, Dig Through Time, Fastbond, Flash, Gifts Ungiven, Gitaxian Probe, Gush, Imperial Seal, Library of Alexandria, Lion's Eye Diamond, Lodestone Golem, Lotus Petal, Mana Crypt, Mana Vault, Memory Jar, Merchant Scroll, Mind's Desire, Monastery Mentor, Mox Emerald, Mox Pearl, Mox Ruby, Mox Sapphire, Mox Jet, Mystical Tutor, Necropotence, Ponder, Sol Ring, Strip Mine, Thorn of Amethyst, Timetwister, Time Vault, Time Walk, Tinker, Tolarian Academy, Trinisphere, Vampiric Tutor, Wheel of Fortune, Windfall, Yawgmoth's Will +Banned:Amulet of Quoz, Bronze Tablet, Chaos Orb, Contract from Below, Darkpact, Demonic Attorney, Falling Star, Jeweled Bird, Rebirth, Shahrazad, Stroke of Genius, Tempest Efreet, Timmerian Fiends \ No newline at end of file diff --git a/forge-gui/src/main/java/forge/quest/QuestController.java b/forge-gui/src/main/java/forge/quest/QuestController.java index 0b15c20ccb1..0d306f4431a 100644 --- a/forge-gui/src/main/java/forge/quest/QuestController.java +++ b/forge-gui/src/main/java/forge/quest/QuestController.java @@ -288,6 +288,8 @@ public class QuestController { this.getAssets().setCredits(FModel.getQuestPreferences().getPrefInt(DifficultyPrefs.STARTING_CREDITS, difficulty)); + // Reset starting cards here. + this.myCards.resetNewList(); } /**