multiple changes:

* refactor: improved target pointer init code and logic, added docs and runtime checks;
* game: fixed miss or wrong init calls in some continuous effects;
* game: fixed wrong usage of target pointers (miss copy code, miss npe checks);
This commit is contained in:
Oleg Agafonov 2024-02-18 15:05:05 +04:00
parent b2aa4ecc08
commit 78612ddc91
115 changed files with 466 additions and 355 deletions

View file

@ -39,6 +39,11 @@ public interface ContinuousEffect extends Effect {
boolean isInactive(Ability source, Game game);
/**
* Init ability data like ZCC or targets on first check in game cycle (ApplyEffects)
* <p>
* Warning, if you setup target pointer in init then must call super.init at the end (after all choices)
*/
void init(Ability source, Game game);
void init(Ability source, Game game, UUID activePlayerId);