技能修复
This commit is contained in:
parent
e1cbcf3789
commit
add941c9ce
@ -259,12 +259,12 @@ export class Skill {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_triggerSubSkill(param: SkillParam, sts: SkillTarget[], cb?: any){
|
_triggerSubSkill(skillid: number, sk: Skill, param: SkillParam, sts: SkillTarget[], cb?: any){
|
||||||
if(this._data.quoteskillid && !this._subskill){
|
if(skillid && !sk){
|
||||||
this._subskill = this._owner.newSkill(this._data.quoteskillid);
|
sk = this._owner.newSkill(this._data.quoteskillid);
|
||||||
this._subskill.setOrignParam(this._orign_effcnt, this._orign_cardpt, this._sender, this._petowner);
|
sk.setOrignParam(this._orign_effcnt, this._orign_cardpt, this._sender, this._petowner);
|
||||||
}
|
}
|
||||||
if(this._subskill){
|
if(sk){
|
||||||
let pl = [];
|
let pl = [];
|
||||||
let bst = false;
|
let bst = false;
|
||||||
switch(this._data.skill_usersid){
|
switch(this._data.skill_usersid){
|
||||||
@ -311,7 +311,7 @@ export class Skill {
|
|||||||
for(let j = 0; j < pl.length; j++){
|
for(let j = 0; j < pl.length; j++){
|
||||||
let sp = pl[j];
|
let sp = pl[j];
|
||||||
let st = bst? sts[j]: null;
|
let st = bst? sts[j]: null;
|
||||||
this._subskill._trigger(sp, cb, st);
|
sk._trigger(sp, cb, st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@ export class Skill {
|
|||||||
|
|
||||||
this._cb && this._cb(this, param, res);
|
this._cb && this._cb(this, param, res);
|
||||||
|
|
||||||
this._triggerSubSkill(param, res, cb);
|
this._triggerSubSkill(this._data.quoteskillid, this._subskill, param, res, cb);
|
||||||
};
|
};
|
||||||
|
|
||||||
trigger(param: SkillParam, cb?: any) {
|
trigger(param: SkillParam, cb?: any) {
|
||||||
@ -693,7 +693,7 @@ export class Skill {
|
|||||||
let v = effvalue;
|
let v = effvalue;
|
||||||
let oldhp = tgt.dst.getHP();
|
let oldhp = tgt.dst.getHP();
|
||||||
let n = obj.attack(this, (tgt.dst as PetHandler), param, v, isAtkBack);
|
let n = obj.attack(this, (tgt.dst as PetHandler), param, v, isAtkBack);
|
||||||
if(n <= 0){
|
{
|
||||||
tgt.success(efftype, n);
|
tgt.success(efftype, n);
|
||||||
// if(this._data.quoteskillid){
|
// if(this._data.quoteskillid){
|
||||||
// let dp = this._data.skill_users? param.oppClone(): param;
|
// let dp = this._data.skill_users? param.oppClone(): param;
|
||||||
@ -716,8 +716,6 @@ export class Skill {
|
|||||||
tgt.success(SkillEffectType.HURT_POWER, sv, true);
|
tgt.success(SkillEffectType.HURT_POWER, sv, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
tgt.fail(efftype, -1);
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
tgt.fail(efftype, -1);
|
tgt.fail(efftype, -1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user