Exemple #1
0
    public static void AddRaidBosses(PogoEncounterList list)
    {
        var T1     = new[] { (int)Bulbasaur }; // Tier 1
        var T3     = new[] { (int)Bulbasaur }; // Tier 3
        var SE     = new[] { (int)Bulbasaur }; // Shiny eligible
        var bosses = T1.Concat(T3);

        foreach (var species in bosses)
        {
            var form = species switch
            {
                (int)Rattata => 1,
                _ => 0,
            };

            var tier  = T1.Contains(species) ? "1" : "3";
            var pkm   = list.GetDetails(species, form);
            var entry = new PogoEntry
            {
                Start          = new PogoDate(),
                End            = new PogoDate(),
                Type           = PogoType.Raid,
                LocalizedStart = true,
                NoEndTolerance = false,
                Comment        = $"Tier {tier} Raid Boss",
                Shiny          = SE.Contains(species) ? PogoShiny.Random : PogoShiny.Never,
            };

            // set species as available if this encounter is its debut
            if (!pkm.Available)
            {
                pkm.Available = true;
            }

            // set its evolutions as available as well
            var evos = EvoUtil.GetEvoSpecForms(species, form)
                       .Select(z => new { Species = z & 0x7FF, Form = z >> 11 })
                       .Where(z => EvoUtil.IsAllowedEvolution(species, form, z.Species, z.Form)).ToArray();

            foreach (var evo in evos)
            {
                var parent = list.GetDetails(evo.Species, evo.Form);
                if (!parent.Available)
                {
                    parent.Available = true;
                }
            }

            pkm.Add(entry); // add the entry!
        }
Exemple #2
0
    public static void AddRaidBosses(PogoEncounterList list)
    {
        var T1     = new[] { (int)Bulbasaur };
        var T3     = new[] { (int)Bulbasaur };
        var T5     = Array.Empty <int>(); // usually manually added
        var bosses = T1.Concat(T3).Concat(T5);

        foreach (var pkm in bosses)
        {
            var form = pkm switch
            {
                (int)Rattata => 1,
                _ => 0,
            };

            var species = list.GetDetails(pkm, form);
            var entry   = new PogoEntry
            {
                Start          = new PogoDate(),
                End            = new PogoDate(),
                Type           = PogoType.Raid,
                LocalizedStart = true,
                // NoEndTolerance = true,
                // Gender = pkm is (int)Frillish ? PogoGender.MaleOnly : PogoGender.Random,
            };

            if (pkm is not((int)Bulbasaur))
            {
                entry.Shiny = PogoShiny.Random;
            }

            if (T1.Contains(pkm))
            {
                entry.Comment = "Tier 1 Raid Boss";
            }
            if (T3.Contains(pkm))
            {
                entry.Comment = "Tier 3 Raid Boss";
            }
            if (T5.Contains(pkm))
            {
                entry.Comment = "Tier 5 Raid Boss";
            }

            // set debut species, and any of its evolutions, as available
            if (!species.Available)
            {
                var evos = EvoUtil.GetEvoSpecForms(pkm, form)
                           .Select(z => new { Species = z & 0x7FF, Form = z >> 11 })
                           .Where(z => EvoUtil.IsAllowedEvolution(pkm, form, z.Species, z.Form)).ToArray();

                foreach (var evo in evos)
                {
                    var parent = list.GetDetails(evo.Species, evo.Form);
                    if (!parent.Available)
                    {
                        parent.Available = true;
                    }
                }
                species.Available = true;
            }
            species.Add(entry);
        }