Monster_10420201.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. 
  2. using XmdsCommonServer.XLS.Data;
  3. using XmdsCommonServer.Plugin;
  4. using XmdsCommonSkill.Plugin.Buffs;
  5. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  6. using CommonAI.Zone;
  7. using XmdsCommon.Plugin;
  8. using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
  9. using CommonLang;
  10. namespace XmdsCommonSkill.Plugin.Skills.Monster
  11. {
  12. /// <summary>
  13. /// 吸血巨蜂 - 蜂刺: 对目标发起,造成x倍魔攻伤害和额外y点魔法伤害。每次命中敌人会回复自身z%生命值.
  14. /// </summary>
  15. public class Monster_10420201 : XmdsSkillBase
  16. {
  17. public static int ID = 10420201;
  18. public static XmdsSkillValue DP_1;
  19. /// HP回复.
  20. public static XmdsSkillValue AddHPPercent;
  21. public override int SkillID { get { return ID; } }
  22. protected override void OnSkillDamagePerEvent(BattleParams param)
  23. {
  24. int ret = CalDamagePer(DP_1, param.GameSkill.SkillLevel);
  25. param.SkillDamagePer = ret;
  26. }
  27. protected override void OnSkillLogicEvent(BattleParams param)
  28. {
  29. // 立即回血.
  30. float percent = this.GetTargetFormulaValue(param.GameSkill.SkillLevel, AddHPPercent);
  31. int addHPValue = CUtils.CastInt(percent / XmdsDamageCalculator.PERER * param.Attacker.mUnit.MaxHP);
  32. param.Attacker.AddHP(addHPValue, param.Attacker.mUnit);
  33. }
  34. protected override void OnInitSkillParam()
  35. {
  36. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
  37. InitData(data, out DP_1, XmdsSkillData.XmdsSkillDataKey.DmgRate);
  38. InitData(data, out AddHPPercent, XmdsSkillData.XmdsSkillDataKey.ValueSet);
  39. }
  40. }
  41. }