修订光环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++){ for(let i = 0; i < count;i++){
let obj = this._owner.newSkill(skillid); let obj = this._owner.newSkill(skillid);
if(obj){ if(obj){
obj.setOrignParam(this._orignEffCnt, this._orignCardPoint);
this._skills.push(obj); this._skills.push(obj);
this._selfskills.push(skillid); this._selfskills.push(skillid);
if(obj.isBornSkill()){ if(obj.isBornSkill()){

View File

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