1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- namespace XmdsCommonSkill.Plugin.Skills.Warrior
- {
- /// <summary>
- /// 五技能 5-5(烈焰风暴释放期间,移动速度提高n%,妖兽免伤上升n% 。)
- /// </summary>
- public class Warrior_110550 : Warrior_110540
- {
- private static readonly int ID = 110550;
- //减伤比例提升, 妖兽免伤
- protected XmdsSkillValue mValueSet3;
- private static readonly int Buff_ID_5_5 = (int)XmdsBuffBase.XmdsBuffList.IGNORCTRL_AND_SPPEDCHG; // 剑刃风暴,免控buf
- public override int SkillID { get { return ID; } }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- base.OnInit(info, unit, ref template);
- // 释放剑刃风暴获得buff
- var pack1 = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID_5_5);
- var buff = (XmdsBuff_IgnorCtrlAndSpeedChg)pack1.GetXmdsBuff(0);
- buff.speedChange = mValueSet3.GetValue(info.TalentSkillLevel2, 1); //移速提高万分之N
- //怪物免伤
- var buff2 = pack1.GetXmdsBuff(1) as XmdsBuff_PropChange;
- buff2.CurentChangeType = XmdsVirtual.UnitAttributeType.MonsterDamageReduce;
- buff2.CurrentValue = mValueSet3.GetValue(info.TalentSkillLevel2, 2);
- buff2.IsPercent = true;
- var bt1 = pack1.mBuffTemplate;
- bt1.IsHarmful = true;
- bt1.LifeTimeMS = DAMAGE_SPELL_TIME; //时间由spell确定,所以写死
- pack1.BindTemplateAndDispose();
- unit.RegistSendBuff(bt1);
- }
- protected override void OnSkillDataChange(GameSkill gs, XmdsVirtual unit)
- {
- base.OnSkillDataChange(gs, unit);
- var buff1 = unit.GetRegisBuffVirtual(Buff_ID_5_5, 0) as XmdsBuff_IgnorCtrlAndSpeedChg;
- buff1.speedChange = mValueSet3.GetValue(gs.TalentSkillLevel2, 1);
- var buff2 = unit.GetRegisBuffVirtual(Buff_ID_5_5, 1) as XmdsBuff_PropChange;
- buff2.CurrentValue = mValueSet3.GetValue(gs.TalentSkillLevel2, 2);
- }
- protected override void OnInitConfig()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out mJuQiValue, XmdsSkillData.XmdsSkillDataKey.DmgRate);
- InitData(data, out mValueSet1, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- InitData(data, out mValueSet3, XmdsSkillData.XmdsSkillDataKey.ValueSet3);
- //扩展配置
- InitData(data, out mValueSet5, XmdsSkillData.XmdsSkillDataKey.ValueSet5);
- InitData(data, out mValueSet6, XmdsSkillData.XmdsSkillDataKey.ValueSet6);
- InitData(data, out mValueSet8, XmdsSkillData.XmdsSkillDataKey.ValueSet8);
- }
- }
- }
|