12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using CommonAI.Zone;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonSkill.Plugin.Buffs;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
- /// <summary>
- /// 恐惧使者(隆塔尔) - 恐惧:使身边所有敌人陷入恐惧状态四散逃走,持续x秒,并在恐惧期间每秒受到x倍魔攻伤害附加y点魔法伤害
- /// </summary>
- public class Monster_6050702 : XmdsSkillBase
- {
- public static int ID = 6050702;
- public static XmdsSkillValue DP_1;
-
- public static int Buff_1 = (int)XmdsBuffBase.XmdsBuffList.FEAR;
- 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 OnSkillLogicEvent(BattleParams param)
- {
- BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_1);
- bt.LifeTimeMS = 5000;
- // 持续伤害.
- XmdsBuff_Bleed buff2 = param.Attacker.GetRegisBuffVirtual(Buff_1, 1) as XmdsBuff_Bleed;
- int attack = param.Attacker.MirrorProp.BaseAttack;
- attack = XmdsDamageCalculator.GetSkillDamage(attack, param.SkillDamagePer, param.SkillDamageModify);
- attack = XmdsDamageCalculator.GetDamage(attack, param.Attacker, param.Hitter, param.Source);
- buff2.ChangeValue = attack;
- param.Hitter.mUnit.AddBuff(Buff_1, param.Attacker.mUnit);
- }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_1);
- XmdsBuff_Fear buff1 = (XmdsBuff_Fear)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.Fear);
- XmdsBuff_Bleed buff2 = (XmdsBuff_Bleed)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.Bleed);
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = true;
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out DP_1, XmdsSkillData.XmdsSkillDataKey.DmgRate);
- }
- }
- }
|