Skip to content

Commit

Permalink
Events (a bit more)
Browse files Browse the repository at this point in the history
  • Loading branch information
paris-ci committed Apr 30, 2024
1 parent 135fd7e commit 702a050
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/cogs/ducks_spawning.py
Expand Up @@ -391,7 +391,17 @@ async def recompute_channel(self, channel: discord.TextChannel):
).compute_ducks_count()

async def change_event(self, force_choice=None, force=False):
if random.randint(1, 12) != 1 and not force and not force_choice:
can_not_select_event = not force and not force_choice

if self.bot.current_event == Events.STAY_TUNED:
can_not_select_event = False

random_says_no = random.randint(1, 8) != 1

if self.bot.current_event == Events.CALM_TIMES_AHEAD:
random_says_no = True

if random_says_no and can_not_select_event:
self.bot.logger.info("No new event this time!")
self.bot.current_event = Events.CALM
else:
Expand Down
2 changes: 2 additions & 0 deletions src/utils/events.py
Expand Up @@ -61,4 +61,6 @@ class Events(Enum):
GARBAGE_COLLECTION = _("Garbage collection"), _("It's hunting season, and hunters left some items behind. "
"One person's trash can end up being your treasure, so enjoy the extra loot you find!")

STAY_TUNED = _("Stay tuned"), _("Check back during the next two hours to see what the next events will be!")

CALM_TIMES_AHEAD = _("Calm times ahead"), _("Looks like clear skies ahead. Enjoy killing ducks in the meantime!")

0 comments on commit 702a050

Please sign in to comment.