修复不死问题
This commit is contained in:
parent
92841345c7
commit
ad82682852
@ -498,8 +498,6 @@ export class BattleHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sp.srcplayer && sp.srcplayer.onUseCardEnd(sp);
|
sp.srcplayer && sp.srcplayer.onUseCardEnd(sp);
|
||||||
|
|
||||||
this.checkPets();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -548,6 +546,7 @@ export class BattleHandler {
|
|||||||
public onPlayerRoundEnd(aplayer: Player){
|
public onPlayerRoundEnd(aplayer: Player){
|
||||||
let ph = this.getPlayer(aplayer);
|
let ph = this.getPlayer(aplayer);
|
||||||
ph && ph.onRoundEnd();
|
ph && ph.onRoundEnd();
|
||||||
|
this.checkPets();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -262,6 +262,7 @@ export class PetHandler {
|
|||||||
this.dataChanged();
|
this.dataChanged();
|
||||||
this.addHP(tmp);
|
this.addHP(tmp);
|
||||||
}else{
|
}else{
|
||||||
|
this.dataChanged();
|
||||||
this.die();
|
this.die();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
@ -658,7 +658,7 @@ export class PlayerHandler {
|
|||||||
};
|
};
|
||||||
|
|
||||||
checkPets(breset: boolean = false){
|
checkPets(breset: boolean = false){
|
||||||
for(let i = this._pets.length - 1; i > 0; i--){
|
for(let i = this._pets.length - 1; i >= 0; i--){
|
||||||
let pet = this._pets[i];
|
let pet = this._pets[i];
|
||||||
if(pet && !pet.isAlive()){
|
if(pet && !pet.isAlive()){
|
||||||
this.delPet(pet);
|
this.delPet(pet);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user