diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java index 68ea74989a0..59c1bc45ec5 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java @@ -677,7 +677,10 @@ public class ComputerUtilMana { AbilityUtils.applyManaColorConversion(manapool, sa.getGrantorStatic().getParam("ManaConversion")); } } - StaticAbilityManaConvert.manaConvert(manapool, ai, sa.getHostCard(), effect ? null : sa); + if (sa.hasParam("ManaConversion")) { + AbilityUtils.applyManaColorConversion(manapool, sa.getParam("ManaConversion")); + } + StaticAbilityManaConvert.manaConvert(manapool, ai, sa.getHostCard(), effect && !sa.isCastFromPlayEffect() ? null : sa); if (ManaPool.payManaCostFromPool(cost, sa, ai, test, manaSpentToPay)) { return true; // paid all from floating mana diff --git a/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java b/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java index ea69036f4eb..5db28d82787 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java @@ -432,6 +432,10 @@ public class PlayEffect extends SpellAbilityEffect { tgtSA.putParam("CastTransformed", "True"); } + if (sa.hasParam("ManaConversion")) { + tgtSA.putParam("ManaConversion", sa.getParam("ManaConversion")); + } + if (tgtSA.usesTargeting() && !optional) { tgtSA.getTargetRestrictions().setMandatory(true); } diff --git a/forge-game/src/main/java/forge/game/card/CardView.java b/forge-game/src/main/java/forge/game/card/CardView.java index 0323c03208c..316553768b1 100644 --- a/forge-game/src/main/java/forge/game/card/CardView.java +++ b/forge-game/src/main/java/forge/game/card/CardView.java @@ -797,13 +797,6 @@ public class CardView extends GameEntityView { sb.append(getRemembered()); - PlayerView chosenPlayer = getChosenPlayer(); - if (chosenPlayer != null) { - sb.append("\r\n[Chosen player: "); - sb.append(chosenPlayer); - sb.append("]\r\n"); - } - Direction chosenDirection = getChosenDirection(); if (chosenDirection != null) { sb.append("\r\n[Chosen direction: "); @@ -837,7 +830,6 @@ public class CardView extends GameEntityView { sb.append(" each combat."); sb.append("\r\n"); } - } Set cantHaveKeyword = this.getCantHaveKeyword(); diff --git a/forge-gui/res/cardsfolder/a/agitator_ant.txt b/forge-gui/res/cardsfolder/a/agitator_ant.txt index ebeb5afeac6..53bafa6e663 100644 --- a/forge-gui/res/cardsfolder/a/agitator_ant.txt +++ b/forge-gui/res/cardsfolder/a/agitator_ant.txt @@ -3,11 +3,9 @@ ManaCost:2 R Types:Creature Insect PT:2/2 T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigRepeat | TriggerDescription$ At the beginning of your end step, each player may put two +1/+1 counters on a creature they control. Goad each creature that had counters put on it this way. (Until your next turn, those creatures attack each combat if able and attack a player other than you if able.) -SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBChoice | SubAbility$ DBPutCounter -SVar:DBChoice:DB$ ChooseCard | Defined$ RememberedPlayer | Amount$ 1 | MinAmount$ 0 | Choices$ Creature.RememberedPlayerCtrl | ImprintChosen$ True -SVar:DBPutCounter:DB$ PutCounterAll | Placer$ Controller | ValidCards$ Creature.IsImprinted | CounterType$ P1P1 | CounterNum$ 2 | RememberPut$ True | SubAbility$ DBClearChosen -SVar:DBClearChosen:DB$ Cleanup | ClearChosenCard$ True | ClearImprinted$ True | SubAbility$ DBGoad +SVar:DBChoice:DB$ ChooseCard | Defined$ Player | Amount$ 1 | MinAmount$ 0 | Choices$ Creature | ControlledByPlayer$ Chooser | SubAbility$ DBPutCounter +SVar:DBPutCounter:DB$ PutCounterAll | Placer$ Controller | ValidCards$ Creature.ChosenCard | CounterType$ P1P1 | CounterNum$ 2 | RememberPut$ True | SubAbility$ DBGoad SVar:DBGoad:DB$ Goad | Defined$ Remembered | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearChosenCard$ True DeckHas:Ability$Counters Oracle:At the beginning of your end step, each player may put two +1/+1 counters on a creature they control. Goad each creature that had counters put on it this way. (Until your next turn, those creatures attack each combat if able and attack a player other than you if able.) diff --git a/forge-gui/res/cardsfolder/b/burakos_party_leader.txt b/forge-gui/res/cardsfolder/b/burakos_party_leader.txt index 408a2a19648..6c461efd64f 100644 --- a/forge-gui/res/cardsfolder/b/burakos_party_leader.txt +++ b/forge-gui/res/cardsfolder/b/burakos_party_leader.txt @@ -4,9 +4,9 @@ Types:Legendary Creature Orc PT:2/4 K:Choose a Background S:Mode$ Continuous | EffectZone$ All | Affected$ Card.Self | CharacteristicDefining$ True | AddType$ Cleric & Rogue & Warrior & Wizard | Description$ CARDNAME is also a Cleric, Rogue, Warrior, and Wizard. -T:Mode$ Attacks | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ Whenever CARDNAME attacks, defending player loses X life +T:Mode$ Attacks | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ Whenever NICKNAME attacks, defending player loses X life and you create X Treasure tokens, where X is the number of creatures in your party. SVar:TrigLoseLife:DB$ LoseLife | Defined$ TriggeredDefendingPlayer | LifeAmount$ X | SubAbility$ DBTreasureTokens -SVar:DBTreasureTokens:DB$ Token | TokenAmount$ X | TokenScript$ c_a_treasure_sac | TokenOwner$ You | Description$ and you create X Treasure tokens, where X is the number of creatures in your party. +SVar:DBTreasureTokens:DB$ Token | TokenAmount$ X | TokenScript$ c_a_treasure_sac | TokenOwner$ You SVar:X:Count$Party DeckHints:Ability$Party & Type$Cleric|Rogue|Warrior|Wizard SVar:PlayMain1:TRUE diff --git a/forge-gui/res/cardsfolder/o/orzhov_advokist.txt b/forge-gui/res/cardsfolder/o/orzhov_advokist.txt index d990e4b5a59..81e0e7c47c0 100644 --- a/forge-gui/res/cardsfolder/o/orzhov_advokist.txt +++ b/forge-gui/res/cardsfolder/o/orzhov_advokist.txt @@ -3,12 +3,9 @@ ManaCost:2 W Types:Creature Human Advisor PT:1/4 T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigChoose | TriggerDescription$ At the beginning of your upkeep, each player may put two +1/+1 counters on a creature they control. If a player does, creatures that player controls can't attack you or planeswalkers you control until your next turn. -SVar:TrigChoose:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBChoice | SubAbility$ DBPutCounter -SVar:DBChoice:DB$ ChooseCard | Defined$ Player.IsRemembered | Amount$ 1 | MinAmount$ 0 | Choices$ Creature.RememberedPlayerCtrl | RememberChosen$ True | AILogic$ OrzhovAdvokist -SVar:DBPutCounter:DB$ PutCounterAll | Placer$ Controller | ValidCards$ Creature.IsRemembered | CounterType$ P1P1 | CounterNum$ 2 | SubAbility$ DBClearChosen -SVar:DBClearChosen:DB$ Cleanup | ClearChosenCard$ True | SubAbility$ DBRememberPlayer -SVar:DBRememberPlayer:DB$ Pump | RememberObjects$ RememberedController | SubAbility$ DBEffect -SVar:DBEffect:DB$ Effect | RememberObjects$ Player.IsRemembered | StaticAbilities$ STCantAttack | Duration$ UntilYourNextTurn | SubAbility$ DBCleanup +SVar:TrigChoose:DB$ ChooseCard | Defined$ Player | Amount$ 1 | MinAmount$ 0 | Choices$ Creature | ControlledByPlayer$ Chooser | AILogic$ OrzhovAdvokist | SubAbility$ DBPutCounter +SVar:DBPutCounter:DB$ PutCounterAll | Placer$ Controller | ValidCards$ Creature.ChosenCard | CounterType$ P1P1 | CounterNum$ 2 | SubAbility$ DBEffect +SVar:DBEffect:DB$ Effect | RememberObjects$ ChosenCardController | StaticAbilities$ STCantAttack | Duration$ UntilYourNextTurn | SubAbility$ DBClearChosen +SVar:DBClearChosen:DB$ Cleanup | ClearChosenCard$ True SVar:STCantAttack:Mode$ CantAttack | EffectZone$ Command | ValidCard$ Creature.RememberedPlayerCtrl | Target$ You,Planeswalker.YouCtrl | Description$ Creatures that player controls can't attack you or planeswalkers you control until your next turn. -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True Oracle:At the beginning of your upkeep, each player may put two +1/+1 counters on a creature they control. If a player does, creatures that player controls can't attack you or planeswalkers you control until your next turn. diff --git a/forge-gui/res/cardsfolder/upcoming/tinybones_the_pickpocket.txt b/forge-gui/res/cardsfolder/upcoming/tinybones_the_pickpocket.txt new file mode 100644 index 00000000000..3489a7577bb --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/tinybones_the_pickpocket.txt @@ -0,0 +1,8 @@ +Name:Tinybones, the Pickpocket +ManaCost:B +Types:Legendary Creature Skeleton Rogue +PT:1/1 +K:Deathtouch +T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | TriggerZones$ Battlefield | Execute$ TrigCast | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, you may cast target nonland permanent card from that player's graveyard, and mana of any type can be spent to cast that spell. +SVar:TrigCast:DB$ Play | ValidTgts$ Permanent.nonLand+ControlledBy TriggeredTarget | TgtZone$ Graveyard | ValidSA$ Spell | Optional$ True | ManaConversion$ AnyType->AnyType +Oracle:Deathtouch\nWhenever Tinybones, the Pickpocket deals combat damage to a player, you may cast target nonland permanent card from that player's graveyard, and mana of any type can be spent to cast that spell. diff --git a/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java b/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java index b7f931d0087..082a2225fd4 100644 --- a/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java +++ b/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java @@ -97,8 +97,6 @@ public class HumanPlaySpellAbility { final Card c = ability.getHostCard(); final CardPlayOption option = c.mayPlay(ability.getMayPlay()); - boolean manaColorConversion = false; - // freeze Stack. No abilities should go onto the stack while I'm filling requirements. boolean refreeze = game.getStack().isFrozen(); game.getStack().freezeStack(); @@ -119,12 +117,13 @@ public class HumanPlaySpellAbility { ability = GameActionUtil.addExtraKeywordCost(ability); - final boolean playerManaConversion = human.hasManaConversion() - && human.getController().confirmStaticApplication(c, null, "Do you want to spend mana as though it were mana of any type to pay the cost?", null); - Cost abCost = ability.getPayCosts(); CostPayment payment = new CostPayment(abCost, ability); + final boolean playerManaConversion = human.hasManaConversion() + && human.getController().confirmStaticApplication(c, null, "Do you want to spend mana as though it were mana of any type to pay the cost?", null); + boolean manaColorConversion = false; + if (!ability.isCopied()) { if (ability.isSpell()) { // Apply by Option if (option != null && option.applyManaConvert(payment)) { @@ -144,6 +143,11 @@ public class HumanPlaySpellAbility { if (StaticAbilityManaConvert.manaConvert(payment, human, ability.getHostCard(), ability)) { manaColorConversion = true; } + + if (ability.hasParam("ManaConversion")) { + AbilityUtils.applyManaColorConversion(manapool, ability.getParam("ManaConversion")); + manaColorConversion = true; + } } if (playerManaConversion) {