123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- 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 - 1 (此技能穿过友方,友方获得加速10%,持续2S(不叠加,只持续重置BUFF时间))
- /// </summary>
- namespace XmdsCommonSkill.Plugin.Skills.Remedy
- {
- public class Remedy_510110 : Remedy_510100
- {
- private static readonly int ID = 510110;
- //治疗提升效果
- protected XmdsSkillValue valueSet2;
- //扩展配置
- protected XmdsSkillValue valueSet6; //加速效果
- protected static readonly int Buff_ID_SpeedUp = (int)XmdsBuffBase.XmdsBuffList.SPEED_UP;
- public override int SkillID { get { return ID; } }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- base.OnInit(info, unit, ref template);
- // Buff2修改
- var pack2 = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID_SpeedUp);
- var buff2 = pack2.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.MoveSpeedUp) as XmdsBuff_MoveSpeedUp;
- buff2.ChangePercent = valueSet6.GetValue(info.TalentSkillLevel1, 1);
- var bt2 = pack2.mBuffTemplate;
- bt2.LifeTimeMS = valueSet6.GetValue(info.TalentSkillLevel1, 2);
- bt2.IsHarmful = false;
- pack2.BindTemplateAndDispose();
- unit.RegistSendBuff(bt2);
- }
- protected override void OnSkillDataChange(GameSkill gs, XmdsVirtual unit)
- {
- base.OnSkillDataChange(gs, unit);
- var buff = unit.GetRegisBuffVirtual(Buff_ID_SpeedUp) as XmdsBuff_MoveSpeedUp;
- buff.ChangePercent = valueSet6.GetValue(gs.TalentSkillLevel1, 1);
- var bt = unit.GetRegistBuff(Buff_ID_SpeedUp);
- bt.LifeTimeMS = valueSet6.GetValue(gs.TalentSkillLevel1, 2);
- }
-
- /** 自疗恢复已损失生命百分百 */
- protected override float GetHealValue(BattleParams param)
- {
- return base.GetHealValue(param) + valueSet2.GetValue(param.GameSkill.TalentSkillLevel1);
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- if (param.Hitter.IsAllies(param.Attacker, false, true))
- {
- param.Hitter.mUnit.AddBuff(Buff_ID_SpeedUp, 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 valueSet5, XmdsSkillData.XmdsSkillDataKey.ValueSet5);
- InitData(data, out valueSet6, XmdsSkillData.XmdsSkillDataKey.ValueSet6);
- }
- }
- }
|