From f31c31767580e8293298c8fe9d44c7ec85ff8a8a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 11 Mar 2015 17:23:13 +0100 Subject: [PATCH] Replaced all usages of EmptyEffect by InfoEffect. --- .../common/CanBeYourCommanderAbility.java | 3 +- .../mage/abilities/common/EmptyEffect.java | 63 ------------------- Mage/src/mage/game/GameCommanderImpl.java | 4 +- Mage/src/mage/game/GameTinyLeadersImpl.java | 4 +- 4 files changed, 6 insertions(+), 68 deletions(-) delete mode 100644 Mage/src/mage/abilities/common/EmptyEffect.java diff --git a/Mage/src/mage/abilities/common/CanBeYourCommanderAbility.java b/Mage/src/mage/abilities/common/CanBeYourCommanderAbility.java index e0b7c73847..f2efbc2cf0 100644 --- a/Mage/src/mage/abilities/common/CanBeYourCommanderAbility.java +++ b/Mage/src/mage/abilities/common/CanBeYourCommanderAbility.java @@ -30,6 +30,7 @@ package mage.abilities.common; import java.io.ObjectStreamException; import mage.abilities.MageSingleton; import mage.abilities.StaticAbility; +import mage.abilities.effects.common.InfoEffect; import mage.constants.Zone; /** @@ -50,7 +51,7 @@ public class CanBeYourCommanderAbility extends StaticAbility implements MageSing } private CanBeYourCommanderAbility() { - super(Zone.ALL, new EmptyEffect("{this} can be your commander")); + super(Zone.ALL, new InfoEffect("{this} can be your commander")); } @Override diff --git a/Mage/src/mage/abilities/common/EmptyEffect.java b/Mage/src/mage/abilities/common/EmptyEffect.java deleted file mode 100644 index 7ebde39a93..0000000000 --- a/Mage/src/mage/abilities/common/EmptyEffect.java +++ /dev/null @@ -1,63 +0,0 @@ -/* -* 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.common; - -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.constants.Outcome; -import mage.game.Game; - -/** - * This effect is used for adding rules on a card. - * It does nothing else. - * - * @author magenoxx_at_gmail.com - */ -public class EmptyEffect extends OneShotEffect { - - public EmptyEffect(String rule) { - super(Outcome.Neutral); - staticText = rule; - } - - public EmptyEffect(final EmptyEffect effect) { - super(effect); - } - - @Override - public EmptyEffect copy() { - return new EmptyEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - // empty effect - return true; - } - -} \ No newline at end of file diff --git a/Mage/src/mage/game/GameCommanderImpl.java b/Mage/src/mage/game/GameCommanderImpl.java index 8955412998..accb5d52c2 100644 --- a/Mage/src/mage/game/GameCommanderImpl.java +++ b/Mage/src/mage/game/GameCommanderImpl.java @@ -34,8 +34,8 @@ import java.util.Map; import java.util.Set; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.EmptyEffect; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.InfoEffect; import mage.abilities.effects.common.continuous.CommanderManaReplacementEffect; import mage.abilities.effects.common.continuous.CommanderReplacementEffect; import mage.abilities.effects.common.cost.CommanderCostModification; @@ -74,7 +74,7 @@ public abstract class GameCommanderImpl extends GameImpl { @Override protected void init(UUID choosingPlayerId, GameOptions gameOptions) { - Ability ability = new SimpleStaticAbility(Zone.COMMAND, new EmptyEffect("Commander effects")); + Ability ability = new SimpleStaticAbility(Zone.COMMAND, new InfoEffect("Commander effects")); //Move commander to command zone for (UUID playerId: state.getPlayerList(startingPlayerId)) { Player player = getPlayer(playerId); diff --git a/Mage/src/mage/game/GameTinyLeadersImpl.java b/Mage/src/mage/game/GameTinyLeadersImpl.java index 0862757890..809d7fb7d2 100644 --- a/Mage/src/mage/game/GameTinyLeadersImpl.java +++ b/Mage/src/mage/game/GameTinyLeadersImpl.java @@ -32,8 +32,8 @@ import java.util.HashSet; import java.util.Set; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.EmptyEffect; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.InfoEffect; import mage.abilities.effects.common.continuous.CommanderManaReplacementEffect; import mage.abilities.effects.common.continuous.CommanderReplacementEffect; import mage.abilities.effects.common.cost.CommanderCostModification; @@ -69,7 +69,7 @@ public abstract class GameTinyLeadersImpl extends GameImpl{ @Override protected void init(UUID choosingPlayerId, GameOptions gameOptions) { - Ability ability = new SimpleStaticAbility(Zone.COMMAND, new EmptyEffect("Commander effects")); + Ability ability = new SimpleStaticAbility(Zone.COMMAND, new InfoEffect("Commander effects")); //Move tiny leader to command zone for (UUID playerId: state.getPlayerList(startingPlayerId)) { Player player = getPlayer(playerId);