mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- [C17] updated Curses to work correctly for "you and the triggered attacking player".
This commit is contained in:
@@ -971,10 +971,14 @@ public class AbilityUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (defined.startsWith("Triggered")) {
|
else if (defined.startsWith("Triggered")) {
|
||||||
|
String defParsed = defined.endsWith("AndYou") ? defined.substring(0, defined.indexOf("AndYou")) : defined;
|
||||||
|
if (defined.endsWith("AndYou")) {
|
||||||
|
players.add(sa.getHostCard().getController());
|
||||||
|
}
|
||||||
final SpellAbility root = sa.getRootAbility();
|
final SpellAbility root = sa.getRootAbility();
|
||||||
Object o = null;
|
Object o = null;
|
||||||
if (defined.endsWith("Controller")) {
|
if (defParsed.endsWith("Controller")) {
|
||||||
String triggeringType = defined.substring(9);
|
String triggeringType = defParsed.substring(9);
|
||||||
triggeringType = triggeringType.substring(0, triggeringType.length() - 10);
|
triggeringType = triggeringType.substring(0, triggeringType.length() - 10);
|
||||||
final Object c = root.getTriggeringObject(triggeringType);
|
final Object c = root.getTriggeringObject(triggeringType);
|
||||||
if (c instanceof Card) {
|
if (c instanceof Card) {
|
||||||
@@ -984,8 +988,8 @@ public class AbilityUtils {
|
|||||||
o = ((SpellAbility) c).getActivatingPlayer();
|
o = ((SpellAbility) c).getActivatingPlayer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (defined.endsWith("Opponent")) {
|
else if (defParsed.endsWith("Opponent")) {
|
||||||
String triggeringType = defined.substring(9);
|
String triggeringType = defParsed.substring(9);
|
||||||
triggeringType = triggeringType.substring(0, triggeringType.length() - 8);
|
triggeringType = triggeringType.substring(0, triggeringType.length() - 8);
|
||||||
final Object c = root.getTriggeringObject(triggeringType);
|
final Object c = root.getTriggeringObject(triggeringType);
|
||||||
if (c instanceof Card) {
|
if (c instanceof Card) {
|
||||||
@@ -995,8 +999,8 @@ public class AbilityUtils {
|
|||||||
o = ((SpellAbility) c).getActivatingPlayer().getOpponents();
|
o = ((SpellAbility) c).getActivatingPlayer().getOpponents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (defined.endsWith("Owner")) {
|
else if (defParsed.endsWith("Owner")) {
|
||||||
String triggeringType = defined.substring(9);
|
String triggeringType = defParsed.substring(9);
|
||||||
triggeringType = triggeringType.substring(0, triggeringType.length() - 5);
|
triggeringType = triggeringType.substring(0, triggeringType.length() - 5);
|
||||||
final Object c = root.getTriggeringObject(triggeringType);
|
final Object c = root.getTriggeringObject(triggeringType);
|
||||||
if (c instanceof Card) {
|
if (c instanceof Card) {
|
||||||
@@ -1004,7 +1008,7 @@ public class AbilityUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final String triggeringType = defined.substring(9);
|
final String triggeringType = defParsed.substring(9);
|
||||||
o = root.getTriggeringObject(triggeringType);
|
o = root.getTriggeringObject(triggeringType);
|
||||||
}
|
}
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ K:Enchant player
|
|||||||
A:SP$ Attach | Cost$ 1 G | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | Cost$ 1 G | ValidTgts$ Player | AILogic$ Curse
|
||||||
# TODO: ensure that TriggeredAttackerController would work correctly (or expand as needed) for multiple opponents attacking
|
# TODO: ensure that TriggeredAttackerController would work correctly (or expand as needed) for multiple opponents attacking
|
||||||
# the player (Player.EnchantedBy) after shared turns are implemented.
|
# the player (Player.EnchantedBy) after shared turns are implemented.
|
||||||
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigUntap | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, you gain 2 life. Each opponent attacking that player does the same.
|
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigRepeat | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, untap all nonland permanents you control. Each opponent attacking that player untaps all nonland permanents he or she controls.
|
||||||
SVar:TrigUntap:DB$ UntapAll | Defined$ TriggeredAttackingPlayer | ValidCards$ Permanent.nonLand | SpellDescription$ Whenever enchanted player is attacked, untap all nonland permanents you control. Each opponent attacking that player untaps all nonland permanents he or she controls.
|
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigUntap
|
||||||
|
SVar:TrigUntap:DB$ UntapAll | Defined$ Player.IsRemembered | ValidCards$ Permanent.nonLand | SpellDescription$ Whenever enchanted player is attacked, untap all nonland permanents you control. Each opponent attacking that player untaps all nonland permanents he or she controls.
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
|
||||||
Oracle:Enchant player\nWhenever enchanted player is attacked, untap all nonland permanents you control. Each opponent attacking that player untaps all nonland permanents he or she controls.
|
Oracle:Enchant player\nWhenever enchanted player is attacked, untap all nonland permanents you control. Each opponent attacking that player untaps all nonland permanents he or she controls.
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ K:Enchant player
|
|||||||
A:SP$ Attach | Cost$ 2 B | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | Cost$ 2 B | ValidTgts$ Player | AILogic$ Curse
|
||||||
# TODO: ensure that TriggeredAttackerController would work correctly (or expand as needed) for multiple opponents attacking
|
# TODO: ensure that TriggeredAttackerController would work correctly (or expand as needed) for multiple opponents attacking
|
||||||
# the player (Player.EnchantedBy) after shared turns are implemented.
|
# the player (Player.EnchantedBy) after shared turns are implemented.
|
||||||
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, create a 2/2 black Zombie creature token. Each opponent attacking that player does the same.
|
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigRepeat | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, create a 2/2 black Zombie creature token. Each opponent attacking that player does the same.
|
||||||
SVar:TrigToken:DB$ Token | TokenOwner$ TriggeredAttackingPlayer | TokenAmount$ 1 | TokenName$ Zombie | TokenTypes$ Creature,Zombie | TokenColors$ Black | TokenPower$ 2 | TokenToughness$ 2 | TokenImage$ b 2 2 zombie C17 | SpellDescription$ Create a 2/2 black Zombie creature token. Activate this ability only any time you could cast a sorcery.
|
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigToken
|
||||||
|
SVar:TrigToken:DB$ Token | TokenOwner$ Player.IsRemembered | TokenAmount$ 1 | TokenName$ Zombie | TokenTypes$ Creature,Zombie | TokenColors$ Black | TokenPower$ 2 | TokenToughness$ 2 | TokenImage$ b 2 2 zombie C17 | SpellDescription$ Create a 2/2 black Zombie creature token. Activate this ability only any time you could cast a sorcery.
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
|
||||||
Oracle:Enchant player\nWhenever enchanted player is attacked, create a 2/2 black Zombie creature token. Each opponent attacking that player does the same.
|
Oracle:Enchant player\nWhenever enchanted player is attacked, create a 2/2 black Zombie creature token. Each opponent attacking that player does the same.
|
||||||
|
|||||||
@@ -5,8 +5,9 @@ K:Enchant player
|
|||||||
A:SP$ Attach | Cost$ R | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | Cost$ R | ValidTgts$ Player | AILogic$ Curse
|
||||||
# TODO: ensure that TriggeredAttackerController would work correctly (or expand as needed) for multiple opponents attacking
|
# TODO: ensure that TriggeredAttackerController would work correctly (or expand as needed) for multiple opponents attacking
|
||||||
# the player (Player.EnchantedBy) after shared turns are implemented.
|
# the player (Player.EnchantedBy) after shared turns are implemented.
|
||||||
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, create a colorless artifact token named Gold. It has "sacrifice this artifact: Add one mana of any color to your mana pool." Each opponent attacking that player does the same.
|
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigRepeat | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, create a colorless artifact token named Gold. It has "sacrifice this artifact: Add one mana of any color to your mana pool." Each opponent attacking that player does the same.
|
||||||
SVar:TrigToken:DB$ Token | TokenName$ Gold | TokenTypes$ Artifact | TokenColors$ Colorless | TokenOwner$ TriggeredAttackingPlayer | TokenAmount$ 1 | TokenImage$ c gold C17 | TokenAbilities$ ABMana | References$ ABMana
|
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigToken
|
||||||
|
SVar:TrigToken:DB$ Token | TokenName$ Gold | TokenTypes$ Artifact | TokenColors$ Colorless | TokenOwner$ Player.IsRemembered | TokenAmount$ 1 | TokenImage$ c gold C17 | TokenAbilities$ ABMana | References$ ABMana
|
||||||
SVar:ABMana:AB$ Mana | Cost$ Sac<1/CARDNAME> | Produced$ Any | SpellDescription$ Add one mana of any color to your mana pool.
|
SVar:ABMana:AB$ Mana | Cost$ Sac<1/CARDNAME> | Produced$ Any | SpellDescription$ Add one mana of any color to your mana pool.
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
|
||||||
Oracle:Enchant player\nWhenever enchanted player is attacked, create a colorless artifact token named Gold. It has "sacrifice this artifact: Add one mana of any color to your mana pool." Each opponent attacking that player does the same.
|
Oracle:Enchant player\nWhenever enchanted player is attacked, create a colorless artifact token named Gold. It has "sacrifice this artifact: Add one mana of any color to your mana pool." Each opponent attacking that player does the same.
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ K:Enchant player
|
|||||||
A:SP$ Attach | Cost$ 2 U | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | Cost$ 2 U | ValidTgts$ Player | AILogic$ Curse
|
||||||
# TODO: ensure that TriggeredAttackerController would work correctly (or expand as needed) for multiple opponents attacking
|
# TODO: ensure that TriggeredAttackerController would work correctly (or expand as needed) for multiple opponents attacking
|
||||||
# the player (Player.EnchantedBy) after shared turns are implemented.
|
# the player (Player.EnchantedBy) after shared turns are implemented.
|
||||||
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigDraw | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, draw a card. Each opponent attacking that player does the same.
|
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigRepeat | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, draw a card. Each opponent attacking that player does the same.
|
||||||
SVar:TrigDraw:DB$ Draw | NumCards$ 1 | Defined$ TriggeredAttackingPlayer
|
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigDraw
|
||||||
|
SVar:TrigDraw:DB$ Draw | NumCards$ 1 | Defined$ Player.IsRemembered
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_verbosity.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_verbosity.jpg
|
||||||
Oracle:Enchant player\nWhenever enchanted player is attacked, draw a card. Each opponent attacking that player does the same.
|
Oracle:Enchant player\nWhenever enchanted player is attacked, draw a card. Each opponent attacking that player does the same.
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ K:Enchant player
|
|||||||
A:SP$ Attach | Cost$ 2 W | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | Cost$ 2 W | ValidTgts$ Player | AILogic$ Curse
|
||||||
# TODO: ensure that TriggeredAttackerController would work correctly (or expand as needed) for multiple opponents attacking
|
# TODO: ensure that TriggeredAttackerController would work correctly (or expand as needed) for multiple opponents attacking
|
||||||
# the player (Player.EnchantedBy) after shared turns are implemented.
|
# the player (Player.EnchantedBy) after shared turns are implemented.
|
||||||
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigGainLife | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, you gain 2 life. Each opponent attacking that player does the same.
|
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigRepeat | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, you gain 2 life. Each opponent attacking that player does the same.
|
||||||
SVar:TrigGainLife:DB$ GainLife | Defined$ TriggeredAttackerController | LifeAmount$ 2
|
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigGainLife
|
||||||
|
SVar:TrigGainLife:DB$ GainLife | Defined$ Player.IsRemembered | LifeAmount$ 2
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
|
||||||
Oracle:Enchant player\nWhenever enchanted player is attacked, you gain 2 life. Each opponent attacking that player does the same.
|
Oracle:Enchant player\nWhenever enchanted player is attacked, you gain 2 life. Each opponent attacking that player does the same.
|
||||||
|
|||||||
Reference in New Issue
Block a user