强化装备栏

This commit is contained in:
luying
2020-12-17 21:37:05 +08:00
parent b3ec0c85da
commit d2097a4264
9 changed files with 133 additions and 18 deletions

View File

@@ -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数据

View 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);
});

View File

@@ -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})