体力:修改体力逻辑

This commit is contained in:
luying
2021-06-22 20:32:10 +08:00
parent 43dd3eb400
commit 2baa41ab63
14 changed files with 184 additions and 41 deletions

View File

@@ -85,6 +85,7 @@ import { loadRMB, dicRMB } from './dictionary/DicRMB';
import { dicActivityType, loadActivityType } from './dictionary/DicActivityType';
import { dicTaskTypeDesc, loadTaskType } from './dictionary/DicTaskType';
import { dicServerName, dicServerGroupName, loadServerName } from "./dictionary/DicServerName";
import { dicAp, loadAp, dicApMaxLevel } from './dictionary/DicAp';
export const gameData = {
blurprtCompose: dicBlueprtCompose,
@@ -208,6 +209,8 @@ export const gameData = {
taskTypeDesc: dicTaskTypeDesc,
serverNames: dicServerName,
serverGroupNames: dicServerGroupName,
ap: dicAp,
apMaxLevel: dicApMaxLevel
};
// 在此提供一些原先在gamedata中提供的方法以便更方便获取gameData数据
@@ -701,6 +704,14 @@ export function getServerName(id: number) {
return name;
}
export function getDicApByLv(level: number) {
if(level > gameData.apMaxLevel.max) {
return gameData.ap.get(gameData.apMaxLevel.max);
} else {
return gameData.ap.get(level);
}
}
// 初始加载
function initDatas() {
parseDicParam();
@@ -799,6 +810,7 @@ function loadDatas() {
loadActivityType();
loadTaskType();
loadServerName();
loadAp();
}
// 重载dicParam