战力:获取显示数据

This commit is contained in:
luying
2022-03-30 14:22:46 +08:00
parent ef731fc979
commit 9adbd08d3c
33 changed files with 205 additions and 1689 deletions
+1 -1
View File
@@ -335,7 +335,7 @@ export function getBossHpByWarId(warId: number) {
if (relation === 2) {
let newAttr = new AttributeCal();
newAttr.setByWarJson(attribute, 1);
let attrJson = newAttr.getReduceAttributes();
let attrJson = newAttr.getAttributes();
const hp = attrJson.hp || 0;
if (hp > 0) {
@@ -1,5 +1,5 @@
// 装备强化表
import { readFileAndParse, parseGoodStr, decodeArrayListStr } from '../util'
import { readFileAndParse, decodeArrayListStr } from '../util'
import { FILENAME } from '../../consts'
export interface DicEquipStrengthAttr {
File diff suppressed because it is too large Load Diff
+1 -16
View File
@@ -1,21 +1,17 @@
import { STATUS } from './../consts/statusCode';
import { HeroModel, HeroType } from '../db/Hero';
import { isNumber } from 'underscore';
const csprng = require('csprng');
import fs = require('fs');
import path = require('path');
import { HERO_CE_RATIO, ABI_STAGE, GACHA_TO_FLOOR, REFRESH_TIME, ROBOT_SYS_TYPE, ITEM_CHANGE_REASON, WAR_TYPE, LINEUP_NUM } from '../consts';
import { ABI_STAGE, GACHA_TO_FLOOR, REFRESH_TIME, ROBOT_SYS_TYPE, ITEM_CHANGE_REASON, WAR_TYPE } from '../consts';
import { findIndex } from 'underscore';
import { getTimeFunM } from './timeUtil';
import { Floor } from '../domain/activityField/gachaField';
import { WhiteListModel } from '../db/RegionWhiteList';
import { RewardInter } from './interface';
import { RoleType } from '../db/Role';
import { RoleCeModel } from '../db/RoleCe';
import { CalCe } from '../services/role/calCe';
const randomName = require("chinese-random-name");
const moment = require('moment');
const crypto = require('crypto');
@@ -564,17 +560,6 @@ export function mergeSameGoods(goods: Array<{ id: number, count: number }>) {
return resGoods;
}
export function returnHeroCeRatio(hero: HeroType) {
let ce = reduceCe(hero.ce);
return Object.assign(hero, { ce });
}
// 缩小战力
export function reduceCe(ce: number = 0) {
return Math.floor(ce / HERO_CE_RATIO / HERO_CE_RATIO)
}
// 获取全部属性
export function getAllAttrStage() {
let attrs = new Array<number>(); // 有升级的属性 1-hp 2-atk 3-def 4-mdef 5-agi 6-luk