From 405a95d5fe1fc9cf15c9020b7c9d68ed104ee9eb Mon Sep 17 00:00:00 2001
From: Evan Kranzler <theelk801@gmail.com>
Date: Fri, 4 Nov 2022 20:53:09 -0400
Subject: [PATCH] [BRO] Implement Desynchronize

---
 Mage.Sets/src/mage/cards/d/Desynchronize.java | 36 +++++++++++++++++++
 Mage.Sets/src/mage/sets/TheBrothersWar.java   |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 Mage.Sets/src/mage/cards/d/Desynchronize.java

diff --git a/Mage.Sets/src/mage/cards/d/Desynchronize.java b/Mage.Sets/src/mage/cards/d/Desynchronize.java
new file mode 100644
index 0000000000..72c77cf2c7
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/d/Desynchronize.java
@@ -0,0 +1,36 @@
+package mage.cards.d;
+
+import mage.abilities.effects.common.PutOnTopOrBottomLibraryTargetEffect;
+import mage.abilities.effects.keyword.ScryEffect;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.target.common.TargetNonlandPermanent;
+
+import java.util.UUID;
+
+/**
+ * @author TheElk801
+ */
+public final class Desynchronize extends CardImpl {
+
+    public Desynchronize(UUID ownerId, CardSetInfo setInfo) {
+        super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{U}");
+
+        // Target nonland permanent's owner puts it on the top or bottom of their library. Scry 2.
+        this.getSpellAbility().addEffect(new PutOnTopOrBottomLibraryTargetEffect(
+                "target nonland permanent's owner puts it on the top or bottom of their library"
+        ));
+        this.getSpellAbility().addEffect(new ScryEffect(2, false));
+        this.getSpellAbility().addTarget(new TargetNonlandPermanent());
+    }
+
+    private Desynchronize(final Desynchronize card) {
+        super(card);
+    }
+
+    @Override
+    public Desynchronize copy() {
+        return new Desynchronize(this);
+    }
+}
diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java
index 71fc9aabf5..e6c957d5bf 100644
--- a/Mage.Sets/src/mage/sets/TheBrothersWar.java
+++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java
@@ -64,6 +64,7 @@ public final class TheBrothersWar extends ExpansionSet {
         cards.add(new SetCardInfo("Deadly Riposte", 5, Rarity.COMMON, mage.cards.d.DeadlyRiposte.class));
         cards.add(new SetCardInfo("Defabricate", 45, Rarity.UNCOMMON, mage.cards.d.Defabricate.class));
         cards.add(new SetCardInfo("Depth Charge Colossus", 78, Rarity.COMMON, mage.cards.d.DepthChargeColossus.class));
+        cards.add(new SetCardInfo("Desynchronize", 46, Rarity.COMMON, mage.cards.d.Desynchronize.class));
         cards.add(new SetCardInfo("Diabolic Intent", 89, Rarity.RARE, mage.cards.d.DiabolicIntent.class));
         cards.add(new SetCardInfo("Disciples of Gix", 90, Rarity.UNCOMMON, mage.cards.d.DisciplesOfGix.class));
         cards.add(new SetCardInfo("Disenchant", 6, Rarity.COMMON, mage.cards.d.Disenchant.class));