diff --git a/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java index f9309c3a91a..7c175cf83b4 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java @@ -118,22 +118,24 @@ public class ControlGainEffect extends SpellAbilityEffect { final Game game = newController.getGame(); CardCollectionView tgtCards = null; - if (sa.hasParam("ControlledByTarget")) { - tgtCards = CardLists.filterControlledBy(tgtCards, getTargetPlayers(sa)); - } else if (sa.hasParam("Choices")) { + if (sa.hasParam("Choices")) { Player chooser = sa.hasParam("Chooser") ? AbilityUtils.getDefinedPlayers(source, sa.getParam("Chooser"), sa).get(0) : activator; CardCollectionView choices = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), sa.getParam("Choices"), activator, source, sa); if (!choices.isEmpty()) { String title = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") : - Localizer.getInstance().getMessage("lblChooseaCard") +" "; - tgtCards = activator.getController().chooseCardsForEffect(choices, sa, title, 1, 1, false, null); + Localizer.getInstance().getMessage("lblChooseaCard") +" "; + tgtCards = chooser.getController().chooseCardsForEffect(choices, sa, title, 1, 1, false, null); } } else { tgtCards = getDefinedCards(sa); } + if (tgtCards !=null & sa.hasParam("ControlledByTarget")) { + tgtCards = CardLists.filterControlledBy(tgtCards, getTargetPlayers(sa)); + } + // in case source was LKI or still resolving if (source.isLKI() || source.getZone().is(ZoneType.Stack)) { source = game.getCardState(source); diff --git a/forge-gui/res/cardsfolder/c/crackdown_construct.txt b/forge-gui/res/cardsfolder/c/crackdown_construct.txt index 25566dd7b9f..bc4abab45dd 100644 --- a/forge-gui/res/cardsfolder/c/crackdown_construct.txt +++ b/forge-gui/res/cardsfolder/c/crackdown_construct.txt @@ -2,6 +2,6 @@ Name:Crackdown Construct ManaCost:4 Types:Artifact Creature Construct PT:2/2 -T:Mode$ AbilityCast | ValidCard$ Artifact.inZoneBattlefield,Creature.inZoneBattlefield | ValidSA$ SpellAbility.nonManaAbility | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you activate an ability of an artifact or creature that isn't a mana ability, Crackdown Construct gets +1/+1 until end of turn. +T:Mode$ AbilityCast | ValidCard$ Artifact.inZoneBattlefield,Creature.inZoneBattlefield | ValidSA$ SpellAbility.nonManaAbility | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you activate an ability of an artifact or creature that isn't a mana ability, CARDNAME gets +1/+1 until end of turn. SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ +1 | NumDef$ +1 Oracle:Whenever you activate an ability of an artifact or creature that isn't a mana ability, Crackdown Construct gets +1/+1 until end of turn. diff --git a/forge-gui/res/cardsfolder/l/laurine_the_diversion.txt b/forge-gui/res/cardsfolder/l/laurine_the_diversion.txt index 5adbcd9c1f6..c02545bf4fd 100644 --- a/forge-gui/res/cardsfolder/l/laurine_the_diversion.txt +++ b/forge-gui/res/cardsfolder/l/laurine_the_diversion.txt @@ -4,7 +4,7 @@ Types:Legendary Creature Human Rogue PT:3/3 K:Partner:Kamber, the Plunderer K:First Strike -A:AB$ Goad | Cost$ 2 Sac<1/Artifact;Creature/artifact or creature> | ValidTgts$ Creature | TgtPrompt$ Select target creature SpellDescription$ Goad target creature. +A:AB$ Goad | Cost$ 2 Sac<1/Artifact;Creature/artifact or creature> | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Goad target creature. SVar:AIPreference:SacCost$Artifact.token+nonCreature,Creature.token+powerLE1,Creature.cmcLE1+powerLE1 DeckHints:Name$Kamber, the Plunderer DeckHas:Ability$Sacrifice diff --git a/forge-gui/res/cardsfolder/r/reckless_amplimancer.txt b/forge-gui/res/cardsfolder/r/reckless_amplimancer.txt index 5a9f1b06207..ad21cbe4f78 100644 --- a/forge-gui/res/cardsfolder/r/reckless_amplimancer.txt +++ b/forge-gui/res/cardsfolder/r/reckless_amplimancer.txt @@ -2,7 +2,7 @@ Name:Reckless Amplimancer ManaCost:1 G Types:Creature Elf Druid PT:2/2 -A:AB$ Pump | Cost$ 4 G | NumAtt$ +X | NumDef$ +Y | Double$ True | SpellDescription$ Double CARDNAME's power and toughness until end of turn. +A:AB$ Pump | Cost$ 4 G | NumAtt$ +X | NumDef$ +Y | Double$ True | StackDescription$ SpellDescription | SpellDescription$ Double CARDNAME's power and toughness until end of turn. SVar:X:Count$CardPower SVar:Y:Count$CardToughness Oracle:{4}{G}: Double Reckless Amplimancer's power and toughness until end of turn. diff --git a/forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt b/forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt new file mode 100644 index 00000000000..7dab340302e --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt @@ -0,0 +1,16 @@ +Name:Commander Liara Portyr +ManaCost:3 R W +Types:Legendary Creature Human Soldier +PT:5/3 +T:Mode$ AttackersDeclared | AttackingPlayer$ You | Execute$ TrigDig | TriggerZones$ Battlefield | TriggerDescription$ Whenever you attack, spells you cast from exile this turn cost {X} less to cast, where X is the number of players being attacked. Exile the top X cards of your library. Until end of turn, you may cast spells from among those exiled cards. +SVar:TrigDig:DB$ Dig | DigNum$ X | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBStoreNum +SVar:DBStoreNum:DB$ StoreSVar | SVar$ Y | Type$ Calculate | Expression$ X | SubAbility$ DBEffect +SVar:DBEffect:DB$ Effect | StaticAbilities$ ReduceCost,STPlay | RememberObjects$ Remembered | SubAbility$ DBCleanup +SVar:ReduceCost:Mode$ ReduceCost | EffectZone$ Command | ValidCard$ Card.wasCastFromExile | Type$ Spell | Activator$ You | Amount$ Y | Description$ Spells you cast from exile this turn cost {X} less to cast, where X is the number of players you attacked. +SVar:STPlay:Mode$ Continuous | Affected$ Card.IsRemembered+nonLand | EffectZone$ Command | AffectedZone$ Exile | MayPlay$ True | Description$ Until end of turn, you may cast spells from among those exiled cards. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBResetNum +SVar:DBResetNum:DB$ StoreSVar | SVar$ Y | Type$ Number | Expression$ 0 +SVar:X:TriggeredPlayersAttackedTarget$Amount +SVar:Y:Number$0 +DeckHints:Keyword$Encore|Myriad +Oracle:Whenever you attack, spells you cast from exile this turn cost {X} less to cast, where X is the number of players being attacked. Exile the top X cards of your library. Until end of turn, you may cast spells from among those exiled cards. diff --git a/forge-gui/res/cardsfolder/upcoming/gorion_wise_mentor.txt b/forge-gui/res/cardsfolder/upcoming/gorion_wise_mentor.txt index c316dcb4e36..946b2ffe238 100644 --- a/forge-gui/res/cardsfolder/upcoming/gorion_wise_mentor.txt +++ b/forge-gui/res/cardsfolder/upcoming/gorion_wise_mentor.txt @@ -6,4 +6,5 @@ K:Vigilance T:Mode$ SpellCast | ValidCard$ Card.Adventure | ValidActivatingPlayer$ You | Execute$ TrigCopySpell | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever you cast an Adventure spell, you may copy it. You may choose new targets for the copy. SVar:TrigCopySpell:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | MayChooseTarget$ True SVar:BuffedBy:Creature.AdventureCard +DeckNeeds:Type$Adventure Oracle:Vigilance\nWhenever you cast an Adventure spell, you may copy it. You may choose new targets for the copy. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt b/forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt new file mode 100644 index 00000000000..e09f6793a65 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt @@ -0,0 +1,11 @@ +Name:Lozhan, Dragons' Legacy +ManaCost:3 U R +Types:Legendary Creature Dragon Shaman +PT:4/2 +K:Flying +T:Mode$ SpellCast | ValidCard$ Card.Adventure,Dragon | ValidActivatingPlayer$ You | Execute$ TrigDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast an Adventure spell or Dragon spell, CARDNAME deals damage equal to that spell's mana value to any target that isn't a commander. +SVar:TrigDamage:DB$ DealDamage | ValidTgts$ Creature.IsNotCommander,Player,Planeswalker.IsNotCommander | TgtPrompt$ Select any target that isn't a commander | NumDmg$ X +SVar:X:TriggerCount$CastSACMC +SVar:BuffedBy:Creature.AdventureCard,Dragon +DeckHints:Type$Adventure|Dragon +Oracle:Flying\nWhenever you cast an Adventure spell or Dragon spell, Lozhan, Dragons' Legacy deals damage equal to that spell's mana value to any target that isn't a commander. diff --git a/forge-gui/res/cardsfolder/upcoming/mazzy_truesword_paladin.txt b/forge-gui/res/cardsfolder/upcoming/mazzy_truesword_paladin.txt new file mode 100644 index 00000000000..dc4a083fb7f --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/mazzy_truesword_paladin.txt @@ -0,0 +1,13 @@ +Name:Mazzy, Truesword Paladin +ManaCost:1 R G W +Types:Legendary Creature Halfling Knight +PT:3/4 +T:Mode$ Attacks | ValidCard$ Creature.enchanted | Attacked$ Player.Opponent | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever an enchanted creature attacks one of your opponents, it gets +2/+0 and gains trample until end of turn. +SVar:TrigPump:DB$ Pump | Defined$ TriggeredAttacker | NumAtt$ 2 | KW$ Trample +T:Mode$ ChangesZone | TriggerZones$ Battlefield | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Aura.YouCtrl+YouOwn | Execute$ TrigExile | TriggerDescription$ Whenever an Aura you control is put into your graveyard from the battlefield, exile it. Until the end of your next turn, you may cast that card. +SVar:TrigExile:DB$ ChangeZone | Defined$ TriggeredNewCardLKICopy | Origin$ Graveyard | Destination$ Exile | RememberChanged$ True | SubAbility$ DBEffect +SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ Remembered | ForgetOnMoved$ Exile | Duration$ UntilTheEndOfYourNextTurn | SubAbility$ DBCleanup +SVar:STPlay:Mode$ Continuous | Affected$ Card.nonLand+IsRemembered | AffectedZone$ Exile | EffectZone$ Command | MayPlay$ True | Description$ Until the end of your next turn, you may cast that card. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +DeckNeeds:Type$Aura +Oracle:Whenever an enchanted creature attacks one of your opponents, it gets +2/+0 and gains trample until end of turn.\nWhenever an Aura you control is put into your graveyard from the battlefield, exile it. Until the end of your next turn, you may cast that card. diff --git a/forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt b/forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt new file mode 100644 index 00000000000..5dbcde70b02 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt @@ -0,0 +1,12 @@ +Name:Raphael, Fiendish Savior +ManaCost:3 B R +Types:Legendary Creature Devil Noble +PT:4/4 +K:Flying +S:Mode$ Continuous | Affected$ Demon.Other+YouCtrl,Devil.Other+YouCtrl,Imp.Other+YouCtrl,Tiefling.Other+YouCtrl | AddPower$ 1 | AddToughness$ 1 | AddKeyword$ Lifelink | Description$ Other Demons, Devils, Imps, and Tieflings you control get +1/+1 and have lifelink. +T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | CheckSVar$ X | Execute$ TrigToken | TriggerDescription$ At the beginning of each end step, if a creature card was put into your graveyard from anywhere this turn, create a 1/1 red Devil creature token with "When this creature dies, it deals 1 damage to any target." +SVar:TrigToken:DB$ Token | TokenScript$ r_1_1_devil_burn +SVar:X:Count$ThisTurnEntered_Graveyard_Creature.YouOwn+nonToken +DeckHas:Ability$LifeGain|Token +DeckHints:Ability$Sacrifice & Type$Demon|Devil|Imp|Tiefling +Oracle:Flying\nOther Demons, Devils, Imps, and Tieflings you control get +1/+1 and have lifelink.\nAt the beginning of each end step, if a creature card was put into your graveyard from anywhere this turn, create a 1/1 red Devil creature token with "When this creature dies, it deals 1 damage to any target."