1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
-
- 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点魔法伤害,并降低魔抗z%.
- /// </summary>
- public class Monster_9143101 : XmdsSkillBase
- {
- public static int ID = 9143101;
- public static XmdsSkillValue DP_1;
- public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.MO_KANG_DOWN2;
- 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);
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = true;
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- int lv = param.GameSkill.SkillLevel;
- XmdsBuff_PropChange buff = (XmdsBuff_PropChange)param.Attacker.GetRegisBuffVirtual(Buff_ID);
- buff.IsPercent = false;
- buff.CurentChangeType = XmdsVirtual.UnitAttributeType.Defence;
- buff.CurrentValue = -this.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);
- }
- }
- }
|