예제 #1
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
            });
        }
예제 #2
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
            });
        }
예제 #3
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
            });
        }