- Added the option OverwriteColors to stAnimate.

- Added Thran Lens.
This commit is contained in:
jendave
2011-08-07 00:34:09 +00:00
parent 2ecf579e79
commit c48bee7c46
4 changed files with 28 additions and 2 deletions

View File

@@ -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<String>(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

View File

@@ -33,6 +33,7 @@ public class StaticEffect {
//for colors
private String colorDesc = "";
private boolean overwriteColors = false;
private HashMap<Card, Long> timestamps = new HashMap<Card, Long>();
@@ -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<Card, Long> getTimestamps() {
return timestamps;