12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- 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;
- using XmdsCommonSkill.Plugin.PassiveSkills.Magic;
- using static CommonAI.Zone.Instance.InstanceUnit;
- namespace XmdsCommonSkill.Plugin.Skills.Boss
- {
- /// <summary>
- /// boss通用技能 - 寒霜
- /// </summary>
- public class Boss_90011 : XmdsSkillBase
- {
- /// 技能ID.
- private static int ID = 90011;
- private static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.SPEED_DOWN; // 减速
- public static XmdsSkillValue DP_1;
- public static XmdsSkillValue valueSet1; // 减速比例
- public static XmdsSkillValue valueSet2; // 减速时间
- public override int SkillID {get { return ID; } }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- // Buff2修改
- var pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- var buff = pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.MoveSpeedDown) as XmdsBuff_MoveSpeedDown;
- buff.ChangePercent = -valueSet1.GetValue();
- var bt = pack.mBuffTemplate;
- bt.LifeTimeMS = valueSet2.GetValue();
- bt.IsHarmful = true;
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- param.SkillDamagePer = CalDamagePer(DP_1, param.GameSkill.SkillLevel);
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- base.OnSkillLogicEvent(param);
- param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out DP_1, XmdsSkillData.XmdsSkillDataKey.DmgRate);
- InitData(data, out valueSet1, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- InitData(data, out valueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- }
- }
- }
|