- 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

@@ -4,7 +4,7 @@ Types:Enchantment
Text:no text Text:no text
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseCT | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose a creature type. T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseCT | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose a creature type.
SVar:ChooseCT:AB$ ChooseType | Cost$ 0 | Defined$ You | Type$ Creature | AILogic$ MostProminentHumanControls SVar:ChooseCT:AB$ ChooseType | Cost$ 0 | Defined$ You | Type$ Creature | AILogic$ MostProminentHumanControls
S:Mode$ Continuous | Affected$ Creature.ChosenType | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Creatures of the chosen type don't untap during their controllers' untap steps. S:Mode$ Continuous | Affected$ Creature.ChosenType | AddHiddenKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Creatures of the chosen type don't untap during their controllers' untap steps.
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/an_zerrin_ruins.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/an_zerrin_ruins.jpg

View File

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

View File

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

View File

@@ -102,7 +102,10 @@ public class StaticAbility {
if(mapParams.containsKey("AddPower") || mapParams.containsKey("AddToughness") if(mapParams.containsKey("AddPower") || mapParams.containsKey("AddToughness")
|| mapParams.containsKey("SetPower") || mapParams.containsKey("SetToughness")) || 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 // Layer 1, 2 & 3 are not supported

View File

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