123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
-
- using CommonAI.Zone;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
- /// <summary>
- /// 巫妖 - 霜冻新星: 在目标身上释放一个新星,对周围的目标造成x%魔攻伤害和额外y点魔法伤害,减速N秒.
- /// </summary>
- public class Monster_9142102 : XmdsSkillBase
- {
- public static int ID = 9142102;
- public static XmdsSkillValue DP_1;
- public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.SPEED_DOWN;
- public static XmdsSkillValue Buff_Value;
- 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 OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- XmdsBuff_MoveSpeedDown buff = (XmdsBuff_MoveSpeedDown)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.MoveSpeedDown);
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = true;
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- int lv = param.GameSkill.SkillLevel;
- XmdsBuff_MoveSpeedDown buff = (XmdsBuff_MoveSpeedDown)param.Attacker.GetRegisBuffVirtual(Buff_ID);
- buff.ChangePercent = -GetTargetFormulaValue(lv, Buff_Value);
- BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
- bt.LifeTimeMS = 5000;
- 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 Buff_Value, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- }
- }
- }
|