using XmdsCommonServer.XLS.Data; using XmdsCommonServer.Plugin; using XmdsCommonSkill.Plugin.Buffs; using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills; using CommonAI.Zone; using XmdsCommon.Plugin; using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator; using CommonLang; namespace XmdsCommonSkill.Plugin.Skills.Monster { /// /// 吸血巨蜂 - 蜂刺: 对目标发起,造成x倍魔攻伤害和额外y点魔法伤害。每次命中敌人会回复自身z%生命值. /// public class Monster_10420201 : XmdsSkillBase { public static int ID = 10420201; public static XmdsSkillValue DP_1; /// HP回复. public static XmdsSkillValue AddHPPercent; public override int SkillID { get { return ID; } } protected override void OnSkillDamagePerEvent(BattleParams param) { int ret = CalDamagePer(DP_1, param.GameSkill.SkillLevel); param.SkillDamagePer = ret; } protected override void OnSkillLogicEvent(BattleParams param) { // 立即回血. float percent = this.GetTargetFormulaValue(param.GameSkill.SkillLevel, AddHPPercent); int addHPValue = CUtils.CastInt(percent / XmdsDamageCalculator.PERER * param.Attacker.mUnit.MaxHP); param.Attacker.AddHP(addHPValue, param.Attacker.mUnit); } protected override void OnInitSkillParam() { XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID); InitData(data, out DP_1, XmdsSkillData.XmdsSkillDataKey.DmgRate); InitData(data, out AddHPPercent, XmdsSkillData.XmdsSkillDataKey.ValueSet); } } }