From 83d0c242654236eda99d6e7ac16436fbfe6a1f62 Mon Sep 17 00:00:00 2001
From: fireshoes <fireshoes@fireshoes-PC>
Date: Mon, 29 Dec 2014 20:20:59 -0600
Subject: [PATCH] Added Honor's Reward, corrected Bolster to key on toughness
 rather than power

---
 .../mage/sets/fatereforged/HonorsReward.java  |  61 +++++
 .../effects/keyword/BolsterEffect.java        | 208 +++++++++---------
 Utils/frf_unimplemented.txt                   |  28 ---
 3 files changed, 165 insertions(+), 132 deletions(-)
 create mode 100644 Mage.Sets/src/mage/sets/fatereforged/HonorsReward.java
 delete mode 100644 Utils/frf_unimplemented.txt

diff --git a/Mage.Sets/src/mage/sets/fatereforged/HonorsReward.java b/Mage.Sets/src/mage/sets/fatereforged/HonorsReward.java
new file mode 100644
index 0000000000..68b89bb0d4
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/fatereforged/HonorsReward.java
@@ -0,0 +1,61 @@
+/*
+ *  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.sets.fatereforged;
+
+import java.util.UUID;
+import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.effects.keyword.BolsterEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class HonorsReward extends CardImpl {
+
+    public HonorsReward(UUID ownerId) {
+        super(ownerId, 14, "Honor's Reward", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{W}");
+        this.expansionSetCode = "FRF";
+
+        // You gain 4 life.
+        this.getSpellAbility().addEffect(new GainLifeEffect(4));
+        // Bolster 2.
+        this.getSpellAbility().addEffect(new BolsterEffect(2));
+    }
+
+    public HonorsReward(final HonorsReward card) {
+        super(card);
+    }
+
+    @Override
+    public HonorsReward copy() {
+        return new HonorsReward(this);
+    }
+}
diff --git a/Mage/src/mage/abilities/effects/keyword/BolsterEffect.java b/Mage/src/mage/abilities/effects/keyword/BolsterEffect.java
index cfb62b5de5..64e233f9be 100644
--- a/Mage/src/mage/abilities/effects/keyword/BolsterEffect.java
+++ b/Mage/src/mage/abilities/effects/keyword/BolsterEffect.java
@@ -1,104 +1,104 @@
-/*
- *  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.abilities.effects.keyword;
-
-import mage.abilities.Ability;
-import mage.abilities.effects.Effect;
-import mage.abilities.effects.OneShotEffect;
-import mage.abilities.effects.common.counter.AddCountersTargetEffect;
-import mage.constants.Outcome;
-import mage.counters.CounterType;
-import mage.filter.Filter;
-import mage.filter.FilterPermanent;
-import mage.filter.common.FilterControlledCreaturePermanent;
-import mage.filter.common.FilterCreaturePermanent;
-import mage.filter.predicate.mageobject.PowerPredicate;
-import mage.game.Game;
-import mage.game.permanent.Permanent;
-import mage.players.Player;
-import mage.target.Target;
-import mage.target.TargetPermanent;
-import mage.target.targetpointer.FixedTarget;
-
-/**
- *
- * @author LevelX2
- */
-public class BolsterEffect extends OneShotEffect {
-    private final int amount;
-    public BolsterEffect(int amount) {
-        super(Outcome.BoostCreature);
-        this.amount = amount;
-        this.staticText = "bolster " + amount + ". <i>(Choose a creature with the least toughness or tied with the least toughness among creatures you control. Put " + amount + " +1/+1 counters on it.)</i>";
-    }
-    
-    public BolsterEffect(final BolsterEffect effect) {
-        super(effect);
-        this.amount = effect.amount;
-    }
-    
-    @Override
-    public BolsterEffect copy() {
-        return new BolsterEffect(this);
-    }
-    
-    @Override
-    public boolean apply(Game game, Ability source) {
-        Player controller = game.getPlayer(source.getControllerId());
-        if (controller != null) {
-            int leastPower = Integer.MAX_VALUE;
-            Permanent selectedCreature = null;
-            for(Permanent permanent: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), controller.getId(), game)) {
-                if (leastPower > permanent.getPower().getValue()) {
-                    leastPower = permanent.getPower().getValue();
-                    selectedCreature = permanent;
-                } else if (leastPower == permanent.getPower().getValue()) {
-                    leastPower = permanent.getPower().getValue();
-                    selectedCreature = null;
-                }
-            }
-            if (leastPower != Integer.MAX_VALUE) {
-                if (selectedCreature == null) {
-                    FilterPermanent filter = new FilterControlledCreaturePermanent("creature you control with power " + leastPower);
-                    filter.add(new PowerPredicate(Filter.ComparisonType.Equal, leastPower));
-                    Target target = new TargetPermanent(1,1, filter, true);
-                    if (controller.chooseTarget(outcome, target, source, game)) {
-                        selectedCreature = game.getPermanent(target.getFirstTarget());
-                    }
-                }
-                if (selectedCreature != null) {
-                    Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(amount));
-                    effect.setTargetPointer(new FixedTarget(selectedCreature.getId()));
-                    return effect.apply(game, source);
-                }                
-            }
-            return true;
-        }
-        return false;
-    }
-}
+/*
+ *  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.abilities.effects.keyword;
+
+import mage.abilities.Ability;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.counter.AddCountersTargetEffect;
+import mage.constants.Outcome;
+import mage.counters.CounterType;
+import mage.filter.Filter;
+import mage.filter.FilterPermanent;
+import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.mageobject.ToughnessPredicate;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.players.Player;
+import mage.target.Target;
+import mage.target.TargetPermanent;
+import mage.target.targetpointer.FixedTarget;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class BolsterEffect extends OneShotEffect {
+    private final int amount;
+    public BolsterEffect(int amount) {
+        super(Outcome.BoostCreature);
+        this.amount = amount;
+        this.staticText = "bolster " + amount + ". <i>(Choose a creature with the least toughness or tied with the least toughness among creatures you control. Put " + amount + " +1/+1 counters on it.)</i>";
+    }
+    
+    public BolsterEffect(final BolsterEffect effect) {
+        super(effect);
+        this.amount = effect.amount;
+    }
+    
+    @Override
+    public BolsterEffect copy() {
+        return new BolsterEffect(this);
+    }
+    
+    @Override
+    public boolean apply(Game game, Ability source) {
+        Player controller = game.getPlayer(source.getControllerId());
+        if (controller != null) {
+            int leastToughness = Integer.MAX_VALUE;
+            Permanent selectedCreature = null;
+            for(Permanent permanent: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), controller.getId(), game)) {
+                if (leastToughness > permanent.getToughness().getValue()) {
+                    leastToughness = permanent.getToughness().getValue();
+                    selectedCreature = permanent;
+                } else if (leastToughness == permanent.getToughness().getValue()) {
+                    leastToughness = permanent.getToughness().getValue();
+                    selectedCreature = null;
+                }
+            }
+            if (leastToughness != Integer.MAX_VALUE) {
+                if (selectedCreature == null) {
+                    FilterPermanent filter = new FilterControlledCreaturePermanent("creature you control with toughness " + leastToughness);
+                    filter.add(new ToughnessPredicate(Filter.ComparisonType.Equal, leastToughness));
+                    Target target = new TargetPermanent(1,1, filter, true);
+                    if (controller.chooseTarget(outcome, target, source, game)) {
+                        selectedCreature = game.getPermanent(target.getFirstTarget());
+                    }
+                }
+                if (selectedCreature != null) {
+                    Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(amount));
+                    effect.setTargetPointer(new FixedTarget(selectedCreature.getId()));
+                    return effect.apply(game, source);
+                }                
+            }
+            return true;
+        }
+        return false;
+    }
+}
diff --git a/Utils/frf_unimplemented.txt b/Utils/frf_unimplemented.txt
deleted file mode 100644
index 6af0db26b6..0000000000
--- a/Utils/frf_unimplemented.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-?|Flamerush Rider
-?|~Shaman Revelation
-14|Honor's Reward
-26|Soul Summons
-38|Jeskai Sage
-50|Sage-Eye Avengers
-65|Crux of Fate
-72|Gurmag Angler
-73|Hooded Assassin
-84|Soulflayer
-102|Goblin Heelcutter
-110|Outpost Siege
-112|Rageform
-130|Frontier Mastodon
-145|Whisperwood Elemental
-148|Yasova Dragonclaw
-152|Ethereal Ambush
-155|Kolaghan, the Storm's Fury
-176|Plains
-177|Plains
-178|Island
-179|Island
-180|Swamp
-181|Swamp
-182|Mountain
-183|Mountain
-184|Forest
-185|Forest
\ No newline at end of file