magefree / magefree/mage

Research/fix usage of `affectedObjectsSet` before `init`

Open
#12,128 0 comments 0 reactions 0 assignees View on GitHub
refactoring
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

This is a followup to #12080

> So only 4 usages before `super.init`:
![image](https://github.com/magefree/mage/assets/34709007/fbd2bcee-a4db-4172-a69b-0e793eb08032)

> Potential place to next refactor:
![shot_240413_183101](https://github.com/magefree/mage/assets/8344157/608a04b9-c4f1-46c0-8d6d-012c1b3babd6)

- [ ] Confirm functionality of these effects with unit test coverage
- [ ] Cleanup/refactor logic so that the subclass only runs additional code after the super

_Originally posted by @Susucre in https://github.com/magefree/mage/issues/12080#issuecomment-2053660477_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the four `affectedObjectsSet` usages before `super.init` identified in issue #12080 and the effects they belong to. Add unit test coverage to confirm their behavior, then verify that subclass logic runs only after the superclass initialization and that the affected usages have been cleaned up.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.