123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using CommonAI.Data;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- namespace XmdsCommonSkill.Plugin.Skills.Warrior
- {
- /// <summary>
- /// 二技能 : 2-2( 落地后的动作有一个二段按钮,按下才会释放第二段的位移+挥击,存在T秒。挥击的法术会向前短暂飞出,(编辑器自配)【同1-3】伤害系数等不变,击中有n%几率提升怒气n点 多人只算一次)
- /// </summary>
- public class Warrior_110220 : Warrior_110210
- {
- private static readonly int ID = 110220;
- //挥斩伤害比例
- protected XmdsSkillValue mValueSet3;
- //挥击额外获得怒气
- protected XmdsSkillValue mValueSet6;
- //挥击是否首次
- private bool isFirstHuiJi = false;
- public override int SkillID { get { return ID; } }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- if(param.AtkProp.DamagePerID <= 1)
- {
- isFirstHuiJi = true;
- }
- if(param.AtkProp.DamagePerID == 3)//挥击
- {
- param.SkillDamagePer = mValueSet3.GetValue(param.GameSkill.TalentSkillLevel2);
- //概率性获得怒气加成
- if (isFirstHuiJi)
- {
- isFirstHuiJi = false;
- if (param.Attacker.mUnit.RandomN.Next(GlobalData.RATE_BASE) < mValueSet6.GetValue(param.GameSkill.TalentSkillLevel2, 1))
- {
- param.Attacker.Talent__Add(mValueSet6.GetValue(param.GameSkill.TalentSkillLevel2, 2));
- }
- }
- }
- else
- {
- base.OnSkillDamagePerEvent(param);
- }
- }
- 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 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);
- }
- }
- }
|