12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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>
- /// 岩浆减速,结束自爆
- /// </summary>
- public class Skill_910040 : XmdsSkillBase
- {
- private static readonly int ID = 910040;
- public override int SkillID { get { return ID; } }
- private static readonly int Buff_SpeedDown = (int)XmdsBuffBase.XmdsBuffList.SPEED_DOWN; // 通用减速
- private static XmdsSkillValue mSpeedDownTime;
- private static XmdsSkillValue mSpeedDownValue;
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- //修改减速buff
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_SpeedDown);
- XmdsBuff_MoveSpeedDown buffAdd = (XmdsBuff_MoveSpeedDown)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.MoveSpeedDown);
- buffAdd.ChangePercent = -mSpeedDownValue.GetValue();
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = true;
- bt.LifeTimeMS = mSpeedDownTime.GetValue();
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- param.UseDamageType = CommonAI.Data.DamageType.None;
- if (param.AtkProp.DamagePerID == 0)
- {
- param.Hitter.mUnit.AddBuff(Buff_SpeedDown, param.Attacker.mUnit);
- }
- else
- {
- //结束那一帧杀死
- param.Hitter.AddHP(-param.Hitter.MirrorProp.MaxHP, param.Attacker.mUnit);
- }
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out mSpeedDownValue, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- InitData(data, out mSpeedDownTime, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- }
- }
- }
|