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

@ -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();
}
}