mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Added the option to remove triggered abilities with continuous static abilities.
- Added it to some cards that currently still use stAnimate.
This commit is contained in:
@@ -2,6 +2,7 @@ Name:Blood Moon
|
|||||||
ManaCost:2 R
|
ManaCost:2 R
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:no text
|
Text:no text
|
||||||
|
S:Mode$ Continuous | Affected$ Land.nonBasic | RemoveTriggers$ True
|
||||||
K:stAnimateAll:Land.nonBasic:no change/no change/Overwrite: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:RemRandomDeck:True
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Types:Enchantment Aura
|
|||||||
Text:no text
|
Text:no text
|
||||||
K:Enchant land
|
K:Enchant land
|
||||||
A:SP$ Attach | Cost$ 1 B | ValidTgts$ Land | AILogic$ Curse
|
A:SP$ Attach | Cost$ 1 B | ValidTgts$ Land | AILogic$ Curse
|
||||||
|
S:Mode$ Continuous | Affected$ Card.EnchantedBy | RemoveTriggers$ True
|
||||||
K:stAnimateEnchanted:Land:no change/no change/Overwrite: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.
|
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$ TriggeredCardController | LifeAmount$ 2
|
SVar:TrigLose:AB$LoseLife | Cost$ 0 | Defined$ TriggeredCardController | LifeAmount$ 2
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Types:Tribal Enchantment Treefolk Aura
|
|||||||
Text:no text
|
Text:no text
|
||||||
K:Enchant creature
|
K:Enchant creature
|
||||||
A:SP$ Attach | Cost$ 1 G | ValidTgts$ Creature | AILogic$ Curse
|
A:SP$ Attach | Cost$ 1 G | ValidTgts$ Creature | AILogic$ Curse
|
||||||
|
S:Mode$ Continuous | Affected$ Card.EnchantedBy | RemoveTriggers$ True
|
||||||
K:stAnimateEnchanted:Creature:0/4/Overwrite:Creature,Treefolk,Overwrite:no colors:Overwrite:No condition:Enchanted creature is a 0/4 Treefolk with no abilities.
|
K:stAnimateEnchanted:Creature:0/4/Overwrite:Creature,Treefolk,Overwrite:no colors:Overwrite:No condition:Enchanted creature is a 0/4 Treefolk with no abilities.
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Types:Enchantment Aura
|
|||||||
Text:no text
|
Text:no text
|
||||||
K:Enchant land
|
K:Enchant land
|
||||||
A:SP$ Attach | Cost$ G | ValidTgts$ Land | AILogic$ Pump
|
A:SP$ Attach | Cost$ G | ValidTgts$ Land | AILogic$ Pump
|
||||||
|
S:Mode$ Continuous | Affected$ Card.EnchantedBy | RemoveTriggers$ True
|
||||||
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.
|
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:RemRandomDeck:True
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ ManaCost:2 R
|
|||||||
Types:Creature Human Wizard
|
Types:Creature Human Wizard
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:2/2
|
PT:2/2
|
||||||
|
S:Mode$ Continuous | Affected$ Land.nonBasic | RemoveTriggers$ True
|
||||||
K:stAnimateAll:Land.nonBasic:no change/no change/Overwrite: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:RemRandomDeck:True
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class StaticEffects {
|
|||||||
}
|
}
|
||||||
staticEffects = new ArrayList<StaticEffect>();
|
staticEffects = new ArrayList<StaticEffect>();
|
||||||
|
|
||||||
AllZone.getTriggerHandler().removeTemporaryTriggers();
|
AllZone.getTriggerHandler().cleanUpTemporaryTriggers();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class StaticAbility {
|
|||||||
return 5;
|
return 5;
|
||||||
|
|
||||||
if(mapParams.containsKey("AddKeyword") || mapParams.containsKey("AddAbility")
|
if(mapParams.containsKey("AddKeyword") || mapParams.containsKey("AddAbility")
|
||||||
|| mapParams.containsKey("AddTrigger"))
|
|| mapParams.containsKey("AddTrigger") || mapParams.containsKey("RemoveTriggers"))
|
||||||
return 6;
|
return 6;
|
||||||
|
|
||||||
if(mapParams.containsKey("CharacteristicDefining"))
|
if(mapParams.containsKey("CharacteristicDefining"))
|
||||||
|
|||||||
@@ -203,6 +203,14 @@ public class StaticAbility_Continuous {
|
|||||||
affectedCard.addTrigger(actualTrigger);
|
affectedCard.addTrigger(actualTrigger);
|
||||||
AllZone.getTriggerHandler().registerTrigger(actualTrigger);
|
AllZone.getTriggerHandler().registerTrigger(actualTrigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove triggers
|
||||||
|
if (params.containsKey("RemoveTriggers") || params.containsKey("RemoveAllAbilities")) {
|
||||||
|
ArrayList<Trigger> triggers = affectedCard.getTriggers();
|
||||||
|
for (Trigger trigger : triggers) {
|
||||||
|
trigger.setSuppressed(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
//affectedCard.updateObservers();
|
//affectedCard.updateObservers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ public abstract class Trigger {
|
|||||||
* @return a {@link java.lang.String} object.
|
* @return a {@link java.lang.String} object.
|
||||||
*/
|
*/
|
||||||
public String toString() {
|
public String toString() {
|
||||||
if (mapParams.containsKey("TriggerDescription")) {
|
if (mapParams.containsKey("TriggerDescription") && !isSuppressed()) {
|
||||||
return mapParams.get("TriggerDescription").replace("CARDNAME", hostCard.getName());
|
return mapParams.get("TriggerDescription").replace("CARDNAME", hostCard.getName());
|
||||||
} else return "";
|
} else return "";
|
||||||
}
|
}
|
||||||
@@ -523,4 +523,14 @@ public abstract class Trigger {
|
|||||||
public boolean isTemporary() {
|
public boolean isTemporary() {
|
||||||
return temporary;
|
return temporary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean suppressed = false;
|
||||||
|
|
||||||
|
public void setSuppressed(boolean supp) {
|
||||||
|
suppressed = supp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSuppressed() {
|
||||||
|
return suppressed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,13 +253,16 @@ public class TriggerHandler {
|
|||||||
* <p>removeTemporaryTriggers.</p>
|
* <p>removeTemporaryTriggers.</p>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public final void removeTemporaryTriggers() {
|
public final void cleanUpTemporaryTriggers() {
|
||||||
for (int i = 0; i < registeredTriggers.size(); i++) {
|
for (int i = 0; i < registeredTriggers.size(); i++) {
|
||||||
if (registeredTriggers.get(i).isTemporary()) {
|
if (registeredTriggers.get(i).isTemporary()) {
|
||||||
registeredTriggers.get(i).hostCard.removeTrigger(registeredTriggers.get(i));
|
registeredTriggers.get(i).hostCard.removeTrigger(registeredTriggers.get(i));
|
||||||
registeredTriggers.remove(i);
|
registeredTriggers.remove(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (int i = 0; i < registeredTriggers.size(); i++) {
|
||||||
|
registeredTriggers.get(i).setSuppressed(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -365,6 +368,9 @@ public class TriggerHandler {
|
|||||||
if (!regtrig.performTest(runParams)) {
|
if (!regtrig.performTest(runParams)) {
|
||||||
return false; //Test failed.
|
return false; //Test failed.
|
||||||
}
|
}
|
||||||
|
if (regtrig.isSuppressed()) {
|
||||||
|
return false; //Trigger removed by effect
|
||||||
|
}
|
||||||
|
|
||||||
//Torpor Orb check
|
//Torpor Orb check
|
||||||
CardList torporOrbs = AllZoneUtil.getCardsInPlay("Torpor Orb");
|
CardList torporOrbs = AllZoneUtil.getCardsInPlay("Torpor Orb");
|
||||||
|
|||||||
Reference in New Issue
Block a user