;;; Sierra Script 1.0 - (do not remove this comment)
(script# 33)
(include sci.sh)
(use Main)
(use Class_255_0)
(use Cycle)
(use Game)
(use Feature)

(public
	Room33 0
)

(local
	newProp
	newProp_2
)
(instance Room33 of Rm
	(properties
		picture 33
	)
	
	(method (init)
		(= north 31)
		(= south 36)
		(= east 34)
		(= west 31)
		(= horizon 80)
		(= global101 0)
		(= gHorizon horizon)
		(gEgo edgeHit: 0)
		(super init:)
		(= newProp (Prop new:))
		(= newProp_2 (Prop new:))
		(newProp
			isExtra: 1
			view: 661
			loop: 0
			cel: 1
			posn: 139 184
			setPri: 0
			setCycle: Fwd
			ignoreActors:
			cycleSpeed: 2
			init:
		)
		(newProp_2
			isExtra: 1
			view: 661
			loop: 1
			cel: 3
			posn: 227 132
			setPri: 0
			setCycle: Fwd
			ignoreActors:
			cycleSpeed: 2
			init:
		)
		(switch gPrevRoomNum
			(36 (gEgo x: 246 y: 186))
			(39
				(cond 
					((== (gEgo view?) 2) (gEgo posn: 138 188))
					((== (gEgo view?) 5) (gEgo posn: 113 187))
					((== (gEgo view?) 6) (gEgo posn: 84 187))
					((== (gEgo view?) 7) (gEgo posn: 58 187))
					(else (gEgo posn: 20 188))
				)
				(Animate (gCast elements?) 0)
			)
			(34 (gEgo posn: 317 (gEgo y?)))
			(31
				(if (< (gEgo y?) horizon)
					(gEgo posn: (gEgo x?) (+ horizon 2))
				else
					(gEgo posn: 2 (gEgo y?))
				)
			)
		)
		(gEgo xStep: 3 yStep: 2 init:)
		(self setRegions: 505 501 503 504)
	)
	
	(method (doit)
		(cond 
			((>= (gEgo y?) 189)
				(if (< (gEgo x?) 160)
					(= gNewRoomNumber_2 39)
					(Animate (gCast elements?) 0)
				else
					(Animate (gCast elements?) 0)
					(= gNewRoomNumber_2 36)
				)
			)
			((>= (gEgo x?) 319) (Animate (gCast elements?) 0) (= gNewRoomNumber_2 34))
			((<= (gEgo x?) 0) (Animate (gCast elements?) 0) (= gNewRoomNumber_2 31))
			((<= (gEgo y?) horizon) (Animate (gCast elements?) 0) (= gNewRoomNumber_2 31))
		)
	)
	
	(method (handleEvent pEvent)
		(if (pEvent claimed?) (return 1))
		(return
			(if
				(and
					(== (pEvent type?) evSAID)
					(or
						(Said 'look/around')
						(Said 'look/island')
						(Said 'look/room')
						(Said 'look[<around][/!*]')
					)
				)
				(Print 33 0)
			else
				0
			)
		)
	)
)
