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