mage/Mage.Server.Plugins/Mage.Player.AI.MA
Alex Vasile a2162ec3e7
Refactor: private fields and performance tweaks (#9625)
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>
2023-08-27 17:58:19 -04:00
..
config
src/mage/player/ai Refactor: private fields and performance tweaks (#9625) 2023-08-27 17:58:19 -04:00
pom.xml [DEV] JDK 11+ support. All builds still target Java 1.8. 2022-08-05 00:17:00 -04:00