Exemplo n.º 1
0
 public static bool CalculateIfShake(PokemonInstance pokemon,
                                     BattleData battleData,
                                     PokeBall pokeBall)
 => CalculateIfShake(CalculateShakeProbability(CalculateModifiedCatchRate(pokemon, pokeBall.GetCatchChanceModifier(pokemon, battleData))));
Exemplo n.º 2
0
        public static Item[] GetRegistryItems()
        {
            //Original item ids:
            //https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_IV)

            PokeBall[] items = new PokeBall[]
            {
                new BasicPokeBall()
                {
                    itemName          = "Poke Ball",
                    catchRateModifier = 1,
                    id           = 4,
                    resourceName = "pokeball",
                    description  = "A device for catching wild Pokemon. It is thrown like a ball at the target. It is designed as a capsule system."
                },

                new BasicPokeBall()
                {
                    itemName          = "Great Ball",
                    catchRateModifier = 1.5F,
                    id           = 3,
                    resourceName = "greatball",
                    description  = "A good, high-performance Ball that provides a higher Pokemon catch rate than a standard Poke Ball."
                },

                new BasicPokeBall()
                {
                    itemName          = "Ultra Ball",
                    catchRateModifier = 2,
                    id           = 2,
                    resourceName = "ultraball",
                    description  = "An ultra-performance Ball that provides a higher Pokemon catch rate than a Great Ball."
                },

                new BasicPokeBall()
                {
                    itemName          = "Master Ball",
                    catchRateModifier = 255,
                    id           = 1,
                    resourceName = "masterball",
                    description  = "The best Ball with the ultimate level of performance. It will catch any wild Pokémon without fail."
                },

                new BasicPokeBall()
                {
                    itemName          = "Safari Ball",
                    catchRateModifier = 1.5F,
                    id           = 5,
                    resourceName = "safariball",
                    description  = "A special Poke Ball that is used only in the Great Marsh. It is decorated in a camouflage pattern."
                },

                new NetBall()
                {
                    itemName     = "Net Ball",
                    id           = 6,
                    resourceName = "netball",
                    description  = "A somewhat different Poke Ball that works especially well on Water- and Bug-type Pokemon."
                },

                new TimerBall()
                {
                    itemName     = "Timer Ball",
                    id           = 10,
                    resourceName = "timerball",
                    description  = "A somewhat different Ball that becomes progressively better the more turns there are in a battle."
                },

                new QuickBall()
                {
                    itemName     = "Quick Ball",
                    id           = 15,
                    resourceName = "quickball",
                    description  = "A somewhat different Ball that provides a better catch rate if it is used at the start of a wild encounter."
                }
            };

            return(items);
        }