Merge branch 'second' of git.kingsome.cn:node/card_svr into second
This commit is contained in:
commit
631d352199
@ -467,6 +467,7 @@ export class BattleHandler {
|
|||||||
this.checkPets(this._cachePets);
|
this.checkPets(this._cachePets);
|
||||||
this._cachePets.length = 0;
|
this._cachePets.length = 0;
|
||||||
}, nt);
|
}, nt);
|
||||||
|
nt += 100;
|
||||||
}else{
|
}else{
|
||||||
this.onUpdatePets(this._cachePets, null);
|
this.onUpdatePets(this._cachePets, null);
|
||||||
this.checkPets(this._cachePets);
|
this.checkPets(this._cachePets);
|
||||||
|
@ -403,6 +403,10 @@ export class PetHandler {
|
|||||||
this._owner.onPetDied(this);
|
this._owner.onPetDied(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public canAttack(){
|
||||||
|
return this._bakTotalap? true: this.totalAP() > 0;
|
||||||
|
};
|
||||||
|
|
||||||
public attack(sk: Skill, apet: PetHandler, param: SkillParam, ev: number = 0, isAtkBack: boolean = false){
|
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, param);
|
||||||
|
|
||||||
|
@ -389,6 +389,10 @@ export class PlayerHandler {
|
|||||||
this._self && this._self.taunt();
|
this._self && this._self.taunt();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public canAttack(){
|
||||||
|
return this._self? this._self.canAttack(): false;
|
||||||
|
};
|
||||||
|
|
||||||
public canBeKill(subhp: number): boolean{
|
public canBeKill(subhp: number): boolean{
|
||||||
if(subhp >= 0){
|
if(subhp >= 0){
|
||||||
return false;
|
return false;
|
||||||
|
@ -348,7 +348,8 @@ export class Skill {
|
|||||||
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, param.edd_cnt, true);
|
this._data.release_timesmax, param.edd_cnt, true);
|
||||||
let sp;
|
let sp;
|
||||||
if(param.srcpet != this._petowner){
|
// if(param.srcpet != this._petowner){
|
||||||
|
if(false){
|
||||||
sp = param.clone();
|
sp = param.clone();
|
||||||
sp.srcpet = this._petowner;
|
sp.srcpet = this._petowner;
|
||||||
sp.srcplayer = sp.srcpet._owner;
|
sp.srcplayer = sp.srcpet._owner;
|
||||||
@ -690,6 +691,7 @@ export class Skill {
|
|||||||
let v = effvalue;
|
let v = effvalue;
|
||||||
let oldhp = tgt.dst.getHP();
|
let oldhp = tgt.dst.getHP();
|
||||||
let dst = tgt.dsttype == GameUnitType.PLAYER? (tgt.dst as PlayerHandler)._self: (tgt.dst as PetHandler);
|
let dst = tgt.dsttype == GameUnitType.PLAYER? (tgt.dst as PlayerHandler)._self: (tgt.dst as PetHandler);
|
||||||
|
// let n = obj.canAttack()? obj.attack(this, dst, param, v, isAtkBack): 1;
|
||||||
let n = obj.attack(this, dst, param, v, isAtkBack);
|
let n = obj.attack(this, dst, param, v, isAtkBack);
|
||||||
if(n <= 0){
|
if(n <= 0){
|
||||||
tgt.success(SkillEffectType.HURT_POWER, n);
|
tgt.success(SkillEffectType.HURT_POWER, n);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user