1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
-
- using CommonAI.Zone;
- using CommonLang;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- using XmdsCommonServer.XLS.Data;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
-
-
-
-
- public class Monster_10320402 : XmdsSkillBase
- {
-
-
-
- public static int ID = 10320402;
-
- public static XmdsSkillValue ChangeValue;
-
- public static int longTime = 5;
- public override int SkillID { get { return ID; } }
- private void OnUseFormluaTypeEvent(BattleParams param)
- {
-
- param.UseDamageType = CommonAI.Data.DamageType.Modify;
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
-
- param.Source.OutClientState = (int)XmdsVirtual.UnitHitEventState.Normal;
-
- float t = (GetTargetFormulaValue(param.GameSkill.SkillLevel, ChangeValue) * 1.0f) / XmdsDamageCalculator.PERER / longTime;
-
- int v = CUtils.CastInt(param.Hitter.mUnit.MaxHP * t);
- if (v > 0)
- {
-
- param.FinalSkillDamage = v;
-
- param.Attacker.AddHP(v, param.Attacker.mUnit, true);
- }
- }
- protected override void OnRegistEvent()
- {
- this.RegistEvent(EventType.UseFormluaType, OnUseFormluaTypeEvent);
- base.OnRegistEvent();
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out ChangeValue, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- }
- }
- }
|