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; } }