nathanj / spirit-island-pbp

Spirit Island PBP Helper
4 stars 7 forks source link

Fix energy bugs by tracking spirit setup energy separately from base energy gain #20

Closed samsullivan closed 3 months ago

samsullivan commented 3 months ago

Thanks @petertseng, for the great review in #18. I understood what is happening a lot more now and have taken another attempt.

This time I have split the energy configuration into two separate maps, setup energy to be passed as energy when creating a player and base energy gain as starting_energy (which is a bit of a misleading name, but I am hesitant to do an unnecessary migration to rename it completely).

This time I checked with "normal" spirits to make sure I didn't mess up the logic like I had last time.

samsullivan commented 3 months ago

Hah, didn't realize @petertseng had made #19 in response to my #18 last night; I'll close this one 🙃

petertseng commented 3 months ago

I'll take the blame for that for not mentioning that; I apologise for causing the duplication of effort. The only remedy I really have to offer is hopefully it does not feel like wasted effort if it was useful to learning a little more about how this all works. I also got a "great minds think alike" feeling from seeing that we named our dictionaries the exact same thing.

samsullivan commented 3 months ago

Hah, yea, nbd -- I intend to contribute more and it was my first time in the code.

And I had the same thought :)