lambdaclass / afk_gacha_game

AFK Gacha Game is an autobattler by LambdaClass
Apache License 2.0
3 stars 0 forks source link

[REFACTOR] Unify the representation of the `type` field in targeting strategies #479

Open ncontinanza opened 5 months ago

ncontinanza commented 5 months ago

🚧 Refactor

Check the first and last comment left in: https://github.com/lambdaclass/mirra_backend/pull/647

In our current targeting strategies, the type field is a string in some cases and a map in others. It would be better to have type as a string and a separate stat field for the cases in which corresponds (highest and lowest targeting strategies, for instance).

This refactor will help to simplify the implementation of create_mechanics_map/3, where we're currently implementing different behaviors for the string and the map case.

Also, talk with Game Design in order to make this change in the design documents.