(version 2)
(include "sci.sh")
(exports
    0 rm27
)
(use "Main")
(use "Class_255_0")
(use "NewFeature")
(use "RFeature")
(use "Extra")
(use "Cycle")
(use "Game")
(use "PicView")
(script 27)



(instance public rm27 of Rm
    (properties
        picture 27
        horizon 84
        north 38
        east 28
        south 22
        west 26
    )

    (method (init)
        Load(rsVIEW 300)
        (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_18(106 (send gEgo:x) 70) (+ horizon 2)))
            )
            (case south
                (send gEgo:y(188))
            )
            (case west
                (send gEgo:posn(3 proc0_17(188 proc0_18(112 (send gEgo:y) 102) (+ 2 horizon))))
            )
            (case east
                (send gEgo:posn(317 proc0_17(188 (send gEgo:y) (+ 2 horizon))))
            )
            (default 
                (send gEgo:posn(3 137))
            )
        )
        (send gEgo:init())
        proc0_1()
        (tree1:init())
        (tree2:init())
        (tree3:init())
        (tree4:init())
        (tree5:init())
        (bush1:init())
        (bush2:init())
        (babeBirds:
            setCycle(Fwd)
            setPri(7)
            init()
        )
        (bird:
            setPri(7)
            init()
        )
        (send gAddToPics:
            add((nest:priority(7)))
            eachElementDo(#init)
            doit()
        )
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('look,look>'))
                    (if (Said('[<at,around][/room,clearing,ceder]'))
                        proc255_0(27 0)
                    )
                )(else
                    (if (Said('get,get/bird'))
                        proc255_0(27 1)
                    )(else
                        (if (Said('feed/bird'))
                            proc255_0(27 2)
                        )
                    )
                )
            )
        )
    )

)
(instance tree1 of NewFeature
    (properties
        x 117
        y 16
        noun 1522
        nsTop -1
        nsBottom 34
        nsRight 235
        description 1575
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1580
    )
)
(instance tree2 of NewFeature
    (properties
        x 70
        y 52
        noun 1522
        nsTop 34
        nsBottom 71
        nsRight 141
        description 1575
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1696
    )
)
(instance tree3 of NewFeature
    (properties
        x 189
        y 65
        noun 1522
        nsTop 52
        nsLeft 141
        nsBottom 78
        nsRight 237
        description 1575
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1696
    )
)
(instance tree4 of NewFeature
    (properties
        x 91
        y 120
        noun 1522
        nsTop 72
        nsLeft 70
        nsBottom 169
        nsRight 112
        description 1575
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1696
    )
)
(instance bird of Extra
    (properties
        x 147
        y 49
        view 300
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/bird') or proc255_5(self pEvent 3))
                proc255_0(27 3)
                (send pEvent:claimed(1))
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )

)
(instance babeBirds of Prop
    (properties
        x 156
        y 52
        description 1781
        view 300
        loop 1
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/(bird<baby),chick') or proc255_5(self pEvent 3))
                proc255_0(27 4)
                (send pEvent:claimed(1))
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )

)
(instance nest of RPicView
    (properties
        x 156
        y 56
        description 1801
        view 300
        loop 2
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/nest') or proc255_5(self pEvent 3))
                proc255_0(27 5)
                (send pEvent:claimed(1))
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )

)
(instance bush1 of NewFeature
    (properties
        x 33
        y 99
        noun 1561
        nsTop 87
        nsBottom 112
        nsRight 66
        description 1818
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1823
    )
)
(instance bush2 of NewFeature
    (properties
        x 123
        y 173
        noun 1561
        nsTop 163
        nsLeft 87
        nsBottom 183
        nsRight 159
        description 1895
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1823
    )
)
(instance tree5 of NewFeature
    (properties
        x 301
        y 35
        noun 1522
        nsTop 3
        nsLeft 282
        nsBottom 67
        nsRight 320
        description 1575
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1914
    )
)
