Ink230 / irongoon

2 stars 1 forks source link

Explore splitting DivineFruit into DivineFruitBody and DivineFruitDragoon #2

Closed Ink230 closed 1 month ago

Ink230 commented 6 months ago

DivineFruit being a single entity is useful and provides efficiencies. It is the central data model for two similar stat sets (body, dragoon) that have much overlap and use in similar locations.

An extenuating pressure is from CharacterStatsRandomizer and DragoonStatsRandomizer being split for planned features in the future where Character stats are randomized one way but Dragoon stats are allowed to be randomized another way.

The benefit of splitting these up and/or creating a mapping from DivineFruitBodyRandomizer to DivineFruitBody is better type safety and a few lines of logic saved from type inference being handy with enums.

Ink230 commented 1 month ago

Resolved by keeping DivineFruit as the working primitive in stat randomizers. The class is likely to become overloaded but the cross-cutting convenience is worth it.