123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using CommonLang;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- using XmdsCommonServer.XLS.Data;
- namespace XmdsCommonSkill.Plugin.Skills.Warrior
- {
- /// <summary>
- /// 战士【1】技能 1 - 2(N%几率此技能伤害增幅N%且怒气积攒量增加N(增幅和积攒在一个触发概率里))
- /// </summary>
- public class Warrior_110120 : Warrior_110110
- {
- private static readonly int ID = 110120;
- public override int SkillID { get { return ID; } }
- //概率增幅N倍伤害
- protected XmdsSkillValue mValueSet3;
- //积攒怒气增加
- protected XmdsSkillValue mValueSet5;
- //是否触发过怒气积攒
- public int [] mTriggerAddAnger = {0, 0, 0, 0};
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- base.OnSkillDamagePerEvent(param);
- if (param.Attacker.mUnit.RandomN.Next(0, 10000) < mValueSet3.GetValue(param.GameSkill.TalentSkillLevel2, 1))
- {
- param.SkillDamagePer += mValueSet3.GetValue(param.GameSkill.TalentSkillLevel2, 2);
- if(param.AtkProp.DamagePerID < mTriggerAddAnger.Length && mTriggerAddAnger[param.AtkProp.DamagePerID] == 0)
- {
- mTriggerAddAnger[param.AtkProp.DamagePerID] = 1;
- param.Attacker.Talent__Add(mValueSet5.GetValue(param.GameSkill.TalentSkillLevel2));
- }
- }
- }
- protected override int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual launcher, CommonAI.Zone.Instance.InstanceUnit.SkillState skill)
- {
- if (skill.ActionIndex == 0)
- {
- for (int i = 0; i < mTriggerAddAnger.Length; i++)
- {
- mTriggerAddAnger[i] = 0;
- }
- }
-
- return base.OnLaunchSkillOver(info, launcher, skill);
- }
- 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 mValueSet8, XmdsSkillData.XmdsSkillDataKey.ValueSet8);
- }
- }
- }
|