(version 2)
(include "sci.sh")
(exports
    0 rm16
)
(use "Main")
(use "Class_255_0")
(use "NewFeature")
(use "Game")
(use "User")
(script 16)



(instance public rm16 of Rm
    (properties
        picture 16
        horizon 51
        north 17
        east 9
        south 83
        west 15
    )

    (method (init)
        (self:style(
            (switch (gGNumber)
                (case north
                    5
                )
                (case west
                    41
                )
                (case east
                    2
                )
                (case south
                    4
                )
            )
))
        (super:init())
        (switch (gGNumber)
            (case north
                (send gEgo:posn(proc0_17(168 (send gEgo:x) 93) (+ horizon 2)))
            )
            (case south
                (send gEgo:posn(163 188))
            )
            (case west
                (send gEgo:posn(3 proc0_17(113 (send gEgo:y) (+ 2 horizon))))
            )
            (default 
                (send gEgo:posn(317 proc0_17(152 (send gEgo:y) (+ 2 horizon))))
            )
        )
        (tree1:init())
        (tree:init())
        (tree2:init())
        (tree3:init())
        (flowers:init())
        (bush:init())
        (bush1:init())
        proc0_1()
        (send gEgo:
            init()
            illegalBits(-31744)
        )
        (if (proc0_12(2))
            (send gGoat:illegalBits(17414))
        )
        (self:setRegions(604))
    )


    (method (doit)
        (var temp0)
        = temp0 
            (switch ((send ((User:alterEgo)):edgeHit))
                (case 1
                    north
                )
                (case 2
                    east
                )
                (case 3
                    south
                )
                (case 4
                    west
                )
            )
        (if (temp0)
            (send gEgo:illegalBits(-32768))
            (if (proc0_12(2))
                (send gGoat:illegalBits(16384))
            )
            (self:newRoom(temp0))
        )
        (super:doit())
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
            )(else
                (if ((((((Said('look,look/castle') or proc0_14(pEvent 0 171 318 188)) or proc0_14(pEvent 284 154 316 170)) or proc0_14(pEvent 206 155 239 170)) or proc0_14(pEvent 126 156 160 171)) or proc0_14(pEvent 53 156 84 171)) or proc0_14(pEvent 0 157 15 172))
                    proc0_10(49)
                    (send pEvent:claimed(1))
                    proc255_0(16 0)
                )
            )
        )
    )

)
(instance tree of NewFeature
    (properties
        x 63
        y 8
        noun 1089
        nsTop -1
        nsBottom 18
        nsRight 127
        description 1111
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1116
    )
)
(instance tree1 of NewFeature
    (properties
        x 32
        y 27
        noun 1089
        nsTop 18
        nsBottom 37
        nsRight 64
        description 1111
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1116
    )
)
(instance tree2 of NewFeature
    (properties
        x 222
        y 19
        noun 1089
        nsTop -1
        nsLeft 171
        nsBottom 39
        nsRight 274
        description 1111
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1116
    )
)
(instance tree3 of NewFeature
    (properties
        x 289
        y 96
        noun 1089
        nsTop 76
        nsLeft 261
        nsBottom 116
        nsRight 318
        description 1111
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1116
    )
)
(instance flowers of NewFeature
    (properties
        x 228
        y 80
        noun 1093
        nsTop 76
        nsLeft 217
        nsBottom 85
        nsRight 240
        description 1175
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1182
    )
)
(instance bush of NewFeature
    (properties
        x 39
        y 47
        noun 1097
        nsTop 37
        nsBottom 57
        nsRight 79
        description 1271
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1276
    )
)
(instance bush1 of NewFeature
    (properties
        x 240
        y 47
        noun 1097
        nsTop 39
        nsLeft 179
        nsBottom 55
        nsRight 301
        description 1271
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1276
    )
)
