属性:次级属性102特殊处理

This commit is contained in:
luying
2021-02-27 16:11:25 +08:00
parent 0966f025cf
commit 41f65eadd0
3 changed files with 15 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
// 物品表
import { decodeArrayListStr, readJsonFile, parseGoodStr } from '../util'
import { FILENAME, ABI_STAGE, ABI_TYPE_TO_STAGE, ABI_TYPE} from '../../consts'
import { FILENAME, ABI_TYPE} from '../../consts'
const _ = require('lodash');
export interface SpecialMaterial {

View File

@@ -2,7 +2,7 @@
* 体力系统
*/
import { HERO_SYSTEM_TYPE, ABI_TYPE } from '../consts';
import { HERO_SYSTEM_TYPE, ABI_TYPE, HERO_CE_RATIO, HERO_SUB_ATTR_RATIO } from '../consts';
import { deepCopy, getAllAttrStage, reduceCe } from './util';
import { HeroModel, HeroType, HeroUpdate } from '../db/Hero';
@@ -16,7 +16,6 @@ import { DicRandomEffectPool } from './dictionary/DicRandomEffectPool';
import { SchoolModel } from '../db/School';
import { ABI_TYPE_TO_STAGE, ABI_TYPE_MAIN } from '../consts/constModules/abilityConst'
import { PvpDefenseModel } from '../db/PvpDefense';
const HERO_CE_RATIO = 100;
import { findIndex } from 'underscore';
import { GuildModel } from '../db/Guild';
import { DicJob } from './dictionary/DicJob';
@@ -792,7 +791,11 @@ function addSeidEffect(heroAttrs: CeAttrData[], addSeidList: Array<number>, remo
if (type == SEID_TYPE.TYPE101) { // 加值
updateHeroAttr(heroAttrs, ability, { inc: {fixUp: value * multi * HERO_CE_RATIO} });
} else if (type == SEID_TYPE.TYPE102) { // 加百分比
updateHeroAttr(heroAttrs, ability, { inc: {ratioUp: value * multi} });
if(ABI_TYPE_MAIN.includes(ability)) {
updateHeroAttr(heroAttrs, ability, { inc: {ratioUp: value * multi} });
} else { // 次级属性102特殊处理
updateHeroAttr(heroAttrs, ability, { inc: {fixUp: value * multi * HERO_SUB_ATTR_RATIO } });
}
}
}
}