diff --git a/.gitattributes b/.gitattributes index e2ac5828618..dee5a69ad73 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7196,6 +7196,7 @@ res/cardsfolder/thran_dynamo.txt -text svneol=native#text/plain res/cardsfolder/thran_forge.txt svneol=native#text/plain res/cardsfolder/thran_foundry.txt -text svneol=native#text/plain res/cardsfolder/thran_golem.txt -text svneol=native#text/plain +res/cardsfolder/thran_lens.txt -text svneol=native#text/plain res/cardsfolder/thran_quarry.txt -text svneol=native#text/plain res/cardsfolder/thran_war_machine.txt -text svneol=native#text/plain res/cardsfolder/thrashing_mudspawn.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/thran_lens.txt b/res/cardsfolder/thran_lens.txt new file mode 100644 index 00000000000..9549556dc5e --- /dev/null +++ b/res/cardsfolder/thran_lens.txt @@ -0,0 +1,9 @@ +Name:Thran Lens +ManaCost:2 +Types:Artifact +Text:no text +K:stAnimateAll:Permanent:no changes:no types:Overwrite:No Abilities:No Condition:All permanents are colorless. +SVar:RemRandomDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/thran_lens.jpg +End \ No newline at end of file diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index f8598eb2911..e244fba6240 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -7376,6 +7376,12 @@ public class GameActionUtil { String colors = ""; if(!k[4].equalsIgnoreCase("no colors")) { + colors = k[4]; + if(colors.contains(",Overwrite") || colors.contains("Overwrite")) { + colors.replace(",Overwrite",""); + colors.replace("Overwrite",""); + se.setOverwriteColors(true); + } colors = CardUtil.getShortColorsString(new ArrayList(Arrays.asList(k[4].split(",")))); } @@ -7470,7 +7476,7 @@ public class GameActionUtil { //TODO - adding SpellAbilities statically here not supported at this time } - long t = affectedCard.addColor(colors, affectedCard, true, true); + long t = affectedCard.addColor(colors, affectedCard, !se.isOverwriteColors(), true); se.addTimestamp(affectedCard, t); }//end for } @@ -7538,7 +7544,7 @@ public class GameActionUtil { //TODO - adding SpellAbilities statically here not supported at this time } - affectedCard.removeColor(se.getColorDesc(), affectedCard, true, se.getTimestamp(affectedCard)); + affectedCard.removeColor(se.getColorDesc(), affectedCard, !se.isOverwriteColors(), se.getTimestamp(affectedCard)); }//end removeStaticEffects // Special Conditions diff --git a/src/forge/StaticEffect.java b/src/forge/StaticEffect.java index 7cc0238b602..4681e2df48f 100644 --- a/src/forge/StaticEffect.java +++ b/src/forge/StaticEffect.java @@ -33,6 +33,7 @@ public class StaticEffect { //for colors private String colorDesc = ""; + private boolean overwriteColors = false; private HashMap timestamps = new HashMap(); @@ -266,6 +267,15 @@ public class StaticEffect { public void setColorDesc(String colorDesc) { this.colorDesc = colorDesc; } + + //overwrite color + public boolean isOverwriteColors() { + return overwriteColors; + } + + public void setOverwriteColors(boolean overwriteColors) { + this.overwriteColors = overwriteColors; + } public HashMap getTimestamps() { return timestamps;