修订光环bug

This commit is contained in:
yuexin 2020-12-24 19:07:35 +08:00
parent ca0e03a8b3
commit 90d195bf70
2 changed files with 18 additions and 6 deletions

View File

@ -161,6 +161,7 @@ export class PetHandler {
for(let i = 0; i < count;i++){
let obj = this._owner.newSkill(skillid);
if(obj){
obj.setOrignParam(this._orignEffCnt, this._orignCardPoint);
this._skills.push(obj);
this._selfskills.push(skillid);
if(obj.isBornSkill()){

View File

@ -26,6 +26,10 @@ export class Skill {
halo_v: number = -1;
rd: number = 0;
_orign_effcnt: number = 0;
_orign_cardpt: number = 0;
private _subskill: Skill;
// LIFE-CYCLE CALLBACKS:
@ -199,16 +203,12 @@ export class Skill {
if(!this.isHaloSkill()){
return 0;
}
if(this.halo_v < 0){
this.halo_v = this.getEffValue();
}
this.checkHaloValue();
return this.halo_v;
};
addHaloValue(v: number): number{
if(this.halo_v < 0){
this.halo_v = this.getEffValue();
}
this.checkHaloValue();
if(this.halo_v > 0){
let tmp = this.halo_v;
this.halo_v += v;
@ -226,6 +226,12 @@ export class Skill {
this.halo_v = -1;
};
checkHaloValue(){
if(this.halo_v < 0){
this.halo_v = this.getEffValue(this._orign_effcnt, this._orign_cardpt);
}
};
_triggerSubSkill(param: SkillParam, sts: SkillTarget[], cb?: any){
if(this._data.quoteskillid && !this._subskill){
this._subskill = this._owner.newSkill(this._data.quoteskillid);
@ -598,6 +604,11 @@ export class Skill {
this._cb = cb;
};
setOrignParam(effcnt: number, cardpoint: number){
this._orign_effcnt = effcnt;
this._orign_cardpt = cardpoint;
};
isTotalCardSkill(){
return this._tgctrl._cond.isTempTotalCard();
};