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

48 lines
2.1 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 { ESkillType,EBuffType,EActionOn, EActionType, EAttrTypeL1, ESkillQuality } from "../../role/EEnum";
import SkillBase from "../core/SkillBase";
//技能效果受到大于自身气血上限50%的伤害时若自身处于被控制状态有几率触发“振羽”解除自身被控制状态若未处于被控制状态则有几率触发“惊雷”对目标使用仙法时将触发惊雷伤害最多不超过自身法力上限的75%。
export default class ZhenYuJIngLei extends SkillBase {
constructor() {
super();
this.skill_id = ESkillType.ZhenYuJIngLei;
this.skill_name = '振羽惊雷';
this.action_type = EActionType.PASSIVE;
this.effectMap = {
[EAttrTypeL1.FASHUDUOSHAN]: { add: 0 },
// [EAttrTypeL1.PHY_DEADLY]: { add: 0 }
};
/**Buff类型无buff/循环伤害/一次计算 */
this.buff_type = EBuffType.ONCE;
/**效果字典 */
// this.effectMap = {};
/** 技能类型*/
this.kind = ESkillType.ZhenYuJIngLei;
/** 技能 品质*/
this.quality = ESkillQuality.SHEN;
/** 技能冷却时间*/
// this.cooldown = 0; // 技能冷却时间
/**技能回合限制 前几回合不能用 */
// this.limit_round = 0; // 技能回合限制 前几回合不能用
/** 技能限制使用次数*/
// this.limit_times = 0;// 技能限制使用次数
/** 技能作用于 0 all 1 敌人 2 自己人*/
this.act_on = EActionOn.SELF;// 技能作用于 0 all 1 敌人 2 自己人
}
//召唤兽计算被动计算传入type,level,relive,qinmi//提升召唤兽法术闪躲属性,亲密等级越高,法术躲闪越高
getEffect(params: any = null): any {
let level = params.level || 0;
let relive = params.relive || 0;
let qinmi = params.qinmi || 0;
let ret: any = {};
ret.add = Math.round(0.1 + 4 * (relive * 0.4 + 1) * (level ** 0.5 / 10 + qinmi ** 0.1666667 * 10 / (100 + relive * 20)));
return ret;
}
}