1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using CommonAI.Data;
- using CommonAI.Zone;
- using CommonAI.Zone.Formula;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using System;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- using XmdsCommonSkill.Plugin.Skills;
- using static CommonAI.Zone.Instance.InstanceUnit;
- /// <summary>
- /// 战士【1】技能 1 基类
- /// 三段向前挥舞的重击,巨剑前端附有缠绕特效,基础造成N1%/N2%/N3%(第三段需要多一个伤害填值(变为了多个相同值的小伤害N4%+原有的下砸伤害N3%)
- /// 【表格1:34_8000,38_9000,41_10000,50_10000。第一,第二段不变,第三段是空中转的两下伤害,第四段是下砸伤害,(3,4段伤害)根据动作需要在序列里面配置伤害】
- /// 攻击加成伤害,递进增加。打击比普攻范围大,内置CD,每下一段会在上一段动作做完,才能释放(技能图标是每点一段会短暂延迟,再出一下一段,出的速度与技能动作时间同步),
- /// T秒内不释放下一段就整体进入冷却。 (160°扇形,半径3.5-4.5)(带位移,位移在2-3) 此技能每段造成伤害提升怒气n点【每一段命中,积攒怒气值】
- /// </summary>
- ///
- namespace XmdsCommonSkill.Plugin.Skills.Warrior
- {
- public class Warrior_110100 : XmdsSkillBase
- {
- /// 技能ID.
- private static readonly int ID = 110100;
- public override int SkillID { get { return ID; } }
- //技能配置表数据 : 固定值,百分比
- protected XmdsSkillValue mValueSet1;
- //怒气值增加概率,值
- protected XmdsSkillValue mValueSet8;
- //多段命中标记
- public int[] mHitFlag = { 0, 0, 0, 0};
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- unit.RegistLaunchSkillOver(OnLaunchSkillOver, info);
- }
- protected virtual int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual launcher, CommonAI.Zone.Instance.InstanceUnit.SkillState skill)
- {
- if (skill.ActionIndex == 0)
- {
- for (int i = 0; i < mHitFlag.Length; i++)
- {
- mHitFlag[i] = 0;
- }
- }
-
- return 0;
- }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- param.SkillDamageAdd = mValueSet1.GetValue(param.GameSkill.SkillLevel, param.AtkProp.DamagePerID);
- param.SkillDamagePer = mValueSet1.GetValueExt(param.GameSkill.SkillLevel, param.AtkProp.DamagePerID);
- bool firstHit = false;
- if(param.AtkProp.DamagePerID < mHitFlag.Length)
- {
- firstHit = mHitFlag[param.AtkProp.DamagePerID] == 0;
- mHitFlag[param.AtkProp.DamagePerID] = 1;
- }
- //当段命中
- if(firstHit && param.Attacker.mUnit.RandomN.Next(GlobalData.RATE_BASE) < mValueSet8.GetValue(param.GameSkill.SkillLevel, 1))
- {
- param.Attacker.Talent__Add(mValueSet8.GetValue(param.GameSkill.SkillLevel, 2));
- }
- }
- protected override void OnInitConfig()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out mValueSet1, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- // 基础扩展
- InitData(data, out mValueSet8, XmdsSkillData.XmdsSkillDataKey.ValueSet8);
- }
- }
- }
|