调整白单策略, 一个帐号可多次获取白单

This commit is contained in:
CounterFire2023 2024-05-20 12:29:59 +08:00
parent 8d19ebcaa2
commit 304640079e
8 changed files with 42 additions and 9 deletions

View File

@ -4,7 +4,7 @@
"type": 1,
"name": "WhiteList",
"amount": 1,
"probability": 100
"probability": 50
},
{
"position": 2,
@ -35,7 +35,7 @@
"type": 2,
"name": "NFT",
"amount": 1,
"probability": 100
"probability": 50
},
{
"position": 7,

View File

@ -419,6 +419,38 @@
"end": "2025-01-01 00:00",
"checkChain": false,
"params": { "time": 6, "failRate": 0 }
},
{
"id": "g3f4f63mp73a6gsq5rr",
"task": "TwitterRetweet",
"title": "RT - Dragonscale Gameplay",
"type": 1,
"desc": "Retweet specific tweets",
"category": "Social Tasks",
"score": 50,
"autoclaim": false,
"pretasks": ["e2yhq2lj30vwcpedv7p"],
"cfg": { "icon": "twitter", "content": "1791452561419161827"},
"start": "2024-01-01 00:00",
"end": "2025-01-01 00:00",
"checkChain": false,
"params": { "time": 6, "failRate": 0 }
},
{
"id": "g3knsuk7c9g45npftvw",
"task": "TwitterLike",
"title": "Like - Dragonscale Gameplay",
"type": 1,
"desc": "Like specific tweets",
"category": "Social Tasks",
"score": 50,
"autoclaim": false,
"pretasks": ["e2yhq2lj30vwcpedv7p"],
"cfg": { "icon": "twitter", "content": "1791452561419161827"},
"start": "2024-01-01 00:00",
"end": "2025-01-01 00:00",
"checkChain": false,
"params": { "time": 6, "failRate": 0 }
}
],
"drawTime": 1715245160457,

View File

@ -168,7 +168,7 @@ class AdminController extends BaseController {
code: user.inviteCode,
mapopen: gameRecord.status,
enhanceCount,
inWhiteList: user.inWhiteList ? 1 : 0,
inWhiteList: user.whiteListNum || 0,
googleId: user.googleId,
googleMail: user.googleEmail,
gameScore: ingameStat.score,

View File

@ -349,8 +349,7 @@ class BoxController extends BaseController {
chest.items.push(item)
})
if (items.find(item => item.type === 1)) {
user.inWhiteList = true
await user.save()
await ActivityUser.updateOne({ _id: user.id }, { inWhiteList: true, $inc: { whiteListNum: 1 } })
}
await updateRankScore({

View File

@ -207,8 +207,7 @@ class InGameController extends BaseController {
items.push(reward)
record.items = [reward]
if (reward.type === 1) {
user.inWhiteList = true
await user.save()
await ActivityUser.updateOne({ _id: user.id }, { inWhiteList: true, $inc: { whiteListNum: 1 } })
}
}
await record.save()

View File

@ -162,7 +162,7 @@ class SignController extends BaseController {
code: user.inviteCode,
mapopen: gameRecord.status,
enhanceCount,
inWhiteList: user.inWhiteList ? 1 : 0,
inWhiteList: user.whiteListNum || 0,
googleId: user.googleId,
googleMail: user.googleEmail,
gameScore: ingameStat.score,

View File

@ -128,6 +128,9 @@ export class ActivityUserClass extends BaseModule {
@prop({ default: false })
public inWhiteList: boolean
@prop({ default: 0 })
public whiteListNum: number
@prop({ default: 1 })
public boost: number
/**

View File

@ -107,7 +107,7 @@ export const generateChestBonus = async (chest: DocumentType<ActivityChestClass>
for (let i = 0; i < chestBonusItems.length; i++) {
let item = chestBonusItems[i]
if (Math.random() < item.probability / 100) {
if (item.type === 1 && hasWhite) {
if (item.type === 1) {
continue
}
bonusItem = item