12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
-
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonServer.Plugin;
- using XmdsCommonSkill.Plugin.Buffs;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
- using CommonAI.Zone;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
- /// <summary>
- /// 屠夫 - 剁肉: 挥砍剁肉刀对目标造成x%物攻伤害和额外y点物理伤害,并造成一个流血效果,在A秒内每秒造成z点伤害.
- /// </summary>
- public class Monster_9140402 : XmdsSkillBase
- {
- public static int ID = 9140402;
- public static XmdsSkillValue DP_1;
- public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.LIU_XUE;
- public static XmdsSkillValue BuffDamageHP;
- 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)
- {
- int lv = param.GameSkill.SkillLevel;
- UnitBuff ub = param.Attacker.GetRegisBuffVirtual(Buff_ID);
- if (ub != null)
- {
- XmdsBuff_Bleed buff = ub as XmdsBuff_Bleed;
- buff.ChangeValue = GetTargetFormulaValue(lv, BuffDamageHP);
- }
- BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
- bt.LifeTimeMS = 5000;
- param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
- }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- XmdsBuff_Bleed buff = (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);
- InitData(data, out BuffDamageHP, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- }
- }
- }
|