- 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
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
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:Rarity:Rare
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
//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")) {
@@ -87,6 +88,10 @@ public class StaticEffects {
}
}
if (params.containsKey("AddHiddenKeyword")) {
addHiddenKeywords = params.get("AddHiddenKeyword").split(" & ");
}
if (params.containsKey("AddColor")) {
addColors = CardUtil.getShortColorsString(
new ArrayList<String>(Arrays.asList(params.get("AddColor").split(" & "))));
@@ -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(" & ");
}
@@ -209,6 +214,13 @@ public class StaticAbility_Continuous {
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) {
for (String abilty : addAbilities) {