xy-server/game/skill/low/HenYvFeiFei.ts

40 lines
1.5 KiB
TypeScript
Raw Permalink Normal View History

2025-04-23 09:34:08 +08:00
import GameUtil from "../../../game/core/GameUtil";
import { ESkillType, EMagicType, EActionType, EBuffType, ESkillQuality } from "../../../game/role/EEnum";
import SKDataUtil from "../../gear/SKDataUtil";
import SkillBase from "../core/SkillBase";
// 恨雨霏霏
export default class HenYvFeiFei extends SkillBase {
constructor() {
super();
this.skill_id = ESkillType.HenYvFeiFei;
this.skill_name = '恨雨霏霏';
this.skill_type = EMagicType.WATER;
this.action_type = EActionType.INITIATIVE;
this.buff_type = EBuffType.ONCE;
this.kind = ESkillType.HenYvFeiFei;
this.quality = ESkillQuality.HIGH;
}
getEffect(params: any = null): any {
let level = params.level || 0;
let relive = params.relive || 0;
let qinmi = params.qinmi || 0;
let maxmp = params.maxmp || 0;
let ret = SKDataUtil.clone(GameUtil.skillEffect);
let cnt = 3;
/**
* 70%
* 80% 50%
*/
let rate = qinmi / 10000000;
let rand = SKDataUtil.random(0, 100);
if (rate >= 0.8 && rate * 40 >= rand) {
cnt = 4;
}
ret.hurt = Math.floor(80 * level + maxmp / 100 * 9 * (relive * 0.9 + 1) * (Math.pow(level,0.4) / 10 + Math.pow(qinmi,0.166666666666666666) * 10 / (100 + relive * 20)));
ret.cnt = cnt;
return ret;
}
}