强化装备栏
This commit is contained in:
@@ -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