123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using System;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- using XmdsCommonSkill.Plugin.PassiveSkills.Magic;
- using static CommonAI.Zone.Instance.InstanceUnit;
- using static XmdsCommonSkill.Plugin.Buffs.XmdsBuff_SwordShadow;
- namespace XmdsCommonSkill.Plugin.Skills.Magic
- {
- /// <summary>
- /// 增强buff(新buffid 效果:增加n%攻击力)
- /// </summary>
- public class Skill_910110 : XmdsSkillBase
- {
- public static readonly int ID = 910110;
- public override int SkillID { get { return ID; } }
- private static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.PROP_CHANGE_1;
- private static XmdsSkillValue dmg;
- private static XmdsSkillValue valueSet0; // 攻击提升值
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- param.SkillDamagePer = dmg.GetValue();
- }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- //攻击
- XmdsBuff_PropChange buff = (XmdsBuff_PropChange)pack.GetXmdsBuff(0);
- buff.CurentChangeType = XmdsVirtual.UnitAttributeType.Attack;
- buff.CurrentValue = valueSet0.GetValue(1, 1);
- buff.IsPercent = true;
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = true;
- bt.LifeTimeMS = valueSet0.GetValue(1, 2);
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- unit.RegistLaunchSkillOver(OnLaunchSkillOver, info);
- }
- private int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual launcher, CommonAI.Zone.Instance.InstanceUnit.SkillState skill)
- {
- launcher.mUnit.AddBuff(Buff_ID);
- return 0;
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out dmg, XmdsSkillData.XmdsSkillDataKey.DmgRate);
- InitData(data, out valueSet0, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- }
- }
- }
|