12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- using CommonAI.Zone;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
- /// <summary>
- /// 狂怒:变得愤怒,在接下来10秒内,攻击增加x,暴击增加x.
- /// </summary>
- public class Monster_10340512 : XmdsSkillBase
- {
- public static int ID = 10340512;
- /// 狂怒.
- public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.KUANG_NU_MONSTER;
- public static XmdsSkillValue Buff1_Value;
- public static XmdsSkillValue Buff2_Value;
- public override int SkillID { get { return ID; } }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = false;
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- //此次攻击没有伤害.
- param.UseDamageType = CommonAI.Data.DamageType.None;
- // 加攻击.
- XmdsBuff_PropChange buff = param.Attacker.GetRegisBuffVirtual(Buff_ID, 0) as XmdsBuff_PropChange;
- buff.CurentChangeType = XmdsVirtual.UnitAttributeType.Attack;
- buff.CurrentValue = this.GetTargetFormulaValue(param.GameSkill.SkillLevel, Buff1_Value);
- buff.IsPercent = true;
- // 加暴击.
- buff = param.Attacker.GetRegisBuffVirtual(Buff_ID, 1) as XmdsBuff_PropChange;
- buff.CurentChangeType = XmdsVirtual.UnitAttributeType.CritRate;
- buff.CurrentValue = this.GetTargetFormulaValue(param.GameSkill.SkillLevel, Buff2_Value);
- buff.IsPercent = true;
- BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
- bt = param.Attacker.GetRegistBuff(Buff_ID);
- bt.LifeTimeMS = 10000;
- param.Attacker.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out Buff1_Value, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- InitData(data, out Buff2_Value, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- }
- }
- }
|