mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Cherry pick full control fix (#6702)
This commit is contained in:
@@ -41,8 +41,7 @@ public class TokenEffect extends TokenEffectBase {
|
|||||||
final Card host = sa.getHostCard();
|
final Card host = sa.getHostCard();
|
||||||
String desc = sa.getParam("SpellDescription");
|
String desc = sa.getParam("SpellDescription");
|
||||||
List<String> words = Arrays.asList(desc.split(" "));
|
List<String> words = Arrays.asList(desc.split(" "));
|
||||||
final List<Player> creators = AbilityUtils.getDefinedPlayers(host, sa.getParamOrDefault("TokenOwner",
|
final List<Player> creators = getDefinedPlayersOrTargeted(sa, "TokenOwner");
|
||||||
"You"), sa);
|
|
||||||
if (!words.get(0).equalsIgnoreCase("Create") && desc.contains(" create")) {
|
if (!words.get(0).equalsIgnoreCase("Create") && desc.contains(" create")) {
|
||||||
String[] parts = desc.split(" create", 2);
|
String[] parts = desc.split(" create", 2);
|
||||||
desc = parts[0] + " " + Lang.joinHomogenous(creators) + " create" + parts[1];
|
desc = parts[0] + " " + Lang.joinHomogenous(creators) + " create" + parts[1];
|
||||||
@@ -123,8 +122,7 @@ public class TokenEffect extends TokenEffectBase {
|
|||||||
useZoneTable = true;
|
useZoneTable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
makeTokenTable(AbilityUtils.getDefinedPlayers(host, sa.getParamOrDefault("TokenOwner", "You"), sa),
|
makeTokenTable(getDefinedPlayersOrTargeted(sa, "TokenOwner"), sa.getParam("TokenScript").split(","),
|
||||||
sa.getParam("TokenScript").split(","),
|
|
||||||
AbilityUtils.calculateAmount(host, sa.getParamOrDefault("TokenAmount", "1"), sa),
|
AbilityUtils.calculateAmount(host, sa.getParamOrDefault("TokenAmount", "1"), sa),
|
||||||
false, triggerList, combatChanged, sa);
|
false, triggerList, combatChanged, sa);
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public abstract class TokenEffectBase extends SpellAbilityEffect {
|
|||||||
|
|
||||||
// support PlayerCollection for affected
|
// support PlayerCollection for affected
|
||||||
Set<Player> toRemove = Sets.newHashSet();
|
Set<Player> toRemove = Sets.newHashSet();
|
||||||
for (Player p : Sets.newHashSet(tokenTable.rowKeySet())) {
|
for (Player p : Lists.newArrayList(tokenTable.rowKeySet())) {
|
||||||
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(p);
|
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(p);
|
||||||
repParams.put(AbilityKey.Token, tokenTable);
|
repParams.put(AbilityKey.Token, tokenTable);
|
||||||
repParams.put(AbilityKey.Cause, sa);
|
repParams.put(AbilityKey.Cause, sa);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ K:Enchant creature
|
|||||||
A:SP$ Attach | Cost$ 4 G | ValidTgts$ Creature | AILogic$ Pump
|
A:SP$ Attach | Cost$ 4 G | ValidTgts$ Creature | AILogic$ Pump
|
||||||
S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddPower$ 5 | AddToughness$ 5 | AddTrigger$ AttackTrigger | Description$ Enchanted creature gets +5/+5 and has "Whenever this creature attacks, create a Monster Role token attached to up to one target attacking creature." (Enchanted creature gets +1/+1 and has trample.)
|
S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddPower$ 5 | AddToughness$ 5 | AddTrigger$ AttackTrigger | Description$ Enchanted creature gets +5/+5 and has "Whenever this creature attacks, create a Monster Role token attached to up to one target attacking creature." (Enchanted creature gets +1/+1 and has trample.)
|
||||||
SVar:AttackTrigger:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever this creature attacks, create a Monster Role token attached to up to one target attacking creature." (Enchanted creature gets +1/+1 and has trample.
|
SVar:AttackTrigger:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever this creature attacks, create a Monster Role token attached to up to one target attacking creature." (Enchanted creature gets +1/+1 and has trample.
|
||||||
SVar:TrigToken:DB$ Token | TokenScript$ role_monster | AttachedTo$ Targeted | TargetMin$ 0 | TargetMax$ 1 | TgtPrompt$ Select up to one target attacking creature | ValidTgts$ Creature.attacking
|
SVar:TrigToken:DB$ Token | TokenScript$ role_monster | AttachedTo$ Targeted | TargetMin$ 0 | TargetMax$ 1 | TgtPrompt$ Select up to one target attacking creature | ValidTgts$ Creature.attacking | TokenOwner$ You
|
||||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand.
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand.
|
||||||
SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | Defined$ TriggeredNewCardLKICopy
|
SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | Defined$ TriggeredNewCardLKICopy
|
||||||
SVar:SacMe:2
|
SVar:SacMe:2
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$
|
|||||||
SVar:RepeatPayment:DB$ RepeatEach | RepeatPlayers$ Player | StartingWith$ You | ChangeZoneTable$ True | RepeatSubAbility$ DBPay | StackDescription$ When CARDNAME dies, each player may pay any amount of mana. Then each player creates a number of 1/1 green Squirrel creature tokens equal to the amount of mana they paid this way.
|
SVar:RepeatPayment:DB$ RepeatEach | RepeatPlayers$ Player | StartingWith$ You | ChangeZoneTable$ True | RepeatSubAbility$ DBPay | StackDescription$ When CARDNAME dies, each player may pay any amount of mana. Then each player creates a number of 1/1 green Squirrel creature tokens equal to the amount of mana they paid this way.
|
||||||
SVar:DBPay:DB$ ChooseNumber | Defined$ Player.IsRemembered | ChooseAnyNumber$ True | ListTitle$ amount of mana to pay | AILogic$ MaxForAnyController | SubAbility$ DBToken
|
SVar:DBPay:DB$ ChooseNumber | Defined$ Player.IsRemembered | ChooseAnyNumber$ True | ListTitle$ amount of mana to pay | AILogic$ MaxForAnyController | SubAbility$ DBToken
|
||||||
# TODO: ideally the tokens should be created simultaneously after all the players have finished paying mana, but that's difficult to implement.
|
# TODO: ideally the tokens should be created simultaneously after all the players have finished paying mana, but that's difficult to implement.
|
||||||
SVar:DBToken:DB$ Token | TokenAmount$ X | TokenScript$ g_1_1_squirrel | TokenOwner$ Player.IsRemembered | UnlessCost$ Y | UnlessPayer$ Player.IsRemembered | UnlessSwitched$ True
|
SVar:DBToken:DB$ Token | TokenAmount$ Y | TokenScript$ g_1_1_squirrel | TokenOwner$ Player.IsRemembered | UnlessCost$ Y | UnlessPayer$ Player.IsRemembered | UnlessSwitched$ True
|
||||||
SVar:Y:Count$ChosenNumber
|
SVar:Y:Count$ChosenNumber
|
||||||
Oracle:When Liege of the Hollows dies, each player may pay any amount of mana. Then each player creates a number of 1/1 green Squirrel creature tokens equal to the amount of mana they paid this way.
|
Oracle:When Liege of the Hollows dies, each player may pay any amount of mana. Then each player creates a number of 1/1 green Squirrel creature tokens equal to the amount of mana they paid this way.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:1 G
|
|||||||
Types:Creature Human Bard
|
Types:Creature Human Bard
|
||||||
PT:1/1
|
PT:1/1
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, create a Questing Role token and attach it to target creature. (If you control another Role on it, put that one into the graveyard. Enchanted creature has all the abilities of Questing Beast.)
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, create a Questing Role token and attach it to target creature. (If you control another Role on it, put that one into the graveyard. Enchanted creature has all the abilities of Questing Beast.)
|
||||||
SVar:TrigToken:DB$ Token | TokenScript$ role_questing | AttachedTo$ Targeted | ValidTgts$ Creature
|
SVar:TrigToken:DB$ Token | TokenScript$ role_questing | AttachedTo$ Targeted | ValidTgts$ Creature | TokenOwner$ You
|
||||||
DeckHas:Type$Aura|Role & Ability$Token
|
DeckHas:Type$Aura|Role & Ability$Token
|
||||||
DeckHints:Type$Aura
|
DeckHints:Type$Aura
|
||||||
Oracle:When Questing Cosplayer enters the battlefield, create a Questing Role token and attach it to target creature. (If you control another Role on it, put that one into the graveyard. Enchanted creature has all the abilities of Questing Beast.)
|
Oracle:When Questing Cosplayer enters the battlefield, create a Questing Role token and attach it to target creature. (If you control another Role on it, put that one into the graveyard. Enchanted creature has all the abilities of Questing Beast.)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Types:Legendary Creature Time Lord Scientist
|
|||||||
PT:3/4
|
PT:3/4
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME enters or attacks, create a red Aura enchantment token named Mark of the Rani attached to another target creature. That token has enchant creature and "Enchanted creature gets +2/+2 and is goaded."
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME enters or attacks, create a red Aura enchantment token named Mark of the Rani attached to another target creature. That token has enchant creature and "Enchanted creature gets +2/+2 and is goaded."
|
||||||
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigToken | Secondary$ True | TriggerDescription$ Whenever CARDNAME enters or attacks, create a red Aura enchantment token named Mark of the Rani attached to another target creature. That token has enchant creature and "Enchanted creature gets +2/+2 and is goaded."
|
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigToken | Secondary$ True | TriggerDescription$ Whenever CARDNAME enters or attacks, create a red Aura enchantment token named Mark of the Rani attached to another target creature. That token has enchant creature and "Enchanted creature gets +2/+2 and is goaded."
|
||||||
SVar:TrigToken:DB$ Token | TokenScript$ mark_of_the_rani | AttachedTo$ Targeted | ValidTgts$ Creature.Other | TgtPrompt$ Select another target creature
|
SVar:TrigToken:DB$ Token | TokenScript$ mark_of_the_rani | TokenOwner$ You | AttachedTo$ Targeted | ValidTgts$ Creature.Other | TgtPrompt$ Select another target creature
|
||||||
T:Mode$ DamageDone | ValidSource$ Creature.IsGoaded | ValidTarget$ Opponent | CombatDamage$ True | TriggerZones$ Battlefield | Execute$ TrigInvestigate | TriggerDescription$ Whenever a goaded creature deals combat damage to one of your opponents, investigate.
|
T:Mode$ DamageDone | ValidSource$ Creature.IsGoaded | ValidTarget$ Opponent | CombatDamage$ True | TriggerZones$ Battlefield | Execute$ TrigInvestigate | TriggerDescription$ Whenever a goaded creature deals combat damage to one of your opponents, investigate.
|
||||||
SVar:TrigInvestigate:DB$ Investigate
|
SVar:TrigInvestigate:DB$ Investigate
|
||||||
SVar:HasAttackEffect:TRUE
|
SVar:HasAttackEffect:TRUE
|
||||||
|
|||||||
Reference in New Issue
Block a user