Marenthyu / NepBot

Waifu Trading Card Game Bot for Twitch
https://waifus.de/help
BSD 3-Clause "New" or "Revised" License
4 stars 6 forks source link

main/website: fix firstGod determination #85

Closed xorhash closed 5 years ago

xorhash commented 5 years ago

This changes the query to account for previously died cards (i.e. ones with both userid and boosterid set to NULL). Otherwise, a dead God card could block the only God in existence.

xorhash commented 5 years ago

I understood this as a fix rather than a design decision via https://pastebin.com/XFrzvh6q, which explicitly says (emphasis mine):

  1. The god card with the earliest creation date for each waifu at any given time will be considered the "first god" and enjoy some minor benefits.
    • For now, the only change is a different appearance in the user's hand. More benefits may be added at a later date.
    • All gods that existed before the update will obviously be considered first gods. But if a card does not have a pre-update god it can still get a "first god" after the update.
    • If the "first god" is disenchanted then the status will be transferred to the next oldest god, if one exists.
Marenthyu commented 5 years ago

LGTM as queries tested; requesting @Dabomstew to check over it once before merging