123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using System.Diagnostics;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- namespace XmdsCommonSkill.Plugin.Skills.Remedy
- {
- /// <summary>
- /// 治疗, 三技能:3-5(普攻弹射最多5个单位(攻击力系数,不是普攻的伤害)(敌伤害 友治疗))
- /// </summary>
- public class Remedy_510350 : Remedy_510340
- {
- public static readonly new int ID = 510350;
- public static int Buff_ID_3_5 = (int)XmdsBuffBase.XmdsBuffList.REMEDY_3_5_TAG;
- public override int SkillID { get { return ID; } }
- //弹射治疗量
- public int normalAtkDmgAdditionExt;
- //弹射普攻
- protected XmdsSkillValue valueSet3;
- //扩展, 普攻条弹射
- protected XmdsSkillValue valueSet6;
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- base.firstHitAddBuf = false;
- base.OnInit(info, unit, ref template);
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID_3_5);
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = false;
- bt.LifeTimeMS = valueSet5.GetValue(info.TalentSkillLevel1);
-
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- unit.RegistLaunchSkillOver(OnLaunchSkillOver, info);
- //额外伤害要加上上一阶段的强化数值
- this.normalAtkDmgAddition = valueSet3.GetValue(info.TalentSkillLevel2, 1) + valueSet2.GetValue(info.TalentSkillLevel1);
- this.normalAtkDmgAdditionExt = valueSet3.GetValue(info.TalentSkillLevel2, 2) + valueSet2.GetValue(info.TalentSkillLevel1);
- }
- private int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual launcher, CommonAI.Zone.Instance.InstanceUnit.SkillState state)
- {
- launcher.mUnit.AddBuff(Buff_ID_3_5, launcher.mUnit);
- return 0;
- }
- protected override void OnSkillDataChange(GameSkill gs, XmdsVirtual unit)
- {
- base.OnSkillDataChange(gs, unit);
- //额外伤害要加上上一阶段的强化数值
- this.normalAtkDmgAddition = valueSet3.GetValue(gs.TalentSkillLevel2, 1) + valueSet2.GetValue(gs.TalentSkillLevel1);
- this.normalAtkDmgAdditionExt = valueSet3.GetValue(gs.TalentSkillLevel2, 2) + valueSet2.GetValue(gs.TalentSkillLevel1);
- var bt = unit.GetRegistBuff(Buff_ID_3_5);
- bt.LifeTimeMS = valueSet5.GetValue(gs.TalentSkillLevel1);
- }
- protected override void OnInitOver(XmdsVirtual unit, GameSkill info)
- {
- unit.ReInitOverBaseSkill(info);
- }
- public override int GetSkillValue(AbstractSkillType type)
- {
- if(type == AbstractSkillType.Value2)
- {
- return this.normalAtkDmgAdditionExt;
- }
- else
- {
- return this.normalAtkDmgAddition;
- }
- }
- protected override void OnInitConfig()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- base.InitBaseConfig(data);
- InitData(data, out valueSet, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- InitData(data, out valueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- InitData(data, out valueSet3, XmdsSkillData.XmdsSkillDataKey.ValueSet3);
- // 扩展配置
- InitData(data, out valueSet5, XmdsSkillData.XmdsSkillDataKey.ValueSet5);
- InitData(data, out valueSet6, XmdsSkillData.XmdsSkillDataKey.ValueSet6);
- }
- }
- }
|