⚒️ [b]Tin Mines of ${planet_name}[/b]

*gosub ore_distribution

*if sound
	*sound miningoffice.wav
	
*if rp
	${rp_emoji} "Ugh, there's no way I'm going near a gross mine."
	
	"Fine, I'll see you later," you tell ${rp_name}.
	
	${rp_emoji} "Bye!"

Following the signs, you make a long trek out into the wilderness before you finally see a small wooden building.

Stepping inside, you see a large barrel and a single, wooden chair.  

Seated on the chair is an elderly man wearing a faded pair of ${clothes1_color} overalls.

👴 "[i]Looking for some work, off-worlder?  Mining ain't easy, but for some folks, it's the only way to make a little money[/i]."

[b]:::[/b] What do you want to do, Captain?

*fake_choice
	#⚒️ Get a job as a miner
	#↩️ Decline the job
		"Sorry, but I have other things I need to go," you say.
		
		👴 [i]"Lazy punk, wasting my time!"[/i]
		
		*page_break 😌
		*goto_scene spaceport leave_market
	
⚒️ [b]Tin Mines of ${planet_name}[/b]

*if sound
	*sound laugh.wav

👴 "[i]Got some spunk in you, eh?  Good!  People these days are too lazy.  They expect everything at the push of a button.[/i]"

"Tell me about the job," you say.

👴 [i]"Grab a hardhat and a pick and then follow the signs out to the mines.  For every full sack of of 100 kilograms of tin ore you bring me, I'll pay you 1,000 credits.  Got any questions?"[/i]

[b]:::[/b] What do you want to do, Captain?

*fake_choice
	#⚒️ Get to work in the mines
		*goto mine_work
	#❓ Ask for more instructions
		*goto instructions
	#↩️ Leave the mining office
		*goto_scene spaceport leave_market

*label instructions

⚒️ [b]Tin Mines of ${planet_name}[/b]

👴 [i]"You're an off-worlder, I see.  Makes sense that you don't understand the basics of mining!" [/i]

"Just explain the basics," you growl in reply.

👴  [i]"There are seven shafts in the mine.  Each shaft is about 50 meters deep.  The deeper you go, the better your chances of finding some ore.  When you find some, put the tin ore into your bucket and take it to the top when it gets full.  Couldn't be simpler!" [/i]

"Very well," you say.

[b]:::[/b] What do you want to do, Captain?

*fake_choice
	#⚒️ Get to work in the mines
		*if sound
			*sound minewind.mp3
		*goto mine_work
	#↩️ Leave the mining office
		*goto_scene spaceport leave_market
	
*label mine_work

⚒️ [b]Tin Mines of ${planet_name}[/b]

You are standing at the entrance to the tin mine.

*if sound
	*sound minewind.mp3

*if bucket = 0
	In your bucket: ${bucket} kilograms of tin ore

*if bucket > 0
	*if sound
		*sound fillsack.wav
		
	You empty your bucket of tin ore into your sack.
	*set sack + bucket
	*if sack > 100
		*set sack 100
	*set bucket 0

*if sack < 100
	In your sack: ${sack} kilograms of tin ore
	
*if sack >= 100
	*if sound
		*sound winner.wav
		
	Your sack is now full!


[b]:::[/b] What do you want to do, Captain?

*fake_choice
	#⬇️ Descend Shaft #1
		*set shaft 1
	#⬇️ Descend Shaft #2
		*set shaft 2
	#⬇️ Descend Shaft #3
		*set shaft 3
	#⬇️ Descend Shaft #4
		*set shaft 4
	#⬇️ Descend Shaft #5
		*set shaft 5
	#⬇️ Descend Shaft #6
		*set shaft 6
	#⬇️ Descend Shaft #7
		*set shaft 7
	#💰 Take your sack to the mining office
		*goto weighing
	
⚒️ [b]Tin Mines of ${planet_name} - Shaft ${shaft}[/b]

[b]:::[/b] How far do you want to descend, Captain?

*temp shaft_depth 0

*input_number shaft_depth 1 50

*label elevator_down

*if depth = shaft_depth
	*goto digging

⚒️ [b]Tin Mines of ${planet_name} - Shaft ${shaft} Elevator[/b]

*if depth = 0
	*if sound
		*sound elevatordown.wav
	Current depth: (Surface)

*if depth = 1
	Current depth: ${depth} meter below the surface
	
*if depth > 1
	Current depth: ${depth} meters below the surface

*set meternumber depth

*page_break ⬇️ ⬇️ ⬇️

*set depth +1

*goto elevator_down

*label digging

*if sound
	*sound elevatordown.wav

⚒️ [b]Tin Mines of ${planet_name} - Shaft ${shaft}[/b]

Current depth: ${depth} meters

The mining elevator comes to a halt and you step out into a small niche.

*if bucket < 15
	In your bucket: ${bucket} kilograms of tin ore.
	
*if bucket >= 15
	Your bucket is now full.
	
[b]:::[/b] What do you want to do, Captain?

*fake_choice
	#⚒️ Dig
		*goto dig
	#🛗 Return to the surface
		[i]You step back into the elevator...[/i]
		
		*goto elevator

*label dig

*rand dieroll 1 5

*if dieroll = 1
	*if sound
		*sound grunt.wav

*if dieroll != 1
	*if sound
		*sound dig.wav

⚒️ [b]Tin Mines of ${planet_name} - Shaft ${shaft}[/b]

Current depth: ${depth} meters

*temp discovery ""

*set discovery "s${shaft}m${depth}"
*set discovery {discovery}

You dig and discover ${discovery}.

*if discovery = "tin ore"
	*set bucket + 0.25
	
*if bucket < 15
	In your bucket: ${bucket} kilograms of tin ore.
	
*if bucket >= 15
	*if sound
		*sound acknowledged.wav
		
	Your bucket is now full.
	*set discovery "s${shaft}m${depth}"
	*set {discovery} "an exhausted vein of tin ore"

*fake_choice
	#⚒️ Dig
		*goto dig
	#🛗 Return to the surface
		*if sound
			*sound elevatorup.wav
		*goto elevator

*label elevator

*if depth = 0
	*goto mine_work

⚒️ [b]Tin Mines of ${planet_name} - Shaft ${shaft} Elevator[/b]

*if depth = 1
	Current depth: ${depth} meter below the surface
	
*if depth > 1
	Current depth: ${depth} meters below the surface
	
*if depth = 0
	*if sound
		*sound elevatorup.wav

*set meternumber depth

*page_break ⬆️ ⬆️ ⬆️

*set depth -1

*goto elevator

*label weighing

⚒️ [b]Tin Mines of ${planet_name}[/b]

*if sack > 0
	*check_achievements
	*if choice_achieved_job = false
		*achieve job

*if sack >= 100
	*if sound
		*sound grandwinner.wav
	Exhausted and weary, you trudge back to the mining office and throw full your sack of tin ore onto the wooden barrel.
	
	👴 [i]"Great job!  When I first saw you, I doubted that you had the ability to do some real work.  Because of that, I'm paying you a bonus of 250 credits.!"[/i]
	
	*set credits + 1250
	
*if (sack > 0) and (sack < 100)
	*if sound
		*sound cashregister.wav
	*temp payment 0
	*set payment (sack * 10)
	*set payment round(payment)
	Tired and dirty, you trudge back to the mining office and throw full your partially full sack of tin ore onto the wooden barrel.
	
	👴 [i]"I see that you gave up before filling your sack.  Too bad.  I would've paid a nice bonus for a job well done.  Nonetheless, you've earned ${payment} credits for the high-quality tin ore that you brought me."[/i]
	
	*set credits + payment
	
*if sack = 0
	*if sound
		*sound laugh.wav
		
	You trudge back to the mining office and throw full your empty sack of tin ore onto the wooden barrel.
	
	👴 [i]"What's this?  Too much hard work for you?  You're a worthless off-worlder punk!"[/i]
	
*set sack 0
*set bucket 0
	
"Thanks," you say.

👴 [i]Go bring me some tin ore, and I'd be happy to pay you money.[/i]"
	
[b]:::[/b] What do you want to do, Captain?

*fake_choice
	#⚒️ Go back to  work in the mines
		*goto mine_work
	#↩️ Leave the mining office
		*if sound
			*sound laugh.wav
			
		"Thanks, but I've had enough," you say.
		
		👴 [i]"Suit yourself, off-worlder!"[/i]
		
		*page_break 😌
		*goto_scene spaceport leave_market


*label ore_distribution

*temp s1m0 "worthless rock"
*temp s1m1 "worthless rock"
*temp s1m2 "worthless rock"
*temp s1m3 "worthless rock"
*temp s1m4 "worthless rock"
*temp s1m5 "worthless rock"
*temp s1m6 "worthless rock"
*temp s1m7 "worthless rock"
*temp s1m8 "worthless rock"
*temp s1m9 "worthless rock"
*temp s1m10 "worthless rock"
*temp s1m11 "worthless rock"
*temp s1m12 "worthless rock"
*temp s1m13 "worthless rock"
*temp s1m14 "worthless rock"
*temp s1m15 "worthless rock"
*temp s1m16 "worthless rock"
*temp s1m17 "worthless rock"
*temp s1m18 "worthless rock"
*temp s1m19 "worthless rock"
*temp s1m20 "worthless rock"
*temp s1m21 "worthless rock"
*temp s1m22 "worthless rock"
*temp s1m23 "worthless rock"
*temp s1m24 "worthless rock"
*temp s1m25 "worthless rock"
*temp s1m26 "worthless rock"
*temp s1m27 "worthless rock"
*temp s1m28 "worthless rock"
*temp s1m29 "worthless rock"
*temp s1m30 "worthless rock"
*temp s1m31 "worthless rock"
*temp s1m32 "worthless rock"
*temp s1m33 "worthless rock"
*temp s1m34 "worthless rock"
*temp s1m35 "worthless rock"
*temp s1m36 "worthless rock"
*temp s1m37 "worthless rock"
*temp s1m38 "worthless rock"
*temp s1m39 "worthless rock"
*temp s1m40 "worthless rock"
*temp s1m41 "worthless rock"
*temp s1m42 "worthless rock"
*temp s1m43 "worthless rock"
*temp s1m44 "worthless rock"
*temp s1m45 "worthless rock"
*temp s1m46 "worthless rock"
*temp s1m47 "worthless rock"
*temp s1m48 "worthless rock"
*temp s1m49 "worthless rock"
*temp s1m50 "worthless rock"

*temp s2m0 "worthless rock"
*temp s2m1 "worthless rock"
*temp s2m2 "worthless rock"
*temp s2m3 "worthless rock"
*temp s2m4 "worthless rock"
*temp s2m5 "worthless rock"
*temp s2m6 "worthless rock"
*temp s2m7 "worthless rock"
*temp s2m8 "worthless rock"
*temp s2m9 "worthless rock"
*temp s2m10 "worthless rock"
*temp s2m11 "worthless rock"
*temp s2m12 "worthless rock"
*temp s2m13 "worthless rock"
*temp s2m14 "worthless rock"
*temp s2m15 "worthless rock"
*temp s2m16 "worthless rock"
*temp s2m17 "worthless rock"
*temp s2m18 "worthless rock"
*temp s2m19 "worthless rock"
*temp s2m20 "worthless rock"
*temp s2m21 "worthless rock"
*temp s2m22 "worthless rock"
*temp s2m23 "worthless rock"
*temp s2m24 "worthless rock"
*temp s2m25 "worthless rock"
*temp s2m26 "worthless rock"
*temp s2m27 "worthless rock"
*temp s2m28 "worthless rock"
*temp s2m29 "worthless rock"
*temp s2m30 "worthless rock"
*temp s2m31 "worthless rock"
*temp s2m32 "worthless rock"
*temp s2m33 "worthless rock"
*temp s2m34 "worthless rock"
*temp s2m35 "worthless rock"
*temp s2m36 "worthless rock"
*temp s2m37 "worthless rock"
*temp s2m38 "worthless rock"
*temp s2m39 "worthless rock"
*temp s2m40 "worthless rock"
*temp s2m41 "worthless rock"
*temp s2m42 "worthless rock"
*temp s2m43 "worthless rock"
*temp s2m44 "worthless rock"
*temp s2m45 "worthless rock"
*temp s2m46 "worthless rock"
*temp s2m47 "worthless rock"
*temp s2m48 "worthless rock"
*temp s2m49 "worthless rock"
*temp s2m50 "worthless rock"

*temp s3m0 "worthless rock"
*temp s3m1 "worthless rock"
*temp s3m2 "worthless rock"
*temp s3m3 "worthless rock"
*temp s3m4 "worthless rock"
*temp s3m5 "worthless rock"
*temp s3m6 "worthless rock"
*temp s3m7 "worthless rock"
*temp s3m8 "worthless rock"
*temp s3m9 "worthless rock"
*temp s3m10 "worthless rock"
*temp s3m11 "worthless rock"
*temp s3m12 "worthless rock"
*temp s3m13 "worthless rock"
*temp s3m14 "worthless rock"
*temp s3m15 "worthless rock"
*temp s3m16 "worthless rock"
*temp s3m17 "worthless rock"
*temp s3m18 "worthless rock"
*temp s3m19 "worthless rock"
*temp s3m20 "worthless rock"
*temp s3m21 "worthless rock"
*temp s3m22 "worthless rock"
*temp s3m23 "worthless rock"
*temp s3m24 "worthless rock"
*temp s3m25 "worthless rock"
*temp s3m26 "worthless rock"
*temp s3m27 "worthless rock"
*temp s3m28 "worthless rock"
*temp s3m29 "worthless rock"
*temp s3m30 "worthless rock"
*temp s3m31 "worthless rock"
*temp s3m32 "worthless rock"
*temp s3m33 "worthless rock"
*temp s3m34 "worthless rock"
*temp s3m35 "worthless rock"
*temp s3m36 "worthless rock"
*temp s3m37 "worthless rock"
*temp s3m38 "worthless rock"
*temp s3m39 "worthless rock"
*temp s3m40 "worthless rock"
*temp s3m41 "worthless rock"
*temp s3m42 "worthless rock"
*temp s3m43 "worthless rock"
*temp s3m44 "worthless rock"
*temp s3m45 "worthless rock"
*temp s3m46 "worthless rock"
*temp s3m47 "worthless rock"
*temp s3m48 "worthless rock"
*temp s3m49 "worthless rock"
*temp s3m50 "worthless rock"

*temp s4m0 "worthless rock"
*temp s4m1 "worthless rock"
*temp s4m2 "worthless rock"
*temp s4m3 "worthless rock"
*temp s4m4 "worthless rock"
*temp s4m5 "worthless rock"
*temp s4m6 "worthless rock"
*temp s4m7 "worthless rock"
*temp s4m8 "worthless rock"
*temp s4m9 "worthless rock"
*temp s4m10 "worthless rock"
*temp s4m11 "worthless rock"
*temp s4m12 "worthless rock"
*temp s4m13 "worthless rock"
*temp s4m14 "worthless rock"
*temp s4m15 "worthless rock"
*temp s4m16 "worthless rock"
*temp s4m17 "worthless rock"
*temp s4m18 "worthless rock"
*temp s4m19 "worthless rock"
*temp s4m20 "worthless rock"
*temp s4m21 "worthless rock"
*temp s4m22 "worthless rock"
*temp s4m23 "worthless rock"
*temp s4m24 "worthless rock"
*temp s4m25 "worthless rock"
*temp s4m26 "worthless rock"
*temp s4m27 "worthless rock"
*temp s4m28 "worthless rock"
*temp s4m29 "worthless rock"
*temp s4m30 "worthless rock"
*temp s4m31 "worthless rock"
*temp s4m32 "worthless rock"
*temp s4m33 "worthless rock"
*temp s4m34 "worthless rock"
*temp s4m35 "worthless rock"
*temp s4m36 "worthless rock"
*temp s4m37 "worthless rock"
*temp s4m38 "worthless rock"
*temp s4m39 "worthless rock"
*temp s4m40 "worthless rock"
*temp s4m41 "worthless rock"
*temp s4m42 "worthless rock"
*temp s4m43 "worthless rock"
*temp s4m44 "worthless rock"
*temp s4m45 "worthless rock"
*temp s4m46 "worthless rock"
*temp s4m47 "worthless rock"
*temp s4m48 "worthless rock"
*temp s4m49 "worthless rock"
*temp s4m50 "worthless rock"

*temp s5m0 "worthless rock"
*temp s5m1 "worthless rock"
*temp s5m2 "worthless rock"
*temp s5m3 "worthless rock"
*temp s5m4 "worthless rock"
*temp s5m5 "worthless rock"
*temp s5m6 "worthless rock"
*temp s5m7 "worthless rock"
*temp s5m8 "worthless rock"
*temp s5m9 "worthless rock"
*temp s5m10 "worthless rock"
*temp s5m11 "worthless rock"
*temp s5m12 "worthless rock"
*temp s5m13 "worthless rock"
*temp s5m14 "worthless rock"
*temp s5m15 "worthless rock"
*temp s5m16 "worthless rock"
*temp s5m17 "worthless rock"
*temp s5m18 "worthless rock"
*temp s5m19 "worthless rock"
*temp s5m20 "worthless rock"
*temp s5m21 "worthless rock"
*temp s5m22 "worthless rock"
*temp s5m23 "worthless rock"
*temp s5m24 "worthless rock"
*temp s5m25 "worthless rock"
*temp s5m26 "worthless rock"
*temp s5m27 "worthless rock"
*temp s5m28 "worthless rock"
*temp s5m29 "worthless rock"
*temp s5m30 "worthless rock"
*temp s5m31 "worthless rock"
*temp s5m32 "worthless rock"
*temp s5m33 "worthless rock"
*temp s5m34 "worthless rock"
*temp s5m35 "worthless rock"
*temp s5m36 "worthless rock"
*temp s5m37 "worthless rock"
*temp s5m38 "worthless rock"
*temp s5m39 "worthless rock"
*temp s5m40 "worthless rock"
*temp s5m41 "worthless rock"
*temp s5m42 "worthless rock"
*temp s5m43 "worthless rock"
*temp s5m44 "worthless rock"
*temp s5m45 "worthless rock"
*temp s5m46 "worthless rock"
*temp s5m47 "worthless rock"
*temp s5m48 "worthless rock"
*temp s5m49 "worthless rock"
*temp s5m50 "worthless rock"

*temp s6m0 "worthless rock"
*temp s6m1 "worthless rock"
*temp s6m2 "worthless rock"
*temp s6m3 "worthless rock"
*temp s6m4 "worthless rock"
*temp s6m5 "worthless rock"
*temp s6m6 "worthless rock"
*temp s6m7 "worthless rock"
*temp s6m8 "worthless rock"
*temp s6m9 "worthless rock"
*temp s6m10 "worthless rock"
*temp s6m11 "worthless rock"
*temp s6m12 "worthless rock"
*temp s6m13 "worthless rock"
*temp s6m14 "worthless rock"
*temp s6m15 "worthless rock"
*temp s6m16 "worthless rock"
*temp s6m17 "worthless rock"
*temp s6m18 "worthless rock"
*temp s6m19 "worthless rock"
*temp s6m20 "worthless rock"
*temp s6m21 "worthless rock"
*temp s6m22 "worthless rock"
*temp s6m23 "worthless rock"
*temp s6m24 "worthless rock"
*temp s6m25 "worthless rock"
*temp s6m26 "worthless rock"
*temp s6m27 "worthless rock"
*temp s6m28 "worthless rock"
*temp s6m29 "worthless rock"
*temp s6m30 "worthless rock"
*temp s6m31 "worthless rock"
*temp s6m32 "worthless rock"
*temp s6m33 "worthless rock"
*temp s6m34 "worthless rock"
*temp s6m35 "worthless rock"
*temp s6m36 "worthless rock"
*temp s6m37 "worthless rock"
*temp s6m38 "worthless rock"
*temp s6m39 "worthless rock"
*temp s6m40 "worthless rock"
*temp s6m41 "worthless rock"
*temp s6m42 "worthless rock"
*temp s6m43 "worthless rock"
*temp s6m44 "worthless rock"
*temp s6m45 "worthless rock"
*temp s6m46 "worthless rock"
*temp s6m47 "worthless rock"
*temp s6m48 "worthless rock"
*temp s6m49 "worthless rock"
*temp s6m50 "worthless rock"

*temp s7m0 "worthless rock"
*temp s7m1 "worthless rock"
*temp s7m2 "worthless rock"
*temp s7m3 "worthless rock"
*temp s7m4 "worthless rock"
*temp s7m5 "worthless rock"
*temp s7m6 "worthless rock"
*temp s7m7 "worthless rock"
*temp s7m8 "worthless rock"
*temp s7m9 "worthless rock"
*temp s7m10 "worthless rock"
*temp s7m11 "worthless rock"
*temp s7m12 "worthless rock"
*temp s7m13 "worthless rock"
*temp s7m14 "worthless rock"
*temp s7m15 "worthless rock"
*temp s7m16 "worthless rock"
*temp s7m17 "worthless rock"
*temp s7m18 "worthless rock"
*temp s7m19 "worthless rock"
*temp s7m20 "worthless rock"
*temp s7m21 "worthless rock"
*temp s7m22 "worthless rock"
*temp s7m23 "worthless rock"
*temp s7m24 "worthless rock"
*temp s7m25 "worthless rock"
*temp s7m26 "worthless rock"
*temp s7m27 "worthless rock"
*temp s7m28 "worthless rock"
*temp s7m29 "worthless rock"
*temp s7m30 "worthless rock"
*temp s7m31 "worthless rock"
*temp s7m32 "worthless rock"
*temp s7m33 "worthless rock"
*temp s7m34 "worthless rock"
*temp s7m35 "worthless rock"
*temp s7m36 "worthless rock"
*temp s7m37 "worthless rock"
*temp s7m38 "worthless rock"
*temp s7m39 "worthless rock"
*temp s7m40 "worthless rock"
*temp s7m41 "worthless rock"
*temp s7m42 "worthless rock"
*temp s7m43 "worthless rock"
*temp s7m44 "worthless rock"
*temp s7m45 "worthless rock"
*temp s7m46 "worthless rock"
*temp s7m47 "worthless rock"
*temp s7m48 "worthless rock"
*temp s7m49 "worthless rock"
*temp s7m50 "worthless rock"

*temp bucket 0
*temp sack 0
*temp shaft 0
*temp depth 0

*temp shaftnumber 1
*temp meternumber 8
*temp cood ""

*label begin

*if shaftnumber > 7
	*return

*if meternumber > 50
	*set meternumber 8
	*set shaftnumber +1
	*goto begin

*if meternumber < 8
	*rand dieroll 1 100
	
*if (meternumber >= 8) and (meternumber < 20)
	*rand dieroll 1 11
	
*if (meternumber >= 20) and (meternumber < 35)
	*rand dieroll 1 7
	
*if meternumber >= 35
	*rand dieroll 1 2

*if dieroll = 1
	*set cood "s${shaftnumber}m${meternumber}"
	*set {cood} "tin ore"
	
*set meternumber +1

*goto begin