using CommonAI.Data; using CommonAI.Zone; using CommonAI.Zone.Formula; 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; using static CommonAI.Zone.Instance.InstanceUnit; namespace XmdsCommonSkill.Plugin.Skills.Warrior { /// /// 2-1战士【1】技能 2 - 1 此技能伤害附带额外伤害(防御力系数加成) /// public class Warrior_110140 : Warrior_110100 { private static readonly int ID = 110140; //附带额外伤害 protected XmdsSkillValue mValueSet2; public override int SkillID { get { return ID; } } protected override void OnSkillDamagePerEvent(BattleParams param) { base.OnSkillDamagePerEvent(param); int defValue = (int)(param.Attacker.MirrorProp.Defence * XmdsUnitProp.PER * mValueSet2.GetValue(param.GameSkill.TalentSkillLevel1)); param.SkillDamageAdd += Math.Max(1, XmdsDamageCalculator.GetDamage(defValue, param.Attacker, param.Hitter, param.Source)); } protected override void OnInitConfig() { XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID); InitData(data, out mValueSet1, XmdsSkillData.XmdsSkillDataKey.ValueSet); InitData(data, out mValueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2); // 基础扩展 InitData(data, out mValueSet8, XmdsSkillData.XmdsSkillDataKey.ValueSet8); } } }