mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Added the option OverwriteColors to stAnimate.
- Added Thran Lens.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user