- HIDDEN keywords will now be treated differently by continuous static abilities.

This commit is contained in:
Sloth
2011-09-13 12:39:24 +00:00
parent 5cff257e41
commit 454747b6c8
5 changed files with 29 additions and 3 deletions

View File

@@ -681,7 +681,7 @@ public class GameAction {
cardsWithStAbs.reverse(); //roughly timestamp order
//apply continuous effects
for (int layer = 4; layer < 10; layer++) {
for (int layer = 4; layer < 11; layer++) {
for (Card card : cardsWithStAbs) {
ArrayList<StaticAbility> staticAbilities = card.getStaticAbilities();
for (StaticAbility stAb : staticAbilities) {

View File

@@ -61,6 +61,7 @@ public class StaticEffects {
int toughnessBonus = 0;
boolean setPT = false;
String[] addKeywords = null;
String[] addHiddenKeywords = null;
String addColors = null;
if (params.containsKey("SetPower") || params.containsKey("SetToughness")) {
@@ -86,6 +87,10 @@ public class StaticEffects {
toughnessBonus = Integer.valueOf(params.get("AddToughness"));
}
}
if (params.containsKey("AddHiddenKeyword")) {
addHiddenKeywords = params.get("AddHiddenKeyword").split(" & ");
}
if (params.containsKey("AddColor")) {
addColors = CardUtil.getShortColorsString(
@@ -137,6 +142,12 @@ public class StaticEffects {
}
}
if(addHiddenKeywords != null) {
for (String k : addHiddenKeywords) {
affectedCard.removeExtrinsicKeyword(k);
}
}
//remove abilities
if (params.containsKey("RemoveAllAbilities")) {
ArrayList<SpellAbility> abilities = affectedCard.getSpellAbilities();

View File

@@ -102,7 +102,10 @@ public class StaticAbility {
if(mapParams.containsKey("AddPower") || mapParams.containsKey("AddToughness")
|| mapParams.containsKey("SetPower") || mapParams.containsKey("SetToughness"))
return 9; // This is the collection of 7b and 7c
return 9; //This is the collection of 7b and 7c
if(mapParams.containsKey("AddHiddenKeyword"))
return 10; // rules change
// Layer 1, 2 & 3 are not supported

View File

@@ -43,6 +43,7 @@ public class StaticAbility_Continuous {
int setPower = -1;
int setToughness = -1;
String[] addKeywords = null;
String[] addHiddenKeywords = null;
String[] removeKeywords = null;
String[] addAbilities = null;
String[] addSVars = null;
@@ -98,6 +99,10 @@ public class StaticAbility_Continuous {
addKeywords = params.get("AddKeyword").split(" & ");
}
if (params.containsKey("AddHiddenKeyword")) {
addHiddenKeywords = params.get("AddHiddenKeyword").split(" & ");
}
if (params.containsKey("RemoveKeyword")) {
removeKeywords = params.get("RemoveKeyword").split(" & ");
}
@@ -208,6 +213,13 @@ public class StaticAbility_Continuous {
if (addKeywords != null || removeKeywords != null || removeAllAbilities) {
affectedCard.addChangedCardKeywords(addKeywords, removeKeywords, removeAllAbilities, hostCard.getTimestamp());
}
// add HIDDEN keywords
if(addHiddenKeywords != null) {
for (String k : addHiddenKeywords) {
affectedCard.addExtrinsicKeyword(k);
}
}
// add abilities
if (addAbilities != null) {