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



(instance public rm15 of Rm
    (properties
        picture 15
        horizon 51
        north 18
        east 16
        south 2
        west 14
    )

    (method (init)
        (self:style(
            (switch (gGNumber)
                (case north
                    5
                )
                (case west
                    3
                )
                (case east
                    40
                )
                (case south
                    4
                )
            )
))
        (super:init())
        (switch (gGNumber)
            (case north
                (send gEgo:posn(proc0_17(223 (send gEgo:x) 153) (+ horizon 2)))
            )
            (case south
                (send gEgo:posn(163 188))
            )
            (case west
                (send gEgo:posn(3 proc0_17(148 (send gEgo:y) (+ 2 horizon))))
            )
            (default 
                (send gEgo:posn(317 proc0_17(113 (send gEgo:y) (+ 2 horizon))))
            )
        )
        (bush:init())
        (bush1:init())
        (bush2:init())
        (bush3:init())
        (tree:init())
        (tree1:init())
        (tree2:init())
        (tree3:init())
        (flowers: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 170 318 188)) or proc0_14(pEvent 304 157 320 174)) or proc0_14(pEvent 235 156 266 173)) or proc0_14(pEvent 159 156 193 172)) or proc0_14(pEvent 79 155 113 172)) or proc0_14(pEvent 4 154 36 171))
                    proc0_10(49)
                    (send pEvent:claimed(1))
                    proc255_0(15 0)
                )
            )
        )
    )

)
(instance tree2 of NewFeature
    (properties
        x 60
        y 18
        noun 1219
        nsTop -1
        nsBottom 38
        nsRight 120
        description 1241
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1246
    )
)
(instance tree1 of NewFeature
    (properties
        x 128
        y 4
        noun 1219
        nsTop -1
        nsLeft 120
        nsBottom 9
        nsRight 136
        description 1241
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1246
    )
)
(instance tree of NewFeature
    (properties
        x 15
        y 75
        noun 1219
        nsTop 61
        nsBottom 89
        nsRight 30
        description 1241
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1246
    )
)
(instance tree3 of NewFeature
    (properties
        x 279
        y 24
        noun 1219
        nsTop -1
        nsLeft 238
        nsBottom 50
        nsRight 320
        description 1241
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1246
    )
)
(instance bush of NewFeature
    (properties
        x 79
        y 47
        noun 1223
        nsTop 40
        nsLeft 19
        nsBottom 54
        nsRight 139
        description 1305
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1310
    )
)
(instance flowers of NewFeature
    (properties
        x 92
        y 80
        noun 1227
        nsTop 75
        nsLeft 81
        nsBottom 85
        nsRight 104
        description 1363
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1370
    )
)
(instance bush1 of NewFeature
    (properties
        x 281
        y 51
        noun 1223
        nsTop 46
        nsLeft 242
        nsBottom 57
        nsRight 320
        description 1305
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1459
    )
)
(instance bush2 of NewFeature
    (properties
        x 285
        y 43
        noun 1223
        nsTop 40
        nsLeft 251
        nsBottom 46
        nsRight 319
        description 1305
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1459
    )
)
(instance bush3 of NewFeature
    (properties
        x 297
        y 36
        noun 1223
        nsTop 33
        nsLeft 275
        nsBottom 40
        nsRight 320
        description 1305
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1459
    )
)
