forge icon indicating copy to clipboard operation
forge copied to clipboard

May Play needs to Refactored into Different Static Abilities

Open Hanmac opened this issue 1 year ago • 4 comments

in short summary, we need to split the MayPlay logic between multiple effects that may or may not be combined:

  • [x] Effects that alter the Cost like Rooftop Storm, that should be use a Static instead of a Keyword like Alternative Cost:0
  • [x] Remove the Intrinsic SVar AltCost
  • [ ] Effects that allow you to cast/play stuff from zones but without setting a cost, like Augur of Autumn
  • [ ] Effects that combine both, but for these, the other effects can't be used too like Bolas's Citadel
  • [ ] The Goal also was to reduce the use of Continuous for LKI stuff

i think my first attempt to split was 3+ years ago: https://github.com/Card-Forge/forge/compare/mayPlayAlternativeCost

Originally posted by @Hanmac in https://github.com/Card-Forge/forge/issues/4696#issuecomment-1948867789

Hanmac avatar Feb 16 '24 16:02 Hanmac

@Hanmac some steps I could try:

  1. cleanup Maestros Ascendancy + Falco Spara they are special since they use additional cost + casting permission but the engine doesn't leave them as basicSpell

  2. refactor remaining MayPlay*ManaCost$ into AlternativeCost static I'm not sure yet if we need a third static, but if we do this first it should be easier to rework the rest with a MayPlay static and finally eliminate the checkStaticAbilities() calls

tool4ever avatar May 13 '24 07:05 tool4ever

one thing i sadly noticed that it doesn't really would reduce checkStaticAbilities that much, because for checking the Spell, it needs to run them again anyway maybe that can be optimized later

but i once made a List to separate them between:

  • AlternativeZone (maybe additional Cost?)
  • AlternativeCost
  • And some kind of combinations of both

We need Static List, because AlternativeCost + AlternativeZone can be combined, like this: private List<StaticAbility> mayPlayList = Lists.newArrayList();

Hanmac avatar May 13 '24 12:05 Hanmac

It's worth noting there are also cases where we need a stack copy to apply statics without any keyworded alternatives involved

E.g. Spawnsire of Ulamog should allow you to cast any creature type spell while controlling Maskwood Nexus (which doesn't affect sideboard)

tool4ever avatar Jun 19 '24 08:06 tool4ever

Because it says: "Eldrazi spells", yes it needs to use Stack Copy

Hanmac avatar Jun 19 '24 09:06 Hanmac