From a020326fcee1e61718363ab21b70af25b8445830 Mon Sep 17 00:00:00 2001 From: dilnu Date: Sat, 1 Feb 2020 18:06:20 -0500 Subject: [PATCH 1/3] Fix Niv Mizzet Reborn so you must select as many cards as possible and so that players are informed of all the revealed cards. --- Mage.Sets/src/mage/cards/n/NivMizzetReborn.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/n/NivMizzetReborn.java b/Mage.Sets/src/mage/cards/n/NivMizzetReborn.java index c55256fafc..fb1de82d31 100644 --- a/Mage.Sets/src/mage/cards/n/NivMizzetReborn.java +++ b/Mage.Sets/src/mage/cards/n/NivMizzetReborn.java @@ -86,7 +86,7 @@ class NivMizzetRebornEffect extends OneShotEffect { } private TargetCard getTarget() { - return new TargetCardInLibrary(makeFilter()); + return new TargetCard(Zone.LIBRARY, makeFilter()); } private String getDescription() { @@ -134,6 +134,8 @@ class NivMizzetRebornEffect extends OneShotEffect { return false; } Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 10)); + game.informPlayers(player.getName() + " reveals " + + cards.getCards(game).stream().map(card -> card.getName() + " ").reduce((a, b) -> a + b)); Cards cards2 = new CardsImpl(); if (cards.isEmpty()) { return false; From d6989d15b9ac5be554ec5b755200473b87ec8d3d Mon Sep 17 00:00:00 2001 From: dilnu Date: Sat, 1 Feb 2020 19:02:50 -0500 Subject: [PATCH 2/3] Fix Skyfire Phoenix's triggered ability. --- .../src/mage/cards/s/SkyfirePhoenix.java | 2 +- Mage.Tests/CommanderDuel_Partners.dck | 71 +++++++++++++++++++ .../commander/duel/TestPartnerCommanders.java | 32 +++++++++ 3 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 Mage.Tests/CommanderDuel_Partners.dck create mode 100644 Mage.Tests/src/test/java/org/mage/test/commander/duel/TestPartnerCommanders.java diff --git a/Mage.Sets/src/mage/cards/s/SkyfirePhoenix.java b/Mage.Sets/src/mage/cards/s/SkyfirePhoenix.java index 062653e2c2..b19405870c 100644 --- a/Mage.Sets/src/mage/cards/s/SkyfirePhoenix.java +++ b/Mage.Sets/src/mage/cards/s/SkyfirePhoenix.java @@ -64,7 +64,7 @@ class SkyfirePhoenixTriggeredAbility extends SpellCastControllerTriggeredAbility public boolean checkTrigger(GameEvent event, Game game) { return super.checkTrigger(event, game) && game.getCommandersIds( game.getPlayer(getControllerId()), CommanderCardType.COMMANDER_OR_OATHBREAKER - ).contains(event.getTargetId()); + ).contains(event.getSourceId()); } @Override diff --git a/Mage.Tests/CommanderDuel_Partners.dck b/Mage.Tests/CommanderDuel_Partners.dck new file mode 100644 index 0000000000..052a619151 --- /dev/null +++ b/Mage.Tests/CommanderDuel_Partners.dck @@ -0,0 +1,71 @@ +NAME:Partner Commanders +1 [THS:58] Ordeal of Thassa +1 [5ED:388] Mana Vault +1 [THS:14] Gift of Immortality +1 [PC2:12] Spirit Mantle +1 [M13:36] Sublime Archangel +1 [M13:206] Gilded Lotus +1 [M11:5] Armored Ascension +1 [ALA:27] Sigiled Paladin +1 [ALA:26] Sighted-Caste Sorcerer +1 [CON:2] Asha's Favor +1 [M14:210] Fireshrieker +1 [GTC:17] Holy Mantle +1 [CHK:65] Hinder +1 [DGM:96] Render Silent +1 [M13:74] Tricks of the Trade +1 [ISD:229] Mask of Avacyn +1 [GPT:28] Infiltrator's Magemark +14 [THS:234] Island +1 [CMD:261] Sol Ring +1 [THS:25] Ordeal of Heliod +1 [5DN:131] Helm of Kaldra +1 [M12:24] Lifelink +1 [AVR:50] Elgaud Shieldmate +19 [THS:230] Plains +1 [M14:23] Indestructibility +1 [M14:5] Archangel of Thune +1 [CMD:265] Azorius Chancery +1 [ARB:3] Ethercaste Knight +1 [ARB:1] Ardent Plea +1 [M13:18] Guardians of Akrasa +1 [CMD:40] Brainstorm +1 [UDS:139] Thran Dynamo +1 [M12:219] Swiftfoot Boots +1 [THS:39] Aqueous Form +1 [M13:6] Aven Squire +1 [MMA:25] Path to Exile +1 [M13:4] Angelic Benediction +1 [CMD:253] Lightning Greaves +1 [SHM:150] Steel of the Godhead +1 [M13:225] Glacial Fortress +1 [10E:40] Serra's Embrace +1 [JUD:31] Unquestioned Authority +1 [M13:221] Cathedral of War +1 [RTR:9] Ethereal Armor +1 [DDL:27] Battle Mastery +1 [DDL:24] Bonds of Faith +1 [ISD:53] Dissipate +1 [DKA:148] Executioner's Hood +1 [DIS:159] Azorius Signet +1 [GTC:37] Hands of Binding +1 [PC2:112] Quietus Spike +1 [MRD:144] Banshee's Blade +1 [AVR:36] Silverblade Paladin +1 [PC2:115] Whispersilk Cloak +1 [M12:73] Ponder +1 [M13:29] Rhox Faithmender +1 [ALA:1] Akrasan Squire +1 [M13:213] Ring of Thune +1 [UDS:46] Sigil of Sleep +1 [M13:211] Ring of Evos Isle +1 [RTR:241] Hallowed Fountain +1 [7ED:67] Counterspell +1 [ISD:49] Curiosity +1 [SOM:229] Seachrome Coast +1 [PC2:10] Mammoth Umbra +1 [MBS:104] Darksteel Plate +1 [M13:21] Knight of Glory +1 [M13:22] Oblivion Ring +SB: 1 [C16:33] Ishai, Ojutai Dragonspeaker +SB: 1 [C16:46] Thrasios, Triton Hero diff --git a/Mage.Tests/src/test/java/org/mage/test/commander/duel/TestPartnerCommanders.java b/Mage.Tests/src/test/java/org/mage/test/commander/duel/TestPartnerCommanders.java new file mode 100644 index 0000000000..3d94a2c8d8 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/commander/duel/TestPartnerCommanders.java @@ -0,0 +1,32 @@ +package org.mage.test.commander.duel; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.GameException; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestCommanderDuelBase; + +import java.io.FileNotFoundException; + +public class TestPartnerCommanders extends CardTestCommanderDuelBase { + + + @Override + protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException { + setDecknamePlayerA("CommanderDuel_Partners.dck"); // Commander = Ishai, Ojutai Dragonspeaker and Thrasios, Triton Hero + return super.createNewGameAndPlayers(); + } + + @Test + public void testSkyfirePhoenix() { + addCard(Zone.GRAVEYARD, playerA, "Skyfire Phoenix"); + addCard(Zone.BATTLEFIELD, playerA, "Tropical Island", 4); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Thrasios, Triton Hero"); + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertPermanentCount(playerA, "Thrasios, Triton Hero", 1); + assertPermanentCount(playerA, "Skyfire Phoenix", 1); + } +} From e14efc53b924aa412078c06a027b86bea5095d4d Mon Sep 17 00:00:00 2001 From: dilnu Date: Sat, 1 Feb 2020 19:04:30 -0500 Subject: [PATCH 3/3] Revert "Fix Skyfire Phoenix's triggered ability." This reverts commit d6989d15 --- Mage.Tests/CommanderDuel_Partners.dck | 71 ------------------- .../commander/duel/TestPartnerCommanders.java | 32 --------- 2 files changed, 103 deletions(-) delete mode 100644 Mage.Tests/CommanderDuel_Partners.dck delete mode 100644 Mage.Tests/src/test/java/org/mage/test/commander/duel/TestPartnerCommanders.java diff --git a/Mage.Tests/CommanderDuel_Partners.dck b/Mage.Tests/CommanderDuel_Partners.dck deleted file mode 100644 index 052a619151..0000000000 --- a/Mage.Tests/CommanderDuel_Partners.dck +++ /dev/null @@ -1,71 +0,0 @@ -NAME:Partner Commanders -1 [THS:58] Ordeal of Thassa -1 [5ED:388] Mana Vault -1 [THS:14] Gift of Immortality -1 [PC2:12] Spirit Mantle -1 [M13:36] Sublime Archangel -1 [M13:206] Gilded Lotus -1 [M11:5] Armored Ascension -1 [ALA:27] Sigiled Paladin -1 [ALA:26] Sighted-Caste Sorcerer -1 [CON:2] Asha's Favor -1 [M14:210] Fireshrieker -1 [GTC:17] Holy Mantle -1 [CHK:65] Hinder -1 [DGM:96] Render Silent -1 [M13:74] Tricks of the Trade -1 [ISD:229] Mask of Avacyn -1 [GPT:28] Infiltrator's Magemark -14 [THS:234] Island -1 [CMD:261] Sol Ring -1 [THS:25] Ordeal of Heliod -1 [5DN:131] Helm of Kaldra -1 [M12:24] Lifelink -1 [AVR:50] Elgaud Shieldmate -19 [THS:230] Plains -1 [M14:23] Indestructibility -1 [M14:5] Archangel of Thune -1 [CMD:265] Azorius Chancery -1 [ARB:3] Ethercaste Knight -1 [ARB:1] Ardent Plea -1 [M13:18] Guardians of Akrasa -1 [CMD:40] Brainstorm -1 [UDS:139] Thran Dynamo -1 [M12:219] Swiftfoot Boots -1 [THS:39] Aqueous Form -1 [M13:6] Aven Squire -1 [MMA:25] Path to Exile -1 [M13:4] Angelic Benediction -1 [CMD:253] Lightning Greaves -1 [SHM:150] Steel of the Godhead -1 [M13:225] Glacial Fortress -1 [10E:40] Serra's Embrace -1 [JUD:31] Unquestioned Authority -1 [M13:221] Cathedral of War -1 [RTR:9] Ethereal Armor -1 [DDL:27] Battle Mastery -1 [DDL:24] Bonds of Faith -1 [ISD:53] Dissipate -1 [DKA:148] Executioner's Hood -1 [DIS:159] Azorius Signet -1 [GTC:37] Hands of Binding -1 [PC2:112] Quietus Spike -1 [MRD:144] Banshee's Blade -1 [AVR:36] Silverblade Paladin -1 [PC2:115] Whispersilk Cloak -1 [M12:73] Ponder -1 [M13:29] Rhox Faithmender -1 [ALA:1] Akrasan Squire -1 [M13:213] Ring of Thune -1 [UDS:46] Sigil of Sleep -1 [M13:211] Ring of Evos Isle -1 [RTR:241] Hallowed Fountain -1 [7ED:67] Counterspell -1 [ISD:49] Curiosity -1 [SOM:229] Seachrome Coast -1 [PC2:10] Mammoth Umbra -1 [MBS:104] Darksteel Plate -1 [M13:21] Knight of Glory -1 [M13:22] Oblivion Ring -SB: 1 [C16:33] Ishai, Ojutai Dragonspeaker -SB: 1 [C16:46] Thrasios, Triton Hero diff --git a/Mage.Tests/src/test/java/org/mage/test/commander/duel/TestPartnerCommanders.java b/Mage.Tests/src/test/java/org/mage/test/commander/duel/TestPartnerCommanders.java deleted file mode 100644 index 3d94a2c8d8..0000000000 --- a/Mage.Tests/src/test/java/org/mage/test/commander/duel/TestPartnerCommanders.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.mage.test.commander.duel; - -import mage.constants.PhaseStep; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.GameException; -import org.junit.Test; -import org.mage.test.serverside.base.CardTestCommanderDuelBase; - -import java.io.FileNotFoundException; - -public class TestPartnerCommanders extends CardTestCommanderDuelBase { - - - @Override - protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException { - setDecknamePlayerA("CommanderDuel_Partners.dck"); // Commander = Ishai, Ojutai Dragonspeaker and Thrasios, Triton Hero - return super.createNewGameAndPlayers(); - } - - @Test - public void testSkyfirePhoenix() { - addCard(Zone.GRAVEYARD, playerA, "Skyfire Phoenix"); - addCard(Zone.BATTLEFIELD, playerA, "Tropical Island", 4); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Thrasios, Triton Hero"); - setStopAt(1, PhaseStep.END_TURN); - execute(); - - assertPermanentCount(playerA, "Thrasios, Triton Hero", 1); - assertPermanentCount(playerA, "Skyfire Phoenix", 1); - } -}