mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Fixed Blood Moon and friends not removing keywords.
This commit is contained in:
@@ -2,7 +2,7 @@ Name:Blood Moon
|
||||
ManaCost:2 R
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
K:stAnimateAll:Land.nonBasic:no changes:Land,Mountain,RemoveSubTypes:no colors:Overwrite:No Condition:Nonbasic lands are Mountains.
|
||||
K:stAnimateAll:Land.nonBasic:no change/no change/Overwrite:Land,Mountain,RemoveSubTypes:no colors:Overwrite:No Condition:Nonbasic lands are Mountains.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/blood_moon.jpg
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:1 B
|
||||
Types:Enchantment Aura
|
||||
Text:no text
|
||||
K:Enchant Land Curse
|
||||
K:stAnimateEnchanted:Land:no changes:Land,Swamp,RemoveSubTypes:no colors:Overwrite:No Condition:Enchanted land is a Swamp.
|
||||
K:stAnimateEnchanted:Land:no change/no change/Overwrite:Land,Swamp,RemoveSubTypes:no colors:Overwrite:No Condition:Enchanted land is a Swamp.
|
||||
T:Mode$ Taps | ValidCard$ Card.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigLose | TriggerDescription$ Whenever enchanted land becomes tapped, its controller loses 2 life.
|
||||
SVar:TrigLose:AB$LoseLife | Cost$ 0 | Defined$ EnchantedController | LifeAmount$ 2
|
||||
SVar:Rarity:Common
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 W W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
K:At the beginning of your upkeep, sacrifice CARDNAME unless you pay W W
|
||||
K:stAnimateAll:Mountain:no changes:Land,Plains,RemoveSubTypes:no colors:Overwrite:No Condition:All Mountains are Plains.
|
||||
K:stAnimateAll:Mountain:no change/no change/Overwrite:Land,Plains,RemoveSubTypes:no colors:Overwrite:No Condition:All Mountains are Plains.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/conversion.jpg
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Name:Darksteel Citadel
|
||||
ManaCost:no cost
|
||||
Types:Artifact Land
|
||||
Text:("Destroy" effects and lethal damage don't destroy it.)
|
||||
Text:no text
|
||||
A:AB$ Mana | Cost$ T | Produced$ 1 | SpellDescription$ Add 1 to your mana pool.
|
||||
K:Indestructible
|
||||
SVar:Rarity:Common
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 W U
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
K:At the beginning of your upkeep, sacrifice CARDNAME unless you pay W U
|
||||
K:stAnimateAll:Mountain:no changes:Land,Plains,RemoveSubTypes:no colors:Overwrite:No Condition:All Mountains are Plains.
|
||||
K:stAnimateAll:Mountain:no change/no change/Overwrite:Land,Plains,RemoveSubTypes:no colors:Overwrite:No Condition:All Mountains are Plains.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/glaciers.jpg
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:G
|
||||
Types:Enchantment Aura
|
||||
Text:no text
|
||||
K:Enchant Land
|
||||
K:stAnimateEnchanted:Land:no changes:Land,Mountain,Forest,Plains,RemoveSubTypes:no colors:Overwrite:No Condition:Enchanted land is a Mountain, Forest, and Plains.
|
||||
K:stAnimateEnchanted:Land:no change/no change/Overwrite:Land,Mountain,Forest,Plains,RemoveSubTypes:no colors:Overwrite:No Condition:Enchanted land is a Mountain, Forest, and Plains.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/lush_growth.jpg
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 R
|
||||
Types:Creature Human Wizard
|
||||
Text:no text
|
||||
PT:2/2
|
||||
K:stAnimateAll:Land.nonBasic:no changes:Land,Mountain,RemoveSubTypes:no colors:Overwrite:No Condition:Nonbasic lands are Mountains.
|
||||
K:stAnimateAll:Land.nonBasic:no change/no change/Overwrite:Land,Mountain,RemoveSubTypes:no colors:Overwrite:No Condition:Nonbasic lands are Mountains.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/magus_of_the_moon.jpg
|
||||
|
||||
@@ -7343,8 +7343,8 @@ public class GameActionUtil {
|
||||
CardList affectedCards = getAffectedCards(cardWithKeyword, k, specific); // options are All, Self, Enchanted etc.
|
||||
se.setAffectedCards(affectedCards);
|
||||
|
||||
if(!k[2].equals("no changes")) {
|
||||
String[] pt = k[2].split("/");
|
||||
String[] pt = k[2].split("/");
|
||||
if(!k[2].equals("no changes") && pt.length > 1) {
|
||||
|
||||
int x = 0;
|
||||
if (pt[0].contains("X") || pt[1].contains("X"))
|
||||
@@ -7406,18 +7406,25 @@ public class GameActionUtil {
|
||||
String powerStr = keyword[0];
|
||||
String toughStr = keyword[1];
|
||||
//copied from stSetPT power/toughness
|
||||
int power = powerStr.matches("[0-9][0-9]?") ? Integer.parseInt(powerStr) : CardFactoryUtil.xCount(affectedCard, powerStr);
|
||||
int toughness = toughStr.matches("[0-9][0-9]?") ? Integer.parseInt(toughStr) : CardFactoryUtil.xCount(affectedCard, toughStr);
|
||||
se.addOriginalPT(affectedCard, affectedCard.getBaseAttack(), affectedCard.getBaseDefense());
|
||||
affectedCard.setBaseAttack(power);
|
||||
affectedCard.setBaseDefense(toughness);
|
||||
if(!powerStr.equals("no change")) {
|
||||
int power = powerStr.matches("[0-9][0-9]?") ? Integer.parseInt(powerStr) : CardFactoryUtil.xCount(affectedCard, powerStr);
|
||||
se.addOriginalPT(affectedCard, affectedCard.getBaseAttack(), affectedCard.getBaseDefense());
|
||||
affectedCard.setBaseAttack(power);
|
||||
}
|
||||
if(!toughStr.equals("no change")) {
|
||||
int toughness = toughStr.matches("[0-9][0-9]?") ? Integer.parseInt(toughStr) : CardFactoryUtil.xCount(affectedCard, toughStr);
|
||||
se.addOriginalPT(affectedCard, affectedCard.getBaseAttack(), affectedCard.getBaseDefense());
|
||||
affectedCard.setBaseDefense(toughness);
|
||||
}
|
||||
if(se.isOverwriteKeywords()) {
|
||||
se.addOriginalKeywords(affectedCard, affectedCard.getIntrinsicKeyword());
|
||||
affectedCard.clearAllKeywords();
|
||||
}
|
||||
else {
|
||||
if(keyword.length > 2) {
|
||||
String keywords[] = keyword[2].split(" & ");
|
||||
if(keyword.length != 2) {
|
||||
int index = 2;
|
||||
if (keyword.length == 1) index = 0;
|
||||
String keywords[] = keyword[index].split(" & ");
|
||||
for(int j = 0; j < keywords.length; j++) {
|
||||
String kw = keywords[j];
|
||||
affectedCard.addExtrinsicKeyword(kw);
|
||||
@@ -7484,8 +7491,12 @@ public class GameActionUtil {
|
||||
|
||||
private void removeStaticEffect(StaticEffect se, Card source, Card affectedCard, String[] details) {
|
||||
|
||||
String[] kw = details[2].split("/", 3);
|
||||
|
||||
if(!details[2].equals("no changes")) {
|
||||
affectedCard.setBaseAttack(se.getOriginalPower(affectedCard));
|
||||
if (!kw[0].equals("no change"))
|
||||
affectedCard.setBaseAttack(se.getOriginalPower(affectedCard));
|
||||
if (!kw[1].equals("no change"))
|
||||
affectedCard.setBaseDefense(se.getOriginalToughness(affectedCard));
|
||||
}
|
||||
|
||||
@@ -7506,15 +7517,16 @@ public class GameActionUtil {
|
||||
}
|
||||
|
||||
if(se.isOverwriteKeywords()) {
|
||||
for(String kw : se.getOriginalKeywords(affectedCard)) affectedCard.addIntrinsicKeyword(kw);
|
||||
for(String keyw : se.getOriginalKeywords(affectedCard)) affectedCard.addIntrinsicKeyword(keyw);
|
||||
}
|
||||
else {
|
||||
String[] kw = details[2].split("/", 3);
|
||||
if (kw.length > 2) {
|
||||
String kws[] = kw[2].split(" & ");
|
||||
for(int j = 0; j < kws.length; j++) {
|
||||
String keyword = kws[j];
|
||||
affectedCard.removeExtrinsicKeyword(keyword);
|
||||
if(kw.length != 2) {
|
||||
int index = 2;
|
||||
if (kw.length == 1) index = 0;
|
||||
String keywords[] = kw[index].split(" & ");
|
||||
for(int j = 0; j < keywords.length; j++) {
|
||||
String keyw = keywords[j];
|
||||
affectedCard.removeExtrinsicKeyword(keyw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user