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



(instance public rm23 of Rm
    (properties
        picture 23
        horizon 57
        north 26
        east 22
        south 10
        west 24
    )

    (method (init)
        (if (>= global101 1)
            Load(rsVIEW 302)
        )
        (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(188 (+ horizon 2)))
            )
            (case south
                (send gEgo:y(188))
            )
            (case west
                (send gEgo:posn(3 proc0_17(189 (send gEgo:y) 95)))
            )
            (case east
                (send gEgo:posn(317 proc0_17(189 (send gEgo:y) 76)))
            )
            (default 
                (send gEgo:posn(3 137))
            )
        )
        (send gEgo:init())
        proc0_1()
        (self:setRegions(603))
        (flower1:init())
        (flower2:init())
        (flower3:init())
        (flower4:init())
        (flower5:init())
        (bush:init())
        (rock1:init())
        (rock2:init())
        (rock3:init())
        (water1:init())
        (water2:init())
        (water3:init())
        (water4:init())
        (tree:init())
        (tree1:init())
        (tree2:init())
        (tree3:init())
        (tree4:init())
        (rock5:init())
        (if (>= global101 1)
            (fish: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('look,look[<at,around][/room]'))
                    proc255_0(23 0)
                )
            )
        )
    )

)
(instance fishJump of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (fish:
                    posn(Random(65 235) Random(105 120))
                    loop(Random(0 1))
                    setCycle(End self)
                )
            )
            (case 1
                (fish:stopUpd())
                (self:dispose())
            )
        )
    )

)
(instance fish of Prop
    (properties
        view 302
    )

    (method (init)
        (self:
            cycleSpeed(
                (if (>= global101 1)
                    1
                )(else
                    0
                )
)
            ignoreActors()
            stopUpd()
        )
        (super:init())
    )


    (method (doit)
        (super:doit())
        (if (((< Random(1 100) 3) and not (fish:script)) and not global130)
            (fish:setScript(fishJump))
        )
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('look,look/fish'))
                    (self:doVerb(1))
                )(else
                    (if (Said('get,get,capture/fish'))
                        (self:doVerb(7))
                    )
                )
            )
        )
    )


    (method (doVerb theVerb)
        (switch (theVerb)
            (case 1
                (if ((fish:script))
                    proc255_0(23 1)
                )(else
                    proc255_0(23 2)
                )
            )
            (case 7
                proc255_0(23 3)
            )
        )
    )

)
(instance water1 of NewFeature
    (properties
        x 194
        y 59
        noun 2216
        nsTop 53
        nsLeft 177
        nsBottom 65
        nsRight 212
        description 2273
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2279
    )
)
(instance water2 of NewFeature
    (properties
        x 182
        y 82
        noun 2216
        nsTop 66
        nsLeft 98
        nsBottom 98
        nsRight 267
        description 2273
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2279
    )
)
(instance water3 of NewFeature
    (properties
        x 279
        y 87
        noun 2216
        nsTop 77
        nsLeft 266
        nsBottom 98
        nsRight 292
        description 2273
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2279
    )
)
(instance water4 of NewFeature
    (properties
        x 163
        y 113
        noun 2216
        nsTop 98
        nsLeft 42
        nsBottom 129
        nsRight 284
        description 2273
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2279
    )
)
(instance rock1 of NewFeature
    (properties
        x 140
        y 150
        noun 2226
        nsTop 133
        nsLeft 114
        nsBottom 167
        nsRight 167
        description 2388
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2393
    )
)
(instance rock2 of NewFeature
    (properties
        x 214
        y 143
        noun 2226
        nsTop 121
        nsLeft 184
        nsBottom 165
        nsRight 245
        description 2388
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2393
    )
)
(instance rock3 of NewFeature
    (properties
        x 189
        y 153
        noun 2226
        nsTop 142
        nsLeft 100
        nsBottom 165
        nsRight 278
        description 2388
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2393
    )
)
(instance tree of NewFeature
    (properties
        x 159
        y 10
        noun 2233
        nsTop -1
        nsBottom 22
        nsRight 319
        description 2472
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2477
    )
)
(instance tree1 of NewFeature
    (properties
        x 19
        y 48
        noun 2233
        nsTop 22
        nsLeft 4
        nsBottom 75
        nsRight 35
        description 2472
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2477
    )
)
(instance tree2 of NewFeature
    (properties
        x 58
        y 34
        noun 2233
        nsTop 22
        nsLeft 35
        nsBottom 47
        nsRight 82
        description 2472
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2477
    )
)
(instance tree3 of NewFeature
    (properties
        x 137
        y 32
        noun 2233
        nsTop 22
        nsLeft 114
        nsBottom 42
        nsRight 161
        description 2472
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2477
    )
)
(instance tree4 of NewFeature
    (properties
        x 236
        y 30
        noun 2233
        nsTop 23
        nsLeft 218
        nsBottom 37
        nsRight 255
        description 2472
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2477
    )
)
(instance bush of NewFeature
    (properties
        x 236
        y 47
        noun 2237
        nsTop 37
        nsLeft 211
        nsBottom 57
        nsRight 261
        description 2556
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2561
    )
)
(instance rock5 of NewFeature
    (properties
        x 260
        y 44
        noun 2241
        nsTop 22
        nsLeft 201
        nsBottom 67
        nsRight 320
        description 2388
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2648
    )
)
(instance flower1 of NewFeature
    (properties
        x 95
        y 154
        noun 2245
        nsTop 149
        nsLeft 89
        nsBottom 160
        nsRight 101
        description 2727
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2734
    )
)
(instance flower2 of NewFeature
    (properties
        x 182
        y 159
        noun 2245
        nsTop 154
        nsLeft 170
        nsBottom 164
        nsRight 195
        description 2727
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2734
    )
)
(instance flower3 of NewFeature
    (properties
        x 167
        y 163
        noun 2245
        nsTop 160
        nsLeft 165
        nsBottom 166
        nsRight 170
        description 2727
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2734
    )
)
(instance flower4 of NewFeature
    (properties
        x 200
        y 163
        noun 2245
        nsTop 159
        nsLeft 195
        nsBottom 167
        nsRight 206
        description 2727
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2734
    )
)
(instance flower5 of NewFeature
    (properties
        x 264
        y 164
        noun 2245
        nsTop 160
        nsLeft 251
        nsBottom 168
        nsRight 277
        description 2727
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2734
    )
)
