From 244da69ede87de4589f50e9d53174ef93cbc1689 Mon Sep 17 00:00:00 2001
From: Evan Kranzler <theelk801@gmail.com>
Date: Tue, 22 May 2018 19:52:02 -0400
Subject: [PATCH] Implemented Arena Rector

---
 Mage.Sets/src/mage/cards/a/AcademyRector.java | 11 +--
 Mage.Sets/src/mage/cards/a/ArenaRector.java   | 75 +++++++++++++++++++
 Mage.Sets/src/mage/sets/Battlebond.java       |  1 +
 3 files changed, 82 insertions(+), 5 deletions(-)
 create mode 100644 Mage.Sets/src/mage/cards/a/ArenaRector.java

diff --git a/Mage.Sets/src/mage/cards/a/AcademyRector.java b/Mage.Sets/src/mage/cards/a/AcademyRector.java
index a88b967c00..0b3ec6ab31 100644
--- a/Mage.Sets/src/mage/cards/a/AcademyRector.java
+++ b/Mage.Sets/src/mage/cards/a/AcademyRector.java
@@ -55,11 +55,12 @@ public class AcademyRector extends CardImpl {
         this.toughness = new MageInt(2);
 
         // When Academy Rector dies, you may exile it. If you do, search your library for an enchantment card, put that card onto the battlefield, then shuffle your library.
-        this.addAbility(new DiesTriggeredAbility(new DoIfCostPaid(
-                new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterEnchantmentCard())),
-                new ExileSourceFromGraveCost(),
-                "Exile to search enchantment?"),
-                false
+        this.addAbility(new DiesTriggeredAbility(
+                new DoIfCostPaid(
+                        new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterEnchantmentCard())),
+                        new ExileSourceFromGraveCost(),
+                        "Exile to search for an enchantment?"
+                ), false
         ));
     }
 
diff --git a/Mage.Sets/src/mage/cards/a/ArenaRector.java b/Mage.Sets/src/mage/cards/a/ArenaRector.java
new file mode 100644
index 0000000000..63b5ab78fd
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/a/ArenaRector.java
@@ -0,0 +1,75 @@
+/*
+ *  Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without modification, are
+ *  permitted provided that the following conditions are met:
+ *
+ *     1. Redistributions of source code must retain the above copyright notice, this list of
+ *        conditions and the following disclaimer.
+ *
+ *     2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *        of conditions and the following disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ *  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  The views and conclusions contained in the software and documentation are those of the
+ *  authors and should not be interpreted as representing official policies, either expressed
+ *  or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.cards.a;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.DiesTriggeredAbility;
+import mage.abilities.costs.common.ExileSourceFromGraveCost;
+import mage.abilities.effects.common.DoIfCostPaid;
+import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
+import mage.constants.SubType;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.filter.common.FilterPlaneswalkerCard;
+import mage.target.common.TargetCardInLibrary;
+
+/**
+ *
+ * @author TheElk801
+ */
+public class ArenaRector extends CardImpl {
+
+    public ArenaRector(UUID ownerId, CardSetInfo setInfo) {
+        super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
+
+        this.subtype.add(SubType.HUMAN);
+        this.subtype.add(SubType.CLERIC);
+        this.power = new MageInt(1);
+        this.toughness = new MageInt(2);
+
+        // When Arena Rector dies, you may exile it. If you do, search your library for a planeswalker card, put it onto the battlefield, then shuffle your library.
+        this.addAbility(new DiesTriggeredAbility(
+                new DoIfCostPaid(
+                        new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterPlaneswalkerCard())),
+                        new ExileSourceFromGraveCost(),
+                        "Exile to search for a planeswalker?"
+                ), false
+        ));
+    }
+
+    public ArenaRector(final ArenaRector card) {
+        super(card);
+    }
+
+    @Override
+    public ArenaRector copy() {
+        return new ArenaRector(this);
+    }
+}
diff --git a/Mage.Sets/src/mage/sets/Battlebond.java b/Mage.Sets/src/mage/sets/Battlebond.java
index 46d5cf150e..ce69883498 100644
--- a/Mage.Sets/src/mage/sets/Battlebond.java
+++ b/Mage.Sets/src/mage/sets/Battlebond.java
@@ -54,6 +54,7 @@ public class Battlebond extends ExpansionSet {
         this.numBoosterRare = 1;
         this.ratioBoosterMythic = 8;
         cards.add(new SetCardInfo("Archfiend of Despair", 44, Rarity.MYTHIC, mage.cards.a.ArchfiendOfDespair.class));
+        cards.add(new SetCardInfo("Arena Rector", 23, Rarity.MYTHIC, mage.cards.a.ArenaRector.class));
         cards.add(new SetCardInfo("Auger Spree", 218, Rarity.COMMON, mage.cards.a.AugerSpree.class));
         cards.add(new SetCardInfo("Boldwyr Intimidator", 169, Rarity.UNCOMMON, mage.cards.b.BoldwyrIntimidator.class));
         cards.add(new SetCardInfo("Bountiful Promenade", 81, Rarity.RARE, mage.cards.b.BountifulPromenade.class));