pvp:战力fix

This commit is contained in:
luying
2021-02-26 11:55:54 +08:00
parent 56efab8cb7
commit e80818e660
3 changed files with 6 additions and 5 deletions

View File

@@ -50,7 +50,7 @@ export async function initPvpInfo(role: RoleType) {
}
export async function checkPvp(role: RoleType) {
let result = await PvpDefenseModel.findByRoleId(role.roleId);
let result = await PvpDefenseModel.findByRoleId(role.roleId, true);
if (!!result)
return result;
result = await initPvpInfo(role);
@@ -495,7 +495,7 @@ export function getRobotAttribute(attribute: Attributes, ce: number, enemyCe: nu
let newAttribute = new CeAttrNumber();
for(let attrName in newAttribute) {
newAttribute[attrName] = Math.floor(attribute[attrName] * reduceCe(ce) / enemyCe * ratio);
newAttribute[attrName] = Math.floor(attribute[attrName] * ce / enemyCe * ratio);
}
newAttribute['speed'] = 0;
newAttribute['ap'] = 0;