* Add withTargetDescription support to all Effects
* use withTargetDescription for effects incorrectly with "target" in text
* CommanderStormAbility add support for non-target rules text
* Heliods Emissary use OrTriggeredAbility
* support all effects withTargetDescription, rename overwriteTargetDescription to targetDescription
* copy target description from old pointer when using setTargetPointer
* Text cleanup/simplifications
* Remove outdated warning
* 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);
1a. Make `costs`, `manaCosts`, and `manaCostsToPay` private in `AbilityImpl` with access through getters/setters
1b. fix cost adjuster for imprinted cards affected by the above
2a. Lazy instantiation for rarely used `data` field in `TargetPointerImpl`
3a. Pre-allocate certain array sizes in `Modes` and `CostsImpl`
4a. Make `manaTemplate` private in `BasicManaEffect`, copy when passing outside the class
4b. Don't copy `manaTemplate` in copy constructor since it doesn't change
4c. Add comments explaining copy usage for `manaTemplate`
4d. Remove redundant variable assignment and make fields final
---------
Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
* apply regex to change public copy constructors to protected
* cleanup code using now protected constructors
* fix manaBuilder weird casting of Mana into ConditionalMana
* GainAbilityTargetEffect - reworked to support static/dynamic targets, added support of spells (card + related permanent);
* SpellCastControllerTriggeredAbility - now it can setup the target to a card instead a spell;
* Added checks/errors on wrong ability adding code (example: if you add permanent's ability by game state instead permanent's method);
* Tyvar Kell Emblem now use a standard code;
* Test framework: added additional logs for some errors;
* now it can be used to calc and find available mana and playable abilities;
* now tests and AI can use that abilities;
* now it follows mtg's rules and restrictions for mana activation order (rule 601.2f, see #768);
- Simplified and fixed some problems of the handling of the "Until end of your next turn" duration.
- Fixed that some continous effects changed controller but shouldn't dependant from their duration type. Controller chnage will now done duration type dependant.
(that change fixes#6581 in a more general way undoing the effect specific changes of 2e8ece1dbd).