修订光环不起效问题
This commit is contained in:
parent
9a9b144580
commit
e1cbcf3789
@ -544,13 +544,11 @@ export class BattleHandler {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.beginFlow('onCardLinkReady');
|
this.beginFlow('onCardLinkReady');
|
||||||
|
|
||||||
ph.onCardLinkReady(fromph);
|
ph.onCardLinkReady(fromph);
|
||||||
|
|
||||||
// return this.endFlow('onCardLinkReady');
|
return this.endFlow('onCardLinkReady');
|
||||||
|
|
||||||
return 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -517,7 +517,7 @@ export class PetHandler {
|
|||||||
public addEffHalo(apet: PetHandler): boolean{
|
public addEffHalo(apet: PetHandler): boolean{
|
||||||
let bok = false;
|
let bok = false;
|
||||||
this._halos.forEach((item: Skill)=>{
|
this._halos.forEach((item: Skill)=>{
|
||||||
if(item.isEffSelfPet(this, apet)){
|
if(item.canEffect(this, apet)){
|
||||||
if(item.isAPHaloSkill()){
|
if(item.isAPHaloSkill()){
|
||||||
bok = true;
|
bok = true;
|
||||||
if(apet._addEffHalo(item)){
|
if(apet._addEffHalo(item)){
|
||||||
|
@ -134,7 +134,7 @@ export class Skill {
|
|||||||
return this._data.rangeid == SkillRangeUnitType.ALL;
|
return this._data.rangeid == SkillRangeUnitType.ALL;
|
||||||
};
|
};
|
||||||
|
|
||||||
isInRange(srcpet: PetHandler, dstpet: PetHandler){
|
isInRange(srcpet: PetHandler, dstpet: PetHandler, exself: boolean){
|
||||||
switch(this._data.rangeid){
|
switch(this._data.rangeid){
|
||||||
case SkillRangeUnitType.SELF:
|
case SkillRangeUnitType.SELF:
|
||||||
return srcpet == dstpet;
|
return srcpet == dstpet;
|
||||||
@ -145,28 +145,40 @@ export class Skill {
|
|||||||
case SkillRangeUnitType.ALL:
|
case SkillRangeUnitType.ALL:
|
||||||
return true;
|
return true;
|
||||||
case SkillRangeUnitType.ALL_EXSELF:
|
case SkillRangeUnitType.ALL_EXSELF:
|
||||||
|
case SkillRangeUnitType.RANDOM_ONE_EXSELF:
|
||||||
return srcpet != dstpet;
|
return srcpet != dstpet;
|
||||||
|
case SkillRangeUnitType.RANDOM_ONE:
|
||||||
|
return !!dstpet;
|
||||||
|
case SkillRangeUnitType.OWNER:
|
||||||
|
return dstpet == this._petowner;
|
||||||
|
case SkillRangeUnitType.ALL_EXOWNER:
|
||||||
|
case SkillRangeUnitType.RANDOM_ONE_EXOWNER:
|
||||||
|
return dstpet != this._petowner;
|
||||||
|
case SkillRangeUnitType.MAXAP_ONE:
|
||||||
|
return dstpet == this._owner.getMaxAPPet(exself);
|
||||||
|
case SkillRangeUnitType.MINAP_ONE:
|
||||||
|
return dstpet == this._owner.getMinAPPet(exself);
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 是否能影响自己
|
// 技能光环是否能影响dst
|
||||||
isEffSelfPet(srcpet: PetHandler, dstpet: PetHandler){
|
canEffect(srcpet: PetHandler, dstpet: PetHandler){
|
||||||
if(this._data.friendlyid != GameCampType.SELF){
|
if(this._data.friendlyid != GameCampType.SELF){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let tgok = false;
|
let tgok = false;
|
||||||
switch(this._data.targetid){
|
switch(this._data.targetid){
|
||||||
case GameUnitType.BATTLEUNIT:
|
case GameUnitType.BATTLEUNIT:
|
||||||
tgok = this.isInRange(srcpet, dstpet);
|
tgok = this.isInRange(srcpet, dstpet, false);
|
||||||
break;
|
break;
|
||||||
case GameUnitType.HERO:
|
case GameUnitType.HERO:
|
||||||
tgok = dstpet._isHero;
|
tgok = dstpet._isHero;
|
||||||
break;
|
break;
|
||||||
case GameUnitType.PET:
|
case GameUnitType.PET:
|
||||||
if(!dstpet._isHero){
|
if(!dstpet._isHero){
|
||||||
tgok = this.isInRange(srcpet, dstpet);
|
tgok = this.isInRange(srcpet, dstpet, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user