1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- namespace XmdsCommonSkill.Plugin.Skills.Remedy
- {
- /// <summary>
- /// 治疗, 二技能: 2-6 (复数绿色的精灵环绕在奶妈四周,类似死亡先知大招,3s,对X码以内的敌人造成伤害,降低其50%治疗量(多个不叠加))
- /// </summary>
- public class Remedy_510260 : Remedy_510250
- {
- private static readonly int ID = 510260;
- private static readonly int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.REMEDY_2_6_HEALEDDOWN;
- public override int SkillID { get { return ID; } }
- // 伤害系数
- protected XmdsSkillValue valueSet4;
- // 扩展配置
- protected XmdsSkillValue valueSet6;
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- base.OnInit(info, unit, ref template);
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- XmdsBuff_PropChange buff = (XmdsBuff_PropChange)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.PropChange);
- buff.IsPercent = false;
- buff.CurentChangeType = XmdsVirtual.UnitAttributeType.HealedEffect;
- buff.CurrentValue = -valueSet6.GetValue(info.TalentSkillLevel3, 1);
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = false;
- bt.LifeTimeMS = valueSet6.GetValue(info.TalentSkillLevel3, 2);
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnSkillDataChange(GameSkill gs, XmdsVirtual unit)
- {
- base.OnSkillDataChange(gs, unit);
- var buff = unit.GetRegisBuffVirtual(Buff_ID) as XmdsBuff_PropChange;
- buff.CurrentValue = valueSet6.GetValue(gs.TalentSkillLevel3, 1);
- var bt = unit.GetRegistBuff(Buff_ID);
- bt.LifeTimeMS = valueSet6.GetValue(gs.TalentSkillLevel3, 2);
- }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- if (param.AtkProp.DamagePerID == 3)
- {
- param.SkillDamagePer = valueSet4.GetValue(param.GameSkill.TalentSkillLevel3);
- }
- else
- {
- base.OnSkillDamagePerEvent(param);
- }
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- base.OnSkillLogicEvent(param);
- //命中,加buff
- if (!param.Attacker.IsAllies(param.Hitter, true, true))
- {
- param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
- }
- }
- protected override void OnInitConfig()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- base.InitBaseConfig(data);
- InitData(data, out buffTime, XmdsSkillData.XmdsSkillDataKey.DmgRate);
- InitData(data, out valueSet, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- InitData(data, out valueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- InitData(data, out valueSet3, XmdsSkillData.XmdsSkillDataKey.ValueSet3);
- InitData(data, out valueSet4, XmdsSkillData.XmdsSkillDataKey.ValueSet4);
- //扩展配置
- InitData(data, out valueSet5, XmdsSkillData.XmdsSkillDataKey.ValueSet5);
- InitData(data, out valueSet6, XmdsSkillData.XmdsSkillDataKey.ValueSet6);
- }
- }
- }
|