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

(public
	Room26 0
)

(local
	local0
	newProp
	newProp_2
	newProp_6
	newProp_5
	newProp_3
	local6
	newProp_4
)
(instance Room26 of Rm
	(properties
		picture 26
	)
	
	(method (init)
		(= north 20)
		(= south 2)
		(= east 27)
		(= west 25)
		(= horizon 75)
		(= global101 0)
		(gEgo edgeHit: 0)
		(super init:)
		(if global100 (gRoom overlay: 126))
		(self setRegions: 501 512 506 518)
		(switch gPrevRoomNum
			(2
				(cond 
					((> (gEgo x?) 251) (gEgo posn: 251 188))
					((< (gEgo x?) 80) (gEgo posn: 82 188))
					(else (gEgo posn: (gEgo x?) 188))
				)
			)
			(21
				(cond 
					((!= (gEgo view?) 2) (gEgo posn: 215 (+ horizon 2)))
					((< (gEgo y?) 155) (gEgo posn: 155 (+ horizon 2)))
					(else (gEgo posn: 255 76))
				)
				(Animate (gCast elements?) 0)
			)
			(25 (gEgo posn: 1 (gEgo y?)))
			(20
				(if (> (gEgo x?) 185)
					(gEgo posn: 185 (+ horizon (gEgo yStep?)))
				else
					(gEgo posn: (gEgo x?) (+ horizon (gEgo yStep?)))
				)
			)
			(27 (gEgo posn: 318 (gEgo y?)))
		)
		(gEgo init:)
		(if (== gPrevRoomNum 0) (gEgo posn: 150 149))
		(= newProp (Prop new:))
		(newProp
			isExtra: 1
			view: 658
			loop: 6
			cel: 1
			posn: 171 85
			setPri: 0
			cycleSpeed: 1
			setCycle: Fwd
			ignoreActors:
			init:
		)
		(= newProp_2 (Prop new:))
		(newProp_2
			isExtra: 1
			view: 658
			loop: 2
			cel: 1
			posn: 184 118
			setPri: 0
			cycleSpeed: 1
			setCycle: Fwd
			ignoreActors:
			init:
		)
		(= newProp_3 (Prop new:))
		(= newProp_4 (Prop new:))
		(newProp_3
			isExtra: 1
			view: 658
			loop: 5
			cel: 1
			posn: 117 169
			setPri: 0
			cycleSpeed: 1
			setCycle: Fwd
			ignoreActors:
			init:
		)
		(newProp_4
			isExtra: 1
			view: 658
			loop: 7
			cel: 0
			posn: 68 181
			setPri: 0
			cycleSpeed: 1
			setCycle: Fwd
			ignoreActors:
			init:
		)
		(= newProp_5 (Prop new:))
		(= newProp_6 (Prop new:))
		(newProp_5
			isExtra: 1
			view: 658
			loop: 4
			cel: 1
			posn: 159 159
			setPri: 0
			cycleSpeed: 1
			setCycle: Fwd
			ignoreActors:
			init:
		)
		(newProp_6
			isExtra: 1
			view: 658
			loop: 3
			cel: 1
			posn: 125 137
			setPri: 0
			cycleSpeed: 1
			setCycle: Fwd
			ignoreActors:
			init:
		)
	)
	
	(method (handleEvent pEvent)
		(if (pEvent claimed?) (return 1))
		(return
			(if
				(and
					(== (pEvent type?) evSAID)
					(or
						(Said 'look/around')
						(Said 'look/room')
						(Said 'look[<around][/!*]')
					)
				)
				(Print 26 0)
			else
				0
			)
		)
	)
	
	(method (newRoom newRoomNumber)
		(if
		(and (== (gEgo edgeHit?) 1) (> (gEgo x?) 202))
			(super newRoom: 21)
		else
			(super newRoom: newRoomNumber)
		)
	)
)
