抽卡:添加提示和限制

This commit is contained in:
luying
2022-08-03 14:31:44 +08:00
parent 9a269c51d5
commit 3f06432b3f
4 changed files with 5 additions and 4 deletions

View File

@@ -62,7 +62,7 @@ export class GachaHandler {
dicGacha = getDicGachaByGachaCnt(dicGacha, historyCount);
if (!dicGacha) return resResult(STATUS.DIC_DATA_NOT_FOUND);
if (!dicGacha.count.includes(count)) return resResult(STATUS.WRONG_PARMS);
if (!dicGacha.count.includes(count)) return resResult(STATUS.GACHA_IS_LOCK);
let gachaPull = new GachaPull(dicGacha, userGacha);
let userHeroes = await HeroModel.findByRole(roleId);

View File

@@ -438,6 +438,7 @@ export const STATUS = {
GACHA_GUIDE_NOT_DO: { code: 31110, simStr: '没有抽卡过' },
GACHA_GUIDE_HAS_DONE: { code: 31111, simStr: '未到达选择时间或已经选择过了' },
GACHA_GUIDE_NO_CANDIDATE: { code: 31112, simStr: '该位置没有保存过数据' },
GACHA_IS_LOCK: { code: 31113, simStr: '十连抽未解锁' },
// 礼包码 31201-31300
GIFT_CODE_USED_NUM_MAX: { code: 31201, simStr: '礼包码使用次数超过' },
YOU_HAVE_USED_THIS_CODE: { code: 31202, simStr: '您已使用过该码' },

View File

@@ -157,7 +157,7 @@ export const RECRUIT = {
RECRUIT_SHARD_LIMIT: 5, // 每日武将拜访碎片数量
RECRUIT_GET_HERO_HIGH_RECRUIT: '1&4|2&2|3&1', // 求贤若渴指定武将为名将/国士/传奇时,抽中后分别获得多少个同武将
RECRUIT_FIRST_RECRUIT: 50, // 首次招募预招募50次10连
RECRUIT_FIRST_RECRUIT_SAVE: 2, // 最多保存2个预招募结果
RECRUIT_FIRST_RECRUIT_SAVE: 3, // 最多保存2个预招募结果
};
export const SCRIPT = {
SCRIPT_BATTLE_ID: 103, // 序章最后一关id

View File

@@ -4,7 +4,7 @@
"gachaType": 1,
"floor": "&",
"name": "新手招募1",
"count": "1&10",
"count": "1&",
"free": "&",
"cost": "22001&1",
"percent": "16&100",
@@ -19,7 +19,7 @@
"gachaType": 1,
"floor": "&",
"name": "新手招募2",
"count": "1&10",
"count": "1&",
"free": "&",
"cost": "22001&1",
"percent": "17&100",