CardFactoryUtil: Aura swap as Keyword

This commit is contained in:
Hanmac
2019-02-09 17:53:05 +01:00
parent 52cc02a316
commit 4da05f03dc
4 changed files with 17 additions and 4 deletions

View File

@@ -1650,7 +1650,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|| keyword.startsWith("Level up") || keyword.equals("Prowess") || keyword.startsWith("Eternalize")
|| keyword.startsWith("Reinforce") || keyword.startsWith("Champion") || keyword.startsWith("Prowl")
|| keyword.startsWith("Amplify") || keyword.startsWith("Ninjutsu") || keyword.startsWith("Adapt")
|| keyword.startsWith("Transfigure")
|| keyword.startsWith("Transfigure") || keyword.startsWith("Aura swap")
|| keyword.startsWith("Cycling") || keyword.startsWith("TypeCycling")) {
// keyword parsing takes care of adding a proper description
} else if (keyword.startsWith("CantBeBlockedByAmount")) {

View File

@@ -3746,6 +3746,19 @@ public class CardFactoryUtil {
origSA.setAftermath(true);
origSA.getRestrictions().setZone(ZoneType.Graveyard);
// The Exile part is done by the System itself
} else if (keyword.startsWith("Aura swap")) {
final String[] k = keyword.split(":");
final String manacost = k[1];
final String effect = "AB$ ExchangeZone | Cost$ " + manacost + " | Zone2$ Hand | Type$ Aura "
+ " | PrecostDesc$ Aura swap | CostDesc$ " + ManaCostParser.parse(manacost)
+ " | StackDescription$ SpellDescription | SpellDescription$ (" + inst.getReminderText() + ")";
final SpellAbility sa = AbilityFactory.getAbility(effect, card);
sa.setIntrinsic(intrinsic);
sa.setTemporary(!intrinsic);
inst.addSpellAbility(sa);
} else if (keyword.startsWith("Awaken")) {
final String[] k = keyword.split(":");
final String counters = k[1];

View File

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

View File

@@ -2,8 +2,8 @@ Name:Arcanum Wings
ManaCost:1 U
Types:Enchantment Aura
K:Enchant creature
K:Aura swap:2 U
A:SP$ Attach | Cost$ 1 U | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Flying | Description$ Enchanted creature has flying.
A:AB$ ExchangeZone | Cost$ 2 U | Zone2$ Hand | Type$ Aura | CostDesc$ Aura swap {2}{U} | SpellDescription$ ({2}{U}: Exchange this Aura with an Aura card in your hand.)
SVar:Picture:http://www.wizards.com/global/images/magic/general/arcanum_wings.jpg
Oracle:Enchant creature\nEnchanted creature has flying.\nAura swap {2}{U} ({2}{U}: Exchange this Aura with an Aura card in your hand.)