123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using System;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- using XmdsCommonSkill.Plugin.PassiveSkills.Magic;
- using static CommonAI.Zone.Instance.InstanceUnit;
- using static XmdsCommonSkill.Plugin.Buffs.XmdsBuff_SwordShadow;
- namespace XmdsCommonSkill.Plugin.Skills.Magic
- {
- /// <summary>
- /// 一次性范围控制伤害技能(新法术技能ID 可配置控制持续时间,效果类似法师4技能的压制)
- /// </summary>
- public class Skill_910150 : XmdsSkillBase
- {
- public static readonly int ID = 910150;
- public override int SkillID { get { return ID; } }
- public static XmdsSkillValue dmg; // 伤害
- public static XmdsSkillValue lockTime; // 沉默时间
- private static readonly int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.COM_SLIENT;
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- // Buff修改
- var pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- var bt = pack.mBuffTemplate;
- bt.LifeTimeMS = lockTime.GetValue();
- bt.IsHarmful = true;
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- param.SkillDamagePer = dmg.GetValue();
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out dmg, XmdsSkillData.XmdsSkillDataKey.DmgRate);
- InitData(data, out lockTime, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- }
- }
- }
|