123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
-
- using CommonAI.Zone;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
- /// <summary>
- /// 被魔化的艾克 - 狂暴之刃: 攻击一个目标,造成x倍物攻伤害和额外y点物理伤害,
- /// 每次攻击提升自己x%攻击力,这个效果持续10秒,可叠加10层.
- /// </summary>
- public class Monster_10330401 : XmdsSkillBase
- {
- public static int ID = 10330401;
- /// 伤害倍数.
- public static XmdsSkillValue DP_1;
- public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.ATTACK_UP; // 攻击力↑.
- public static XmdsSkillValue Buff_Value;
- public static XmdsSkillValue Buff_MaxLay;
- public override int SkillID { get { return ID; } }
- protected override void OnRegistEvent()
- {
- this.RegistEvent(EventType.UseFormluaType, OnUseFormluaTypeEvent);
- base.OnRegistEvent();
- }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- int ret = CalDamagePer(DP_1, param.GameSkill.SkillLevel);
- param.SkillDamagePer = ret;
- }
- private void OnUseFormluaTypeEvent(BattleParams param)
- {
- param.UseDamageType = CommonAI.Data.DamageType.Damage;
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- XmdsBuff_PropChange buff = (XmdsBuff_PropChange)param.Attacker.GetRegisBuffVirtual(Buff_ID);
- buff.CurentChangeType = XmdsVirtual.UnitAttributeType.Attack;
- buff.IsPercent = true;
- buff.CurrentValue = this.GetTargetFormulaValue(param.GameSkill.SkillLevel, Buff_Value);
- BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
- bt.LifeTimeMS = 5000;
- bt.MaxOverlay = (byte)this.GetTargetFormulaValue(param.GameSkill.SkillLevel, Buff_MaxLay);
- param.Attacker.mUnit.AddBuff(Buff_ID);
- }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- XmdsBuff_PropChange buff = (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);
- InitData(data, out Buff_MaxLay, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- }
- }
- }
|