magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.91k stars 778 forks source link

Card rules generator don't use target pointers #5523

Open JayDi85 opened 5 years ago

JayDi85 commented 5 years ago

As example: Essence Capture (fix: 0b648343bc25fad65f9f72d6c54a4a8987e09e0a)

That's spell uses target pointer for second effect:

But rules generation in AddCountersTargetEffect uses first target only:

There are not so many affected cards (~100).

TODO:

Most effects have been cleaned up. The remaining effects use a second target or need to check some other feature of the target, so more work would be needed:

Zerrisx commented 4 years ago

Has this been done, and if not, can we get a list of the places that would need to be fixed as a mini-tracking project?

JayDi85 commented 4 years ago

It's not done and can be fixed very easy (see TODO list with search and fix example in rules generation).

I updated topic with effects and cards list to check/fix.

awjackson commented 2 years ago

I didn't see this issue until I had started implementing this myself.

Anyway, Targets.getEffectTarget is gone. The new way to do it is with TargetPointer.describeTargets, which handles all the text generation for you--numbers, "up to", and even multiple targets with EachTargetPointer.