1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using CommonLang;
- using System;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.Base;
- using XmdsCommonServer.XLS.Data;
- namespace XmdsCommonSkill.Plugin.Skills.Warrior
- {
- /// <summary>
- /// 五技能 5-2(烈焰风暴释放期间再次释放技能可以立刻停止旋转,顺势砸下对指向小区域造成一次伤害(伤害为未打出伤害的百分比))
- /// </summary>
- public class Warrior_110520 : Warrior_110510
- {
- private static readonly int ID = 110520;
- //一次打完剩余剑刃风暴
- protected XmdsSkillValue mValueSet3;
- private int mLeftSkillDamage = 1; //剩余剑刃风暴打出,伤害
- public override int SkillID { get { return ID; } }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- base.OnInit(info, unit, ref template);
- unit.RegistLaunchSkillOver(OnLaunchSkillOver, info);
- }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- base.OnSkillDamagePerEvent(param);
- if (param.AtkProp.DamagePerID == 2)
- {
- param.SkillDamagePer = CUtils.CastInt(param.SkillDamagePer * XmdsUnitProp.PER * this.mLeftSkillDamage);
- }
- }
- private int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual attacker, CommonAI.Zone.Instance.InstanceUnit.SkillState state)
- {
- //挥斩出去的动作
- if (state.ActionIndex == 3)
- {
- //自动/手动 释放的剑刃风暴
- long leftTime = DAMAGE_SPELL_TIME - (CommonLang.CUtils.localTimeMS - base.damageStartTime);
- this.mLeftSkillDamage = Math.Max(1, CUtils.CastInt(leftTime / 500)) * mValueSet3.GetValue(info.TalentSkillLevel2);
- //根据剩余时间,返还怒气
- int returnAnger = CUtils.CastInt(XmdsGlobalData.GetTalentData(this.SkillID).GetValue() * leftTime / DAMAGE_SPELL_TIME);
- attacker.Talent__Add(returnAnger);
- }
- return 0;
- }
- 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 mValueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- 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);
- }
- }
- }
|