Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Everyone gets a guaranteed hatch on Christmas #199

Merged
merged 2 commits into from
Dec 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/commands/NFD.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class NFD {
// Roll the hatch check
const res = roll_dy_x_TimesPick_z(4, 1, 1)

if (res <= this.MAXIMUM_FAILED_HATCHES - ownerRecordPrev.consecutiveFails) {
if (res <= this.MAXIMUM_FAILED_HATCHES - ownerRecordPrev.consecutiveFails && !this.isTodayChristmas()) {
this.updateDBfailedMint(ownerMember.id)
const nowtime = Date.now()
const nextMint =
Expand Down Expand Up @@ -188,6 +188,12 @@ class NFD {
})
}

private isTodayChristmas(): boolean {
const today = new Date()
// Day is between 1 and 31 while month is between 0 and 11
return today.getDate() == 25 && today.getMonth() == 11
}

@Slash({ name: 'view', description: 'View an existing dino.' })
@SlashGroup('dino')
async view(
Expand Down
Loading