🐞 fix(gvg): 修复打败了对手反而加血的bug

This commit is contained in:
luying
2023-02-24 10:55:03 +08:00
parent 724b0ee485
commit 1c0661ed24
2 changed files with 3 additions and 2 deletions
@@ -534,7 +534,8 @@ export class GVGBattleHandler {
let city = await GVGCityModel.findByCityId(configId, groupKey, cityId);
if (!city) return resResult(STATUS.GVG_CITY_NOT_FOUND);
defenseTeam = await GVGTeamModel.battleEndDefense(oppoTeamCode, await getTechKnifeHurt(configId, attackTeam.leagueCode), getBirthAreaOfCity(city, defenseTeam.leagueCode), await getTechReviveMinus(configId, defenseTeam.leagueCode));
let hurt = await getTechKnifeHurt(configId, attackTeam.leagueCode);
defenseTeam = await GVGTeamModel.battleEndDefense(oppoTeamCode, -hurt, getBirthAreaOfCity(city, defenseTeam.leagueCode), await getTechReviveMinus(configId, defenseTeam.leagueCode));
if(defenseTeam.curTeamBreak && defenseTeam.originPointId > 0) { // 打败的对手原来占领着一个位置,现在这个位置是你的了
if(!attackTeam.curTeamBreak) {
attackTeam = await GVGTeamModel.settlePoint(attackTeam.teamCode, defenseTeam.originPointId);