using System.Collections.Generic; using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic; using GameLogic.Combat.Buff; using GameLogic.Combat.CombatTool; using GameLogic.Combat.Hero; using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface; namespace GameLogic.Combat.Skill { /// /// 随机为一名队友恢复{0}%生命值 /// public class S9092 : SkillBasic { protected override void ProUseSkill() { CombatHeroEntity[] allHero = CombatController.currActiveCombat.CombatHeroController.GetHero(CombatHeroEntity.IsEnemy); CombatHeroEntity target = null; float minHp = 9999; for (int i = 0; i < allHero.Length; i++) { CombatHeroEntity t = allHero[i]; if (t.HpBl < minHp) { minHp = t.HpBl; target = t; } } BetterList currTarget = new BetterList(); if (target != null) { currTarget.Add(target.GetMainHotPoin()); } ActivationTimeLineData("9092", currTarget: currTarget); } protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity, ITimelineFxLogic timelineFxLogic, TriggerData triggerData, ISkillFeatures skillFeatures) { List allBuff = targetEntity.combatHeroEntity.BuffControl.GetBuffBasicForBuffType(2, 1); if (allBuff.Count > 0) { int index = CombatCalculateTool.Instance.GetOdd(0, allBuff.Count); targetEntity.combatHeroEntity.BuffControl.RemoveBuff(allBuff[index]); } } } }