修订目标问题
This commit is contained in:
parent
4b0b8850fd
commit
11dad2c3ed
@ -179,11 +179,10 @@ export class PetHandler {
|
|||||||
obj.setOrignParam(eddcnt < 0? this._orignEffCnt: eddcnt, cp < 0? this._orignCardPoint: cp, from? from: this, this, tgtflag);
|
obj.setOrignParam(eddcnt < 0? this._orignEffCnt: eddcnt, cp < 0? this._orignCardPoint: cp, from? from: this, this, tgtflag);
|
||||||
let bkeep = true;
|
let bkeep = true;
|
||||||
if(obj.isBornSkill()){
|
if(obj.isBornSkill()){
|
||||||
if(from && from != this){
|
if(!from || from == this){
|
||||||
bkeep = false; // 一次性技能使用
|
|
||||||
}else{
|
|
||||||
this._bornSkills.push(obj);
|
this._bornSkills.push(obj);
|
||||||
}
|
}
|
||||||
|
bkeep = false; // 一次性技能使用
|
||||||
}else if(obj.isDieSkill()){
|
}else if(obj.isDieSkill()){
|
||||||
this._dieSkills.push(obj);
|
this._dieSkills.push(obj);
|
||||||
}else if(obj.isAPHaloSkill() || obj.isBuffHaloSkill()){
|
}else if(obj.isAPHaloSkill() || obj.isBuffHaloSkill()){
|
||||||
|
@ -233,9 +233,7 @@ export class Skill {
|
|||||||
|
|
||||||
setTargets(tgt: SkillTarget[]){
|
setTargets(tgt: SkillTarget[]){
|
||||||
// todo:是否需要拷贝
|
// todo:是否需要拷贝
|
||||||
if(tgt && tgt.length > 0){
|
|
||||||
this._sts = tgt;
|
this._sts = tgt;
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
getQuoteValue(count: number, maxcount: number, effcount: number){
|
getQuoteValue(count: number, maxcount: number, effcount: number){
|
||||||
@ -321,12 +319,11 @@ export class Skill {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_real_trigger(ncount: number, param: SkillParam, cb?: any) {
|
_real_trigger(param: SkillParam, cb?: any) {
|
||||||
if(!this._sts){
|
if(!this._sts){
|
||||||
this._sts = this.getTargets(param);
|
this._sts = this.getTargets(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let i=0; i<ncount;i++){
|
|
||||||
let res = TriggerManager.onTrigger(this, param, this._sts);
|
let res = TriggerManager.onTrigger(this, param, this._sts);
|
||||||
|
|
||||||
this._currCount++;
|
this._currCount++;
|
||||||
@ -338,19 +335,21 @@ export class Skill {
|
|||||||
cb && cb(this, param, res);
|
cb && cb(this, param, res);
|
||||||
|
|
||||||
this._cb && this._cb(this, param, res);
|
this._cb && this._cb(this, param, res);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
trigger(param: SkillParam, cb?: any) {
|
trigger(param: SkillParam, cb?: any) {
|
||||||
if(!this._sts){
|
let bnormal = !this._sts;
|
||||||
this._sts = this.getTargets(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!this.isSummonSkill()){
|
|
||||||
let ncount = this.getFinalValue(EnhanceCustomType.RELEASE_TIMES, this._data.release_times,
|
let ncount = this.getFinalValue(EnhanceCustomType.RELEASE_TIMES, this._data.release_times,
|
||||||
this._data.release_timesmax, this._orign_effcnt, true);
|
this._data.release_timesmax, this._orign_effcnt, true);
|
||||||
|
|
||||||
this._real_trigger(ncount, param, cb);
|
for(let i = 0; i < ncount; i++){
|
||||||
|
if(bnormal){
|
||||||
|
this.setTargets(this.getTargets(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!this.isSummonSkill()){
|
||||||
|
this._real_trigger(param, cb);
|
||||||
|
|
||||||
this._triggerSubSkill(this._subskill, this._data.quoteskillid, this._data.skill_usersid,
|
this._triggerSubSkill(this._subskill, this._data.quoteskillid, this._data.skill_usersid,
|
||||||
this._data.quoteskill_times, this._data.quoteskill_timesmax, param, this._sts, cb);
|
this._data.quoteskill_times, this._data.quoteskill_timesmax, param, this._sts, cb);
|
||||||
@ -364,11 +363,11 @@ export class Skill {
|
|||||||
this._triggerSubSkill(this._subskill2, this._data.quoteskill2id, this._data.skill2_usersid,
|
this._triggerSubSkill(this._subskill2, this._data.quoteskill2id, this._data.skill2_usersid,
|
||||||
this._data.quoteskill2_times, this._data.quoteskill2_timesmax, param, this._sts, cb);
|
this._data.quoteskill2_times, this._data.quoteskill2_timesmax, param, this._sts, cb);
|
||||||
|
|
||||||
let ncount = this.getFinalValue(EnhanceCustomType.RELEASE_TIMES, this._data.release_times,
|
this._real_trigger(param, cb);
|
||||||
this._data.release_timesmax, this._orign_effcnt, true);
|
|
||||||
|
|
||||||
this._real_trigger(ncount, param, cb);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setTargets(null);
|
||||||
};
|
};
|
||||||
|
|
||||||
checkTrigger(tg_type: TriggerType, tg_value: PlayerHandler, tg_target: SkillParam, cb?: any) {
|
checkTrigger(tg_type: TriggerType, tg_value: PlayerHandler, tg_target: SkillParam, cb?: any) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user