12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- 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.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- using static CommonAI.Zone.Instance.InstanceUnit;
- namespace XmdsCommonSkill.Plugin.Skills.Warrior
- {
- /// <summary>
- /// 战士【1】技能 2 - 3(第三次攻击砸地立即砸出一个火焰飓风,能击飞+眩晕,造成N%攻击力伤害(仅表现及效果变化,编辑器自调))
- /// </summary>
- public class Warrior_110160 : Warrior_110150
- {
- private static readonly int ID = 110160;
- private static readonly int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.ZS_YUNXIAN_1_6;
- //熔岩伤害
- protected XmdsSkillValue mValueSet4;
- //眩晕时间
- protected XmdsSkillValue mValueSet5;
- public override int SkillID { get { return ID; } }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- base.OnInit(info, unit, ref template);
- // Buff3修改
- var pack3 = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- pack3.mBuffTemplate.LifeTimeMS = mValueSet5.GetValue(info.TalentSkillLevel3);
- var bt3 = pack3.mBuffTemplate;
- pack3.BindTemplateAndDispose();
- unit.RegistSendBuff(bt3);
- }
- protected override void OnSkillDataChange(GameSkill gs, XmdsVirtual unit)
- {
- base.OnSkillDataChange(gs, unit);
- var bt = unit.GetRegistBuff(Buff_ID);
- bt.LifeTimeMS = mValueSet5.GetValue(gs.TalentSkillLevel3);
- }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- if(param.AtkProp.DamagePerID == 5)
- {
- param.SkillDamagePer = mValueSet4.GetValue(param.GameSkill.TalentSkillLevel3);
- }
- else
- {
- base.OnSkillDamagePerEvent(param);
- //MMO-16584 sub MMO-16258不知道以前有啥需求,现改为伤害全部叠加。
- //param.SkillDamageAdd = Math.Max(1, CUtils.CastInt(param.Attacker.MirrorProp.Defence * XmdsUnitProp.PER * mValueSet2.GetValue(param.GameSkill.TalentSkillLevel1)));
- }
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- base.OnSkillLogicEvent(param);
- //命中,加减速buff
- if(param.AtkProp.DamagePerID == 5)
- {
- param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
- }
- }
- 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 mValueSet4, XmdsSkillData.XmdsSkillDataKey.ValueSet4);
- //眩晕
- InitData(data, out mValueSet5, XmdsSkillData.XmdsSkillDataKey.ValueSet5);
- // 基础扩展
- InitData(data, out mValueSet8, XmdsSkillData.XmdsSkillDataKey.ValueSet8);
- }
- }
- }
|