mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Merge branch 'master' into 'master'
Simplify ManaConversion scripts, remove Flash/Ice Cave technical debt See merge request core-developers/forge!4479
This commit is contained in:
@@ -138,23 +138,11 @@ public final class MagicColor {
|
|||||||
public static final ImmutableList<String> BASIC_LANDS = ImmutableList.of("Plains", "Island", "Swamp", "Mountain", "Forest");
|
public static final ImmutableList<String> BASIC_LANDS = ImmutableList.of("Plains", "Island", "Swamp", "Mountain", "Forest");
|
||||||
public static final ImmutableList<String> SNOW_LANDS = ImmutableList.of("Snow-Covered Plains", "Snow-Covered Island", "Snow-Covered Swamp", "Snow-Covered Mountain", "Snow-Covered Forest");
|
public static final ImmutableList<String> SNOW_LANDS = ImmutableList.of("Snow-Covered Plains", "Snow-Covered Island", "Snow-Covered Swamp", "Snow-Covered Mountain", "Snow-Covered Forest");
|
||||||
public static final ImmutableMap<String, String> ANY_COLOR_CONVERSION = new ImmutableMap.Builder<String, String>()
|
public static final ImmutableMap<String, String> ANY_COLOR_CONVERSION = new ImmutableMap.Builder<String, String>()
|
||||||
.put("ManaColorConversion", "Additive")
|
.put("ManaConversion", "AnyType->AnyColor")
|
||||||
.put("WhiteConversion", "Color")
|
|
||||||
.put("BlueConversion", "Color")
|
|
||||||
.put("BlackConversion", "Color")
|
|
||||||
.put("RedConversion", "Color")
|
|
||||||
.put("GreenConversion", "Color")
|
|
||||||
.put("ColorlessConversion", "Color")
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
public static final ImmutableMap<String, String> ANY_TYPE_CONVERSION = new ImmutableMap.Builder<String, String>()
|
public static final ImmutableMap<String, String> ANY_TYPE_CONVERSION = new ImmutableMap.Builder<String, String>()
|
||||||
.put("ManaColorConversion", "Additive")
|
.put("ManaConversion", "AnyType->AnyType")
|
||||||
.put("WhiteConversion", "Type")
|
|
||||||
.put("BlueConversion", "Type")
|
|
||||||
.put("BlackConversion", "Type")
|
|
||||||
.put("RedConversion", "Type")
|
|
||||||
.put("GreenConversion", "Type")
|
|
||||||
.put("ColorlessConversion", "Type")
|
|
||||||
.build();
|
.build();
|
||||||
/**
|
/**
|
||||||
* Private constructor to prevent instantiation.
|
* Private constructor to prevent instantiation.
|
||||||
|
|||||||
@@ -59,6 +59,18 @@ public abstract class ManaAtom {
|
|||||||
return 0; // generic
|
return 0; // generic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static byte fromConversion(String s) {
|
||||||
|
switch (s) {
|
||||||
|
case "AnyColor": return ALL_MANA_COLORS;
|
||||||
|
case "AnyType": return ALL_MANA_TYPES;
|
||||||
|
}
|
||||||
|
byte b = 0;
|
||||||
|
for (char c : s.toCharArray()) {
|
||||||
|
b |= fromName(c);
|
||||||
|
}
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
public static int getIndexOfFirstManaType(final byte color){
|
public static int getIndexOfFirstManaType(final byte color){
|
||||||
for (int i = 0; i < MANATYPES.length; i++) {
|
for (int i = 0; i < MANATYPES.length; i++) {
|
||||||
if ((color & MANATYPES[i]) != 0) {
|
if ((color & MANATYPES[i]) != 0) {
|
||||||
|
|||||||
@@ -1496,17 +1496,45 @@ public class AbilityUtils {
|
|||||||
else if (unlessCost.equals("ChosenNumber")) {
|
else if (unlessCost.equals("ChosenNumber")) {
|
||||||
cost = new Cost(new ManaCost(new ManaCostParser(String.valueOf(source.getChosenNumber()))), true);
|
cost = new Cost(new ManaCost(new ManaCostParser(String.valueOf(source.getChosenNumber()))), true);
|
||||||
}
|
}
|
||||||
else if (unlessCost.equals("RememberedCostMinus2")) {
|
else if (unlessCost.startsWith("DefinedCost")) {
|
||||||
Card rememberedCard = (Card) source.getFirstRemembered();
|
CardCollection definedCards = AbilityUtils.getDefinedCards(sa.getHostCard(), unlessCost.split("_")[1], sa);
|
||||||
if (rememberedCard == null) {
|
if (definedCards.isEmpty()) {
|
||||||
sa.resolve();
|
sa.resolve();
|
||||||
resolveSubAbilities(sa, game);
|
resolveSubAbilities(sa, game);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ManaCostBeingPaid newCost = new ManaCostBeingPaid(rememberedCard.getManaCost());
|
Card card = definedCards.getFirst();
|
||||||
newCost.decreaseGenericMana(2);
|
ManaCostBeingPaid newCost = new ManaCostBeingPaid(card.getManaCost());
|
||||||
|
// Check if there's a third underscore for cost modifying
|
||||||
|
if (unlessCost.split("_").length == 3) {
|
||||||
|
String modifier = unlessCost.split("_")[2];
|
||||||
|
if (modifier.startsWith("Minus")) {
|
||||||
|
newCost.decreaseGenericMana(Integer.parseInt(modifier.substring(5)));
|
||||||
|
} else {
|
||||||
|
newCost.increaseGenericMana(Integer.parseInt(modifier.substring(4)));
|
||||||
|
}
|
||||||
|
}
|
||||||
cost = new Cost(newCost.toManaCost(), true);
|
cost = new Cost(newCost.toManaCost(), true);
|
||||||
}
|
}
|
||||||
|
else if (unlessCost.startsWith("DefinedSACost")) {
|
||||||
|
FCollection<SpellAbility> definedSAs = AbilityUtils.getDefinedSpellAbilities(sa.getHostCard(), unlessCost.split("_")[1], sa);
|
||||||
|
if (definedSAs.isEmpty()) {
|
||||||
|
sa.resolve();
|
||||||
|
resolveSubAbilities(sa, game);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Card host = definedSAs.getFirst().getHostCard();
|
||||||
|
if (host.getManaCost() == null) {
|
||||||
|
cost = new Cost(ManaCost.ZERO, true);
|
||||||
|
} else {
|
||||||
|
int xCount = host.getManaCost().countX();
|
||||||
|
int xPaid = host.getXManaCostPaid() * xCount;
|
||||||
|
ManaCostBeingPaid toPay = new ManaCostBeingPaid(host.getManaCost());
|
||||||
|
toPay.decreaseShard(ManaCostShard.X, xCount);
|
||||||
|
toPay.increaseGenericMana(xPaid);
|
||||||
|
cost = new Cost(toPay.toManaCost(), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (!StringUtils.isBlank(sa.getSVar(unlessCost)) || !StringUtils.isBlank(source.getSVar(unlessCost))) {
|
else if (!StringUtils.isBlank(sa.getSVar(unlessCost)) || !StringUtils.isBlank(source.getSVar(unlessCost))) {
|
||||||
// check for X costs (stored in SVars
|
// check for X costs (stored in SVars
|
||||||
int xCost = calculateAmount(source, TextUtil.fastReplace(sa.getParam("UnlessCost"),
|
int xCost = calculateAmount(source, TextUtil.fastReplace(sa.getParam("UnlessCost"),
|
||||||
@@ -1864,30 +1892,19 @@ public class AbilityUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final void applyManaColorConversion(ManaConversionMatrix matrix, final Map<String, String> params) {
|
public static final void applyManaColorConversion(ManaConversionMatrix matrix, final Map<String, String> params) {
|
||||||
String conversionType = params.get("ManaColorConversion");
|
String conversion = params.get("ManaConversion");
|
||||||
|
|
||||||
// Choices are Additives(OR) or Restrictive(AND)
|
for (String pair : conversion.split(" ")) {
|
||||||
boolean additive = "Additive".equals(conversionType);
|
// Check if conversion is additive or restrictive and how to split
|
||||||
|
boolean additive = pair.contains("->");
|
||||||
|
String[] sides = pair.split(additive ? "->" : "<-");
|
||||||
|
|
||||||
for(String c : MagicColor.Constant.COLORS_AND_COLORLESS) {
|
if (sides[0].equals("AnyColor") || sides[0].equals("AnyType")) {
|
||||||
// Use the strings from MagicColor, since that's how the Script will be coming in as
|
for (byte c : (sides[0].equals("AnyColor") ? MagicColor.WUBRG : MagicColor.WUBRGC)) {
|
||||||
String key = StringUtils.capitalize(c) + "Conversion";
|
matrix.adjustColorReplacement(c, ManaAtom.fromConversion(sides[1]), additive);
|
||||||
if (params.containsKey(key)) {
|
}
|
||||||
String convertTo = params.get(key);
|
|
||||||
byte convertByte = 0;
|
|
||||||
if ("Type".equals(convertTo)) {
|
|
||||||
// IMPORTANT! We need to use Mana Color here not Card Color.
|
|
||||||
convertByte = ManaAtom.ALL_MANA_TYPES;
|
|
||||||
} else if ("Color".equals(convertTo)) {
|
|
||||||
// IMPORTANT! We need to use Mana Color here not Card Color.
|
|
||||||
convertByte = ManaAtom.ALL_MANA_COLORS;
|
|
||||||
} else {
|
} else {
|
||||||
for (final String convertColor : convertTo.split(",")) {
|
matrix.adjustColorReplacement(ManaAtom.fromConversion(sides[0]), ManaAtom.fromConversion(sides[1]), additive);
|
||||||
convertByte |= ManaAtom.fromName(convertColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// AdjustColorReplacement has two different matrices handling final mana conversion under the covers
|
|
||||||
matrix.adjustColorReplacement(ManaAtom.fromName(c), convertByte, additive);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1915,6 +1915,9 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
|||||||
s.append(" on it.");
|
s.append(" on it.");
|
||||||
}
|
}
|
||||||
sbLong.append(s).append("\r\n");
|
sbLong.append(s).append("\r\n");
|
||||||
|
} else if (keyword.startsWith("ManaConvert")) {
|
||||||
|
final String[] k = keyword.split(":");
|
||||||
|
sbLong.append(k[2]).append("\r\n");
|
||||||
} else if (keyword.startsWith("Protection:") || keyword.startsWith("DeckLimit")) {
|
} else if (keyword.startsWith("Protection:") || keyword.startsWith("DeckLimit")) {
|
||||||
final String[] k = keyword.split(":");
|
final String[] k = keyword.split(":");
|
||||||
sbLong.append(k[2]).append("\r\n");
|
sbLong.append(k[2]).append("\r\n");
|
||||||
|
|||||||
@@ -591,7 +591,7 @@ public final class StaticAbilityContinuous {
|
|||||||
p.setMaxHandSize(p.getMaxHandSize() + rmax);
|
p.setMaxHandSize(p.getMaxHandSize() + rmax);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.containsKey("ManaColorConversion")) {
|
if (params.containsKey("ManaConversion")) {
|
||||||
AbilityUtils.applyManaColorConversion(p.getManaPool(), params);
|
AbilityUtils.applyManaColorConversion(p.getManaPool(), params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ Types:Enchantment
|
|||||||
S:Mode$ Continuous | Affected$ Land.YouCtrl | AddType$ Plains | RemoveLandTypes$ True | Description$ Lands you control are Plains.
|
S:Mode$ Continuous | Affected$ Land.YouCtrl | AddType$ Plains | RemoveLandTypes$ True | Description$ Lands you control are Plains.
|
||||||
S:Mode$ Continuous | Affected$ Card.YouOwn+nonLand | SetColor$ White | AffectedZone$ Hand,Library,Graveyard,Exile,Command | Description$ Nonland permanents you control are white. The same is true for spells you control and nonland cards you own that aren't on the battlefield.
|
S:Mode$ Continuous | Affected$ Card.YouOwn+nonLand | SetColor$ White | AffectedZone$ Hand,Library,Graveyard,Exile,Command | Description$ Nonland permanents you control are white. The same is true for spells you control and nonland cards you own that aren't on the battlefield.
|
||||||
S:Mode$ Continuous | Affected$ Card.YouCtrl+nonLand | SetColor$ White | AffectedZone$ Battlefield,Stack
|
S:Mode$ Continuous | Affected$ Card.YouCtrl+nonLand | SetColor$ White | AffectedZone$ Battlefield,Stack
|
||||||
S:Mode$ Continuous | Affected$ You | ManaColorConversion$ Additive | WhiteConversion$ Color | Description$ You may spend white mana as though it were mana of any color.
|
S:Mode$ Continuous | Affected$ You | ManaConversion$ W->AnyColor | Description$ You may spend white mana as though it were mana of any color.
|
||||||
S:Mode$ Continuous | Affected$ You | ManaColorConversion$ Restrictive | BlueConversion$ Colorless | BlackConversion$ Colorless | RedConversion$ Colorless | GreenConversion$ Colorless | ColorlessConversion$ Colorless | Description$ You may spend other mana only as though it were colorless mana.
|
S:Mode$ Continuous | Affected$ You | ManaConversion$ UBRG<-C | Description$ You may spend other mana only as though it were colorless mana.
|
||||||
SVar:NonStackingEffect:True
|
SVar:NonStackingEffect:True
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/celestial_dawn.jpg
|
|
||||||
Oracle:Lands you control are Plains.\nNonland permanents you control are white. The same is true for spells you control and nonland cards you own that aren't on the battlefield.\nYou may spend white mana as though it were mana of any color. You may spend other mana only as though it were colorless mana.
|
Oracle:Lands you control are Plains.\nNonland permanents you control are white. The same is true for spells you control and nonland cards you own that aren't on the battlefield.\nYou may spend white mana as though it were mana of any color. You may spend other mana only as though it were colorless mana.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Name:Chromatic Orrery
|
Name:Chromatic Orrery
|
||||||
ManaCost:7
|
ManaCost:7
|
||||||
Types:Legendary Artifact
|
Types:Legendary Artifact
|
||||||
S:Mode$ Continuous | Affected$ You | ManaColorConversion$ Additive | WhiteConversion$ Color | BlueConversion$ Color | BlackConversion$ Color | RedConversion$ Color | GreenConversion$ Color | ColorlessConversion$ Color | Description$ You may spend mana as though it were mana of any color.
|
S:Mode$ Continuous | Affected$ You | ManaConversion$ AnyType->AnyColor | Description$ You may spend mana as though it were mana of any color.
|
||||||
SVar:NonStackingEffect:True
|
SVar:NonStackingEffect:True
|
||||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 5 | SpellDescription$ Add {C}{C}{C}{C}{C}.
|
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 5 | SpellDescription$ Add {C}{C}{C}{C}{C}.
|
||||||
A:AB$ Draw | Cost$ 5 T | NumCards$ X | SpellDescription$ Draw a card for each color among permanents you control.
|
A:AB$ Draw | Cost$ 5 T | NumCards$ X | SpellDescription$ Draw a card for each color among permanents you control.
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ A:SP$ Effect | Cost$ 1 W | ReplacementEffects$ FDRep | StaticAbilities$ FDManaCo
|
|||||||
SVar:DBDraw:DB$ Draw | NumCards$ 1
|
SVar:DBDraw:DB$ Draw | NumCards$ 1
|
||||||
SVar:FDRep:Event$ ProduceMana | ActiveZones$ Command | ValidCard$ Card.YouCtrl | ReplaceWith$ ProduceW | Description$ Spells and abilities you control that would add colored mana add that much white mana instead.
|
SVar:FDRep:Event$ ProduceMana | ActiveZones$ Command | ValidCard$ Card.YouCtrl | ReplaceWith$ ProduceW | Description$ Spells and abilities you control that would add colored mana add that much white mana instead.
|
||||||
SVar:ProduceW:DB$ ReplaceMana | ReplaceColor$ W
|
SVar:ProduceW:DB$ ReplaceMana | ReplaceColor$ W
|
||||||
SVar:FDManaConvertion:Mode$ Continuous | EffectZone$ Command | Affected$ You | ManaColorConversion$ Additive | WhiteConversion$ Color | Description$ You may spend white mana as though it were mana of any color.
|
SVar:FDManaConvertion:Mode$ Continuous | EffectZone$ Command | Affected$ You | ManaConversion$ W->AnyColor | Description$ You may spend white mana as though it were mana of any color.
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
Oracle:Until end of turn, spells and abilities you control that would add colored mana instead add that much white mana. Until end of turn, you may spend white mana as though it were mana of any color.\nDraw a card.
|
Oracle:Until end of turn, spells and abilities you control that would add colored mana instead add that much white mana. Until end of turn, you may spend white mana as though it were mana of any color.\nDraw a card.
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ Name:Flash
|
|||||||
ManaCost:1 U
|
ManaCost:1 U
|
||||||
Types:Instant
|
Types:Instant
|
||||||
A:SP$ ChangeZone | Cost$ 1 U | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature | ChangeNum$ 1 | SubAbility$ DBSac | RememberChanged$ True | SpellDescription$ You may put a creature card from your hand onto the battlefield. If you do, sacrifice it unless you pay its mana cost reduced by up to {2}.
|
A:SP$ ChangeZone | Cost$ 1 U | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature | ChangeNum$ 1 | SubAbility$ DBSac | RememberChanged$ True | SpellDescription$ You may put a creature card from your hand onto the battlefield. If you do, sacrifice it unless you pay its mana cost reduced by up to {2}.
|
||||||
SVar:DBSac:DB$ SacrificeAll | Defined$ Remembered | UnlessCost$ RememberedCostMinus2 | UnlessPayer$ You | SubAbility$ DBCleanup
|
SVar:DBSac:DB$ SacrificeAll | Defined$ Remembered | UnlessCost$ DefinedCost_Remembered_Minus2 | UnlessPayer$ You | SubAbility$ DBCleanup
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/flash.jpg
|
|
||||||
Oracle:You may put a creature card from your hand onto the battlefield. If you do, sacrifice it unless you pay its mana cost reduced by up to {2}.
|
Oracle:You may put a creature card from your hand onto the battlefield. If you do, sacrifice it unless you pay its mana cost reduced by up to {2}.
|
||||||
|
|||||||
@@ -2,6 +2,5 @@ Name:Ice Cave
|
|||||||
ManaCost:3 U U
|
ManaCost:3 U U
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
T:Mode$ SpellCast | ValidCard$ Card | TriggerZones$ Battlefield | Execute$ TrigCounter | TriggerDescription$ Whenever a player casts a spell, any other player may pay that spell's mana cost. If a player does, counter the spell. (Mana cost includes color.)
|
T:Mode$ SpellCast | ValidCard$ Card | TriggerZones$ Battlefield | Execute$ TrigCounter | TriggerDescription$ Whenever a player casts a spell, any other player may pay that spell's mana cost. If a player does, counter the spell. (Mana cost includes color.)
|
||||||
SVar:TrigCounter:DB$ Counter | Defined$ TriggeredSpellAbility | UnlessCost$ TriggeredSpellManaCost | UnlessPayer$ NonTriggeredCardController | UnlessSwitched$ True
|
SVar:TrigCounter:DB$ Counter | Defined$ TriggeredSpellAbility | UnlessCost$ DefinedSACost_TriggeredSpellAbility | UnlessPayer$ NonTriggeredCardController | UnlessSwitched$ True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/ice_cave.jpg
|
|
||||||
Oracle:Whenever a player casts a spell, any other player may pay that spell's mana cost. If a player does, counter the spell. (Mana cost includes color.)
|
Oracle:Whenever a player casts a spell, any other player may pay that spell's mana cost. If a player does, counter the spell. (Mana cost includes color.)
|
||||||
|
|||||||
@@ -2,12 +2,7 @@ Name:Manascape Refractor
|
|||||||
ManaCost:3
|
ManaCost:3
|
||||||
Types:Artifact
|
Types:Artifact
|
||||||
K:CARDNAME enters the battlefield tapped.
|
K:CARDNAME enters the battlefield tapped.
|
||||||
K:ManaConvert:Black:All
|
K:ManaConvert:AnyType->AnyColor:You may spend mana as though it were mana of any color to pay the activation costs of CARDNAME's abilities.
|
||||||
K:ManaConvert:Blue:All
|
|
||||||
K:ManaConvert:Green:All
|
|
||||||
K:ManaConvert:Red:All
|
|
||||||
K:ManaConvert:White:All
|
|
||||||
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainsAbilitiesOf$ Land | Description$ CARDNAME has all activated abilities of all lands on the battlefield.
|
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainsAbilitiesOf$ Land | Description$ CARDNAME has all activated abilities of all lands on the battlefield.
|
||||||
Text:You may spend mana as though it were mana of any color to pay the activation costs of CARDNAME's abilities.
|
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
Oracle:Manascape Refractor enters the battlefield tapped.\nManascape Refractor has all activated abilities of all lands on the battlefield.\nYou may spend mana as though it were mana of any color to pay the activation costs of Manascape Refractor's abilities.
|
Oracle:Manascape Refractor enters the battlefield tapped.\nManascape Refractor has all activated abilities of all lands on the battlefield.\nYou may spend mana as though it were mana of any color to pay the activation costs of Manascape Refractor's abilities.
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ ManaCost:6
|
|||||||
Types:Artifact
|
Types:Artifact
|
||||||
S:Mode$ Continuous | Affected$ Permanent | AddType$ Artifact | Description$ All permanents are artifact in addition to their other types.
|
S:Mode$ Continuous | Affected$ Permanent | AddType$ Artifact | Description$ All permanents are artifact in addition to their other types.
|
||||||
S:Mode$ Continuous| Affected$ Card | SetColor$ Colorless | AffectedZone$ Battlefield,Hand,Library,Graveyard,Exile,Stack,Command | Description$ All cards that aren't on the battlefield, spells, and permanents are colorless.
|
S:Mode$ Continuous| Affected$ Card | SetColor$ Colorless | AffectedZone$ Battlefield,Hand,Library,Graveyard,Exile,Stack,Command | Description$ All cards that aren't on the battlefield, spells, and permanents are colorless.
|
||||||
S:Mode$ Continuous | Affected$ Player | ManaColorConversion$ Additive | WhiteConversion$ Color | BlueConversion$ Color | BlackConversion$ Color | RedConversion$ Color | GreenConversion$ Color | ColorlessConversion$ Color | Description$ Players may spend mana as though it were mana of any color.
|
S:Mode$ Continuous | Affected$ Player | ManaConversion$ AnyType->AnyColor | Description$ Players may spend mana as though it were mana of any color.
|
||||||
SVar:NonStackingEffect:True
|
SVar:NonStackingEffect:True
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mycosynth_lattice.jpg
|
|
||||||
Oracle:All permanents are artifacts in addition to their other types.\nAll cards that aren't on the battlefield, spells, and permanents are colorless.\nPlayers may spend mana as though it were mana of any color.
|
Oracle:All permanents are artifacts in addition to their other types.\nAll cards that aren't on the battlefield, spells, and permanents are colorless.\nPlayers may spend mana as though it were mana of any color.
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ Name:Quicksilver Elemental
|
|||||||
ManaCost:3 U U
|
ManaCost:3 U U
|
||||||
Types:Creature Elemental
|
Types:Creature Elemental
|
||||||
PT:3/4
|
PT:3/4
|
||||||
K:ManaConvert:Blue:All
|
K:ManaConvert:U->AnyColor:You may spend blue mana as though it were mana of any color to pay the activation costs of CARDNAME's abilities.
|
||||||
A:AB$ Effect | Cost$ U | ValidTgts$ Creature | TgtZone$ Battlefield | TgtPrompt$ Select target creature card | StaticAbilities$ STSteal | RememberObjects$ Targeted | SpellDescription$ CARDNAME gains all activated abilities of target creature until end of turn.
|
A:AB$ Effect | Cost$ U | ValidTgts$ Creature | TgtZone$ Battlefield | TgtPrompt$ Select target creature card | StaticAbilities$ STSteal | RememberObjects$ Targeted | SpellDescription$ CARDNAME gains all activated abilities of target creature until end of turn.
|
||||||
SVar:STSteal:Mode$ Continuous | Affected$ EffectSource | EffectZone$ Command | GainsAbilitiesOfDefined$ RememberedLKI | Description$ Quicksilver Elemental gains all activated abilities of that card until end of turn.
|
SVar:STSteal:Mode$ Continuous | Affected$ Card.EffectSource | EffectZone$ Command | GainsAbilitiesOfDefined$ RememberedLKI | Description$ Quicksilver Elemental gains all activated abilities of that card until end of turn.
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/quicksilver_elemental.jpg
|
|
||||||
Oracle:{U}: Quicksilver Elemental gains all activated abilities of target creature until end of turn. (If any of the abilities use that creature's name, use this creature's name instead.)\nYou may spend blue mana as though it were mana of any color to pay the activation costs of Quicksilver Elemental's abilities.
|
Oracle:{U}: Quicksilver Elemental gains all activated abilities of target creature until end of turn. (If any of the abilities use that creature's name, use this creature's name instead.)\nYou may spend blue mana as though it were mana of any color to pay the activation costs of Quicksilver Elemental's abilities.
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
Name:Sunglasses of Urza
|
Name:Sunglasses of Urza
|
||||||
ManaCost:3
|
ManaCost:3
|
||||||
Types:Artifact
|
Types:Artifact
|
||||||
S:Mode$ Continuous | Affected$ You | ManaColorConversion$ Additive | WhiteConversion$ Red | Description$ You may spend white mana as though it were red mana.
|
S:Mode$ Continuous | Affected$ You | ManaConversion$ W->R | Description$ You may spend white mana as though it were red mana.
|
||||||
AI:RemoveDeck:Random
|
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sunglasses_of_urza.jpg
|
|
||||||
Oracle:You may spend white mana as though it were red mana.
|
Oracle:You may spend white mana as though it were red mana.
|
||||||
|
|||||||
@@ -93,11 +93,10 @@ public class HumanPlaySpellAbility {
|
|||||||
ability = GameActionUtil.addExtraKeywordCost(ability);
|
ability = GameActionUtil.addExtraKeywordCost(ability);
|
||||||
|
|
||||||
if (ability.isSpell() && !ability.isCopied()) { // These hidden keywords should only apply on the Stack
|
if (ability.isSpell() && !ability.isCopied()) { // These hidden keywords should only apply on the Stack
|
||||||
final Card host = ability.getHostCard();
|
if (c.hasKeyword("May spend mana as though it were mana of any type to cast CARDNAME")
|
||||||
if (host.hasKeyword("May spend mana as though it were mana of any type to cast CARDNAME")
|
|
||||||
|| (option != null && option.isIgnoreManaCostType())) {
|
|| (option != null && option.isIgnoreManaCostType())) {
|
||||||
manaTypeConversion = true;
|
manaTypeConversion = true;
|
||||||
} else if (host.hasKeyword("May spend mana as though it were mana of any color to cast CARDNAME")
|
} else if (c.hasKeyword("May spend mana as though it were mana of any color to cast CARDNAME")
|
||||||
|| (option != null && option.isIgnoreManaCostColor())) {
|
|| (option != null && option.isIgnoreManaCostColor())) {
|
||||||
manaColorConversion = true;
|
manaColorConversion = true;
|
||||||
}
|
}
|
||||||
@@ -127,13 +126,12 @@ public class HumanPlaySpellAbility {
|
|||||||
|
|
||||||
if (ability.isAbility() && ability.isActivatedAbility()) {
|
if (ability.isAbility() && ability.isActivatedAbility()) {
|
||||||
final Map<String, String> params = Maps.newHashMap();
|
final Map<String, String> params = Maps.newHashMap();
|
||||||
params.put("ManaColorConversion", "Additive");
|
|
||||||
|
|
||||||
for (KeywordInterface inst : c.getKeywords()) {
|
for (KeywordInterface inst : c.getKeywords()) {
|
||||||
String keyword = inst.getOriginal();
|
String keyword = inst.getOriginal();
|
||||||
if (keyword.startsWith("ManaConvert")) {
|
if (keyword.startsWith("ManaConvert")) {
|
||||||
final String[] k = keyword.split(":");
|
final String[] k = keyword.split(":");
|
||||||
params.put(k[1] + "Conversion", k[2]);
|
params.put("ManaConversion", k[1]);
|
||||||
keywordColor = true;
|
keywordColor = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user