using CommonAI.Data; using CommonAI.Zone; using CommonAI.Zone.Helper; using CommonAI.Zone.Instance; using CommonLang; using System; using XmdsCommon.Plugin; using XmdsCommonServer.Plugin; using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills; using XmdsCommonServer.XLS.Data; using XmdsCommonSkill.Plugin.Buffs; using XmdsCommonSkill.Plugin.PassiveSkills.Magic; using static CommonAI.Zone.Instance.InstanceUnit; using static XmdsCommonSkill.Plugin.Buffs.XmdsBuff_SwordShadow; using static XmdsCommonSkill.Plugin.Skills.XmdsSummonBase; namespace XmdsCommonSkill.Plugin.Skills.Magic { /// /// 自爆(配置在死亡时。策划自配 新法术技能ID 范围一次性伤害扣除玩家百分比血量,值填表 /// public class Skill_910160 : XmdsSummonBase_ActiveSkill { public static readonly int ID = 910160; public override int SkillID { get { return ID; } } public static XmdsSkillValue deadDmg; //锁定玩家时间 protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template) { unit.RegistLaunchSkillOver(OnLaunchSkillOver, info); } private int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual attacker, CommonAI.Zone.Instance.InstanceUnit.SkillState state) { base.summonModule.SummonUnit(attacker); return 0; } protected override bool OnSkillFinalDamageModifyEvent(BattleParams param) { param.HitDamge = CUtils.CastInt(param.Hitter.MirrorProp.MaxHP * XmdsUnitProp.PER * deadDmg.GetValue()); return true; } protected override void OnInitConfig() { XmdsSkillData data = base.InitSummonConfig(SummonType.guardMaster); // 独有数据 InitData(data, out deadDmg, XmdsSkillData.XmdsSkillDataKey.ValueSet4); } } }