12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using CommonAI.Zone;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
- /// <summary>
- /// 沙尘暴 对所有目标造成持续的魔法伤害,并且降低治疗效果 " 一个百分比魔法伤害和固定魔法伤害加成 受到伤害造成最近治疗效果降低"
- /// </summary>
- class Monster_605062 : XmdsSkillBase
- {
- public static int ID = 605062;
- public static XmdsSkillValue DP_1;
- public static int Buff_ID = 102060;
- /// BUFF伤害 - 治疗效果下降.
- public static XmdsSkillValue BuffDamageTreat;
- public override int SkillID { get { return ID; } }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- int ret = CalDamagePer(DP_1, param.GameSkill.SkillLevel);
- param.SkillDamagePer = ret;
- }
-
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out DP_1, XmdsSkillData.XmdsSkillDataKey.DmgRate);
- InitData(data, out BuffDamageTreat, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = true;
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- // 治疗效果
- XmdsBuff_PropChange bf = param.Attacker.GetRegisBuffVirtual(Buff_ID) as XmdsBuff_PropChange;
- bf.CurentChangeType = XmdsVirtual.UnitAttributeType.HealEffect;
- bf.IsPercent = true;
- bf.CurrentValue = -this.GetTargetFormulaValue(param.GameSkill.TalentSkillLevel1, BuffDamageTreat);
- // 设置buff时长
- BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
- bt.LifeTimeMS = 5000;
- // 上buff
- param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
- }
- }
- }
|