mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added the optional parameter "Attacked" to the "Attacks" trigger. If set to player it won't trigger when a planeswalker is attacked.
This commit is contained in:
@@ -2,7 +2,7 @@ Name:Briar Patch
|
||||
ManaCost:1 G G
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
T:Mode$ Attacks | ValidCard$ Creature.YouDontCtrl | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever a creature attacks you, it gets -1/-0 until end of turn.
|
||||
T:Mode$ Attacks | ValidCard$ Creature.YouDontCtrl | Attacked$ Player | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever a creature attacks you, it gets -1/-0 until end of turn.
|
||||
SVar:TrigPump:AB$Pump | Cost$ 0 | Defined$ TriggeredAttacker | NumAtt$ -1
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/briar_patch.jpg
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Hissing Miasma
|
||||
ManaCost:1 B B
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
T:Mode$ Attacks | ValidCard$ Creature.YouDontCtrl | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ Whenever a creature attacks you, its controller loses 1 life.
|
||||
T:Mode$ Attacks | ValidCard$ Creature.YouDontCtrl | Attacked$ Player | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ Whenever a creature attacks you, its controller loses 1 life.
|
||||
SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ Opponent | LifeAmount$ 1 | SpellDescription$ Whenever a creature attacks you, its controller loses 1 life.
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/hissing_miasma.jpg
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Raking Canopy
|
||||
ManaCost:1 G G
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
T:Mode$ Attacks | ValidCard$ Creature.YouDontCtrl+withFlying | TriggerZones$ Battlefield | Execute$ TrigDamage | TriggerDescription$ Whenever a creature with flying attacks you, CARDNAME deals 4 damage to it.
|
||||
T:Mode$ Attacks | ValidCard$ Creature.YouDontCtrl+withFlying | Attacked$ Player | TriggerZones$ Battlefield | Execute$ TrigDamage | TriggerDescription$ Whenever a creature with flying attacks you, CARDNAME deals 4 damage to it.
|
||||
SVar:TrigDamage:AB$DealDamage | Cost$ 0 | Defined$ TriggeredAttacker | NumDmg$ 4
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/raking_canopy.jpg
|
||||
|
||||
@@ -2096,6 +2096,7 @@ public class CombatUtil {
|
||||
CardList otherAttackers = new CardList(AllZone.getCombat().getAttackers());
|
||||
otherAttackers.remove(c);
|
||||
runParams.put("OtherAttackers", otherAttackers);
|
||||
runParams.put("Attacked", AllZone.getCombat().getDefenderByAttacker(c));
|
||||
AllZone.getTriggerHandler().runTrigger("Attacks", runParams);
|
||||
|
||||
// Annihilator:
|
||||
|
||||
@@ -3,8 +3,11 @@ package forge.card.trigger;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import forge.Card;
|
||||
import forge.CardList;
|
||||
import forge.Player;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
|
||||
/**
|
||||
@@ -42,6 +45,12 @@ public class Trigger_Attacks extends Trigger {
|
||||
}
|
||||
}
|
||||
|
||||
if (mapParams.containsKey("Attacked")) {
|
||||
if (mapParams.get("Attacked").equals("Player") && StringUtils.isNumeric(runParams2.get("Attacked").toString())
|
||||
&& Integer.parseInt(runParams2.get("Attacked").toString()) > 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mapParams.containsKey("Alone")) {
|
||||
CardList otherAttackers = (CardList) runParams2.get("OtherAttackers");
|
||||
if (otherAttackers == null) {
|
||||
|
||||
Reference in New Issue
Block a user