Example #1
0
        public override byte GetUsagePower(BattleData battleData, PokemonInstance user, PokemonInstance target)
        {
            float r = battleData.RandomValue01();

            if (r <= 5)
            {
                return(10);
            }
            else if (r <= 15)
            {
                return(30);
            }
            else if (r <= 35)
            {
                return(50);
            }
            else if (r <= 65)
            {
                return(70);
            }
            else if (r <= 85)
            {
                return(90);
            }
            else if (r <= 95)
            {
                return(110);
            }
            else
            {
                return(150);
            }
        }
Example #2
0
        public override byte GetUsagePower(BattleData battleData, PokemonInstance user, PokemonInstance target)
        {
            float r = battleData.RandomValue01();

            if (r <= 0.2F)
            {
                return(5);
            }
            else if (r <= 0.6F)
            {
                return(40);
            }
            else if (r <= 0.9F)
            {
                return(80);
            }
            else
            {
                return(120);
            }
        }
 public bool GetRandomProtectionSucceeds(BattleData battleData)
 => battleData.RandomValue01() <= Mathf.Pow(2F, -consecutiveProtectionMoves);