fix getText() overrides ignoring staticText (#11044)

* fix text: SkipNextPlayerUntapStepEffect

* remove old copyright info

* individual card text fixes

* fix overrides ignoring staticText
This commit is contained in:
xenohedron 2023-08-26 20:47:02 -04:00 committed by GitHub
parent 52eaa600ba
commit 869de1eac6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 63 additions and 426 deletions

View file

@ -9,7 +9,6 @@ import mage.filter.predicate.mageobject.PermanentPredicate;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CopySourceSpellEffect;
import mage.abilities.effects.common.CopyTargetSpellEffect;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
@ -23,7 +22,7 @@ import mage.constants.SetTargetPointer;
*/
public final class ArchmageOfEchoes extends CardImpl {
private static FilterSpell filter = new FilterSpell("Faerie or Wizard permanent spell");
private static final FilterSpell filter = new FilterSpell("a Faerie or Wizard permanent spell");
static {
filter.add(PermanentPredicate.instance);
@ -45,7 +44,9 @@ public final class ArchmageOfEchoes extends CardImpl {
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
// Whenever you cast a Faerie or Wizard permanent spell, copy it.
this.addAbility(new SpellCastControllerTriggeredAbility(new CopyTargetSpellEffect(), filter, false, SetTargetPointer.SPELL));
this.addAbility(new SpellCastControllerTriggeredAbility(
new CopyTargetSpellEffect(false, false, false).setText("copy it"),
filter, false, SetTargetPointer.SPELL));
}
private ArchmageOfEchoes(final ArchmageOfEchoes card) {

View file

@ -1,32 +1,3 @@
/*
*
* 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.b;
import java.util.UUID;

View file

@ -1,32 +1,3 @@
/*
*
* 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.b;
import java.util.UUID;

View file

@ -1,33 +1,3 @@
/*
*
* 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.b;
import mage.MageInt;

View file

@ -38,7 +38,7 @@ public final class DovinArchitectOfLaw extends CardImpl {
this.addAbility(ability);
// -9: Tap all permanents target opponent controls. That player skips their next untap step.
ability = new LoyaltyAbility(new TapAllTargetPlayerControlsEffect(StaticFilters.FILTER_PERMANENT), -9);
ability = new LoyaltyAbility(new TapAllTargetPlayerControlsEffect(StaticFilters.FILTER_PERMANENTS), -9);
ability.addEffect(new SkipNextPlayerUntapStepEffect("That player"));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);

View file

@ -1,32 +1,3 @@
/*
*
* 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.h;
import java.util.UUID;

View file

@ -1,32 +1,3 @@
/*
*
* 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.l;
import java.util.UUID;
@ -46,7 +17,6 @@ import mage.filter.common.FilterCreaturePermanent;
*
* @author LevelX2
*/
public final class LongForgottenGohei extends CardImpl {
private static final FilterCard arcaneFilter = new FilterCard("Arcane spells");

View file

@ -40,7 +40,7 @@ public final class ShisatoWhisperingHunter extends CardImpl {
// At the beginning of your upkeep, sacrifice a Snake.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(filter, 1,""), TargetController.YOU, false));
// Whenever Shisato, Whispering Hunter deals combat damage to a player, that player skips their next untap step.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new SkipNextPlayerUntapStepEffect("that"), false, true));
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new SkipNextPlayerUntapStepEffect("that player"), false, true));
}
private ShisatoWhisperingHunter(final ShisatoWhisperingHunter card) {
@ -51,4 +51,4 @@ public final class ShisatoWhisperingHunter extends CardImpl {
public ShisatoWhisperingHunter copy() {
return new ShisatoWhisperingHunter(this);
}
}
}

View file

@ -1,32 +1,3 @@
/*
*
* 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.t;
import java.util.UUID;
@ -73,4 +44,4 @@ public final class TellerOfTales extends CardImpl {
return new TellerOfTales(this);
}
}
}

View file

@ -1,32 +1,3 @@
/*
*
* 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.t;
import mage.abilities.effects.common.TapTargetEffect;

View file

@ -55,7 +55,9 @@ class TheEndEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExileEf
TheEndEffect() {
super(true, "its controller's", "any number of cards with the same name as that permanent");
this.staticText = "Exile target creature or planeswalker. Search its controller's graveyard, hand, and library for any number of cards with the same name as that permanent and exile them. That player shuffles, then draws card for each card exiled from their hand this way";
this.staticText = "Exile target creature or planeswalker. Search its controller's graveyard, hand, and library" +
" for any number of cards with the same name as that permanent and exile them." +
" That player shuffles, then draws a card for each card exiled from their hand this way";
}
private TheEndEffect(final TheEndEffect effect) {
@ -70,12 +72,12 @@ class TheEndEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExileEf
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if(permanent == null) {
if (permanent == null) {
return false;
}
String name = permanent.getName();
Player player = game.getPlayer(permanent.getControllerId());
if(player == null) {
if (player == null) {
return false;
}
@ -92,4 +94,4 @@ class TheEndEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExileEf
}
return result;
}
}
}

View file

@ -1,32 +1,3 @@
/*
*
* 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.t;
import java.util.UUID;

View file

@ -1,32 +1,3 @@
/*
*
* 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.u;
import mage.abilities.effects.common.combat.CantBlockTargetEffect;

View file

@ -1,32 +1,3 @@
/*
*
* 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.y;
import java.util.UUID;

View file

@ -39,7 +39,7 @@ public final class YoseiTheMorningStar extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// When Yosei, the Morning Star dies, target player skips their next untap step. Tap up to five target permanents that player controls.
Ability ability = new DiesSourceTriggeredAbility(new SkipNextPlayerUntapStepEffect("target"));
Ability ability = new DiesSourceTriggeredAbility(new SkipNextPlayerUntapStepEffect("target player"));
ability.addTarget(new TargetPlayer());
ability.addTarget(new YoseiTheMorningStarTarget());
ability.addEffect(new TapTargetEffect().setTargetPointer(new SecondTargetPointer()));

View file

@ -74,6 +74,9 @@ public class ConjureCardEffect extends OneShotEffect {
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder("conjure ");
sb.append(CardUtil.numberToText(amount, "a"));
sb.append(' ');

View file

@ -59,6 +59,7 @@ public class ExileTargetAndSearchGraveyardHandLibraryEffect extends SearchTarget
@Override
public String getText(Mode mode) {
// TODO: Parent class sets static text so it must be overridden here for now
StringBuilder sb = new StringBuilder();
sb.append("Exile target ").append(mode.getTargets().get(0).getTargetName()).append(". ");
sb.append(CardUtil.getTextWithFirstCharUpperCase(super.getText(mode)));

View file

@ -46,6 +46,9 @@ public class PlayTargetWithoutPayingManaEffect extends OneShotEffect {
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();
if (!mode.getTargets().isEmpty()) {
Target target = mode.getTargets().get(0);

View file

@ -106,16 +106,16 @@ public class PreventDamageToTargetMultiAmountEffect extends PreventionEffectImpl
@Override
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder();
if (staticText.isEmpty()) {
sb.append("prevent the next ").append(amountToPrevent).append(" damage that would be dealt ");
if (duration == Duration.EndOfTurn) {
sb.append("this turn ");
}
sb.append("to any number of targets, divided as you choose");
return sb.toString();
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return staticText;
StringBuilder sb = new StringBuilder();
sb.append("prevent the next ").append(amountToPrevent).append(" damage that would be dealt ");
if (duration == Duration.EndOfTurn) {
sb.append("this turn ");
}
sb.append("to any number of targets, divided as you choose");
return sb.toString();
}
}

View file

@ -69,6 +69,9 @@ public class PreventNextDamageFromChosenSourceToTargetEffect extends PreventionE
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder("The next time a ").append(targetSource.getFilter().getMessage());
sb.append(" of your choice would deal damage to ");
String targetName = mode.getTargets().get(0).getTargetName();

View file

@ -2,7 +2,6 @@ package mage.abilities.effects.common;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.constants.Outcome;
@ -18,8 +17,7 @@ public class PutOnLibrarySourceEffect extends OneShotEffect {
private final boolean onTop;
public PutOnLibrarySourceEffect(boolean onTop) {
super(Outcome.ReturnToHand);
this.onTop = onTop;
this(onTop, "put {this} on " + (onTop ? "top" : "the bottom") + " of its owner's library");
}
public PutOnLibrarySourceEffect(boolean onTop, String rule) {
@ -50,17 +48,4 @@ public class PutOnLibrarySourceEffect extends OneShotEffect {
}
return player.putCardsOnBottomOfLibrary((Card) sourceObject, game, source, false);
}
@Override
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder();
if (this.staticText != null && !this.staticText.isEmpty()) {
sb.append(staticText);
} else {
// Put Champion of Stray Souls on top of your library from your graveyard
sb.append("put {this} on ");
sb.append(onTop ? "top" : "the bottom").append(" of its owner's library");
}
return sb.toString();
}
}

View file

@ -59,6 +59,9 @@ public class ReturnFromGraveyardToBattlefieldWithCounterTargetEffect extends Ret
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder(super.getText(mode));
sb.append(" with ");
if (additional) {

View file

@ -89,6 +89,9 @@ public class RollDieWithResultTableEffect extends OneShotEffect {
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder(prefixText);
sb.append('.');
for (TableEntry tableEntry : this.resultsTable) {
@ -157,4 +160,3 @@ public class RollDieWithResultTableEffect extends OneShotEffect {
return super.setTargetPointer(targetPointer);
}
}

View file

@ -1,32 +1,3 @@
/*
*
* 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.common;
import mage.abilities.Ability;

View file

@ -1,38 +1,8 @@
/*
*
* 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.common;
import mage.constants.Outcome;
import mage.constants.PhaseStep;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect;
import mage.game.Game;
import mage.game.turn.TurnMod;
@ -50,7 +20,9 @@ public class SkipNextPlayerUntapStepEffect extends OneShotEffect {
public SkipNextPlayerUntapStepEffect(String text) {
super(Outcome.Detriment);
this.staticText = text;
this.staticText = text.isEmpty()
? "You skip your next untap step"
: text + " skips their next untap step";
}
public SkipNextPlayerUntapStepEffect(SkipNextPlayerUntapStepEffect effect) {
@ -79,14 +51,4 @@ public class SkipNextPlayerUntapStepEffect extends OneShotEffect {
return new SkipNextPlayerUntapStepEffect(this);
}
@Override
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder();
if (!staticText.isEmpty()) {
sb.append(staticText).append(" player skips their next untap step");
} else {
sb.append("You skip your next untap step");
}
return sb.toString();
}
}

View file

@ -164,6 +164,9 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();
if (duration.toString() != null && !duration.toString().isEmpty()) {
sb.append(duration.toString()).append(", ");

View file

@ -46,6 +46,9 @@ public class LoseAllAbilitiesAllEffect extends ContinuousEffectImpl {
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();
if (duration == Duration.EndOfTurn) {
sb.append(duration.toString()).append(", ");

View file

@ -1,5 +1,3 @@
package mage.abilities.effects.common.continuous;
import mage.constants.Duration;
@ -43,9 +41,10 @@ public class SwitchPowerToughnessTargetEffect extends ContinuousEffectImpl {
@Override
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder();
sb.append("switch target ").append(mode.getTargets().get(0).getTargetName()).append("'s power and toughness")
.append(' ').append(duration.toString());
return sb.toString();
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return "switch " + getTargetPointer().describeTargets(mode.getTargets(), "that creature") + "'s power and toughness" +
' ' + duration.toString();
}
}
}

View file

@ -79,13 +79,14 @@ public class EchoEffect extends OneShotEffect {
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder("sacrifice {this} unless you ");
if (cost == null) {
sb.append("pay this permanent's mana cost");
return sb.toString();
}
String costText = cost.getText();
if (costText.toLowerCase(Locale.ENGLISH).startsWith("discard")) {
sb.append(costText.substring(0, 1).toLowerCase(Locale.ENGLISH));
@ -93,8 +94,6 @@ public class EchoEffect extends OneShotEffect {
} else {
sb.append("pay ").append(costText);
}
return sb.toString();
}
}

View file

@ -1,7 +1,6 @@
package mage.game.command.planes;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
@ -16,8 +15,8 @@ import mage.constants.Duration;
import mage.constants.Planes;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.command.Plane;
import mage.game.permanent.Permanent;
@ -32,8 +31,6 @@ import java.util.List;
*/
public class TazeemPlane extends Plane {
private static final String rule = "Creatures can't block";
public TazeemPlane() {
this.setPlaneType(Planes.PLANE_TAZEEM);
@ -70,15 +67,13 @@ public class TazeemPlane extends Plane {
class TazeemCantBlockAllEffect extends RestrictionEffect {
private FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures");
public TazeemCantBlockAllEffect() {
TazeemCantBlockAllEffect() {
super(Duration.Custom);
staticText = "creatures can't block";
}
protected TazeemCantBlockAllEffect(final TazeemCantBlockAllEffect effect) {
super(effect);
this.filter = effect.filter;
}
@Override
@ -88,7 +83,7 @@ class TazeemCantBlockAllEffect extends RestrictionEffect {
if (cPlane == null || !cPlane.getPlaneType().equals(Planes.PLANE_TAZEEM)) {
return false;
}
return filter.match(permanent, source.getControllerId(), source, game);
return StaticFilters.FILTER_PERMANENT_CREATURES.match(permanent, source.getControllerId(), source, game);
}
@Override
@ -101,10 +96,4 @@ class TazeemCantBlockAllEffect extends RestrictionEffect {
return new TazeemCantBlockAllEffect(this);
}
@Override
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder();
sb.append(filter.getMessage()).append(" can't block");
return sb.toString();
}
}