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

45 lines
1.4 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,EBuffType, EMagicType,EAttrTypeL1, EActionType, ESkillQuality} from "../../../game/role/EEnum";
//荼蘼花开
export default class ChaMiHuaKai extends SkillBase {
constructor() {
super();
this.skill_id = ESkillType.ChaMiHuaKai;
this.skill_name = '荼蘼花开';
this.skill_type = EMagicType.PHYSICS;
this.action_type = EActionType.INITIATIVE;
this.kind = ESkillType.ChaMiHuaKai;
this.quality = ESkillQuality.HIGH;
this.act_on = EActionOn.ENEMY;// 技能作用于 0 all 1 敌人 2 自己人
this.buff_type = EBuffType.LOOP;
}
getEffect(params:any=null):any{
let ret = SKDataUtil.clone(GameUtil.skillEffect);
let level = params.level || 0;
let relive = params.relive || 0;
let qinmi = params.qinmi || 0;
let profic = params.profic || 0;
let du = params.du || 0;
let xianhurt = Math.floor(60 * level * (profic ** 0.4 * 2.5853998 / 100 + 1));
let hurt = Math.floor(xianhurt / 3) + (xianhurt * 0.1);
ret.hurt = hurt;
ret.attrtype = EAttrTypeL1.ATK_ADD;
ret.round = 2;//种下荼蘼花种持续2回合
ret.cnt = SKDataUtil.random(2,3);//对敌方随机2~3个目标造成物理伤害
return ret;
}
}