magefree / magefree/mage

Card rules generator don't use target pointers

Open
#5,523 3 comments 0 reactions 1 assignee Claimed by @xenohedron View on GitHub
bug refactoring tracking tasks
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

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:
* [x] implement targetPointer processing in rules;
* [x] search files for `mode.getTargets().get(0)` and replace it with
* `getTargetPointer().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:
- [ ] DamageMultiEffect
- [x] DamageTargetEffect
- [ ] DamageWithPowerFromOneToAnotherTargetEffect
- [ ] DontUntapInControllersNextUntapStepTargetEffect
- [ ] FightTargetsEffect
- [ ] PutOnLibraryTargetEffect
- [ ] ReturnFromGraveyardToBattlefieldTargetEffect
- [ ] TargetPlayerShufflesTargetCardsEffect

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.