Ejemplo n.º 1
0
        private static void Metronome(AtkContext atk)
        {
LOOP:
            var m = MoveTypeE.Get(atk.Controller.GetRandomInt(1, RomData.MOVES));

            if (METRONOME_BLOCK.Contains(m.Id) || m.Zmove)
            {
                goto LOOP;
            }
            atk.StartExecute(m, null, "Metronome");
        }
Ejemplo n.º 2
0
        private static void NaturePower(AtkContext atk, Tile selectTile = null)
        {
            MoveTypeE m;

            switch (atk.Controller.GameSettings.Terrain)
            {
            case Terrain.Path:
                m = MoveTypeE.Get(Ms.TRI_ATTACK);
                break;

            default:
                atk.Controller.ReportBuilder.ShowLog("error");
                return;
            }
            atk.StartExecute(m, selectTile, "NaturePower");
        }
        private static void NaturePower(AtkContext atk)
        {
            MoveTypeE m;

            switch (atk.Controller.GameSettings.Terrain)
            {
            case Terrain.Path:
                m = MoveTypeE.Get(Ms.EARTHQUAKE);
                break;

            default:
                atk.Controller.ReportBuilder.ShowLog("error");
                return;
            }
            atk.StartExecute(m, null, "NaturePower");
        }
Ejemplo n.º 4
0
        private static void Assist(AtkContext atk)
        {
            var aer   = atk.Attacker;
            var moves = new List <MoveTypeE>();

            foreach (var pm in aer.Pokemon.Owner.Pokemons)
            {
                foreach (var m in pm.Pokemon.Moves)
                {
                    if (pm != aer && !(ASSIST_BLOCK.Contains(m.Type.Id)))
                    {
                        moves.Add(MoveTypeE.Get(m.Type));
                    }
                }
            }
            if (moves.Count == 0)
            {
                atk.FailAll();
            }
            else
            {
                atk.StartExecute(moves[aer.Controller.GetRandomInt(0, moves.Count - 1)]);
            }
        }