Mage: getPlayable does not work correctly with all spell reduction abilities (e.g. Mystical Dispute) or with targeting conditions for the cost reduction

Created on 20 Jun 2020  路  15Comments  路  Source: magefree/mage

I was unable to cast a Mystical Dispute on my opponent's Mystical Dispute targeting my blue spell with one mana open for it. My opponent was at 3 mana and paid 1 to cast his.

Check and fix:

  • [x] AbilitiesCostReductionControllerEffect.java
  • [x] AffinityEffect.java
  • [x] BantPlane.java
  • [x] CommanderCostModification.java
  • [x] ConditionalCostModificationEffect.java
  • [x] CostModificationSourceEffect.java
  • [x] EscalateAbility.java
  • [x] FeedingGroundsPlane.java
  • [ ] !!! OfferingAbility.java
  • [x] SourceCostReductionForEachCardInGraveyardEffect.java (removed)
  • [x] SpellCostReductionSourceEffect.java
  • [x] SpellCostReductionForEachSourceEffect
  • [x] SpellCostReductionSourceForOpponentsEffect.java (removed)
  • [x] SpellsCostIncreasementAllEffect.java (removed)
  • [x] SpellsCostIncreasingAllEffect.java

    • [x] DampingSphereIncreasementAllEffect

  • [x] SpellsCostIncreasementControllerEffect.java (removed)
  • [x] SpellsCostReductionAllEffect.java

    • [x] SpellsCostReductionAllOfChosenSubtypeEffect

    • [x] SpellsCostReductionAllOfChosenCardTypeEffect

  • [x] SpellsCostReductionControllerEffect.java

    • [x] CentaurOmenreaderSpellsCostReductionEffect

  • [x] StriveAbility.java
  • [x] TurriIslandPlane.java
  • [x] SpellsCostModificationThatTargetSourceEffect.java

Use checkplayable state:

  • [ ] search by public void adjustCosts(

Refactor to standard method, search by cast that target (fix example):

  • [x] AccursedWitch.java
  • [ ] AncientStoneIdol.java
  • [ ] AngelOfJubilation.java
  • [ ] AnimarSoulOfElements.java
  • [ ] ArcaneMelee.java
  • [ ] AuraOfSilence.java
  • [ ] AvatarOfFury.java
  • [ ] AvatarOfHope.java
  • [ ] xxx BattlefieldThaumaturge.java
  • [ ] BiomancersFamiliar.java
  • [ ] BlasphemousAct.java
  • [ ] BonePicker.java
  • [ ] BorealElemental.java
  • [ ] BrineGiant.java
  • [ ] BrutalSuppression.java
  • [ ] CallapheBelovedOfTheSea.java
  • [ ] CatalystStone.java
  • [ ] ChandrasIncinerator.java
  • [ ] CloudKey.java
  • [ ] CouncilOfTheAbsolute.java
  • [ ] DefenseGrid.java
  • [ ] DovinHandOfControl.java
  • [ ] Draco.java
  • [ ] Drought.java
  • [ ] EchoBaseCommando.java
  • [ ] EidolonOfObstruction.java
  • [ ] ElderwoodScion.java
  • [ ] ElspethConquersDeath.java
  • [ ] EmbalmersTools.java
  • [ ] Embercleave.java
  • [ ] EmrakulThePromisedEnd.java
  • [ ] EmryLurkerOfTheLoch.java
  • [ ] FerventChampion.java
  • [ ] Fluctuator.java
  • [ ] GateColossus.java
  • [ ] GaviNestWarden.java
  • [ ] GearseekerSerpent.java
  • [ ] GhaltaPrimalHunger.java
  • [ ] Gloom.java
  • [ ] Glowrider.java
  • [ ] GodPharaohsStatue.java
  • [ ] GrandArbiterAugustinIV.java
  • [ ] HardenedBerserker.java
  • [ ] Heartstone.java
  • [ ] HeraldOfWar.java
  • [ ] HollowOne.java
  • [ ] HumOfTheRadix.java
  • [ ] IcefallRegent.java
  • [ ] InfectiousCurse.java
  • [ ] JubilantSkybonder.java
  • [ ] KaerveksTorch.java
  • [ ] KaradorGhostChieftain.java
  • [x] KasminaEnigmaticMentor.java
  • [x] KopalaWardenOfWaves.java
  • [ ] LiciaSanguineTribune.java
  • [ ] LocketOfYesterdays.java
  • [ ] LodestoneGolem.java
  • [ ] LoreseekersStone.java
  • [ ] MemoryCrystal.java
  • [ ] MetalworkColossus.java
  • [ ] MizzixOfTheIzmagnus.java
  • [ ] MobilizedDistrict.java
  • [x] MonasterySiege.java
  • [ ] MythUnbound.java
  • [ ] NemesisOfMortals.java
  • [ ] NewPerspectives.java
  • [ ] OppressiveRays.java
  • [ ] PowerArtifact.java
  • [ ] PrimevalProtector.java
  • [ ] Pteramander.java
  • [ ] PursuedWhale.java
  • [ ] RakdosLordOfRiots.java
  • [ ] RisenExecutioner.java
  • [ ] SaheeliTheGifted.java
  • [ ] SealOfTheGuildpact.java
  • [ ] SemblanceAnvil.java
  • [x] SenatorLottDod.java
  • [ ] SpellwildOuphe.java
  • [ ] SphinxOfNewPrahv.java
  • [ ] StoneIdolTrap.java
  • [ ] Stratadon.java
  • [ ] SuppressionField.java
  • [ ] SyrElenoraTheDiscerning.java
  • [x] TerrorOfThePeaks.java
  • [ ] ThaliaGuardianOfThraben.java
  • [ ] TheCauldronOfEternity.java
  • [ ] TheCircleOfLoyalty.java
  • [ ] TheGreatHenge.java
  • [ ] TitheTaker.java
  • [x] TorgaarFamineIncarnate.java
  • [ ] TrainingGrounds.java
  • [ ] Trinisphere.java
  • [x] ValiantChangeling.java
  • [ ] VolcanicSalvo.java
  • [ ] VrynWingmare.java
  • [ ] Warbringer.java
  • [ ] ZirdaTheDawnwaker.java
bug

All 15 comments

The blue spell in question was Thopter Foundry. I was producing the blue mana to cast my Mystical Dispute with a Steam Vents.

No T3feris or other cards that could possibly have interacted with the situation were involved.

The same exact thing seems to happen every time when you try to counter an Ice-Fang Coatl with a Mystical Dispute with less than three mana available, possibly when you try to counter any multicolored blue spell.

Other people on XMage.de are reporting the same issue. Mystical Dispute seems to be broken for everyone.

Cards with wrong zone for cost reduction ability (STACK instaed of ALL):

  • [x] BoltBend.java
  • [x] MysticalDispute.java
  • [x] GustOfWind.java
  • [x] IgneousElemental.java
  • [x] IntoTheStory.java
  • [x] LookoutsDispersal.java
  • [x] OfOneMind.java
  • [x] PriceOfFame.java
  • [x] OakhameAdversary.java
  • [x] SavageStomp.java
  • [x] NotOfThisWorld.java
  • [x] SirenReaver.java
  • [x] ScourTheLaboratory.java
  • [x] StormwingEntity.java
  • [x] StoicRebuttal.java
  • [x] WingedWords.java
  • [x] WizardsLightning.java
  • [x] TitanicBrawl.java
  • [x] WizardsRetort.java

Cards with targeting condition that does not work currently for getPlayable

  • [x] MysticalDispute.java
  • [x] PriceOfFame.java
  • [x] SavageStomp.java
  • [x] NotOfThisWorld.java

Not all cards can be fixed by Zone.STACK changes. Some spells have special filters like "if you target creature type then do cost reduction" -- that thing must be brainstorming.

As example -- introduce new method like:

  • boolean canActivateWithoutAvailableMana(ManaOptions availableMana)

Some cards can calcs and checks possible targets and mana (is it possible to cast or not), but another can return true (e.g. allow user to put spell/ability on stack without available mana cheks). Also it can be cost reduction for other spells with same things (like all spells that target dino must cost less).

wtf example:

  • Kaervek's Torch - Spells that target {this} cost {2} more to cast.

I updated verify test to find potential problem cards. Open VerifyCardDataTest.java, find 6684 text (that issue number) and uncomment two lines with warning and error. After that run checkMissingCardData. It will output potential problem cards (need to check).

Current output:
https://pastebin.com/raw/kMTQSYV6

Additoinal cards to check: new AlternativeCostSourceAbility

i feel like the reason people are complaining about this (and similar stuff like Hogaak, et al.) is because now you can't even _attempt_ to move spells onto stack if they aren't highlighted as "playable", when in the previous release you could. easy solution would be to revert whatever stops players from trying to play cards that the client thinks are not playable, hard solution would be to upgrade the code that determines playability to include all the cost reduction and alternate payment modes. but i'm not a coder, just wanted to drop my two cents on this issue, so i'll leave the hard decisions for you

That sounds right to me. There are a lot of ways to cast a card that might be hard to calculate. For example, if you want to use Selvala, Explorer Returned without worrying about opponents getting priority due to effects triggering off the card draw, it is the strategically correct play to put a sometimes as-yet unaffordable spell on the stack. A player shouldn't be hard locked out of that option.

@SergeWind
It's already have special "switch" to enabled old logic in code for all cards:
shot_200622_061639

But that's NOT a solution. All that not working cards were broken many years -- that cards can't be tested by unit tests, AI can't play that cards too. So it's a good time to collect feedback and find all problem to fix it.

So the real solution's steps:

  1. Find all broken cards;
  2. Try to fix it;
  3. For single cards enable workaround (that can't be fixed by normal way);

In that case, let's create a master issue (it could be this one) for this and start adding every card that gets reported to it, while closing all the individual card issues as duplicates. #6680, #6685, #6696, and the reports in discord that you can't cast spells with an untapped Chrome Mox in play were probably all issues revealed by this.

@Zerrisx yes, it's will be useful to create new master issue like you do it before. Can you make it?

@Zerrisx yes, it's will be useful to create new master issue like you do it before. Can you make it?

Done - #6698

That sounds right to me. There are a _lot_ of ways to cast a card that might be hard to calculate. For example, if you want to use Selvala, Explorer Returned without worrying about opponents getting priority due to effects triggering off the card draw, it is the strategically correct play to put a sometimes as-yet unaffordable spell on the stack. A player shouldn't be hard locked out of that option.

I agree with Zerrisx. Even after all of these issues are addressed there should still be an escape hatch, maybe via right-click, to put an uncastable spell on the stack.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dosfod picture dosfod  路  7Comments

ketsuban picture ketsuban  路  3Comments

copperfield42 picture copperfield42  路  6Comments

townxelliot picture townxelliot  路  3Comments

theelk801 picture theelk801  路  10Comments