Пример #1
0
        //イベントエネミーフィルタリング
        public static Enemy EventFiltering(Enemy e, EnemyCollection master, int index)
        {
            Enemy temp = new Enemy();

            //EventEnemy Lv.100
            if (index == master.Array.Count() + 2 && e.Level == "100")
            {
                for (int i = 0; master.Array.Count() > i; i++)
                {
                    if (e.Name_ja == master.Array[i].Name_ja || e.Name_en == master.Array[i].Name_en && e.Level == "100")
                    {
                        if (e.Name_ja != "")
                        {
                            if (e.Name_ja.StartsWith(master.Array[i].Name_ja.Substring(0, 2)) == true)
                            {
                                Tonull(e);
                                Tonull(temp);
                                break;
                            }
                        }
                        else if (e.Name_en != "")
                        {
                            if (e.Name_en.StartsWith(master.Array[i].Name_en.Substring(0, 4)) == true)
                            {
                                Tonull(e);
                                Tonull(temp);
                                break;
                            }
                        }
                    }
                }
                for (int i = 0; master.Array.Count() > i; i++)
                {
                    if (e.Name_ja != master.Array[i].Name_ja || e.Name_en != master.Array[i].Name_en && e.Level == "100")
                    {
                        if (e.Name_ja == "")
                        {
                            e.Name_ja  = e.Name_en;
                            e.Name_ja += " (Eng)";
                        }
                        return(e);
                    }
                    else
                    {
                        e = temp;
                    }
                }
            }
            //EventEnemy Lv.60
            else if (index == master.Array.Count() + 1 && e.Level == "60")
            {
                for (int i = 0; master.Array.Count() > i; i++)
                {
                    if (e.Name_ja == master.Array[i].Name_ja || e.Name_en == master.Array[i].Name_en && e.Level == "60")
                    {
                        if (e.Name_ja != "")
                        {
                            if (e.Name_ja.StartsWith(master.Array[i].Name_ja.Substring(0, 2)) == true)
                            {
                                Tonull(e);
                                Tonull(temp);
                                break;
                            }
                        }
                        else if (e.Name_en != "")
                        {
                            if (e.Name_en.StartsWith(master.Array[i].Name_en.Substring(0, 4)) == true)
                            {
                                Tonull(e);
                                Tonull(temp);
                                break;
                            }
                        }
                    }
                }
                for (int i = 0; master.Array.Count() > i; i++)
                {
                    if (e.Name_ja != master.Array[i].Name_ja || e.Name_en != master.Array[i].Name_en && e.Level == "60")
                    {
                        if (e.Name_ja == "")
                        {
                            e.Name_ja  = e.Name_en;
                            e.Name_ja += " (Eng)";
                        }
                        return(e);
                    }
                    else
                    {
                        e = temp;
                    }
                }
            }
            //EventEnemy Lv.50
            else if (index == master.Array.Count() && e.Level == "50")
            {
                for (int i = 0; master.Array.Count() > i; i++)
                {
                    if (e.Name_ja == master.Array[i].Name_ja || e.Name_en == master.Array[i].Name_en && e.Level == "100")
                    {
                        if (e.Name_ja != "")
                        {
                            if (e.Name_ja.StartsWith(master.Array[i].Name_ja.Substring(0, 2)) == true)
                            {
                                Tonull(e);
                                Tonull(temp);
                                break;
                            }
                        }
                        else if (e.Name_en != "")
                        {
                            if (e.Name_en.StartsWith(master.Array[i].Name_en.Substring(0, 4)) == true)
                            {
                                Tonull(e);
                                Tonull(temp);
                                break;
                            }
                        }
                    }
                }
                for (int i = 0; master.Array.Count() > i; i++)
                {
                    if (e.Name_ja != master.Array[i].Name_ja || e.Name_en != master.Array[i].Name_en && e.Level == "100")
                    {
                        if (e.Name_ja == "")
                        {
                            e.Name_ja  = e.Name_en;
                            e.Name_ja += " (Eng)";
                        }
                        return(e);
                    }
                    else
                    {
                        e = temp;
                    }
                }
            }
            Tonull(e);
            return(e);
        }