private static List <BaseNpc> Find_Self(FilterArgs Args) { return(new List <BaseNpc> { Args.Master }); }
public static List <BaseNpc> Find(FilterRule Rule, FilterArgs Args) { var List = FilterTeam.Find(Rule.TeamType, Args); List = FilterRange.Find(List, Rule.RangeType, Args); return(FilterNpc.Find(List, Rule.NpcType, Args)); }
private static List <BaseNpc> Find_All(FilterArgs Args) { var Result = Find_Team(Args); Result.AddRange(Find_Enemy(Args)); return(Result); }
private static List <BaseNpc> Find_TeamExceptSelf(FilterArgs Args) { var Result = Find_Team(Args); Result.Remove(Args.Master); return(Result); }
private static List <BaseNpc> Find_Attacker(FilterArgs Args) { var Result = new List <BaseNpc>(); if (Args.Master.Action.IsValidAttacker()) { Result.Add(Args.Master); } return(Result); }
private static List <BaseNpc> Find_Random(List <BaseNpc> List, FilterArgs Args) { if (List.Count == 0) { return(List); } var Index = UnityEngine.Random.Range(0, List.Count); return(new List <BaseNpc> { List[Index] }); }
public static List <BaseNpc> Find(FilterTeamType Type, FilterArgs Args) { var NpcList = FuncList_[Type].Invoke(Args); var Result = new List <BaseNpc>(); foreach (var Npc in NpcList) { if (Npc.IsValid()) { Result.Add(Npc); } } return(Result); }
private static List <BaseNpc> Find_MaxHpMinimum(List <BaseNpc> List, FilterArgs Args) { var Value = float.MaxValue; BaseNpc Target = null; foreach (var Npc in List) { var Hp = Npc.CalcFinalAttr(NpcAttrIndex.MaxHp); if (Hp < Value) { Value = Hp; Target = Npc; } } return(Target == null ? new List <BaseNpc>() : new List <BaseNpc> { Target }); }
private static List <BaseNpc> Find_Nearest(List <BaseNpc> List, FilterArgs Args) { var Value = float.MaxValue; BaseNpc Target = null; foreach (var Npc in List) { var Dist = Vector2.Distance(Args.Position, Npc.Position); if (Dist < Value) { Value = Dist; Target = Npc; } } return(Target == null ? new List <BaseNpc>() : new List <BaseNpc> { Target }); }
private static List <BaseNpc> Find_DamageMaximum(List <BaseNpc> List, FilterArgs Args) { var Value = float.MinValue; BaseNpc Target = null; foreach (var Npc in List) { var Damage = Npc.CalcFinalAttr(NpcAttrIndex.Damage); if (Damage > Value) { Value = Damage; Target = Npc; } } return(Target == null ? new List <BaseNpc>() : new List <BaseNpc> { Target }); }
private static List <BaseNpc> Find_HpPercentMaximum(List <BaseNpc> List, FilterArgs Args) { var Value = float.MinValue; BaseNpc Target = null; foreach (var Npc in List) { var Percent = Npc.CalcFinalAttr(NpcAttrIndex.Hp) / Npc.CalcFinalAttr(NpcAttrIndex.MaxHp); if (Percent > Value) { Value = Percent; Target = Npc; } } return(Target == null ? new List <BaseNpc>() : new List <BaseNpc> { Target }); }
private static List <BaseNpc> Find_Enemy(FilterArgs Args) { return(NpcManager.GetNpcList(Args.Team.Opposite())); }
private static List <BaseNpc> Find_Team(FilterArgs Args) { return(NpcManager.GetNpcList(Args.Team)); }
private static List <BaseNpc> Find_All(List <BaseNpc> List, FilterArgs Args) { return(List); }
public static List <BaseNpc> Find(List <BaseNpc> List, FilterNpcType Type, FilterArgs Args) { return(FuncList_[Type].Invoke(List, Args)); }