Ejemplo n.º 1
0
                public Block(Layout parent, EndianBinaryReader r)
                {
                    Parent = parent;

                    Elevations    = r.ReadByte();
                    Passage       = r.ReadEnum <LayoutBlockPassage>();
                    BlocksetBlock = Blockset.LoadOrGet(r.ReadInt32()).Blocks[r.ReadInt32()];
                }
Ejemplo n.º 2
0
        public static PBEBattleTerrain GetPBEBattleTerrainFromBlock(Blockset.Block block)
        {
            BlocksetBlockBehavior behavior = block.Behavior;

            switch (behavior)
            {
            case BlocksetBlockBehavior.AllowElevationChange_Cave_Encounter:
            case BlocksetBlockBehavior.Cave_Encounter: return(PBEBattleTerrain.Cave);

            case BlocksetBlockBehavior.Grass_Encounter:
            case BlocksetBlockBehavior.Grass_SpecialEncounter: return(PBEBattleTerrain.Grass);

            case BlocksetBlockBehavior.Surf: return(PBEBattleTerrain.Water);

            default: return(PBEBattleTerrain.Plain);
            }
        }