导表+修订bug

This commit is contained in:
yuexin 2021-01-18 16:51:55 +08:00
parent d405675fc0
commit 03bec8ce6f
5 changed files with 13 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -938,8 +938,11 @@ export class BattleHandler {
nstart = natk + 1;
let atkobj = skillres[natk];
let natkbk = __indexOfAttackBk(nstart, atkobj);
if(natkbk){
if(natkbk >= 0){
let atkbkobj = skillres[natkbk];
if(!atkbkobj){
console.log('[error find attakbk]'+natkbk);
}
atkbkobj.res && atkbkobj.res.forEach((item: SkillResult) => {
if(item.bsuccess){
if(item.effect_type == SkillEffectType.CHG_AP || item.effect_type == SkillEffectType.CHG_HP){
@ -1008,7 +1011,7 @@ export class BattleHandler {
};
public onPlayerAddHPNotify(aplayer: PlayerHandler, addhp: number, from: PlayerHandler){
return this._room.updateHp(aplayer.getId(), addhp, from? from.getId(): null);
return this._room.updateHp(aplayer.getId(), addhp, '', from? from.getId(): null);
};
//end------------------------------------------------

View File

@ -400,7 +400,7 @@ export class PetHandler {
};
public attack(sk: Skill, apet: PetHandler, param: SkillParam, ev: number = 0, isAtkBack: boolean = false){
!isAtkBack && this._owner.onAttackBefore(this, param);
!isAtkBack && this._owner.onAttackBefore(this, apet, param);
// let myap = this.totalAP();
// myap += myap*ev;
@ -418,7 +418,7 @@ export class PetHandler {
let n = apet.beHurt(myap, this);
!isAtkBack && this._owner.onAttackAfter(apet, param);
!isAtkBack && this._owner.onAttackAfter(this, apet, param);
let nowap = apet.totalAP();

View File

@ -541,12 +541,12 @@ export class PlayerHandler {
this._owner.onUpdatePetsNotify(lst, apet);
};
public onAttackBefore(apet: PetHandler, sp?: SkillParam){
this.singleCheckSkills(apet, TriggerType.BEFORE_ATTACK, null, sp);
public onAttackBefore(apet: PetHandler, dstpet: PetHandler, sp?: SkillParam){
this.singleCheckSkills(apet, TriggerType.BEFORE_ATTACK, dstpet? dstpet._owner: null, sp);
};
public onAttackAfter(apet: PetHandler, sp?: SkillParam){
this.singleCheckSkills(apet, TriggerType.AFTER_ATTACK, null, sp);
public onAttackAfter(apet: PetHandler, dstpet: PetHandler, sp?: SkillParam){
this.singleCheckSkills(apet, TriggerType.AFTER_ATTACK, dstpet? dstpet._owner: null, sp);
};
// 暂不用