예제 #1
0
 private static List <BaseNpc> Find_Self(FilterArgs Args)
 {
     return(new List <BaseNpc>
     {
         Args.Master
     });
 }
예제 #2
0
        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));
        }
예제 #3
0
        private static List <BaseNpc> Find_All(FilterArgs Args)
        {
            var Result = Find_Team(Args);

            Result.AddRange(Find_Enemy(Args));
            return(Result);
        }
예제 #4
0
        private static List <BaseNpc> Find_TeamExceptSelf(FilterArgs Args)
        {
            var Result = Find_Team(Args);

            Result.Remove(Args.Master);
            return(Result);
        }
예제 #5
0
        private static List <BaseNpc> Find_Attacker(FilterArgs Args)
        {
            var Result = new List <BaseNpc>();

            if (Args.Master.Action.IsValidAttacker())
            {
                Result.Add(Args.Master);
            }
            return(Result);
        }
예제 #6
0
        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]
            });
        }
예제 #7
0
        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);
        }
예제 #8
0
        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
            });
        }
예제 #9
0
        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
            });
        }
예제 #10
0
        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
            });
        }
예제 #11
0
        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
            });
        }
예제 #12
0
 private static List <BaseNpc> Find_Enemy(FilterArgs Args)
 {
     return(NpcManager.GetNpcList(Args.Team.Opposite()));
 }
예제 #13
0
 private static List <BaseNpc> Find_Team(FilterArgs Args)
 {
     return(NpcManager.GetNpcList(Args.Team));
 }
예제 #14
0
 private static List <BaseNpc> Find_All(List <BaseNpc> List, FilterArgs Args)
 {
     return(List);
 }
예제 #15
0
 public static List <BaseNpc> Find(List <BaseNpc> List, FilterNpcType Type, FilterArgs Args)
 {
     return(FuncList_[Type].Invoke(List, Args));
 }