1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
-
- using CommonAI.Zone;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonSkill.Plugin.Buffs;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- using CommonLang;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
- /// <summary>
- /// 岩浆狂徒 - 熔岩重生:立即恢复自己x%生命,并在接下来5秒内总计恢复y点生命.
- /// </summary>
- public class Monster_10690302 : XmdsSkillBase
- {
- /// <summary>
- /// 技能ID.
- /// </summary>
- public static int ID = 10690302;
- /// 回血(不可打断)
- public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.HUI_XUE_DA_DUAN;
- public static XmdsSkillValue Buff_Value;
- /// 立即恢复
- public static XmdsSkillValue Buff_Value2;
- public override int SkillID { get { return ID; } }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- param.SkillDamagePer = 0;
- }
- protected override void OnskillDamageModifyEvent(BattleParams param)
- {
- float v = GetTargetFormulaValue(param.GameSkill.SkillLevel, Buff_Value) * 1.0f / XmdsDamageCalculator.PERER;
- int ret = CUtils.CastInt(v * param.Attacker.mUnit.MaxHP);
- param.SkillDamageModify = ret;
- }
- protected override void OnRegistEvent()
- {
- this.RegistEvent(EventType.UseFormluaType, OnUseFormluaTypeEvent);
- base.OnRegistEvent();
- }
- private void OnUseFormluaTypeEvent(BattleParams param)
- {
- param.UseDamageType = CommonAI.Data.DamageType.Heal;
- }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- XmdsBuff_AddHP buff = (XmdsBuff_AddHP)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.AddHP);
- buff.RemoveOnHit = false; // 不可打断
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = false;
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- XmdsBuff_AddHP buff = (XmdsBuff_AddHP)param.Attacker.GetRegisBuffVirtual(Buff_ID);
- int v = GetTargetFormulaValue(param.GameSkill.SkillLevel, Buff_Value2);
- v = CUtils.CastInt(v / (5));
- buff.ChangeValue = v;
- BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
- bt.LifeTimeMS = 5000;
- param.Attacker.mUnit.AddBuff(Buff_ID);
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out Buff_Value, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- InitData(data, out Buff_Value2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- }
-
- }
- }
|