Closed petertseng closed 2 months ago
Okay, so there is a way this could fail, which is that if the aspect card's image hasn't loaded in yet (or the player uses an element blocker to remove it or something), then the player could click this supposedly unclickable presence. Wouldn't be the end of the world, since in that case they could just fall back to using the permanent moon.
Maybe it's more reasonable to just put it in the elements
property of GamePlayer. Doing it that way would require a migration of existing Dark Fire Shadows, however: would need to decrement their permanent_moon by 1, otherwise they'll have too much moon.
I don't like this way of doing this either. It feels wrong to create a presence object just for this, rather than just add the moon directly. Migrating existing Dark Fire Shadows can be done with a a database migration that decrements the permanent_moon of any of them, or alternatively add something like an game version field to every GamePlayer, indicating the version of the code that was used to create that GamePlayer, and then only Dark Fire Shadows with a sufficiently-new version get the moon in elements
; older ones are assumed to use permanent_moon.
I would like to use permanent_elements for dark fire and intentify. It's simple and intuitive. Everyone who will do shenanigans like removing permanent elements, can re-add or recalculate it.
For darkfire specifically, it might be good to consider the spirit specific counter we added for stuff like time and snake presences
Let me hear your idea for what the spirit-specific resource would be used for with Dark Fire?
Before this change, it's possible for the player to accidentally decrement their permanent moon and lose it.
With this change, the advantage is that this feels more in line with other bonus elements granted by the track: The player is always entitled to them and cannot accidentally lose them due to misclick.
No migration is needed for existing games with a Dark Fire Shadows because both init_permanent_elements and add_player are only run on player creation. Existing instances of Dark Fire Shadows continue to use permanent_elements and don't get this new invisible presence. Only new instances of Dark Fire Shadows get this.
Author's notes: This isn't really necessary; the status quo code (using permanent_elements) works fine. This just feels more in line with other track elements, so I'm sending it in as a proposal. But ultimately this is fixing something that isn't actually broken.