1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
-
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- using CommonAI.Zone;
- using XmdsCommon.Plugin;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
- /// <summary>
- /// 行刑官(比列) - 巨刃乱舞: 挥舞武器,对身边所有敌人造成x倍物攻伤害和额外y点物理伤害.
- /// 并降低敌人z%的物抗,这个效果持续5秒(一个短暂的旋风斩,类似Dota里的斧王,原地快速的转一下即可).
- /// </summary>
- public class Monster_6061102 : XmdsSkillBase
- {
- public static int ID = 6061102;
- public static XmdsSkillValue DP_1;
- /// 物防.
- public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.WU_FANG_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 OnSkillLogicEvent(BattleParams param)
- {
- XmdsBuff_PropChange buff = param.Attacker.GetRegisBuffVirtual(Buff_ID) as XmdsBuff_PropChange;
- buff.CurentChangeType = XmdsVirtual.UnitAttributeType.Defence;
- buff.IsPercent = true;
- buff.CurrentValue = -this.GetTargetFormulaValue(param.GameSkill.SkillLevel, Buff_Value);
- BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
- bt.LifeTimeMS = 5000;
- param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
- }
- /// <summary>
- /// 初始化.
- /// </summary>
- /// <param name="info"></param>
- /// <param name="unit"></param>
- /// <param name="template"></param>
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- XmdsBuff_PropChange buff3 = (XmdsBuff_PropChange)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.PropChange);
- 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);
- InitData(data, out Buff_Value, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- }
- }
- }
|