diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java index 13dafd1357f..ce77bb7287d 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java @@ -680,6 +680,8 @@ public class ComputerUtilMana { } else if (mayPlay.hasParam("MayPlayIgnoreType")) { ignoreType = true; } + } else if (sa.hasParam("ActivateIgnoreColor")) { + ignoreColor = true; } boolean hasConverge = sa.getHostCard().hasConverge(); ListMultimap sourcesForShards = getSourcesForShards(cost, sa, ai, test, diff --git a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java index d7e2070e918..8c112ab1ab0 100644 --- a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java +++ b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java @@ -813,7 +813,6 @@ public final class StaticAbilityContinuous { if (params.containsKey("GainsAbilitiesOf") || params.containsKey("GainsAbilitiesOfDefined")) { CardCollection cardsIGainedAbilitiesFrom = new CardCollection(); - final boolean loyaltyAB = params.containsKey("GainsLoyaltyAbilities"); if (params.containsKey("GainsAbilitiesOf")) { final String[] valids = params.get("GainsAbilitiesOf").split(","); @@ -832,7 +831,7 @@ public final class StaticAbilityContinuous { for (Card c : cardsIGainedAbilitiesFrom) { for (SpellAbility sa : c.getSpellAbilities()) { if (sa.isActivatedAbility()) { - if (loyaltyAB && !sa.isPwAbility()) { + if (!stAb.matchesValidParam("GainsValidAbilities", sa)) { continue; } SpellAbility newSA = sa.copy(affectedCard, false); @@ -840,6 +839,9 @@ public final class StaticAbilityContinuous { newSA.setRestrictions(sa.getRestrictions()); newSA.getRestrictions().setLimitToCheck(params.get("GainsAbilitiesLimitPerTurn")); } + if (params.containsKey("GainsAbilitiesActivateIgnoreColor")) { + newSA.putParam("ActivateIgnoreColor","True"); + } newSA.setOriginalAbility(sa); // need to be set to get the Once Per turn Clause correct newSA.setGrantorStatic(stAb); newSA.setIntrinsic(false); diff --git a/forge-gui/res/cardsfolder/k/kasmina_enigma_sage.txt b/forge-gui/res/cardsfolder/k/kasmina_enigma_sage.txt index 9a13163f1e8..a0fbac01e28 100644 --- a/forge-gui/res/cardsfolder/k/kasmina_enigma_sage.txt +++ b/forge-gui/res/cardsfolder/k/kasmina_enigma_sage.txt @@ -2,7 +2,7 @@ Name:Kasmina, Enigma Sage ManaCost:1 G U Types:Legendary Planeswalker Kasmina Loyalty:2 -S:Mode$ Continuous | Affected$ Planeswalker.Other+YouCtrl | EffectZone$ Battlefield | GainsAbilitiesOf$ Card.Self | GainsLoyaltyAbilities$ True | Description$ Each other planeswalker you control has the loyalty abilities of CARDNAME. +S:Mode$ Continuous | Affected$ Planeswalker.Other+YouCtrl | EffectZone$ Battlefield | GainsAbilitiesOfDefined$ Self | GainsValidAbilities$ Activated.Loyalty | Description$ Each other planeswalker you control has the loyalty abilities of CARDNAME. A:AB$ Scry | Cost$ AddCounter<2/LOYALTY> | Planeswalker$ True | ScryNum$ 1 | SpellDescription$ Scry 1. A:AB$ Token | Cost$ SubCounter | Planeswalker$ True | TokenScript$ gu_0_0_fractal | SubAbility$ DBPutCounter | RememberTokens$ True | SpellDescription$ Create a 0/0 green and blue Fractal creature token. Put X +1/+1 counters on it. SVar:DBPutCounter:DB$ PutCounter | Defined$ Remembered | CounterType$ P1P1 | CounterNum$ X | SubAbility$ DBCleanup diff --git a/forge-gui/res/cardsfolder/n/nicol_bolas_dragon_god.txt b/forge-gui/res/cardsfolder/n/nicol_bolas_dragon_god.txt index 9c6043eff89..1da2899ce24 100644 --- a/forge-gui/res/cardsfolder/n/nicol_bolas_dragon_god.txt +++ b/forge-gui/res/cardsfolder/n/nicol_bolas_dragon_god.txt @@ -2,7 +2,7 @@ Name:Nicol Bolas, Dragon-God ManaCost:U B B B R Types:Legendary Planeswalker Bolas Loyalty:4 -S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainsAbilitiesOf$ Planeswalker.Other | GainsLoyaltyAbilities$ True | Description$ CARDNAME has all loyalty abilities of all other planeswalkers on the battlefield. +S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainsAbilitiesOf$ Planeswalker.Other | GainsValidAbilities$ Activated.Loyalty | Description$ CARDNAME has all loyalty abilities of all other planeswalkers on the battlefield. A:AB$ Draw | Cost$ AddCounter<1/LOYALTY> | NumCards$ 1 | SubAbility$ DBChangeZone | Planeswalker$ True | SpellDescription$ You draw a card. Each opponent exiles a card from their hand or a permanent they control. SVar:DBChangeZone:DB$ ChangeZone | Origin$ Battlefield,Hand | Destination$ Exile | DefinedPlayer$ Player.Opponent | ChangeType$ Card | ChangeNum$ 1 | Mandatory$ True AI:RemoveDeck:Random diff --git a/forge-gui/res/cardsfolder/s/shadow_stinger.txt b/forge-gui/res/cardsfolder/s/shadow_stinger.txt index 40abf26ec0a..9c2328d1021 100644 --- a/forge-gui/res/cardsfolder/s/shadow_stinger.txt +++ b/forge-gui/res/cardsfolder/s/shadow_stinger.txt @@ -2,7 +2,7 @@ Name:Shadow Stinger ManaCost:2 B Types:Creature Vampire Rogue PT:1/4 -A:AB$ Pump | Cost$ tapXType<1/Rogue> | Defined$ Self | KW$ Deathtouch | SpellDescription$ CARDNAME gains deathtouch until end of turn. +A:AB$ Pump | Cost$ tapXType<1/Rogue.Other> | Defined$ Self | KW$ Deathtouch | SpellDescription$ CARDNAME gains deathtouch until end of turn. T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigMill | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, that player mills three cards. (They put the top three cards of their library into their graveyard.) SVar:TrigMill:DB$ Mill | Defined$ TriggeredTarget | NumCards$ 3 DeckHas:Ability$Mill diff --git a/forge-gui/res/cardsfolder/upcoming/park_heights_pegasus.txt b/forge-gui/res/cardsfolder/upcoming/park_heights_pegasus.txt new file mode 100644 index 00000000000..3a98e76ba36 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/park_heights_pegasus.txt @@ -0,0 +1,10 @@ +Name:Park Heights Pegasus +ManaCost:G W +Types:Creature Pegasus +PT:2/1 +K:Flying +K:Trample +T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigDraw | CheckSVar$ X | SVarCompare$ GE2 | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, draw a card if you had two or more creatures enter the battlefield under your control this turn. +SVar:TrigDraw:DB$ Draw +SVar:X:Count$ThisTurnEntered_Battlefield_Creature.YouCtrl +Oracle:Flying, trample\nWhenever Park Heights Pegasus deals combat damage to a player, draw a card if you had two or more creatures enter the battlefield under your control this turn. diff --git a/forge-gui/res/cardsfolder/upcoming/scheming_fence.txt b/forge-gui/res/cardsfolder/upcoming/scheming_fence.txt new file mode 100644 index 00000000000..00662c7831a --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/scheming_fence.txt @@ -0,0 +1,11 @@ +Name:Scheming Fence +ManaCost:W U +Types:Creature Human Citizen +PT:2/3 +K:ETBReplacement:Other:ChooseCard +SVar:ChooseCard:DB$ ChooseCard | Choices$ Permanent.nonLand | MinAmount$ 0 | ChoiceTitle$ You may choose a nonland permanent | AILogic$ OppPreferred | SpellDescription$ As CARDNAME enters the battlefield, you may choose a nonland permanent. +S:Mode$ Continuous | Affected$ Card.ChosenCard | AddHiddenKeyword$ CARDNAME's activated abilities can't be activated. | Description$ Activated abilities of the chosen permanent can't be activated. +S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainsAbilitiesOfDefined$ ChosenCard | GainsValidAbilities$ Activated.nonLoyalty | GainsAbilitiesActivateIgnoreColor$ True | Description$ CARDNAME has all activated abilities of the chosen permanent except for loyalty abilities. You may spend mana as though it were mana of any color to activate those abilities. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.ChosenCard | Execute$ TrigCleanup +SVar:TrigCleanup:DB$ Cleanup | ClearChosenCard$ True +Oracle:As Scheming Fence enters the battlefield, you may choose a nonland permanent.\nActivated abilities of the chosen permanent can't be activated.\nScheming Fence has all activated abilities of the chosen permanent except for loyalty abilities. You may spend mana as though it were mana of any color to activate those abilities. diff --git a/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java b/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java index 33d65aba859..f600d640071 100644 --- a/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java +++ b/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java @@ -138,6 +138,10 @@ public class HumanPlaySpellAbility { keywordColor = true; } } + if (ability.hasParam("ActivateIgnoreColor")) { + AbilityUtils.applyManaColorConversion(payment, MagicColor.Constant.ANY_COLOR_CONVERSION); + manaColorConversion = true; + } if (keywordColor) { AbilityUtils.applyManaColorConversion(payment, params);