12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using CommonAI.Data;
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using CommonLang;
- using System.Collections.Generic;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- using XmdsCommonServer.XLS.Data;
- namespace XmdsCommonSkill.Plugin.Skills.Remedy
- {
- /// <summary>
- /// 战士【1】技能 1 - 2(扇子接触到友军会恢复友军自身失去血量的n%)
- /// </summary>
- public class Remedy_510120 : Remedy_510110
- {
- private static readonly int ID = 510120;
- //友军被治疗
- protected XmdsSkillValue valueSet3;
- //友军治疗列表
- protected HashSet<uint> mCureList = new HashSet<uint>();
- public override int SkillID { get { return ID; } }
- protected override int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual launcher, CommonAI.Zone.Instance.InstanceUnit.SkillState state)
- {
- base.OnLaunchSkillOver(info, launcher, state);
- mCureList.Clear();
- return 0;
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- if (param.Attacker.IsAllies(param.Hitter, false, true))
- {
- if (mCureList.Contains(param.Hitter.mUnit.ID))
- {
- param.UseDamageType = DamageType.None;
- }
- else
- {
- mCureList.Add(param.Hitter.mUnit.ID);
- //友方获得加速buff 和 加血
- param.Hitter.mUnit.AddBuff(Buff_ID_SpeedUp, param.Attacker.mUnit);
- double addHP = (long)param.Attacker.MirrorProp.MaxAttack * XmdsUnitProp.PER * valueSet3.GetValue(param.GameSkill.TalentSkillLevel2);
- param.Hitter.mUnit.AddHP((int)addHP, param.Attacker.mUnit);
- }
- }
- }
- protected override void OnInitConfig()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- base.InitBaseConfig(data);
- InitData(data, out valueSet1, 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);
- }
- }
- }
|