mirror of
https://github.com/motajs/template.git
synced 2026-11-16 17:04:31 +08:00
chore: 调整勇士属性接口
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user