using CommonAI.Zone; using CommonAI.Zone.Helper; using CommonAI.Zone.Instance; using CommonLang; using System; using XmdsCommon.Plugin; using XmdsCommonServer.Plugin; using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator; using XmdsCommonServer.XLS.Data; using XmdsCommonSkill.Plugin.Buffs; namespace XmdsCommonSkill.Plugin.Skills.Remedy { /// /// 治疗【1】技能 2 - 2(扇子每穿过一个敌人造成伤害,后续伤害就会增加n%,最多叠加到6层) /// public class Remedy_510150 : Remedy_510140 { private static readonly int ID = 510150; public override int SkillID { get { return ID; } } //伤害提升比例, 最高层数 protected XmdsSkillValue valueSet3; // 提高伤害 protected XmdsSkillValue valueSet7; private int damageDeepers = 0; protected override int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual launcher, CommonAI.Zone.Instance.InstanceUnit.SkillState state) { base.OnLaunchSkillOver(info, launcher, state); this.damageDeepers = 0; return 0; } protected override void OnSkillDamagePerEvent(BattleParams param) { base.OnSkillDamagePerEvent(param); param.SkillDamagePer += valueSet7.GetValue(param.GameSkill.TalentSkillLevel2); if (param.SkillDamagePer > 0 && this.damageDeepers < valueSet3.GetValue(param.GameSkill.TalentSkillLevel2, 2)) { this.damageDeepers++; } param.SkillDamagePer -= damageDeepers * valueSet3.GetValue(param.GameSkill.TalentSkillLevel2, 1); } protected override void OnInitConfig() { XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID); base.InitBaseConfig(data); InitData(data, out valueSet1, XmdsSkillData.XmdsSkillDataKey.ValueSet); InitData(data, out valueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2); InitData(data, out valueSet3, XmdsSkillData.XmdsSkillDataKey.ValueSet3); //扩展配置 InitData(data, out valueSet5, XmdsSkillData.XmdsSkillDataKey.ValueSet5); InitData(data, out valueSet6, XmdsSkillData.XmdsSkillDataKey.ValueSet6); InitData(data, out valueSet7, XmdsSkillData.XmdsSkillDataKey.ValueSet7); } } }