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 { /// /// 对敌人照成伤害,使敌人五行混乱。敌人的功法每次使用功法都将使用最低灵根属性作为伤害计算,持续{0}秒 /// 使敌人的所有灵根降低10%持续5秒 /// public class S3101 : MagicSkillBasic { private CombatHeroEntity target; protected override void ProMagicUseSkill() { // StraightLineShow straightLineShow = new StraightLineShow(); // straightLineShow.Init(this); CombatHeroEntity[] allHero = CombatController.currActiveCombat.CombatHeroController.GetHero(!CombatHeroEntity.IsEnemy); if (allHero == null || allHero.Length <= 0) { SkillPlayFinish(); return; } target = allHero[0]; MagicAttShowBasic magicAttShowBasic = InitMagicAttShowBasic(allHero[0], Finish); SetMagicAttShowBasic(magicAttShowBasic); } protected override ILifetCycleHitPoint[] ProGetTineLineTargetEntity( TimeLineEventLogicBasic timeLineEventLogicBasic) { ILifetCycleHitPoint[] lifetCycleHitPoints = new ILifetCycleHitPoint[1]; lifetCycleHitPoints[0] = target.GetMainHotPoin(); return lifetCycleHitPoints; } private void Finish() { BuffInfo buffInfo = BuffInfo.GetBuffInfo(10091, effectValue[1], 1); 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(); if (lifetCycleHitPoint == null) { SkillPlayFinish(); return; } BetterList cBetterList = new BetterList(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); } } }