add check interface

This commit is contained in:
yuexin 2020-12-03 20:39:31 +08:00
parent 7558e992fa
commit 7bcf1b67c2
4 changed files with 45 additions and 2 deletions

View File

@ -44,7 +44,6 @@ export class BattleHandler {
}; };
/** /**
* 使 * 使
* @param obj * @param obj
@ -81,6 +80,15 @@ export class BattleHandler {
}; };
/**
*
* @param aplayer
*/
public hasTransEffCardSkill(aplayer: Player): boolean{
let ph = this.getPlayer(aplayer);
return ph && ph.hasTransEffCardSkill();
};
/** /**
* / * /
* @param aplayer : 玩家 * @param aplayer : 玩家

View File

@ -139,5 +139,20 @@ export class PlayerHandler {
public isMyPet(apet: PetHandler){ public isMyPet(apet: PetHandler){
return this._pets.includes(apet); return this._pets.includes(apet);
};
public hasTransEffCardSkill(): boolean{
if(!this._self){
return false;
}
let bok = false;
for(let [key, val] of this._self._skills){
if(val.isTransEffCardSkill()){
bok = true;
break;
} }
} }
return bok;
};
}

View File

@ -115,6 +115,10 @@ export class Skill {
return this._data.effect_typeid == SkillEffectType.TAUNT; return this._data.effect_typeid == SkillEffectType.TAUNT;
}; };
isTransEffCardSkill(){
return this._data.effect_typeid == SkillEffectType.CARD_CHG_EN;
};
// 是否是稀有技能 // 是否是稀有技能
isRareSkill() { isRareSkill() {
return false; return false;

View File

@ -70,6 +70,22 @@ export const enum SkillRangeUnitType{
}; };
// 技能效果类型 // 技能效果类型
/**
* 0.
* 1.
* 2.
* 3.
* 4.
* 5.HP性质的战力
* 6.
* 7.
* 8.ID
* 9.ID
* 10.
* 11.HP
* 12.
* 13.
*/
export const enum SkillEffectType export const enum SkillEffectType
{ {
NONE = 0, NONE = 0,