chore: 调整勇士属性接口

This commit is contained in:
AncTe committed 2026-06-19 01:21:03 +08:00
1 parent 566ffc586a
commit 02bf39a62d
4 files changed
+37 -10

No files matched your search

@@ -215,7 +215,7 @@ export class DamageContext<TEnemy, THero> implements IDamageContext<
let left = currentValue;
let right = upperLimit;
hero.setBaseAttribute(attribute, right as THero[typeof attribute]);
hero.set(attribute, right as THero[typeof attribute]);
let targetInfo = this.calculator!.calculate(handler);
if (targetInfo.damage >= referenceDamage) return null;
@@ -223,7 +223,7 @@ export class DamageContext<TEnemy, THero> implements IDamageContext<
let iter = 0;
while (iter++ < maxIterations) {
const middle = Math.floor((left + right) / 2);
hero.setBaseAttribute(attribute, middle as THero[typeof attribute]);
hero.set(attribute, middle as THero[typeof attribute]);
const middleInfo = this.calculator!.calculate(handler);
if (middleInfo.damage < referenceDamage) {