SCene 0
% Item Dungeon Scene

% This is an infinite dungeon. Once the specified level is reached,
% the item will be inserted. If V1=0, no item will be inserted, and
% this will just be a big featureless dungeon.

% V1 = *Item to insert
% V2 = *Depth at which to insert
% V3 = *Current Depth
% V4 = *Current Monster Rating
% V5 =  Initialization Counter

	special <NoExit>
	NU1 <if= T1 0 Return>
	CaveMap
	BorderType 35
	FloorType 14

	start <Print 1 if= V5 0 V= 5 1 MonsterUp 2 V4 if# V1 0 Compose Get L1 .getitem>
	Restore_Start <Print 1>
	%Msg1 <You are approximately \VAL V3 meters below Wujung street level.>
	Msg1 <Wujung の地下およそ \VAL V3 メートルまで来たようだ。>
	.getitem <if# L1 0 L= 1 0 XPV 100>

sub
	Team 1
	SetEnemy 2

	Team 2
	SetEnemy 1
	type <City Mutant Vermin Devo Earth>

	Team 3
	home <Down SPot>

	rect
	width 3
	height 3
	sub
		StairsUp
		Destination -1
		use <Print 1 L+ 3 -5 L+ 4 -4 ifG 1 L3 else GoUpStairs Return>
		% GoUpStairs <LoadD .sitename PassVar 3 L3 PassVar 4 L4 SeekGate 1>
		GoUpStairs <LoadD .sitename PassVar 1 L1 PassVar 2 L2 PassVar 3 L3 PassVar 4 L4 SeekGate 1>
		.sitename <TS_SCENE_WujungUndercity.txt>
	end

	rect
	width 3
	height 3
	name <Down SPot>
	sub
		StairsDown
		Destination 1
		use <if= L3 45 else Godown ifKeyItem 17 else GoNoKey Goto GoDown>
		GoNoKey <Print 2>
		GoDown <Print 1 L+ 3 5 L+ 4 4 LoadD .sitename PassVar 1 L1 PassVar 2 L2 PassVar 3 L3 PassVar 4 L4 SeekGate -1 if# L1 0 ifG L3 L2 DynaItemTeam L1 3>
		.sitename <TS_SCENE_WujungUndercity.txt>
		update <if# L1 0 ifG L3 L2  SetStat STAT_MetaVisibility -1>
		%Msg2 <The stairs down are blocked by a metal grate. There's no way you can get through.>
		Msg2 <下り階段は金属製の格子によって封鎖されている。通り抜ける事は出来ない。>
		Clue37 <if= L3 45 Print 3>
		Clue29 <if= L3 45 Print 4>
		Clue32 <if= L3 45 Print 5>
		%Msg3 <There's a lock on the grate. If only you had a key...>
		Msg3 <格子には錠がかかっている. 鍵さえあれば…。>
		%Msg4 <The bars of the grate are made of Impervium. You'd need a mecha to even dent them.>
		Msg4 <格子の棒はインペルビウム製だ。曲げようとするだけでもメックが必要だろう。>
		%Msg5 <Unfortunately, your modern technological skills are of no use against this primitive mechanical lock. You have no idea how to open the grate.>
		Msg5 <残念ながら、現代のテクノロジーはこの原始的な機械式錠には役に立たない。格子を開ける方法は分からない。>

	end

end
