Open JayDi85 opened 5 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?
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.
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
.
As example: Essence Capture (fix: 0b648343bc25fad65f9f72d6c54a4a8987e09e0a)
That's spell uses target pointer for second effect:
.setTargetPointer(new SecondTargetPointer())
But rules generation in
AddCountersTargetEffect
uses first target only:Target target = mode.getTargets().get(0);
There are not so many affected cards (~100).
TODO:
mode.getTargets().get(0)
and replace it withgetTargetPointer().describeTargets(mode.getTargets(), "{default for empty/fixed target}");
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: