抽卡:求贤若渴pick武将按品质算数量
This commit is contained in:
@@ -140,20 +140,20 @@ export class GachaResult {
|
||||
if(id) this.pickHero = id;
|
||||
}
|
||||
|
||||
setHidOrGid(id: number, count?: number) {
|
||||
setHidOrGid(id: number, count: number) {
|
||||
let dicGachaContent = gameData.gachaContent.get(this.contentId);
|
||||
if(!dicGachaContent) return;
|
||||
|
||||
if(dicGachaContent.type == GACHA_CONTENT_TYPE.HERO) {
|
||||
this.setHero(id);
|
||||
this.setHero(id, count);
|
||||
} else {
|
||||
this.setItem(id, count||dicGachaContent.count);
|
||||
}
|
||||
}
|
||||
|
||||
setHero(hid: number) {
|
||||
setHero(hid: number, count: number) {
|
||||
this.hid = hid;
|
||||
this.count = 1;
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
setItem(id: number, count: number) {
|
||||
@@ -166,4 +166,14 @@ export class GachaResult {
|
||||
this.id = id;
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
copy() {
|
||||
let result = new GachaResult(this.contentId);
|
||||
result.hid = this.hid;
|
||||
result.isTransfer = this.isTransfer;
|
||||
result.id = this.id;
|
||||
result.count = this.count;
|
||||
result.pickHero = this.pickHero;
|
||||
return result
|
||||
}
|
||||
}
|
||||
@@ -214,6 +214,7 @@ export const gameData = {
|
||||
gachaContentHero: dicGachaContentHero,
|
||||
gachaHope: new Array<{id: number, weight: number}>(),
|
||||
gachaTurntable: new Array<{quality: number, count: number}>(),
|
||||
gachaPickHeroCnt: new Map<number, number>(),
|
||||
heroTransPiece: new Map<number, number>(),
|
||||
giftPackage: dicGiftPackage,
|
||||
comBtlLvRange: new Map<number, {min: number, max: number}>(),
|
||||
@@ -745,6 +746,13 @@ function getGachaTurntablePercent() {
|
||||
});
|
||||
}
|
||||
|
||||
function getGachaPickHeroCnt() {
|
||||
let arr = decodeArrayListStr(RECRUIT.RECRUIT_GET_HERO_HIGH_RECRUIT);
|
||||
arr.forEach(cur => {
|
||||
gameData.gachaPickHeroCnt.set(parseInt(cur[0]), parseInt(cur[1]));
|
||||
});
|
||||
}
|
||||
|
||||
function getHeroTransPiece() {
|
||||
let map = decodeIdCntArrayStr(RECRUIT.RECRUIT_CHANGE_SHARD, 1);
|
||||
let newMap = new Map<number, number>();
|
||||
@@ -955,6 +963,7 @@ function parseDicParam() {
|
||||
decodeRaceEventItems();
|
||||
getGachaHopePercent();
|
||||
getGachaTurntablePercent();
|
||||
getGachaPickHeroCnt();
|
||||
getHeroTransPiece();
|
||||
parseComBtlLvRange();
|
||||
getCeRatio();
|
||||
|
||||
@@ -151,6 +151,7 @@ export const RECRUIT = {
|
||||
RECRUIT_LEVEL_HIGH_RECRUIT: 30, // 求贤若渴多少级开启
|
||||
RECRUIT_DAILY_RECRUIT_SHARD: 3, // 每日武将拜访数量
|
||||
RECRUIT_SHARD_LIMIT: 5, // 每日武将拜访碎片数量
|
||||
RECRUIT_GET_HERO_HIGH_RECRUIT: '1&6|2&3|3&1', // 求贤若渴指定武将为名将/国士/传奇时,抽中后分别获得多少个同武将
|
||||
RECRUIT_FIRST_RECRUIT: 50, // 首次招募预招募50次10连
|
||||
RECRUIT_FIRST_RECRUIT_SAVE: 2, // 最多保存2个预招募结果
|
||||
};
|
||||
@@ -245,7 +246,6 @@ export const SERVER_DEBUG_MODE = {
|
||||
export const IS_SQ = {
|
||||
IS_OPEN: 1, // 0关,1开(37SDK)
|
||||
};
|
||||
/*音效开关*/
|
||||
export const OPEN_EFFECT = {
|
||||
GUIDE_EFFECT: 0, // 0关,1开 (引导音效)
|
||||
TALK_EFFECT: 0, // 0关,1开 (剧情对话音效)
|
||||
@@ -300,3 +300,8 @@ export const TABEL = {
|
||||
JOB_MIN_GRADE: 0, // 职业表-职业最小阶数
|
||||
JOB_MAX_GRADE: 16, // 职业表-职业最大阶数
|
||||
};
|
||||
export const INFO_WINDOW = {
|
||||
TEAM_VIEW: 10, // 组队列表显示队伍最大数量
|
||||
REFRESH_TIME: 10, // 刷新冷却时间(s)
|
||||
TEAM_INFORMATION_TIME: 60, // 显示的组队信息时间(s)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user