Skill_910160.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using CommonAI.Data;
  2. using CommonAI.Zone;
  3. using CommonAI.Zone.Helper;
  4. using CommonAI.Zone.Instance;
  5. using CommonLang;
  6. using System;
  7. using XmdsCommon.Plugin;
  8. using XmdsCommonServer.Plugin;
  9. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  10. using XmdsCommonServer.XLS.Data;
  11. using XmdsCommonSkill.Plugin.Buffs;
  12. using XmdsCommonSkill.Plugin.PassiveSkills.Magic;
  13. using static CommonAI.Zone.Instance.InstanceUnit;
  14. using static XmdsCommonSkill.Plugin.Buffs.XmdsBuff_SwordShadow;
  15. using static XmdsCommonSkill.Plugin.Skills.XmdsSummonBase;
  16. namespace XmdsCommonSkill.Plugin.Skills.Magic
  17. {
  18. /// <summary>
  19. /// 自爆(配置在死亡时。策划自配 新法术技能ID 范围一次性伤害扣除玩家百分比血量,值填表
  20. /// </summary>
  21. public class Skill_910160 : XmdsSummonBase_ActiveSkill
  22. {
  23. public static readonly int ID = 910160;
  24. public override int SkillID { get { return ID; } }
  25. public static XmdsSkillValue deadDmg; //锁定玩家时间
  26. protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
  27. {
  28. unit.RegistLaunchSkillOver(OnLaunchSkillOver, info);
  29. }
  30. private int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual attacker, CommonAI.Zone.Instance.InstanceUnit.SkillState state)
  31. {
  32. base.summonModule.SummonUnit(attacker);
  33. return 0;
  34. }
  35. protected override bool OnSkillFinalDamageModifyEvent(BattleParams param)
  36. {
  37. param.HitDamge = CUtils.CastInt(param.Hitter.MirrorProp.MaxHP * XmdsUnitProp.PER * deadDmg.GetValue());
  38. return true;
  39. }
  40. protected override void OnInitConfig()
  41. {
  42. XmdsSkillData data = base.InitSummonConfig(SummonType.guardMaster);
  43. // 独有数据
  44. InitData(data, out deadDmg, XmdsSkillData.XmdsSkillDataKey.ValueSet4);
  45. }
  46. }
  47. }