示例#1
0
        // Token: 0x06000453 RID: 1107 RVA: 0x0000FBC4 File Offset: 0x0000DFC4
        public bool get_Puede_Cambiar_Mapa(MapaTeleportCeldas direccion, Celda celda)
        {
            Console.WriteLine("get puede cambiar Map");
            Console.WriteLine(direccion);
            bool result;

            switch (direccion)
            {
            case MapaTeleportCeldas.HAUT:
                result = (celda.y < 0 && celda.x - Math.Abs(celda.y) == 1);
                break;

            case MapaTeleportCeldas.DROITE:
                result = (celda.x - 27 == celda.y);
                break;

            case MapaTeleportCeldas.BAS:
                result = (celda.x + celda.y == 31);
                break;

            case MapaTeleportCeldas.GAUCHE:
                result = (celda.x - 1 == celda.y);
                break;

            default:
                result = true;
                break;
            }
            return(result);
        }
示例#2
0
        // Token: 0x06000455 RID: 1109 RVA: 0x0000FCCC File Offset: 0x0000E0CC
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direccion)
        {
            bool flag = this.cuenta.esta_ocupado();
            bool result;

            if (flag)
            {
                result = false;
            }
            else
            {
                List <Celda> list = (from celda in this.cuenta.juego.mapa.celdas
                                     where celda.tipo == TipoCelda.CELDA_TELEPORT
                                     select celda).ToList <Celda>();
                Console.WriteLine("celdas_teleport.count");
                Console.WriteLine(list.Count);
                Console.WriteLine(direccion.ToString());
                while (list.Count > 0)
                {
                    Celda celda2 = list[Randomize.get_Random(0, list.Count)];
                    bool  flag2  = this.get_Cambiar_Mapa(direccion, celda2);
                    if (flag2)
                    {
                        return(true);
                    }
                    list.Remove(celda2);
                }
                this.cuenta.logger.log_Peligro("MOUVEMENTS", "Aucune cellule cible n'a été trouvée, utilisez une autre méthode (gauche,droite,bas,haut) ou cellID");
                result = true;
            }
            return(result);
        }
示例#3
0
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direccion, Cell celda, bool ignoreGroupOnSun = false)
        {
            if (cuenta.Is_Busy() || personaje.inventario.porcentaje_pods >= 100)
            {
                return(false);
            }

            if (!get_Puede_Cambiar_Mapa(direccion, celda))
            {
                return(false);
            }

            return(get_Mover_Para_Cambiar_mapa(celda, ignoreGroupOnSun));
        }
示例#4
0
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direccion, Celda celda)
        {
            if (cuenta.esta_ocupado)
            {
                return(false);
            }

            if (!get_Puede_Cambiar_Mapa(direccion, celda))
            {
                return(false);
            }

            return(get_Mover_Para_Cambiar_mapa(celda));
        }
示例#5
0
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direccion, short celda_id, bool esquivar_monstruos)
        {
            if (cuenta.esta_ocupado)
            {
                return(false);
            }

            if (!get_Puede_Cambiar_Mapa(direccion, celda_id))
            {
                return(false);
            }

            return(get_Mover_Para_Cambiar_mapa(celda_id, esquivar_monstruos));
        }
示例#6
0
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direccion, Celda celda)
        {
            if (cuenta.esta_ocupado() || personaje.inventario.porcentaje_pods >= 100)
            {
                return(false);
            }

            if (!get_Puede_Cambiar_Mapa(direccion, celda))
            {
                return(false);
            }

            return(get_Mover_Para_Cambiar_mapa(celda));
        }
示例#7
0
        // Token: 0x06000454 RID: 1108 RVA: 0x0000FC6C File Offset: 0x0000E06C
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direccion, Celda celda)
        {
            bool flag = this.cuenta.esta_ocupado() || this.personaje.inventario.porcentaje_pods >= 100;
            bool result;

            if (flag)
            {
                result = false;
            }
            else
            {
                bool flag2 = this.get_Puede_Cambiar_Mapa(direccion, celda);
                bool flag3 = !flag2;
                result = (!flag3 && this.get_Mover_Para_Cambiar_mapa(celda));
            }
            return(result);
        }
示例#8
0
        public bool get_Puede_Cambiar_Mapa(MapaTeleportCeldas direccion, Celda celda)
        {
            switch (direccion)
            {
            case MapaTeleportCeldas.IZQUIERDA:
                return((celda.x - 1) == celda.y);

            case MapaTeleportCeldas.DERECHA:
                return((celda.x - 27) == celda.y);

            case MapaTeleportCeldas.ABAJO:
                return((celda.x + celda.y) == 31);

            case MapaTeleportCeldas.ARRIBA:
                return(celda.y < 0 && (celda.x - Math.Abs(celda.y)) == 1);
            }

            return(true); // direccion NINGUNA
        }
示例#9
0
        public bool get_Verificar_Direccion_Correcta(MapaTeleportCeldas direccion, Celda celda)
        {
            switch (direccion)
            {
            case MapaTeleportCeldas.IZQUIERDA:
                return((celda.x - 1) == celda.y || (celda.x - 2) == celda.y);

            case MapaTeleportCeldas.DERECHA:
                return(celda.x - (mapa.anchura + mapa.altura - 5) == celda.y || celda.x - (mapa.anchura + mapa.altura - 5) == celda.y - 1);

            case MapaTeleportCeldas.ABAJO:
                return(celda.y + celda.x > (mapa.anchura + mapa.altura - 5));

            case MapaTeleportCeldas.ARRIBA:
                return(celda.y < 0 && (celda.x - Math.Abs(celda.y)) < 5);
            }

            return(direccion == MapaTeleportCeldas.NINGUNO); //direccion ninguna
        }
示例#10
0
        public bool get_Puede_Cambiar_Mapa(MapaTeleportCeldas direccion, Cell celda)
        {
            switch (direccion)
            {
            case MapaTeleportCeldas.LEFT:
                return((celda.x - 1) == celda.y);

            case MapaTeleportCeldas.RIGHT:
                return((celda.x - 27) == celda.y);

            case MapaTeleportCeldas.BOTTOM:
                return((celda.x + celda.y) == 31);

            case MapaTeleportCeldas.TOP:
                return(celda.y < 0 && (celda.x - Math.Abs(celda.y)) == 1);
            }

            return(true); // direccion NINGUNA
        }
示例#11
0
        public bool get_Puede_Cambiar_Mapa(MapaTeleportCeldas direccion, short celda_id)
        {
            Celda celda = mapa.celdas[celda_id];

            switch (direccion)
            {
            case MapaTeleportCeldas.IZQUIERDA:
                return((celda.x - 1) == celda.y);

            case MapaTeleportCeldas.DERECHA:
                return((celda.x - 27) == celda.y);

            case MapaTeleportCeldas.ABAJO:
                return((celda.x + celda.y) == 31);

            case MapaTeleportCeldas.ARRIBA:
                return((celda.x - Math.Abs(celda.y)) == 1);
            }

            return(true);
        }
示例#12
0
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direccion)
        {
            if (cuenta.esta_ocupado || personaje.inventario.porcentaje_pods >= 100)
            {
                return(false);
            }

            List <Celda> celdas_teleport = cuenta.juego.mapa.celdas.Where(celda => celda.es_Teleport()).ToList();

            while (celdas_teleport.Count > 0)
            {
                Celda celda = celdas_teleport[Extensiones.get_Nuevo_Random(0, celdas_teleport.Count)];

                if (get_Cambiar_Mapa(direccion, celda))
                {
                    return(true);
                }

                celdas_teleport.Remove(celda);
            }
            return(false);
        }
示例#13
0
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direccion)
        {
            if (cuenta.esta_ocupado())
            {
                return(false);
            }

            List <Celda> celdas_teleport = cuenta.juego.mapa.celdas.Where(celda => celda.tipo == TipoCelda.CELDA_TELEPORT).Select(celda => celda).ToList();

            while (celdas_teleport.Count > 0)
            {
                Celda celda = celdas_teleport[Randomize.get_Random(0, celdas_teleport.Count)];

                if (get_Cambiar_Mapa(direccion, celda))
                {
                    return(true);
                }

                celdas_teleport.Remove(celda);
            }

            cuenta.logger.log_Peligro("MOVIMIENTOS", "No se ha encontrado celda de destino, usa el metodo por id");
            return(false);
        }
示例#14
0
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direccion)
        {
            if (cuenta.Is_Busy())
            {
                return(false);
            }

            List <Cell> celdas_teleport = cuenta.game.map.mapCells.Where(celda => celda.cellType == CellTypes.TELEPORT_CELL).Select(celda => celda).ToList();

            while (celdas_teleport.Count > 0)
            {
                Cell celda = celdas_teleport[Randomize.get_Random(0, celdas_teleport.Count)];

                if (get_Cambiar_Mapa(direccion, celda))
                {
                    return(true);
                }

                celdas_teleport.Remove(celda);
            }

            cuenta.Logger.LogDanger("MOUVEMENT", "Aucune cellule de destination trouvée, utiliser la méthode : TOP|BOTTOM|RIGHT|LEFT");
            return(false);
        }
示例#15
0
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direction, bool esquivar_monstruos)
        {
            if (cuenta.esta_ocupado)
            {
                return(false);
            }

            List <short> celdas_teleport = cuenta.personaje.mapa.celdas.Where(celda => celda.tipo == TipoCelda.CELDA_TELEPORT).Select(celda => celda.id).ToList();

            while (celdas_teleport.Count > 0)
            {
                short celda_id = celdas_teleport[Randomize.get_Random_Int(0, celdas_teleport.Count)];

                if (get_Cambiar_Mapa(direction, celda_id, esquivar_monstruos))
                {
                    return(true);
                }

                celdas_teleport.Remove(celda_id);
            }

            cuenta.logger.log_Peligro("MOVIMIENTOS", "No se ha encontrado celda de destino");
            return(false);
        }
示例#16
0
        public bool get_Cambiar_Mapa(MapaTeleportCeldas direccion)
        {
            if (cuenta.esta_ocupado())
            {
                return(false);
            }

            List <Celda> celdas_teleport = cuenta.juego.mapa.celdas.Where(celda => celda.tipo == TipoCelda.CELDA_TELEPORT).Select(celda => celda).ToList();

            while (celdas_teleport.Count > 0)
            {
                Celda celda = celdas_teleport[Randomize.get_Random(0, celdas_teleport.Count)];

                if (get_Cambiar_Mapa(direccion, celda))
                {
                    return(true);
                }

                celdas_teleport.Remove(celda);
            }

            cuenta.logger.log_Peligro("MOUVEMENT", "Aucune cellule de destination trouvée, utiliser la méthode : TOP|BOTTOM|RIGHT|LEFT");
            return(false);
        }
 public CambiarMapaAccion(MapaTeleportCeldas _direccion, short _celda_id)
 {
     direccion = _direccion;
     celda_id  = _celda_id;
 }
示例#18
0
 public ChangeMapAction(MapaTeleportCeldas _direccion, short _celda_id)
 {
     direccion = _direccion;
     celda_id  = _celda_id;
 }