| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 | using Fort23.Core;using GameLogic.Combat.Buff;using GameLogic.Combat.CombatTool;using GameLogic.Combat.Hero;using UnityEngine;using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;namespace GameLogic.Combat.Skill.MagicSkill{    /// <summary>    /// 对敌人照成伤害,使敌人五行混乱。敌人的功法每次使用功法都将使用最低灵根属性作为伤害计算,持续{0}秒    /// 使敌人的所有灵根降低10%持续5秒    /// </summary>    public class S3101 : MagicSkillBasic    {        private CombatHeroEntity target;        protected override void ProMagicUseSkill()        {            // StraightLineShow straightLineShow = new StraightLineShow();            // straightLineShow.Init(this);            target=  CombatMagicWeaponEntity.RootMagicWeaponControl.combatHeroEntity.CombatAIBasic.currFocusTarget;                     if (target == null)            {                SkillPlayFinish();                return;            }                      MagicAttShowBasic magicAttShowBasic = InitMagicAttShowBasic(target, Finish);            SetMagicAttShowBasic(magicAttShowBasic);        }        protected override ILifetCycleHitPoint[] ProGetTineLineTargetEntity(            TimeLineEventLogicBasic timeLineEventLogicBasic)        {            ILifetCycleHitPoint[] lifetCycleHitPoints = new ILifetCycleHitPoint[1];            lifetCycleHitPoints[0] = target.GetMainHotPoin<ILifetCycleHitPoint>();            return lifetCycleHitPoints;        }        private void Finish()        {            BuffInfo buffInfo = BuffInfo.GetBuffInfo(10091, effectValue[1], 1,this);            BuffBasic buffBasic = target.BuffControl.AddBuff(CombatHeroEntity, buffInfo);            if (buffBasic != null && SelfSkillConfig.level > 5)            {                float v = effectValue[2];                target.CurrCombatHeroInfo.Metal -= v;                target.CurrCombatHeroInfo.Wood -= v;                target.CurrCombatHeroInfo.Water -= v;                target.CurrCombatHeroInfo.Fire -= v;                target.CurrCombatHeroInfo.Earth -= v;                buffBasic.buffFinish = delegate()                {                    target.CurrCombatHeroInfo.Metal += v;                    target.CurrCombatHeroInfo.Wood += v;                    target.CurrCombatHeroInfo.Water += v;                    target.CurrCombatHeroInfo.Fire += v;                    target.CurrCombatHeroInfo.Earth += v;                };            }            //             Debug.Log("法宝对敌人照成伤害");            ILifetCycleHitPoint lifetCycleHitPoint = target.GetMainHotPoin<ILifetCycleHitPoint>();            if (lifetCycleHitPoint == null)            {                SkillPlayFinish();                return;            }            BetterList<ILifetCycleHitPoint> cBetterList = new BetterList<ILifetCycleHitPoint>(1);            cBetterList.Add(lifetCycleHitPoint);            ActivationTimeLineData("sk1_hit", currTarget: cBetterList);            SkillPlayFinish();                long att = CombatMagicWeaponEntity.RootMagicWeaponControl.combatHeroEntity.CurrCombatHeroInfo.attack.Value;            long harm = CombatCalculateTool.Instance.GetVlaueRatioForLong(att, effectValue[0]);            CombatCalculateTool.Instance.Harm(CombatMagicWeaponEntity.RootMagicWeaponControl.combatHeroEntity,                lifetCycleHitPoint as CombatHeroHitPoint, harm, AttType.FaBao, triggerData, wuXingType, null,                HarmType.Default);        }    }}
 |