强化装备栏
This commit is contained in:
@@ -5,7 +5,8 @@ export const HERO_SYSTEM_TYPE = {
|
||||
STAGEUP:6,
|
||||
SKIN:7,
|
||||
FAVOUR:8,
|
||||
CONNECT:9
|
||||
CONNECT:9,
|
||||
EPLACE_STRENGTHEN: 10
|
||||
};
|
||||
|
||||
// 武将上限
|
||||
|
||||
@@ -5,8 +5,8 @@ export const IT_TYPE = {
|
||||
|
||||
// 大类型,区分存到哪张表里
|
||||
export const GOOD_TYPE = {
|
||||
EQUIP: 1,
|
||||
CONSUMES: 2,
|
||||
EQUIP: 2,
|
||||
CONSUMES: 1,
|
||||
SCRIPT: 3
|
||||
};
|
||||
|
||||
@@ -131,4 +131,23 @@ export const RANDOM_SE_COUNT = new Map<number, number>([
|
||||
[QUALITY_TYPE.GOLD, 4]
|
||||
]);
|
||||
|
||||
export const FIX_ATTRIBUTES_RAN = 20; // 固定属性值+-20%随机
|
||||
export const FIX_ATTRIBUTES_RAN = 20; // 固定属性值+-20%随机
|
||||
|
||||
|
||||
export function getCurNameById(gid) {
|
||||
let currency = CURRENCY.get(gid);
|
||||
if (!currency) {
|
||||
return;
|
||||
}
|
||||
if (currency.type == CURRENCY_TYPE.COIN) {
|
||||
return 'coin';
|
||||
} else if (currency.type == CURRENCY_TYPE.GOLD) {
|
||||
return 'gold';
|
||||
} else if (currency.type == CURRENCY_TYPE.ACTION_POINT) {
|
||||
return 'ap';
|
||||
} else if (currency.type == CURRENCY_TYPE.FRIEND_POINT) {
|
||||
return 'frdCnt';
|
||||
} else if (currency.type == CURRENCY_TYPE.EXPEDITION_POINT) {
|
||||
return 'expeditionPoint';
|
||||
}
|
||||
}
|
||||
@@ -8,13 +8,13 @@ export const ENCRYPT_KEY = 'fiqaxijabbantusmprc234fj';
|
||||
export const AUTH_SMS_CNT_PER_DAY = 8;
|
||||
|
||||
export const COUNTER = {
|
||||
UID: {name:'uid',def:1},
|
||||
GMUID: {name:'gmuid',def:1},
|
||||
API: {name:'api',def:1},
|
||||
GM_GROUP: {name:'gmgroup',def:1},
|
||||
HID: {name:'hid',def:10000},
|
||||
EID: {name:'eid',def:1},
|
||||
ROLE: {name:'role',def:1}
|
||||
UID: { name: 'uid', def: 1 },
|
||||
GMUID: { name: 'gmuid', def: 1 },
|
||||
API: { name: 'api', def: 1 },
|
||||
GM_GROUP: { name: 'gmgroup', def: 1 },
|
||||
HID: { name: 'hid', def: 10000 },
|
||||
EID: { name: 'eid', def: 1 },
|
||||
ROLE: { name: 'role', def: 1 }
|
||||
};
|
||||
|
||||
export const DEFAULT_HEROES = [12, 14, 11, 9, 15];
|
||||
@@ -83,7 +83,8 @@ export const FILENAME = {
|
||||
DIC_TOWER: 'dic_zyz_tower',
|
||||
DIC_XUNBAO: 'dic_zyz_xunbao',
|
||||
DIC_QUESTION: 'Questions',
|
||||
DIC_RANDOM_EFFECT_POOL: 'dic_random_effect_pool'
|
||||
DIC_RANDOM_EFFECT_POOL: 'dic_random_effect_pool',
|
||||
DIC_STRENGTHEN_COST: 'dic_zyz_enhancementCost'
|
||||
}
|
||||
|
||||
export const WAR_RELATE_TABLES = [
|
||||
@@ -98,3 +99,10 @@ export const WAR_RELATE_TABLES = [
|
||||
FILENAME.DIC_GK_TOWER,
|
||||
FILENAME.DIC_GK_TREASURE
|
||||
]
|
||||
|
||||
// 装备栏强化类型
|
||||
export const EQUIP_STRENGTHEN_TYPE = {
|
||||
SINGLE: 1, // 单件单级强化
|
||||
SINGLE_QUICK: 2, // 单件一键强化
|
||||
ALL_QUICK: 3 // 武将全部装备栏一键强化
|
||||
}
|
||||
@@ -144,6 +144,9 @@ export const STATUS = {
|
||||
ROLE_SHORT_HERO_CONECTION:{code: 30308, simStr: '未拥有羁绊武将'},
|
||||
HERO_FAVOUR_LEVEL_REACH_MAXT:{code: 30308, simStr: '武将好感等级以达到最大'},
|
||||
|
||||
// 装备养成 30400-30499
|
||||
ROLE_EQUIP_PLACE_NOT_ENOUGH: {code: 30400, simStr: '装备栏未装备或无可强化'},
|
||||
ROLE_COIN_NOT_ENOUGH: {code: 30401, simStr: '铜币不足'},
|
||||
|
||||
// 社交相关状态 40000 - 49999
|
||||
// 运营模块相关状态 50000 - 59999
|
||||
|
||||
@@ -26,6 +26,7 @@ import { dicHeroQualityUp } from "./dictionary/DicHeroQualityUp";
|
||||
import { dicHeroStar } from "./dictionary/DicHeroStar";
|
||||
import { dicHeroWake } from "./dictionary/DicHeroWake";
|
||||
import { dicRandomEffectPool } from './dictionary/DicRandomEffectPool';
|
||||
import { dicStrengthenCost } from './dictionary/DicStrengthenCost';
|
||||
|
||||
export const gameData = {
|
||||
blurprtCompose: dicBlueprtCompose,
|
||||
@@ -63,6 +64,7 @@ export const gameData = {
|
||||
friendShipLevel: dicFriendShipLevel,
|
||||
friendShipLevelMap: dicFriendShipLevelMap,
|
||||
randomEffectPool: dicRandomEffectPool,
|
||||
strengthenCost: dicStrengthenCost
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
|
||||
19
shared/pubUtils/dictionary/DicStrengthenCost.ts
Normal file
19
shared/pubUtils/dictionary/DicStrengthenCost.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
// 强化消耗表
|
||||
import {readJsonFile} from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicStrengthenCost {
|
||||
// 等级
|
||||
readonly level: number;
|
||||
// 消耗铜钱
|
||||
readonly costCoin: number;
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_STRENGTHEN_COST);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicStrengthenCost = new Map<number, number>();
|
||||
|
||||
arr.forEach(o => {
|
||||
dicStrengthenCost.set(o.level, o.costCoin);
|
||||
});
|
||||
@@ -52,7 +52,7 @@ export async function addEquips(roleId: string, roleName: string, weapon: EquipI
|
||||
locked: false
|
||||
});
|
||||
}
|
||||
let randRange = Math.floor(Math.random() * FIX_ATTRIBUTES_RAN);
|
||||
let randRange = Math.floor(Math.random() * FIX_ATTRIBUTES_RAN * 2) - FIX_ATTRIBUTES_RAN;
|
||||
let holes = new Array<Holes>();
|
||||
for(let i = 0; i < hole; i++) {
|
||||
holes.push({id: i+1, isOpen: false, jewel: 0})
|
||||
|
||||
Reference in New Issue
Block a user