mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Merge branch 'token' into 'master'
Cleaning up some token generation and a Curse cycle Closes #1104 See merge request core-developers/forge!6041
This commit is contained in:
@@ -1096,7 +1096,7 @@ public class AbilityUtils {
|
|||||||
o = ((CardCollection) c).get(0).getController();
|
o = ((CardCollection) c).get(0).getController();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (defParsed.endsWith("Opponent")) {
|
else if (defParsed.endsWith("Opponent") && !defParsed.endsWith("IfOpponent")) {
|
||||||
String triggeringType = defParsed.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(AbilityKey.fromString(triggeringType));
|
final Object c = root.getTriggeringObject(AbilityKey.fromString(triggeringType));
|
||||||
@@ -1124,8 +1124,22 @@ public class AbilityUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final String triggeringType = defParsed.substring(9);
|
String triggeringType = defParsed.substring(9);
|
||||||
|
String filter = null;
|
||||||
|
if (triggeringType.contains("=")) {
|
||||||
|
filter = triggeringType.split("If")[1];
|
||||||
|
triggeringType = triggeringType.split("If")[0];
|
||||||
|
}
|
||||||
o = root.getTriggeringObject(AbilityKey.fromString(triggeringType));
|
o = root.getTriggeringObject(AbilityKey.fromString(triggeringType));
|
||||||
|
if (filter != null) {
|
||||||
|
if (filter.equals("Opponent")) {
|
||||||
|
if (!(Player) o.isOpponentOf(((SpellAbility) sa).getActivatingPlayer())) {
|
||||||
|
o = null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
System.err.println("getDefinedPlayers needs additional code for =Filter");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
if (o instanceof Player) {
|
if (o instanceof Player) {
|
||||||
|
|||||||
@@ -5,11 +5,10 @@ R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplaceWith$
|
|||||||
SVar:DBChooseOpp:DB$ ChoosePlayer | Defined$ You | Choices$ Player.Opponent | ChoiceTitle$ Choose an opponent to give control to: | AILogic$ Curse | SubAbility$ MoveToPlay
|
SVar:DBChooseOpp:DB$ ChoosePlayer | Defined$ You | Choices$ Player.Opponent | ChoiceTitle$ Choose an opponent to give control to: | AILogic$ Curse | SubAbility$ MoveToPlay
|
||||||
SVar:MoveToPlay:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard | GainControl$ True | NewController$ ChosenPlayer
|
SVar:MoveToPlay:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard | GainControl$ True | NewController$ ChosenPlayer
|
||||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigCharm | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, ABILITY
|
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigCharm | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, ABILITY
|
||||||
SVar:TrigCharm:DB$ Charm | Choices$ LifePact,DiscardPact,ZombiesPact | ChoiceRestriction$ ThisGame | CharmNum$ 1
|
SVar:TrigCharm:DB$ Charm | Choices$ LifePact,DiscardPact,MakeZombies | ChoiceRestriction$ ThisGame | CharmNum$ 1
|
||||||
SVar:LifePact:DB$ SetLife | Defined$ You | LifeAmount$ 4 | SpellDescription$ Your life total becomes 4.
|
SVar:LifePact:DB$ SetLife | Defined$ You | LifeAmount$ 4 | SpellDescription$ Your life total becomes 4.
|
||||||
SVar:DiscardPact:DB$ Discard | Defined$ You | Mode$ Hand | SpellDescription$ Discard your hand.
|
SVar:DiscardPact:DB$ Discard | Defined$ You | Mode$ Hand | SpellDescription$ Discard your hand.
|
||||||
SVar:ZombiesPact:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ MakeZombies | ChangeZoneTable$ True | SpellDescription$ Each opponent creates five 2/2 black Zombie creature tokens.
|
SVar:MakeZombies:DB$ Token | TokenAmount$ 5 | TokenScript$ b_2_2_zombie | TokenOwner$ Opponent | SpellDescription$ Each opponent creates five 2/2 black Zombie creature tokens.
|
||||||
SVar:MakeZombies:DB$ Token | LegacyImage$ b 2 2 zombie rna | TokenAmount$ 5 | TokenScript$ b_2_2_zombie | TokenOwner$ Remembered | SpellDescription$ Each opponent creates five 2/2 black Zombie creature tokens.
|
|
||||||
SVar:SacMe:6
|
SVar:SacMe:6
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
DeckHas:Ability$Token
|
DeckHas:Ability$Token
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ Name:Curse of Bounty
|
|||||||
ManaCost:1 G
|
ManaCost:1 G
|
||||||
Types:Enchantment Aura Curse
|
Types:Enchantment Aura Curse
|
||||||
K:Enchant player
|
K:Enchant player
|
||||||
A:SP$ Attach | Cost$ 1 G | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | ValidTgts$ Player | AILogic$ Curse
|
||||||
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 they control.
|
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigUntap | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, untap all nonland permanents you control. Each opponent attacking that player untaps all nonland permanents they control.
|
||||||
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigUntap
|
SVar:TrigUntap:DB$ UntapAll | Defined$ You | ValidCards$ Permanent.nonLand | SubAbility$ DBUntap
|
||||||
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 they control.
|
SVar:DBUntap:DB$ UntapAll | Defined$ TriggeredAttackingPlayerIfOpponent | ValidCards$ Permanent.nonLand
|
||||||
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 they control.
|
Oracle:Enchant player\nWhenever enchanted player is attacked, untap all nonland permanents you control. Each opponent attacking that player untaps all nonland permanents they control.
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ Name:Curse of Disturbance
|
|||||||
ManaCost:2 B
|
ManaCost:2 B
|
||||||
Types:Enchantment Aura Curse
|
Types:Enchantment Aura Curse
|
||||||
K:Enchant player
|
K:Enchant player
|
||||||
A:SP$ Attach | Cost$ 2 B | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | ValidTgts$ Player | AILogic$ Curse
|
||||||
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.
|
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.
|
||||||
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigToken | ChangeZoneTable$ True
|
SVar:TrigToken:DB$ Token | TokenScript$ b_2_2_zombie | SubAbility$ DBToken
|
||||||
SVar:TrigToken:DB$ Token | TokenOwner$ Player.IsRemembered | TokenAmount$ 1 | TokenScript$ b_2_2_zombie | LegacyImage$ b 2 2 zombie c17 | SpellDescription$ Create a 2/2 black Zombie creature token. Activate only any time you could cast a sorcery.
|
SVar:DBToken:DB$ Token | TokenOwner$ TriggeredAttackingPlayerIfOpponent | TokenScript$ b_2_2_zombie
|
||||||
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.
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ Name:Curse of Opulence
|
|||||||
ManaCost:R
|
ManaCost:R
|
||||||
Types:Enchantment Aura Curse
|
Types:Enchantment Aura Curse
|
||||||
K:Enchant player
|
K:Enchant player
|
||||||
A:SP$ Attach | Cost$ R | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | ValidTgts$ Player | AILogic$ Curse
|
||||||
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigRepeat | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, create a Gold token. Each opponent attacking that player does the same. (A Gold token is an artifact with "Sacrifice this artifact: Add one mana of any color.")
|
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, create a Gold token. Each opponent attacking that player does the same. (A Gold token is an artifact with "Sacrifice this artifact: Add one mana of any color.")
|
||||||
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigToken | ChangeZoneTable$ True
|
SVar:TrigToken:DB$ Token | TokenScript$ c_a_gold_draw | SubAbility$ DBToken
|
||||||
SVar:TrigToken:DB$ Token | TokenScript$ c_a_gold_draw | TokenOwner$ Player.IsRemembered | TokenAmount$ 1
|
SVar:DBToken:DB$ Token | TokenOwner$ TriggeredAttackingPlayerIfOpponent | TokenScript$ c_a_gold_draw
|
||||||
Oracle:Enchant player\nWhenever enchanted player is attacked, create a Gold token. Each opponent attacking that player does the same. (A Gold token is an artifact with "Sacrifice this artifact: Add one mana of any color.")
|
Oracle:Enchant player\nWhenever enchanted player is attacked, create a Gold token. Each opponent attacking that player does the same. (A Gold token is an artifact with "Sacrifice this artifact: Add one mana of any color.")
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ Name:Curse of Verbosity
|
|||||||
ManaCost:2 U
|
ManaCost:2 U
|
||||||
Types:Enchantment Aura Curse
|
Types:Enchantment Aura Curse
|
||||||
K:Enchant player
|
K:Enchant player
|
||||||
A:SP$ Attach | Cost$ 2 U | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | ValidTgts$ Player | AILogic$ Curse
|
||||||
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.
|
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:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigDraw
|
SVar:TrigDraw:DB$ Draw | NumCards$ 1 | Defined$ You
|
||||||
SVar:TrigDraw:DB$ Draw | NumCards$ 1 | Defined$ Player.IsRemembered
|
SVar:DBDraw:DB$ Draw | NumCards$ 1 | Defined$ TriggeredAttackingPlayerIfOpponent
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_verbosity.jpg
|
|
||||||
Oracle:Enchant player\nWhenever enchanted player is attacked, you draw a card. Each opponent attacking that player does the same.
|
Oracle:Enchant player\nWhenever enchanted player is attacked, you draw a card. Each opponent attacking that player does the same.
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ Name:Curse of Vitality
|
|||||||
ManaCost:2 W
|
ManaCost:2 W
|
||||||
Types:Enchantment Aura Curse
|
Types:Enchantment Aura Curse
|
||||||
K:Enchant player
|
K:Enchant player
|
||||||
A:SP$ Attach | Cost$ 2 W | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | ValidTgts$ Player | AILogic$ Curse
|
||||||
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.
|
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.
|
||||||
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigGainLife
|
SVar:TrigGainLife:DB$ GainLife | Defined$ You | LifeAmount$ 2 | SubAbility$ DBGainLife
|
||||||
SVar:TrigGainLife:DB$ GainLife | Defined$ Player.IsRemembered | LifeAmount$ 2
|
SVar:DBGainLife:DB$ GainLife | Defined$ TriggeredAttackingPlayerIfOpponent | LifeAmount$ 2
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
|
DeckHas:Ability$LifeGain
|
||||||
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.
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
Name:Elephant Resurgence
|
Name:Elephant Resurgence
|
||||||
ManaCost:1 G
|
ManaCost:1 G
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ RepeatEach | Cost$ 1 G | RepeatPlayers$ Player | RepeatSubAbility$ DBToken | ChangeZoneTable$ True | SpellDescription$ Each player creates a green Elephant creature token. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard."
|
A:SP$ Token | TokenScript$ g_x_x_elephant_resurgence | TokenOwner$ Player | SpellDescription$ Each player creates a green Elephant creature token. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard."
|
||||||
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_x_x_elephant_resurgence | TokenOwner$ Player.IsRemembered | LegacyImage$ g x x elephant resurgence pcy
|
|
||||||
SVar:NeedsToPlayVar:Z GE2
|
SVar:NeedsToPlayVar:Z GE2
|
||||||
SVar:Z:SVar$Z1/Minus.Z2
|
SVar:Z:SVar$Z1/Minus.Z2
|
||||||
SVar:Z1:Count$ValidGraveyard Creature.YouOwn
|
SVar:Z1:Count$ValidGraveyard Creature.YouOwn
|
||||||
SVar:Z2:Count$ValidGraveyard Creature.OppOwn
|
SVar:Z2:Count$ValidGraveyard Creature.OppOwn
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/elephant_resurgence.jpg
|
|
||||||
Oracle:Each player creates a green Elephant creature token. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard."
|
Oracle:Each player creates a green Elephant creature token. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard."
|
||||||
|
|||||||
Reference in New Issue
Block a user