open-duelyst / duelyst

Duelyst is a digital collectible card game and turn-based strategy hybrid, developed by Counterplay Games.
Creative Commons Zero v1.0 Universal
3.62k stars 556 forks source link

[P0] Automatically schedule boss battles #227

Closed willroberts closed 1 year ago

willroberts commented 1 year ago

Summary

We already have a finite set of boss battles available, which can be chosen and enabled in the QA Editor tools.

Let's create a scheduled task (can run once a day in the Worker) to keep track of the last boss index, and rotate through the list as each one expires. In other words, the worker would do the following:

- check to see if a boss is already enabled
- if not, determine what the next boss should be
- activate the next boss

We can do the same thing with daily challenges if we happen to still have access to those. They may have been stored in S3, though, which would make this more difficult as we'd need to create or generate the content instead.

willroberts commented 1 year ago

Relevant code: scripts/daily_challenges/migrate_daily_challenge_from_staging.coffee

Challenges were indeed in S3, and we don't appear to have access to them in the repo.