Mirrored Lotus

This commit is contained in:
Adam Pantel
2021-02-16 17:42:36 -05:00
parent e38bfeca5a
commit 18921e954a
6 changed files with 34 additions and 2 deletions

View File

@@ -1884,7 +1884,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
sbLong.append(" (").append(inst.getReminderText()).append(")"); sbLong.append(" (").append(inst.getReminderText()).append(")");
sbLong.append("\r\n"); sbLong.append("\r\n");
} }
} else if (keyword.startsWith("Emerge")) { } else if (keyword.startsWith("Emerge") || keyword.startsWith("Reflect")) {
final String[] k = keyword.split(":"); final String[] k = keyword.split(":");
sbLong.append(k[0]).append(" ").append(ManaCostParser.parse(k[1])); sbLong.append(k[0]).append(" ").append(ManaCostParser.parse(k[1]));
sbLong.append(" (").append(inst.getReminderText()).append(")"); sbLong.append(" (").append(inst.getReminderText()).append(")");

View File

@@ -565,6 +565,7 @@ public class CardFactory {
final Map<String,String> origSVars = host.getSVars(); final Map<String,String> origSVars = host.getSVars();
final List<String> types = Lists.newArrayList(); final List<String> types = Lists.newArrayList();
final List<String> keywords = Lists.newArrayList(); final List<String> keywords = Lists.newArrayList();
final List<String> removeKeywords = Lists.newArrayList();
List<String> creatureTypes = null; List<String> creatureTypes = null;
final CardCloneStates result = new CardCloneStates(in, sa); final CardCloneStates result = new CardCloneStates(in, sa);
@@ -579,6 +580,10 @@ public class CardFactory {
keywords.addAll(Arrays.asList(sa.getParam("AddKeywords").split(" & "))); keywords.addAll(Arrays.asList(sa.getParam("AddKeywords").split(" & ")));
} }
if (sa.hasParam("RemoveKeywords")) {
removeKeywords.addAll(Arrays.asList(sa.getParam("RemoveKeywords").split(" & ")));
}
if (sa.hasParam("SetColor")) { if (sa.hasParam("SetColor")) {
shortColors = CardUtil.getShortColorsString(Arrays.asList(sa.getParam("SetColor").split(","))); shortColors = CardUtil.getShortColorsString(Arrays.asList(sa.getParam("SetColor").split(",")));
} }
@@ -646,6 +651,9 @@ public class CardFactory {
} }
state.addIntrinsicKeywords(keywords); state.addIntrinsicKeywords(keywords);
for (String kw : removeKeywords) {
state.removeIntrinsicKeyword(kw);
}
if (sa.hasParam("SetPower")) { if (sa.hasParam("SetPower")) {
state.setBasePower(Integer.parseInt(sa.getParam("SetPower"))); state.setBasePower(Integer.parseInt(sa.getParam("SetPower")));

View File

@@ -3659,6 +3659,23 @@ public class CardFactoryUtil {
re.setOverridingAbility(saExile); re.setOverridingAbility(saExile);
inst.addReplacement(re); inst.addReplacement(re);
} else if (keyword.startsWith("Reflect:")) {
final String[] k = keyword.split(":");
final String repeatStr = "DB$ RepeatEach | RepeatPlayers$ Opponent";
final String payStr = "DB$ ImmediateTrigger | RememberObjects$ Player.IsRemembered | TriggerDescription$ Copy CARDNAME | "
+ "UnlessPayer$ Player.IsRemembered | UnlessSwitched$ True | UnlessCost$ " + k[1];
final String copyStr = "DB$ CopyPermanent | Defined$ Self | Controller$ Player.IsRemembered | RemoveKeywords$ Reflect";
SpellAbility repeatSA = AbilityFactory.getAbility(repeatStr, card);
AbilitySub paySA = (AbilitySub) AbilityFactory.getAbility(payStr, card);
AbilitySub copySA = (AbilitySub) AbilityFactory.getAbility(copyStr, card);
repeatSA.setAdditionalAbility("RepeatSubAbility", paySA);
paySA.setAdditionalAbility("Execute", copySA);
ReplacementEffect cardre = createETBReplacement(card, ReplacementLayer.Other, repeatSA, false, true, intrinsic, "Card.Self", "");
inst.addReplacement(cardre);
} else if (keyword.startsWith("Riot")) { } else if (keyword.startsWith("Riot")) {
final String choose = "DB$ GenericChoice | AILogic$ Riot | SpellDescription$ Riot"; final String choose = "DB$ GenericChoice | AILogic$ Riot | SpellDescription$ Riot";

View File

@@ -58,7 +58,7 @@ public final class CardUtil {
"Fortify", "Transfigure", "Champion", "Evoke", "Prowl", "IfReach", "Fortify", "Transfigure", "Champion", "Evoke", "Prowl", "IfReach",
"Reinforce", "Unearth", "Level up", "Miracle", "Overload", "Reinforce", "Unearth", "Level up", "Miracle", "Overload",
"Scavenge", "Encore", "Bestow", "Outlast", "Dash", "Surge", "Emerge", "Hexproof:", "Scavenge", "Encore", "Bestow", "Outlast", "Dash", "Surge", "Emerge", "Hexproof:",
"etbCounter").build(); "etbCounter", "Reflect").build();
/** List of keyword endings of keywords that could be modified by text changes. */ /** List of keyword endings of keywords that could be modified by text changes. */
public static final ImmutableList<String> modifiableKeywordEndings = ImmutableList.<String>builder().add( public static final ImmutableList<String> modifiableKeywordEndings = ImmutableList.<String>builder().add(
"walk", "cycling", "offering").build(); "walk", "cycling", "offering").build();

View File

@@ -120,6 +120,7 @@ public enum Keyword {
REACH("Reach", SimpleKeyword.class, true, "This creature can block creatures with flying."), REACH("Reach", SimpleKeyword.class, true, "This creature can block creatures with flying."),
REBOUND("Rebound", SimpleKeyword.class, true, "If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost."), REBOUND("Rebound", SimpleKeyword.class, true, "If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost."),
RECOVER("Recover", KeywordWithCost.class, false, "When a creature is put into your graveyard from the battlefield, you may pay %s. If you do, return this card from your graveyard to your hand. Otherwise, exile this card."), RECOVER("Recover", KeywordWithCost.class, false, "When a creature is put into your graveyard from the battlefield, you may pay %s. If you do, return this card from your graveyard to your hand. Otherwise, exile this card."),
REFLECT("Reflect", KeywordWithCost.class, false, "As this enters the battlefield, each opponent may pay %s. When they do, they create a token copy of this except it lacks this ability."),
REINFORCE("Reinforce", KeywordWithCostAndAmount.class, false, "%s, Discard this card: Put {%d:+1/+1 counter} on target creature."), REINFORCE("Reinforce", KeywordWithCostAndAmount.class, false, "%s, Discard this card: Put {%d:+1/+1 counter} on target creature."),
RENOWN("Renown", KeywordWithAmount.class, false, "When this creature deals combat damage to a player, if it isn't renowned, put {%d:+1/+1 counter} on it and it becomes renowned."), RENOWN("Renown", KeywordWithAmount.class, false, "When this creature deals combat damage to a player, if it isn't renowned, put {%d:+1/+1 counter} on it and it becomes renowned."),
REPLICATE("Replicate", KeywordWithCost.class, false, "As an additional cost to cast this spell, you may pay %s any number of times. If you do, copy it that many times. You may choose new targets for the copies."), REPLICATE("Replicate", KeywordWithCost.class, false, "As an additional cost to cast this spell, you may pay %s any number of times. If you do, copy it that many times. You may choose new targets for the copies."),

View File

@@ -0,0 +1,6 @@
Name:Mirrored Lotus
ManaCost:0
Types:Artifact
K:Reflect:0
A:AB$ Mana | Cost$ T Exile<1/CARDNAME> | Produced$ Any | Amount$ 3 | AILogic$ BlackLotus | SpellDescription$ Add three mana of any one color.
Oracle:Reflect {0} (As this enters the battlefield, each opponent may pay {0}. When they do, they create a token copy of this except it lacks this ability.)\n{T}, Exile Mirrored Lotus: Add three mana of any one color.