修订返回值
This commit is contained in:
parent
82f0a7d79e
commit
1f5697bdd2
@ -244,9 +244,11 @@ export class PetHandler {
|
||||
|
||||
let n = -value;
|
||||
|
||||
let hv = 0;
|
||||
for( let [k, v] of this._effhalos){
|
||||
if(v > 0){
|
||||
n += v;
|
||||
hv -= v;
|
||||
if(n >= 0){
|
||||
this._effhalos.set(k, n);
|
||||
break;
|
||||
@ -261,7 +263,7 @@ export class PetHandler {
|
||||
return -value;
|
||||
}
|
||||
|
||||
return this.addBaseAP(n, from);
|
||||
return hv + this.addBaseAP(n, from);
|
||||
};
|
||||
|
||||
public addBaseAP(value: number, from: PetHandler): number{
|
||||
@ -284,6 +286,7 @@ export class PetHandler {
|
||||
this.dataChanged(from);
|
||||
this.addHP(tmp, from);
|
||||
}else{
|
||||
this._baseap = 0;
|
||||
this.dataChanged(from);
|
||||
this.die();
|
||||
}
|
||||
|
@ -322,9 +322,9 @@ export class Skill {
|
||||
};
|
||||
|
||||
_real_trigger(param: SkillParam, cb?: any) {
|
||||
if(!this._sts){
|
||||
this._sts = this.getTargets(param);
|
||||
}
|
||||
// if(!this._sts){
|
||||
// this._sts = this.getTargets(param);
|
||||
// }
|
||||
|
||||
let res = TriggerManager.onTrigger(this, param, this._sts);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user