Skip to content

Commit

Permalink
tickets
Browse files Browse the repository at this point in the history
  • Loading branch information
hashwarp committed Dec 26, 2024
1 parent 0176a23 commit 81dd6c1
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/shard-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,23 @@ export class ShardBridge implements Bridge.Service {
tempReward.rewardItemType = 4;

config.drops.trinket = now;
} else if (now - config.drops.santa > 24 * 60 * 60 * 1000 && randPerDay === Math.round(timesPerDay / 100)) {
tempReward = {
id: generateShortId(),
position: config.level2open
? this.config.rewardSpawnPoints2[random(0, this.config.rewardSpawnPoints2.length - 1)]
: this.config.rewardSpawnPoints[random(0, this.config.rewardSpawnPoints.length - 1)],
enabledDate: now,
name: 'Santa Christmas 2024 Ticket',
rarity: 'Normal',
quantity: 1,
rewardItemType: 6,
};

tempReward.rewardItemName = tempReward.name;
tempReward.rewardItemType = 6;

config.drops.santa = now;
} else {
const odds = Array(1000).fill('tokens');

Expand All @@ -557,7 +574,7 @@ export class ShardBridge implements Bridge.Service {
}

const reward = rewardType[random(0, rewardType.length - 1)];
if (reward.type === 'rune' && reward.quantity <= 0) {
if (reward.type === 'token' && reward.quantity <= 0) {
throw new Error('No tokens left');
}

Expand Down

0 comments on commit 81dd6c1

Please sign in to comment.