diff --git a/src/commands/drop.ts b/src/commands/drop.ts index 8d82d81..f28c83e 100644 --- a/src/commands/drop.ts +++ b/src/commands/drop.ts @@ -53,6 +53,8 @@ export default class Drop extends Command { const hasChanceUpEffect = await EffectHelper.HasEffect(interaction.user.id, "unclaimed"); + console.log(hasChanceUpEffect); + if (hasChanceUpEffect && Math.random() <= CardConstants.UnusedChanceUpChance) { randomCard = await CardDropHelperMetadata.GetRandomCardUnclaimed(interaction.user.id); } else { diff --git a/src/helpers/EffectHelper.ts b/src/helpers/EffectHelper.ts index 26aab8c..1033ada 100644 --- a/src/helpers/EffectHelper.ts +++ b/src/helpers/EffectHelper.ts @@ -37,16 +37,19 @@ export default class EffectHelper { const now = new Date(); if (!effect || effect.Unused == 0) { + console.log(1); return false; } - const effectDetail = EffectDetails.get(effect.Id); + const effectDetail = EffectDetails.get(effect.Name); if (!effectDetail) { + console.log(2); return false; } if (effect.WhenExpires && now < new Date(effect.WhenExpires.getMilliseconds() + effectDetail.cooldown)) { + console.log(3); return false; }