(version 2)
(include "sci.sh")
(exports
    0 rm73
)
(use "Main")
(use "Class_255_0")
(use "NewFeature")
(use "n958")
(use "Extra")
(use "Cycle")
(use "Game")
(use "User")
(use "Obj")
(script 73)



(instance public rm73 of Rm
    (properties
        picture 73
        north 48
        south 74
    )

    (method (init)
        (self:style(
            (switch (gGNumber)
                (case north
                    7
                )
                (case south
                    4
                )
            )
))
        proc958_0(132 17 70 31 95)
        proc958_0(128 18 274)
        (super:init())
        proc0_1()
        (switch (gGNumber)
            (case south
                (send gEgo:
                    posn(
                        (if (>= (send gEgo:x) 267)
                            250
                        )(else
                            (if (<= (send gEgo:x) 240)
                                157
                            )(else
                                199
                            )
                        )
 188)
                    init()
                )
            )
            (default 
                (send gEgo:
                    view(18)
                    setLoop(0)
                    posn(182 -42)
                    ignoreControl(-32768)
                    init()
                )
                (self:setScript(fallScript))
            )
        )
        (if (>= global101 1)
            (d1:
                setPri(14)
                init()
            )
            (d2:
                setPri(15)
                init()
            )
            (d3:
                setPri(14)
                init()
            )
            (d4:
                setPri(13)
                init()
            )
            (d5:
                setPri(14)
                init()
            )
            (d6:
                setPri(13)
                init()
            )
        )
        (light1:init())
        (sunbeam1:init())
        (sunbeam2:init())
        (sunbeam3:init())
        (sunbeam4:init())
        (sunbeam5:init())
        (wall:init())
        (wall2:init())
        (stalactite1:init())
        (stalactite2:init())
        (stalactite3:init())
        (stalactite4:init())
    )


    (method (doit)
        (var temp0)
        (if (script)
            (send script:doit())
        )(else
            = temp0 
                (switch ((send ((User:alterEgo)):edgeHit))
                    (case 1
                        north
                    )
                    (case 2
                        east
                    )
                    (case 3
                        south
                    )
                    (case 4
                        west
                    )
                )
            (if (temp0)
                (self:newRoom((= temp0 
                        (switch ((send ((User:alterEgo)):edgeHit))
                            (case 1
                                north
                            )
                            (case 2
                                east
                            )
                            (case 3
                                south
                            )
                            (case 4
                                west
                            )
                        )
)))
            )
        )
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('listen'))
                    proc255_0(73 0)
                )(else
                    (if (Said('smell,smell/cave'))
                        proc255_0(73 1)
                    )(else
                        (if (Said('drink,get,get/drink,water'))
                            proc255_0(73 2)
                        )(else
                            (if (Said('light/torch,match'))
                                proc255_0(73 3)
                            )(else
                                (if (Said('/wall[<cave]>') or (Said('/cave>') and Said('/side>')))
                                    (if (Said('look,look'))
                                        proc255_0(73 4)
                                    )(else
                                        (if (Said('climb,climb,ascend'))
                                            proc255_0(73 5)
                                        )
                                    )
                                )(else
                                    (if (Said('get,get,turn,switch,light/light,flashlight'))
                                        proc255_0(73 6)
                                    )(else
                                        (if (Said('/boulder,mold>'))
                                            (if (Said('eat,consume'))
                                                proc255_0(73 7)
                                            )(else
                                                (if (Said('get'))
                                                    proc255_0(73 8)
                                                )(else
                                                    (if (Said('look,look'))
                                                        proc255_0(73 9)
                                                    )
                                                )
                                            )
                                        )(else
                                            (if (Said('/stalactite,stalactite>'))
                                                (if (Said('get,bend'))
                                                    proc255_0(73 10)
                                                )(else
                                                    (if (Said('look,look'))
                                                        proc255_0(73 11)
                                                    )
                                                )
                                            )(else
                                                (if (Said('look,look>'))
                                                    (if (Said('/drip'))
                                                        proc255_0(73 12)
                                                    )(else
                                                        (if (Said('/tunnel'))
                                                            proc255_0(73 13)
                                                        )(else
                                                            (if (Said('/hole') or Said('<up'))
                                                                proc255_0(73 14)
                                                            )(else
                                                                (if (Said('/floor') or Said('<down'))
                                                                    proc255_0(73 15)
                                                                )(else
                                                                    (if (Said('[<at,around][/room,cave]'))
                                                                        proc255_0(73 16)
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                )(else
                                                    (if (((== (send pEvent:type) 1) and (& (send pEvent:modifiers) $0003)) and (== OnControl(2 (send pEvent:x) (send pEvent:y)) -32768))
                                                        proc255_0(73 11)
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )

)
(instance d1 of Extra
    (properties
        x 128
        y 34
        description 3225
        view 274
        loop 2
        cel 3
        cycleType 1
        minPause 30
        maxPause 40
        minCycles 1
        maxCycles 1
    )

    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 1
                proc255_0(73 12)
            )
            (default 
                (super:doVerb(theVerb rest param2))
            )
        )
    )

)
(instance d2 of Extra
    (properties
        x 227
        y 40
        description 3225
        view 274
        loop 2
        cel 1
        cycleType 1
        minPause 40
        maxPause 50
        minCycles 1
        maxCycles 1
    )

    (method (doVerb theVerb param2)
        (d1:doVerb(theVerb rest param2))
    )

)
(instance d3 of Extra
    (properties
        x 254
        y 40
        description 3225
        view 274
        loop 2
        cel 5
        cycleType 1
        minPause 50
        maxPause 60
        minCycles 1
        maxCycles 1
    )

    (method (doVerb theVerb param2)
        (d1:doVerb(theVerb rest param2))
    )

)
(instance d4 of Extra
    (properties
        x 210
        y 53
        description 3225
        view 274
        loop 2
        cel 4
        cycleType 1
        minPause 36
        maxPause 40
        minCycles 1
        maxCycles 1
    )

    (method (doVerb theVerb param2)
        (d1:doVerb(theVerb rest param2))
    )

)
(instance d5 of Extra
    (properties
        x 289
        y 57
        description 3225
        view 274
        loop 2
        cel 6
        cycleType 1
        minPause 40
        maxPause 48
        minCycles 1
        maxCycles 1
    )

    (method (doVerb theVerb param2)
        (d1:doVerb(theVerb rest param2))
    )

)
(instance d6 of Extra
    (properties
        x 266
        y 53
        description 3225
        view 274
        loop 2
        cel 1
        cycleType 1
        minPause 20
        minCycles 1
        maxCycles 1
    )

    (method (doVerb theVerb param2)
        (d1:doVerb(theVerb rest param2))
    )

)
(instance fallScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send (ScriptID(0 21)):
                    number(17)
                    loop(1)
                    init()
                    play()
                )
                (send gEgo:
                    yStep(11)
                    setMotion(MoveTo 182 133 self)
                )
            )
            (case 1
                (send (ScriptID(0 21)):
                    number(95)
                    play()
                )
                (send gEgo:
                    setLoop(1)
                    cycleSpeed(1)
                    posn(181 132)
                    setCycle(CT 2 1 self)
                )
            )
            (case 2
                ShakeScreen(6)
                (send gEgo:setCycle(End))
                = seconds 5
            )
            (case 3
                (send gEgo:
                    setLoop(2)
                    setCel(0)
                    posn(181 132)
                )
                = cycles 2
            )
            (case 4
                (send (ScriptID(0 21)):
                    number(70)
                    play()
                )
                (send gEgo:
                    cycleSpeed(2)
                    setCycle(End self)
                )
            )
            (case 5
                (send gEgo:observeControl(-32768))
                proc0_1()
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance light1 of NewFeature
    (properties
        x 181
        y 134
        noun 3191
        nsTop 131
        nsLeft 152
        nsBottom 138
        nsRight 211
        description 3259
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3265
    )
)
(instance sunbeam1 of NewFeature
    (properties
        x 182
        y 72
        noun 3201
        nsTop 14
        nsLeft 166
        nsBottom 131
        nsRight 198
        description 3362
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3370
    )
)
(instance sunbeam2 of NewFeature
    (properties
        x 201
        y 93
        noun 3201
        nsTop 55
        nsLeft 197
        nsBottom 131
        nsRight 205
        description 3362
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3370
    )
)
(instance sunbeam3 of NewFeature
    (properties
        x 161
        y 93
        noun 3201
        nsTop 55
        nsLeft 158
        nsBottom 131
        nsRight 165
        description 3362
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3370
    )
)
(instance sunbeam4 of NewFeature
    (properties
        x 208
        y 117
        noun 3201
        nsTop 104
        nsLeft 205
        nsBottom 131
        nsRight 211
        description 3362
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3370
    )
)
(instance sunbeam5 of NewFeature
    (properties
        x 154
        y 122
        noun 3201
        nsTop 113
        nsLeft 152
        nsBottom 131
        nsRight 157
        description 3362
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3370
    )
)
(instance wall of NewFeature
    (properties
        x 265
        y 107
        noun 3208
        nsTop 62
        nsLeft 211
        nsBottom 153
        nsRight 320
        description 3477
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3482
    )
)
(instance wall2 of NewFeature
    (properties
        x 128
        y 86
        noun 3208
        nsTop 59
        nsLeft 105
        nsBottom 114
        nsRight 152
        description 3525
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3482
    )
)
(instance stalactite1 of NewFeature
    (properties
        x 131
        y 23
        noun 3212
        nsTop 16
        nsLeft 120
        nsBottom 31
        nsRight 143
        description 3531
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3542
    )
)
(instance stalactite2 of NewFeature
    (properties
        x 138
        y 42
        noun 3212
        nsTop 32
        nsLeft 135
        nsBottom 52
        nsRight 141
        description 3621
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3542
    )
)
(instance stalactite3 of NewFeature
    (properties
        x 254
        y 31
        noun 3212
        nsTop 22
        nsLeft 249
        nsBottom 41
        nsRight 259
        description 3531
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3542
    )
)
(instance stalactite4 of NewFeature
    (properties
        x 289
        y 40
        noun 3212
        nsTop 23
        nsLeft 284
        nsBottom 57
        nsRight 294
        description 3531
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3542
    )
)
