🐞 fix(稷下学宫): 修改恢复hp时过滤hp为0的情况
This commit is contained in:
@@ -783,7 +783,8 @@ export class RougeHandler {
|
||||
let updateCharas: RougelikeCharaPara[] = [];
|
||||
|
||||
let hpRatio = await getRecoveryExtendHp(roleId, gameCode);
|
||||
for (let { gameCode, charaCode, charaId, cards, hp, maxHp = 0, ap, shield, roundSkill, apSkill } of dbCharas) {
|
||||
for (let { gameCode, charaCode, charaId, cards, hp = 0, maxHp = 0, ap, shield, roundSkill, apSkill } of dbCharas) {
|
||||
if (hp == 0) continue;
|
||||
let beforeHp = hp;
|
||||
hp = Math.floor(Math.min(hp + maxHp * ROUGELIKE.RECOVERY_RATIO / 100 + maxHp * hpRatio / 100, maxHp));
|
||||
updateCharas.push({ gameCode, charaCode, hp });
|
||||
|
||||
Reference in New Issue
Block a user