xy-server/game/skill/pet/piZeBaFang.ts
2025-04-23 09:34:08 +08:00

44 lines
1.7 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import GameUtil from "../../core/GameUtil";
import SkillBase from "../core/SkillBase";
import SKDataUtil from "../../gear/SKDataUtil";
import Buff from "../../skill/core/Buff";
import SkillUtil from "../../skill/core/SkillUtil";
import SKLogger from "../../gear/SKLogger";
import {ESkillType,EActionOn, EMagicType,EBuffType, EActionType, ESkillQuality} from "../../../game/role/EEnum";
//泽披八方
export default class piZeBaFang extends SkillBase {
constructor() {
super();
this.skill_id = ESkillType.piZeBaFang;
this.skill_name = '泽披八方';
this.skill_type = EMagicType.DEFENSE;
this.action_type = EActionType.INITIATIVE;
this.kind = ESkillType.piZeBaFang;
this.quality = ESkillQuality.HIGH;
this.act_on = EActionOn.SELF;// 技能作用于 0 all 1 敌人 2 自己人
this.buff_type = EBuffType.LOOP;
}
getEffect(params:any=null):any{
let level = params.level || 0;
let relive = params.relive || 0;
let qinmi = params.qinmi || 0;
let cure = params.cure || 0;
let maxhp = params.maxhp || 0;
let profic = params.profic || 0;
let nilin = params.nilin || 0;
let ret = SKDataUtil.clone(GameUtil.skillEffect);
let addkongzhi = Math.floor(60 * level * (profic ** 0.4 * 2.8853998 / 200 + 1));
SKLogger.debug('召唤兽控制抗性+ '+Math.floor(60 * level * (profic ** 0.4 * 2.8853998 / 200 + 1)))
ret.round = 3;//持续3回合
ret.cnt = 3;//给己方3个非死亡单位施加庇护状态
if(nilin > 0){
ret.cnt = 8;
ret.kongzhi = addkongzhi+addkongzhi*cure/100+maxhp/10 + 10000;
}else{
ret.kongzhi = addkongzhi+addkongzhi*cure/100+maxhp/10;
}
return ret;
}
}