(version 2)
(include "sci.sh")
(exports
    0 rm35
)
(use "Main")
(use "Class_255_0")
(use "NewFeature")
(use "Cycle")
(use "Game")
(use "User")
(use "Obj")
(script 35)



(instance public rm35 of Rm
    (properties
        picture 35
        north 46
        east 34
        south 30
        west 36
        picAngle 60
    )

    (method (init)
        (self:style(
            (switch (gGNumber)
                (case north
                    5
                )
                (case west
                    3
                )
                (case east
                    2
                )
                (case south
                    4
                )
            )
))
        (super:init())
        (switch (gGNumber)
            (case north
                (send gEgo:posn(proc0_17(190 (send gEgo:x) 109) 60))
            )
            (case south
                (send gEgo:y(188))
            )
            (case west
                (send gEgo:posn(3 proc0_17(188 proc0_18(175 (send gEgo:y) 166) 75)))
            )
            (default 
                (send gEgo:posn(317 proc0_17(175 (send gEgo:y) 69)))
            )
        )
        (send gEgo:init())
        proc0_1()
        (if (not proc0_12(2) and Random(0 3))
            (self:setRegions(602))
        )
        (smalltree1:init())
        (smalltree2:init())
        (smalltree3:init())
        (smalltree4:init())
        (smalltree5:init())
        (smalltree6:init())
        (smalltree7:init())
        (smalltree8:init())
        (smalltree9:init())
        (smalltree10:init())
        (smalltree11:init())
        (plant1:init())
        (plant2:init())
    )


    (method (doit)
        (var temp0)
        (if ((send gMenace:script) and ((<> (send gMenace:script) ScriptID(602 1)) or gTLHandsOff))
            (send ((send gMenace:script)):doit())
        )(else
            (if ((& (send gEgo:onControl(1)) $1000) and (<> (send gEgo:script) climbHill))
                (send gEgo:setScript(climbHill))
            )(else
                = temp0 
                    (switch ((send ((User:alterEgo)):edgeHit))
                        (case 1
                            north
                        )
                        (case 2
                            east
                        )
                        (case 3
                            south
                        )
                        (case 4
                            west
                        )
                    )
                (if (temp0)
                    proc0_26()
                    (self:newRoom(temp0))
                )(else
                    (if (script)
                        (send script:doit())
                    )
                )
            )
        )
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('get,get,move,move/boulder'))
                    proc255_0(35 0)
                )(else
                    (if (((((Said('look,look[<!*]/boulder') or proc0_14(pEvent 121 114 309 126)) or proc0_14(pEvent 141 106 301 114)) or proc0_14(pEvent 177 96 289 106)) or proc0_14(pEvent 192 87 279 96)) or proc0_14(pEvent 206 77 254 87))
                        proc255_0(35 1)
                    )(else
                        (if (Said('look,look>'))
                            (if (Said('[<at,around][/room,ceder,clearing]'))
                                proc255_0(35 2)
                            )(else
                                (if (Said('/ceder'))
                                    proc255_0(35 3)
                                )(else
                                    (if (Said('<below/boulder'))
                                        proc255_0(35 0)
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )

)
(instance climbHill of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                proc0_10(44)
                (send gEgo:
                    illegalBits(0)
                    ignoreActors()
                    setLoop(3)
                    setPri(0)
                    setMotion(MoveTo (send gEgo:x) + (send gEgo:y) 15 self)
                )
            )
            (case 1
                proc0_1()
                proc0_3()
                proc0_11(44)
                (send global2:newRoom((send global2:north)))
                (self:dispose())
            )
        )
    )

)
(instance smalltree1 of NewFeature
    (properties
        x 24
        y 117
        noun 1841
        nsTop 100
        nsBottom 135
        nsRight 49
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance smalltree2 of NewFeature
    (properties
        x 71
        y 122
        noun 1841
        nsTop 105
        nsLeft 48
        nsBottom 140
        nsRight 94
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance smalltree3 of NewFeature
    (properties
        x 100
        y 127
        noun 1841
        nsTop 118
        nsLeft 94
        nsBottom 136
        nsRight 107
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance smalltree4 of NewFeature
    (properties
        x 34
        y 152
        noun 1841
        nsTop 137
        nsLeft 29
        nsBottom 168
        nsRight 39
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance smalltree5 of NewFeature
    (properties
        x 35
        y 15
        noun 1841
        nsTop 11
        nsLeft 3
        nsBottom 20
        nsRight 67
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance smalltree6 of NewFeature
    (properties
        x 80
        y 20
        noun 1841
        nsTop 14
        nsLeft 67
        nsBottom 27
        nsRight 93
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance smalltree7 of NewFeature
    (properties
        x 34
        y 32
        noun 1841
        nsTop 28
        nsLeft 10
        nsBottom 37
        nsRight 58
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance smalltree8 of NewFeature
    (properties
        x 50
        y 47
        noun 1841
        nsTop 42
        nsLeft 12
        nsBottom 51
        nsRight 89
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance smalltree9 of NewFeature
    (properties
        x 225
        y 52
        noun 1841
        nsTop 42
        nsLeft 198
        nsBottom 63
        nsRight 252
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance smalltree10 of NewFeature
    (properties
        x 251
        y 34
        noun 1841
        nsTop 25
        nsLeft 227
        nsBottom 43
        nsRight 275
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance smalltree11 of NewFeature
    (properties
        x 235
        y 71
        noun 1841
        nsTop 66
        nsLeft 185
        nsBottom 76
        nsRight 286
        description 1877
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1888
    )
)
(instance plant1 of NewFeature
    (properties
        x 284
        y 157
        noun 1850
        nsTop 135
        nsLeft 266
        nsBottom 180
        nsRight 303
        description 2070
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2076
    )
)
(instance plant2 of NewFeature
    (properties
        x 246
        y 173
        noun 1850
        nsTop 167
        nsLeft 228
        nsBottom 179
        nsRight 265
        description 2070
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2076
    )
)
