game: improved visible rules of face down cards, removed visible face up cost (part of #10653, #11884)

This commit is contained in:
Oleg Agafonov 2024-03-01 16:47:42 +04:00
parent 9ea3356b77
commit 55f1d36695
10 changed files with 128 additions and 58 deletions

View file

@ -8,9 +8,6 @@ import mage.cards.Card;
import mage.game.Game;
import mage.game.stack.Spell;
import java.util.Collections;
import java.util.List;
/**
* @author LevelX2
*/
@ -20,18 +17,13 @@ public enum SpellAbilityCastMode {
FLASHBACK("Flashback"),
BESTOW("Bestow"),
PROTOTYPE("Prototype"),
MORPH("Morph", false, true, SpellAbilityCastMode.MORPH_ADDITIONAL_RULE),
MEGAMORPH("Megamorph", false, true, SpellAbilityCastMode.MORPH_ADDITIONAL_RULE),
DISGUISE("Disguise", false, true, SpellAbilityCastMode.DISGUISE_ADDITIONAL_RULE),
MORPH("Morph", false, true),
MEGAMORPH("Megamorph", false, true),
DISGUISE("Disguise", false, true),
TRANSFORMED("Transformed", true),
DISTURB("Disturb", true),
MORE_THAN_MEETS_THE_EYE("More than Meets the Eye", true);
private static final String MORPH_ADDITIONAL_RULE = "You may cast this card as a 2/2 face-down creature, with no text,"
+ " no name, no subtypes, and no mana cost by paying {3} rather than paying its mana cost.";
private static final String DISGUISE_ADDITIONAL_RULE = "You may cast this card face down for {3} as a 2/2 creature with "
+ "ward {2}. Turn it face up any time for its disguise cost.";
private final String text;
// should the cast mode use the second face?
@ -39,10 +31,6 @@ public enum SpellAbilityCastMode {
private final boolean isFaceDown;
// use it to add additional info in stack object cause face down has nothing
// TODO: is it possible to use InfoEffect or CardHint instead that?
private final List<String> additionalRulesOnStack;
public boolean isTransformed() {
return this.isTransformed;
}
@ -52,24 +40,19 @@ public enum SpellAbilityCastMode {
}
SpellAbilityCastMode(String text, boolean isTransformed) {
this(text, isTransformed, false, null);
this(text, isTransformed, false);
}
SpellAbilityCastMode(String text, boolean isTransformed, boolean isFaceDown, String additionalRulesOnStack) {
SpellAbilityCastMode(String text, boolean isTransformed, boolean isFaceDown) {
this.text = text;
this.isTransformed = isTransformed;
this.isFaceDown = isFaceDown;
this.additionalRulesOnStack = additionalRulesOnStack == null ? null : Collections.singletonList(additionalRulesOnStack);
}
public boolean isFaceDown() {
return this.isFaceDown;
}
public List<String> getAdditionalRulesOnStack() {
return additionalRulesOnStack;
}
@Override
public String toString() {
return text;