*if bar_banned = true
	*goto banned

*check_achievements
*if choice_achieved_bar = false
	*achieve bar

*rand dieroll 51 75

*set refuel_cost (dieroll * 10)

*temp customer_emoji ""
*temp drink ""
*temp drink_cost 0

*if planet_level = 1
	*set drink "moonshine"
	*rand drink_cost 5 9
	
*if planet_level = 2
	*set drink "beer"
	*rand drink_cost 15 30
	
*if planet_level = 3
	*set drink "craft beer"
	*rand drink_cost 25 70
	
*if planet_level = 4
	*set drink "wine"
	*rand drink_cost 90 150
	
*if planet_level = 5
	*set drink "aged single-malt whiskey"
	*rand drink_cost 300 900

${bar_emoji} [b]${bar_name}[/b]

*temp aimlessly ""

*rand dieroll 1 3

*if dieroll = 1
	*set aimlessly "aimlessly whistling a tune"
	*if sound
		*sound whistling.wav
	
*if dieroll = 2
	*set aimlessly "softly moaning"
	
*if dieroll = 3
	*set aimlessly "singing a drinking song"
	
*if sound
	*sound drinkstir.wav
	
*if planet_level = 1
	*goto bar1

*if planet_level = 2
	*goto bar2

*if planet_level = 3
	*goto bar3

*if planet_level = 4
	*goto bar4

*if planet_level = 5
	*goto bar5

*label bar1

Dust swirls around your feet as you push open the front door of the shack.

*if (rp = true) and (rp_quiet = false)
	${rp_emoji} "Ugh, this place looks horrible.  I think I'll go wander around the spaceport."
	
	"Okay, ${rp_name}," you say.

The inside is dimly lit, and about all you can make out is a short bar faced by half a dozen rough-hewn wooden stools.

As you approach the bar, you see a customer seated in front of a drink and ${aimlessly}.

*goto bar_menu

*label bar2

The air inside the day bar is stale and reeks of something sour.

The dingy lighting is more than adequate for you to see that there is just one customer inside, wearing a ${clothes1_color} ${clothes1} and a ${clothes2_color} ${clothes2}, sitting on a rickety looking bar stool.

*if bar_chat = 0
	Hunched over their drink, the customer is ${aimlessly}.
	
*if bar_chat > 0
	Hunched over their drink, the ${bar_customer_name} is ${aimlessly}.

*goto bar_menu

*label bar3

Stepping inside, you are greeted with the familiar sight of a well-appointed bar, complete with photos plastered on the mirror behind the bar and several neon signs advertising different kinds of beer.

*if (rp = true) and (rp_quiet = false)
	${rp_emoji} "Ugh, this place smells terrible.  I think I'll go wander around the spaceport."
	
	"Okay, ${rp_name}," you say.

However, at this hour, there appears to be just one customer inside the bar.

*if bar_chat = 0
	He or she is seated at the bar, wearing a ${clothes1_color} ${clothes1} and a ${clothes2_color} ${clothes2}, and apparently deeply engaged in thought and ${aimlessly}.
	
*if bar_chat > 0
	${bar_customer_name} is seated at the bar, wearing a ${clothes1_color} ${clothes1} and a ${clothes2_color} ${clothes2}, and apparently deeply engaged in thought and ${aimlessly}.

*goto bar_menu

*label bar4

Pulling open the elegant handle on the stout wooden door, you step inside the pub and are greeted with the sight of an upscale establishment.

The name of the pub is displayed on a large sign hanging above the bar, and there is an impressive collection of bottles on display behind the bar.

However, despite the warm and inviting atmosphere in the pub, it appears that there is only one customer here at the moment.

*if bar_chat = 0
	She or he is seated on a well-appointed barstool, is wearing a ${clothes1_color} ${clothes1} and a ${clothes2_color} ${clothes2}, and is tapping their fingers on the bar while ${aimlessly}.
	
*if bar_chat > 0
	${bar_customer_name} is seated on a well-appointed barstool, is wearing a ${clothes1_color} ${clothes1} and a ${clothes2_color} ${clothes2},  and is tapping their fingers on the bar while ${aimlessly}.

*goto bar_menu

*label bar5

*if (rp = true) and (rp_quiet = false)
	${rp_emoji} "You enjoy your drink, ${name}.  I'm going to go look around the spaceport and maybe do some shopping."
	
	"Okay, ${rp_name}," you say.

You do not even have to touch the door to open the lounge because a sensor detects your presence and opens the door just as you approach.

Inside the lounge, you see elegantly appointed white seating cubes artfully interspersed with what look like real live ferns growing out of the glass-tiled floor.

A floating display in front of you rotates between the name of the lounge and saying "For your comfort, this facility is serviced by AI bartenders."

The only thing that is out of place is the customer wearing a ${clothes1_color} ${clothes1} and a ${clothes2_color} ${clothes2} that you see seated by the bar.

*if bar_chat = 0
	Clumsily perched on a tall stool, the customer is shaking their head and ${aimlessly}.
	
*if bar_chat > 0
	Clumsily perched on a tall stool, ${bar_customer_name} is shaking their head and ${aimlessly}.

*goto bar_menu

*label bar_menu

*temp mayo ""

*if bar_chat = 0
	*set mayo "the customer"

*if bar_chat > 0
	*set mayo "${bar_customer_name}"
	
*temp a ""

*if your_drinks = 0
	*set a "a"
	
*if your_drinks > 0
	*set a "another"
	
*temp cust_a ""

*if customer_drinks = 0
	*set cust_a "a"
	
*if customer_drinks > 0
	*set cust_a "another"

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

*fake_choice
	#🗣️ Speak to ${mayo}
		*if bar_chat = 1
			*goto speak_person1b
		*elseif bar_chat > 1
			*goto speak_person2
		*else
			*goto speak_person
	#${drink_emoji} Order ${a} drink
		*goto order_drink
	#↩️ Leave
		*goto leave_speech

*label speak_person

*set bar_chat + 1

${bar_emoji} [b]${bar_name}[/b]

*temp brazenly ""

*rand dieroll 1 5

*if dieroll = 1
	*set brazenly "brazenly"
	
*if dieroll = 2
	*set brazenly "cautiously"
	
*if dieroll = 3
	*set brazenly "fearlessly"
	
*if dieroll = 4
	*set brazenly "casually"
	
*if dieroll = 5
	*set brazenly "nonchalantly"

	
*temp souse ""

*rand dieroll 1 11

*if dieroll = 1
	*set souse "souse"
	
*if dieroll = 2
	*set souse "boozer"
	
*if dieroll = 3
	*set souse "alky"
	
*if dieroll = 4
	*set souse "wino"
	
*if dieroll = 5
	*set souse "lush"
	
*if dieroll = 6
	*set souse "drinker"
	
*if dieroll = 7
	*set souse "alcoholic"
	
*if dieroll = 8
	*set souse "dipsomaniac"
	
*if dieroll = 9
	*set souse "bottle hound"
	
*if dieroll = 10
	*set souse "rummy"
	
*if dieroll = 11
	*set souse "juicer"
	
*if bar_his = "his"
	*set customer_emoji "👨‍🎨"
	
*if bar_his = "her"
	*set customer_emoji "👩‍🎨"
	
$!{brazenly}, you pull yourself up on a stool next to the customer.

"${greetings}," you say.

Immediately, the person wearing the ${clothes2_color} ${clothes2} turns to face you.

*if sound
	*sound welcome.wav

${customer_emoji} "Welcome, friend! People around here call me [b]${bar_customer_name}[/b].  If you buy me a drink, I can give you some valuable information about this region of the galaxy, or I can sell you some fuel pods or some engine booster for your warp drive."

*goto order_menu
		
*label order_customer_drink

${bar_emoji} [b]${bar_name}[/b]

*temp drink ""
*temp drink_cost 0

*if planet_level = 1
	*set drink "moonshine"
	*rand drink_cost 7 11
	
*if planet_level = 2
	*set drink "beer"
	*rand drink_cost 18 35
	
*if planet_level = 3
	*set drink "craft beer"
	*rand drink_cost 33 81
	
*if planet_level = 4
	*set drink "wine"
	*rand drink_cost 99 185
	
*if planet_level = 5
	*set drink "aged single-malt whiskey"
	*rand drink_cost 350 995
	
*if sound
	*sound throatclear.wav

With a little wave, you successfully manage to summon the bartender.

"I'd like to order them ${cust_a} drink," you say, pointing in ${bar_customer_name}'s direction.

*if customer_drinks > 1
	*goto cutoff_customer

🙎‍♂️ "Right now, all we have is ${drink} for ${drink_cost} credits a glass.

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

*fake_choice
	#✅ Buy the drink for ${bar_customer_name}
		*set customer_drinks +1
		*goto buy_customer_drink
	#${drink_emoji} Order ${a} drink for yourself
		*goto order_drink
	#↩️ Leave the bar
		*goto leave_speech
	
*label buy_customer_drink

${bar_emoji} [b]${bar_name}[/b]

🙎‍♂️ "Here you go.  That'll be ${drink_cost} credits.

*if drink_cost > credits
	*temp ejaculation ""
	*gosub ejaculation
	To your embarrassment, you realize that you do not have enough money to pay for the drink.
	
	"I'm a little short on cash at the moment.  Is there some way I can pay you back?" you say.
	
	🙎‍♂️ "${ejaculation}! We don't tolerate off-worlder thieves in ${bar_name}."
	
	*page_break 😌
	
	*goto kicked_out

*set credits - drink_cost

*if sound
	*sound cardswipe.wav

You swipe over the credits, and a moment later, the bartender nods before lumbering off to a back area behind the bar.

*page_break ${drink_emoji}

${bar_emoji} [b]${bar_name}[/b]

*temp cheers ""

*rand dieroll 1 11

*if dieroll = 1
	*set cheers "Cheers"
	
*if dieroll = 2
	*set cheers "Here's mud in your eye"
	
*if dieroll = 3
	*set cheers "Yamas"
	
*if dieroll = 4
	*set cheers "Kan-pie"
	
*if dieroll = 5
	*set cheers "Saw-oo-day"
	
*if dieroll = 6
	*set cheers "Salud"
	
*if dieroll = 7
	*set cheers "Proost"
	
*if dieroll = 8
	*set cheers "Skawl"
	
*if dieroll = 9
	*set cheers "Live long and prosper"
	
*if dieroll = 10
	*set cheers "Here's to world peace"
	
*if dieroll = 11
	*set cheers "Eat, drink, and be merry, for tomorrow we die"
	
"Here's your drink," you say, sliding it over to ${bar_customer_name}.
	
${customer_emoji} "${cheers}!" says ${bar_customer_name}, raising ${bar_his} glass in a toast.

*if your_drinks > 0
	You lift your own glass in response.
	
*if sound
	*sound glassesclink.wav

*page_break 🥂

*if bar_chat > 1
	*goto get_down_to_business

${bar_emoji} [b]${bar_name}[/b]

*set bar_chat + 1

A moment later, ${bar_customer_name} breaks out into a smile.

*gosub_scene joke

*if sound
	*sound barlaugh.wav

*temp he ""

*if bar_his = "his"
	*set he "he"
	
*if bar_his = "her"
	*set he "she"

${customer_emoji} "${joke}" says ${bar_customer_name} with a laugh as ${he} gulps down ${bar_his} ${drink}. 

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

*fake_choice
	#🤣 Laugh
	#🙂 Politely laugh
	#😐 Do not laugh
		
${bar_emoji} [b]${bar_name}[/b]

*check_achievements
*if choice_achieved_chatterbox = false
	*achieve chatterbox

${customer_emoji} "That was a classic joke!  Hey, buy me one more drink, and I'll give you the keys to the kingdom, friend," says ${bar_customer_name}.

*if sound
	*sound buymeonemore.wav

*label order_menu

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

*fake_choice
	#${drink_emoji} Order ${cust_a} drink for ${bar_customer_name}
		*goto order_customer_drink
	#${drink_emoji} Order ${a} drink for yourself
		*goto order_drink
	#↩️ Leave the bar
		*goto leave_speech

*label order_drink

*if bar_chat = 0
	*set mayo "the customer"

*if bar_chat > 0
	*set mayo "${bar_customer_name}"

*if bar_chat = 0
	*set mayo "the customer"

*if bar_chat > 0
	*set mayo "${bar_customer_name}"

${bar_emoji} [b]${bar_name}[/b]

*if sound
	*sound throatclear.wav

With a little wave, you successfully manage to summon the bartender.

"I'd like to order a drink," you say.

*if your_drinks > 2
	*goto cutoff

🙎‍♂️ "Right now, all we have is ${drink} for ${drink_cost} credits a glass.

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

*fake_choice
	#✅ Buy the drink
		*set your_drinks +1
		*goto buy_drink
	#🗣️ Speak to ${mayo}
		*if bar_chat = 1
			*goto speak_person2
		*elseif bar_chat > 1
			*goto speak_person1b
		*else
			*goto speak_person
	#↩️ Leave the bar
		*goto leave_speech
	
*label buy_drink

${bar_emoji} [b]${bar_name}[/b]
		
🙎‍♂️ "Here you go.  That'll be ${drink_cost} credits."

*if drink_cost > credits
	*if sound
		*sound warning.wav
	*gosub ejaculation
	To your embarrassment, you realize that you do not have enough money to pay for the drink.
	
	"I'm a little short on cash at the moment.  Is there some way I can pay you back?" you say.
	
	"${ejaculation}!" says the bartender.  "We don't tolerate off-worlder thieves in ${bar_name}."
	
	*page_break 😌
	
	*goto kicked_out

*check_achievements
*if choice_achieved_first_drink = false
	*achieve first_drink

*set credits - drink_cost

*if sound
	*sound cardswipe.wav

You swipe over the appropriate amount, and a moment later, the bartender nods before lumbering off to a back area behind the bar.

*page_break ${drink_emoji}

${bar_emoji} [b]${bar_name}[/b]

Admiring the look of your ${drink} in the glass for a moment, you then lift it to your lips and swallow.

As far as things go, it's not the best ${drink} you ever had, but it also isn't the worst.

*goto bar_menu

*label get_down_to_business

${bar_emoji} [b]${bar_name}[/b]

"Let's get down to business, now," you say.

*if sound
	*sound sohowcanihelp.wav

${customer_emoji} "Whew, that really laid down the dust, friend," says ${bar_customer_name}, taking a long swallow of ${bar_his} ${drink}.  "So, how can I help you?"

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

*fake_choice
	#📍 Ask about the location of planets
		*goto location
	#🔥 Ask about buying fuel pods
		*goto buy_fuel
	*selectable_if (speed < 10) #🛠️ Ask about tuning up your warp engine
		*goto tune_up
	
*label location

${bar_emoji} [b]${bar_name}[/b]

*gosub loc_setup

*if sound
	*sound friendmyadvice.wav

${customer_emoji} "Friend, my advice is to go to the planet [b]${planet_divulge}[/b] in Quadrant ${divulge_quad}," says ${bar_customer_name}.

"What so special about ${planet_divulge}?" you ask, warily.

${customer_emoji} "I heard that they're they're desperate for ${divulge_resources}, and the folks over there are willing to pay top credits for them. But if you want to know more, you're going to have to buy me another drink."

*goto order_menu
		
*label buy_fuel

${bar_emoji} [b]${bar_name}[/b]

*set refuel_cost 0

*rand dieroll 100 299

*set refuel_cost (3 * dieroll)

*if sound
	*sound exploringthegalaxy.wav

${customer_emoji} "Exploring the galaxy sure is a lot of fun, but my goodness, it really does burn a lot of fuel, doesn't it? Worst part is, if you run out, you might get stuck on a planet like ${planet_name}!" laughs ${bar_customer_name}.

"How much for the fuel pods?" you inquire.

${customer_emoji} "I've got ten fuel pods that I'd be willing to let you have for ${refuel_cost} credits.  That's a real bargain, ten pods for just ${refuel_cost} credits!  What do you say?" says ${bar_customer_name}.

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

*fake_choice
	*selectable_if (credits >= refuel_cost) #✅ Buy the fuel pods.
		*set double_banned true
		*goto buy_fuel_pods
	#🙅‍♂️ Do not buy the fuel pods
		*goto dont_buy_fuel
	#↩️ Leave the bar
		*goto leave_speech
		
*label buy_fuel_pods

${bar_emoji} [b]${bar_name}[/b]

*set fuel +10
*if fuel > fuel_max
	*set fuel fuel_max
*set credits - refuel_cost

*if sound
	*sound comeontheyreoutback.wav

${customer_emoji} "Come on, they're out back!" says ${bar_customer_name}, hopping down from ${bar_his} stool.

Brazenly, you follow behind ${bar_customer_name}, exiting out of a small door nearly hidden from view at the back of the room.

${customer_emoji} As soon as the exit door closes behind you, ${bar_customer_name} turns to you and says, "Okay, time to fork over the credits, friend."

You swipe over ¢${refuel_cost} to the long string of numbers and letters that ${bar_customer_name} carefully recites aloud.

*page_break ⛓️

${bar_emoji} [b]${bar_name}[/b]

*if sound
	*sound letsgoinside.wav

${customer_emoji} "Good doing business with you, friend," says ${bar_customer_name}, handing over a heavy canvas tote bag.

Looking inside, you count ten fuel pods, each carefully nestled in protective wrapping.

${customer_emoji} "Come on, let's go inside and get another drink," says ${bar_customer_name}.

A moment later, the two of you return to your former places at the bar.

*goto order_menu
		
*label dont_buy_fuel

*temp ejaculation ""

${bar_emoji} [b]${bar_name}[/b]

*gosub ejaculation

"I'm afraid that your price is a little too high," you say.

*if sound
	*sound what.wav

${customer_emoji} "What?" splurts ${bar_customer_name}.  "You won't find a better price on fuel pods anywhere in the next three quadrants!"

"My ship has an efficient engine.  I don't want your overpriced fuel pods," you say.

${customer_emoji} "${ejaculation}! Well, if you want me to maybe think about reducing the price a little, you'll have to buy me another drink."

*goto order_menu
		
*label tune_up

*temp tune_price 0
*set tune_price (drink_cost * 5)
*set tune_price round(tune_price)

${bar_emoji} [b]${bar_name}[/b]

*if sound
	*sound oneofthebestwaystosave.wav

${customer_emoji} "Friend, one of the best ways to save on fuel costs is to boost your ship's engines with my special blend of additives that'll improve your warp speed by zero point two five," says ${bar_customer_name}.

"How much?" you ask.

${customer_emoji} "Friend, just because of how much I like your face, I'm going to let you have one packet of my engine booster for only ${tune_price} credits," says ${bar_customer_name} with a smile.

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

*fake_choice
	*selectable_if (credits >= tune_price) #✅ Buy the engine booster
		*goto buy_powder
	#🙅‍♂️ Do not buy the engine booster
		*goto notbuy_powder
	#↩️ Leave the bar
		*goto leave_speech
	
*label buy_powder

*check_achievements
*if choice_achieved_tuneup = false
	*achieve tuneup

${bar_emoji} [b]${bar_name}[/b]

*set credits - tune_price

*set speed + 0.25
*if speed > 10
	*set speed 10

*gosub gamgam
*gosub an_orbital_farmer
*temp years 0
*rand years 17 85

"The price is a little high, but the engine booster will save me a lot of credits on fuel pods in the long run," you say as you swipe transfer the money over to ${bar_customer_name}.

*if sound
	*sound wortheverycredit.wav

${customer_emoji} "Worth every credit, friend!  What you've got there is my ${gamgam}'s special recipe.  She was ${an_orbital_farmer} for more than ${years} years, you know!"

"Good to know," you reply as you tuck the packet of engine booster into the pocket of your tunic.

${customer_emoji} "Doing business always makes me thirsty.  Care to buy me another drink, friend?" 

*goto order_menu

*label notbuy_powder

${bar_emoji} [b]${bar_name}[/b]

*temp gamgam ""
*temp an_orbital_farmer ""
*gosub gamgam
*gosub an_orbital_farmer
*temp years 0
*rand years 17 85

*if sound
	*sound friendthisengineboostermix.wav

"if it is so easy to boost your warp speed with that magic mixture of yours, then why isn't everyone using it?" you ask.

${customer_emoji} "Friend, this engine booster mixture is my ${gamgam}'s special recipe.  She was ${an_orbital_farmer} for more than ${years} years, you know!" 

"Well, even if it does work the way you say it does, ${tune_price} credits is way too much to be charging for a mere point two five boost in warp speed," you reply.

${customer_emoji} "Tell you what, friend. Buy me another drink, and I might think about bringing the price down."

*goto order_menu

*label speak_person1b

${bar_emoji} [b]${bar_name}[/b]

*set mayo "${bar_customer_name}"

*if sound
	*sound thirstybusiness.wav

${customer_emoji} "Hey, what did you say your name was, friend? Let me tell you, living on ${planet_name} sure is thirsty business," says ${bar_customer_name}.

"My name is ${name}, and I am captain of the ${ship_name}," you reply as you sip your drink.

${customer_emoji} "Captain, eh?  That's cool! I can tell you where some interesting planets are, if you like.  Or I'd be happy to sell you some engine booster to speed up your warp drive.  Or maybe you're looking for some fuel pods?  After all, cruising around the galaxy burns a lot of gas, am I right?" says ${bar_customer_name} with a chuckle.  "But I really could use another drink, first."

*goto order_menu

*label speak_person2

${bar_emoji} [b]${bar_name}[/b]

*if sound
	*sound thirstybusiness.wav

${customer_emoji} "Hey, what did you say your name was, friend? Let me tell you, living on ${planet_name} sure is thirsty work.  What do you say you buy me a drink, friend?" says ${bar_customer_name}.

"Last time I did that, you told me a joke," you reply.

${customer_emoji} "No more jokes, I promise!  I can tell you where planets are, if you like.  Or I'd be happy to improving the efficiency of your warp engine.  Or maybe you're looking for some fuel pods?  After all, cruising around the galaxy burns a lot of gas, am I right?" 

*goto order_menu
	
*label loc_setup

*temp planet_divulge ""
*temp divulge_quad 0
*temp divulge_resources ""

*rand dieroll 1 11

*temp poppy ""

*set poppy "resource${dieroll}"
*set divulge_resources {poppy}

*rand dieroll 1 150

*temp lemon ""
*temp bar ""

*set lemon "planet${dieroll}_name"

*if lemon = planet_name
	*gosub loc_setup
*set planet_divulge {lemon}
*set bar "planet${dieroll}_quadrant"
*set divulge_quad {bar}

*return

*label bar_names

*temp customer_emoji ""

*rand dieroll 1 2

*if dieroll = 1
	*set bar_his "his"
	
*if dieroll = 2
	*set bar_his "her"
	
*if bar_his = "his"
	*set customer_emoji "👨‍🎨"
	
*if bar_his = "her"
	*set customer_emoji "👩‍🎨"

*if planet_level = 1
	*set bar_emoji "🏚️"
	*set drink_emoji "🏺"
	
*if planet_level = 2
	*set bar_emoji"🍺"
	*set drink_emoji bar_emoji
	
*if planet_level = 3
	*set bar_emoji"🍺"
	*set drink_emoji bar_emoji
	
*if planet_level = 4
	*set bar_emoji"🍷"
	*set drink_emoji bar_emoji
	
*if planet_level = 5
	*set bar_emoji"🥃"
	*set drink_emoji bar_emoji

*rand dieroll 1 59

*if dieroll = 1
	*set bar_name "The Coachman's Casque"
	
*if dieroll = 2
	*set bar_name "The Fish's Pelt"
	
*if dieroll = 3
	*set bar_name "The Green Elixir"
	
*if dieroll = 4
	*set bar_name "The Narwhal Inn"
	
*if dieroll = 5
	*set bar_name "The Outraged Raven"
	
*if dieroll = 6
	*set bar_name "The Wealthy Troll's Alehouse"
	
*if dieroll = 7
	*set bar_name "The Bottle and Lab"
	
*if dieroll = 8
	*set bar_name "The Excited Cleric"
	
*if dieroll = 9
	*set bar_name "The Goblin's Den"
	
*if dieroll = 10
	*set bar_name "The Wolf and Rose"
	
*if dieroll = 11
	*set bar_name "The Good Militiaman"
	
*if dieroll = 12
	*set bar_name "The Broken Bottle"
	
*if dieroll = 13
	*set bar_name "The Duplicate Duck"
	
*if dieroll = 14
	*set bar_name "The Peddler's Inn"
	
*if dieroll = 15
	*set bar_name "The Scroll and Club"
	
*if dieroll = 16
	*set bar_name "The Priest's Prayer"
	
*if dieroll = 17
	*set bar_name "The Quail and Bard"
	
*if dieroll = 18
	*set bar_name "The Mad Phoenix"
	
*if dieroll = 19
	*set bar_name "The Red Prince of Harrow"
	
*if dieroll = 20
	*set bar_name "The Castle Arms"
	
*if dieroll = 21
	*set bar_name "The Gray Falcon"
	
*if dieroll = 22
	*set bar_name "The Angel's Rest Tavern"
	
*if dieroll = 23
	*set bar_name "The Lord of Edgeware Inn"
	
*if dieroll = 24
	*set bar_name "The Hanged Sheep"
	
*if dieroll = 25
	*set bar_name "The Bear Arms"
	
*if dieroll = 26
	*set bar_name "The Harlequin and Grill"
	
*if dieroll = 27
	*set bar_name "The Cleric and Bell"
	
*if dieroll = 28
	*set bar_name "The Four Coats"
	
*if dieroll = 29
	*set bar_name "The Naughty Woodsman"
	
*if dieroll = 30
	*set bar_name "The Tiger and King"
	
*if dieroll = 31
	*set bar_name "The Hare Arms"
	
*if dieroll = 32
	*set bar_name "The Staff and Star"
	
*if dieroll = 33
	*set bar_name "Albion's Mount"
	
*if dieroll = 34
	*set bar_name "The Trinity and Peacock"
	
*if dieroll = 35
	*set bar_name "Donager's Rest"
	
*if dieroll = 36
	*set bar_name "The Five Hop Brew House"
	
*if dieroll = 37
	*set bar_name "The Grill and Lion"
	
*if dieroll = 38
	*set bar_name "The Alchemist's Bottle"
	
*if dieroll = 39
	*set bar_name "The Blessing and Prayer"
	
*if dieroll = 40
	*set bar_name "The Club and Cauldron"
	
*if dieroll = 41
	*set bar_name "The Demon's Barrel"
	
*if dieroll = 42
	*set bar_name "The Harpy's Beak"
	
*if dieroll = 43
	*set bar_name "The Knight's Barrel"
	
*if dieroll = 44
	*set bar_name "The Sword and Prayer"
	
*if dieroll = 45
	*set bar_name "Trader's Rest"
	
*if dieroll = 46
	*set bar_name "The Gleaming Cauldron"
	
*if dieroll = 47
	*set bar_name "The Purple Club Inn"
	
*if dieroll = 48
	*set bar_name "The International Clams Inn"
	
*if dieroll = 49
	*set bar_name "The Amused Mountain"
	
*if dieroll = 50
	*set bar_name "The Fascinating Yew"
	
*if dieroll = 51
	*set bar_name "The Vagabond Spider"
	
*if dieroll = 52
	*set bar_name "The Juicy Melon"
	
*if dieroll = 53
	*set bar_name "The Tired Oyster"
	
*if dieroll = 54
	*set bar_name "The First Flute Pub"
	
*if dieroll = 55
	*set bar_name "The Thin Chestnut Tavern"
	
*if dieroll = 56
	*set bar_name "The Mellow Wayfarer"
	
*if dieroll = 57
	*set bar_name "Ye Olde Worker Bar"
	
*if dieroll = 58
	*set bar_name "The Laughing Gooseberry"
	
*if dieroll = 59
	*set bar_name "Thin City Bistro and Pub"
	
*return

*label cutoff

🙎‍♂️ "No way.  You've had enough to drink, pal.  Go find somewhere else to drown your sorrows."

*page_break 😮

*goto kicked_out

*label cutoff_customer

*gosub souse

🙎‍♂️ "Are you kidding me?  ${bar_customer_name} is the worst ${souse} in this sector, and they have had more than enough to drink today."

*page_break 😮

*label kicked_out

${bar_emoji} [b]${bar_name}[/b]

*set bar_banned true

*gosub malarkey

*if sound
	*sound warning.wav

"I don't understand," you say.

*if planet_level = 1
	🙎‍♂️ "All right, that's enough ${malarkey} out of you!" says the bartender, aggressively menacing you with a long club.  "Get out of my bar, off-worlder!  And don't come back until you sober up."
	
*if planet_level = 2
	🙎‍♂️ "We do not tolerate this kind of ${malarkey} out of folks on ${planet_name}.  I'm going to have to ask you to leave now.  Please do not make me have to take out my gun, or things are going to get ugly."
	
*if planet_level = 3
	🙎‍♂️ "They do not pay me enough to deal with all this ${malarkey} out of you damned off-worlders! I'm giving you one second to get out of here before I call the cops."

*if planet_level = 4
	🙎‍♂️ "Oy, off-worlder!  That's enough malarkey out of you.  I have an ion whip behind the bar, and I will use it if you do not vacate the premises immediately.
	
*if planet_level = 5
	🙎‍♂️ "Error!  Your behavior has fallen bellow acceptable limits for society on this planet.  You will be ejected and barred from this facility until further notice.

You are not quite sure whether or not you were ready to leave this bar yet, but you do know that you cannot afford to get into serious trouble on this planet.

Keeping your dignity as intact as you are able, you make your way out of the bar.

*page_break 😌

*goto leave_speech

*label banned

*if double_banned = true
	*if sound
		*sound getoutandstayout.wav
		
	🙎‍♂️ "Get out and stay out!" 
	
	*page_break 😌
	*goto leave_speech

${bar_emoji} [b]${bar_name}[/b]

"$!{greetings}," you say as you enter.

*if sound
	*sound notservingyouanymore.wav
	
*set refuel_cost + 25

🙎‍♂️ "I'm not serving you any more drinks," shouts the bartender.  "And your drinking buddy went home to sleep.  But ${bar_customer_name} said you might be interested in buying some fuel pods."

"Possibly," you say, tentatively.

🙎‍♂️ "${bar_customer_name} said you might need 'em.  I'll let you have them for ${refuel_cost} credits."

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

*fake_choice
	*selectable_if (credits >= refuel_cost) #🔥 Buy the fuel pods
		*if sound
			*sound hereyagonowgit.wav
		*set double_banned true
		*set credits - refuel_cost
		*set fuel + 10
		*if fuel > fuel_max
			*set fuel fuel_max
		🙎‍♂️ 		"Here you go," says the bartender, handing you ten fuel pods.  "Now get out of here!"
		
		"I was just leaving," you reply as you make your way out the door.
		
		*page_break 😌
		*goto leave_speech
	#↩️ Leave the bar
		*goto leave_speech

*label ejaculation

*temp ejaculation ""

*rand dieroll 1 50

*if dieroll = 1
	*set ejaculation "Flippin 'eck"
	
*if dieroll = 2
	*set ejaculation "Fair suck of the sav"
	
*if dieroll = 3
	*set ejaculation "Man alive"
	
*if dieroll = 4
	*set ejaculation "Holy cow"
	
*if dieroll = 5
	*set ejaculation "The Outraged Raven"
	
*if dieroll = 6
	*set ejaculation "Astounding"
	
*if dieroll = 7
	*set ejaculation "Woah"
	
*if dieroll = 8
	*set ejaculation "Heckfire and tarnation"
	
*if dieroll = 9
	*set ejaculation "Gadzooks"
	
*if dieroll = 10
	*set ejaculation "Brass farthing"
	
*if dieroll = 11
	*set ejaculation "Well, iffin' that don't beat everything"
	
*if dieroll = 12
	*set ejaculation "I'll be a monkey's uncle"
	
*if dieroll = 13
	*set ejaculation "Flip me over and call me a pancake"
	
*if dieroll = 14
	*set ejaculation "Gosh, by gosh, and golly"
	
*if dieroll = 15
	*set ejaculation "Gosh"
	
*if dieroll = 16
	*set ejaculation "Goly gee"
	
*if dieroll = 17
	*set ejaculation "Good lord"
	
*if dieroll = 18
	*set ejaculation "Bless my soul"
	
*if dieroll = 19
	*set ejaculation "By gum"
	
*if dieroll = 20
	*set ejaculation "By Jove"
	
*if dieroll = 21
	*set ejaculation "As I live and breathe"
	
*if dieroll = 22
	*set ejaculation "Crumbs"
	
*if dieroll = 23
	*set ejaculation "Cripes"
	
*if dieroll = 24
	*set ejaculation "Crikey"
	
*if dieroll = 25
	*set ejaculation "Oh shoot"
	
*if dieroll = 26
	*set ejaculation "Fuck me gently with a chainsaw"
	
*if dieroll = 27
	*set ejaculation "Doggone it"
	
*if dieroll = 28
	*set ejaculation "Gee whiz"
	
*if dieroll = 29
	*set ejaculation "Gracious"
	
*if dieroll = 30
	*set ejaculation "Gracious me"
	
*if dieroll = 31
	*set ejaculation "Ye gods"
	
*if dieroll = 32
	*set ejaculation "Yikes"
	
*if dieroll = 33
	*set ejaculation "By Thor's hammer"
	
*if dieroll = 34
	*set ejaculation "By the hairs of Lord Lavka's beard"
	
*if dieroll = 35
	*set ejaculation "Holy pretzel"
	
*if dieroll = 36
	*set ejaculation "Gup it"
	
*if dieroll = 37
	*set ejaculation "Pip and gip"
	
*if dieroll = 38
	*set ejaculation "Well, I'll be jitterbugged"
	
*if dieroll = 39
	*set ejaculation "That'll stiffen the wombatr"
	
*if dieroll = 40
	*set ejaculation "My wig and whiskers"
	
*if dieroll = 41
	*set ejaculation "My wigs and eyes"
	
*if dieroll = 42
	*set ejaculation "Oh my wig"
	
*if dieroll = 43
	*set ejaculation "Jumping piminy"
	
*if dieroll = 44
	*set ejaculation "My stars"
	
*if dieroll = 45
	*set ejaculation "God bless you"
	
*if dieroll = 46
	*set ejaculation "Zookers"
	
*if dieroll = 47
	*set ejaculation "Oh, fishhooks"
	
*if dieroll = 48
	*set ejaculation "Well, gosh all hemlock"
	
*if dieroll = 49
	*set ejaculation "Well, gosh all Fiddlesticks"
	
*if dieroll = 50
	*set ejaculation "Well, gosh all firelocks"
	

*return

*label malarkey

*temp malarkey ""

*rand dieroll 1 11

*if dieroll = 1
	*set malarkey "malarkey"
	
*if dieroll = 2
	*set malarkey "bosh"
	
*if dieroll = 3
	*set malarkey "poppycock"
	
*if dieroll = 4
	*set malarkey "balderdash"
	
*if dieroll = 5
	*set malarkey "bull"
	
*if dieroll = 6
	*set malarkey "bunk"
	
*if dieroll = 7
	*set malarkey "foolishness"
	
*if dieroll = 8
	*set malarkey "monkey business"
	
*if dieroll = 9
	*set malarkey "twaddle"
	
*if dieroll = 10
	*set malarkey "of this idiocy"
	
*if dieroll = 11
	*set malarkey "drivel"
	
*return

*label gamgam

*temp gamgam ""

*rand dieroll 1 11

*if dieroll = 1
	*set gamgam "gam-gam"
	
*if dieroll = 2
	*set gamgam "baba"
	
*if dieroll = 3
	*set gamgam "bomma"
	
*if dieroll = 4
	*set gamgam "ouma"
	
*if dieroll = 5
	*set gamgam "bubbe"
	
*if dieroll = 6
	*set gamgam "gamma"
	
*if dieroll = 7
	*set gamgam "gammie"
	
*if dieroll = 8
	*set gamgam "glamma"
	
*if dieroll = 9
	*set gamgam "G-ma"
	
*if dieroll = 10
	*set gamgam "G-pa"
	
*if dieroll = 11
	*set gamgam "Lovie"
	
*return

*label an_orbital_farmer

*temp an_orbital_farmer ""

*rand dieroll 1 11

*if dieroll = 1
	*set an_orbital_farmer "an orbital farmer"
	
*if dieroll = 2
	*set an_orbital_farmer "an astrogeomancer"
	
*if dieroll = 3
	*set an_orbital_farmer "an engineering plantologist"
	
*if dieroll = 4
	*set an_orbital_farmer "a data processor living in the deserts of Aeschylus V"
	
*if dieroll = 5
	*set an_orbital_farmer "a blue milk rancher"
	
*if dieroll = 6
	*set an_orbital_farmer "an electrical distiller on Novus Prime"
	
*if dieroll = 7
	*set an_orbital_farmer "a reverse data analyst"
	
*if dieroll = 8
	*set an_orbital_farmer "an AI songwriter"
	
*if dieroll = 9
	*set an_orbital_farmer "a mercenary psychiatrist"
	
*if dieroll = 10
	*set an_orbital_farmer "a communications officer on Truhelon's ninth moon"
	
*if dieroll = 11
	*set an_orbital_farmer "a nuclear midwife"
	
*return

*label leave_speech

*goto_scene spaceport leave_market

*label clothes

*rand dieroll 1 11

*if dieroll = 1
	*set clothes1_color "white"
	
*if dieroll = 2
	*set clothes1_color "blue"
	
*if dieroll = 3
	*set clothes1_color "red"
	
*if dieroll = 4
	*set clothes1_color "yellow"
	
*if dieroll = 5
	*set clothes1_color "brown"
	
*if dieroll = 6
	*set clothes1_color "black"
	
*if dieroll = 7
	*set clothes1_color "white"
	
*if dieroll = 8
	*set clothes1_color "green"
	
*if dieroll = 9
	*set clothes1_color "pink"
	
*if dieroll = 9
	*set clothes1_color "polka dot"
	
*if dieroll = 10
	*set clothes1_color "striped"
	
*if dieroll = 11
	*set clothes1_color "orange"
	
*rand dieroll 1 11

*if dieroll = 1
	*set clothes2_color "white"
	
*if dieroll = 2
	*set clothes2_color "blue"
	
*if dieroll = 3
	*set clothes2_color "red"
	
*if dieroll = 4
	*set clothes2_color "yellow"
	
*if dieroll = 5
	*set clothes2_color "brown"
	
*if dieroll = 6
	*set clothes2_color "black"
	
*if dieroll = 7
	*set clothes2_color "white"
	
*if dieroll = 8
	*set clothes2_color "green"
	
*if dieroll = 9
	*set clothes2_color "pink"
	
*if dieroll = 9
	*set clothes2_color "polka dot"
	
*if dieroll = 10
	*set clothes2_color "sparkly"
	
*if dieroll = 11
	*set clothes2_color "orange"
	
*rand dieroll 1 11

*if dieroll = 1
	*set clothes1 "pair of faded overalls"
	
*if dieroll = 2
	*set clothes1 "tattered overcoat"
	
*if dieroll = 3
	*set clothes1 "fuzzy sweater"
	
*if dieroll = 4
	*set clothes1 "baggy sweatshirt"
	
*if dieroll = 5
	*set clothes1 "house dress"
	
*if dieroll = 6
	*set clothes1 "pair of what look like pajamas"
	
*if dieroll = 7
	*set clothes1 "pair of baggy jeans"
	
*if dieroll = 8
	*set clothes1 "oversized hoodie"
	
*if dieroll = 9
	*set clothes1 "food-stained shirt"
	
*if dieroll = 9
	*set clothes1 "vintage dress shirt"
	
*if dieroll = 10
	*set clothes1 "poncho"
	
*if dieroll = 11
	*set clothes1 "raincoat"
	
*rand dieroll 1 11

*if dieroll = 1
	*set clothes2 "top hat"
	
*if dieroll = 2
	*set clothes2 "baseball cap"
	
*if dieroll = 3
	*set clothes2 "headband"
	
*if dieroll = 4
	*set clothes2 "driver's cap"
	
*if dieroll = 5
	*set clothes2 "chef's hat"
	
*if dieroll = 6
	*set clothes2 "pair of bunny ears"
	
*if dieroll = 7
	*set clothes2 "knit cap"
	
*if dieroll = 8
	*set clothes2 "scarf"
	
*if dieroll = 9
	*set clothes2 "pair of mittens"
	
*if dieroll = 9
	*set clothes2 "pair of sneakers"
	
*if dieroll = 10
	*set clothes2 "hardhat"
	
*if dieroll = 11
	*set clothes2 "belt"
	
*return

*label souse
	
*temp souse ""

*rand dieroll 1 11

*if dieroll = 1
	*set souse "souse"
	
*if dieroll = 2
	*set souse "boozer"
	
*if dieroll = 3
	*set souse "alky"
	
*if dieroll = 4
	*set souse "wino"
	
*if dieroll = 5
	*set souse "lush"
	
*if dieroll = 6
	*set souse "drinker"
	
*if dieroll = 7
	*set souse "alcoholic"
	
*if dieroll = 8
	*set souse "dipsomaniac"
	
*if dieroll = 9
	*set souse "bottle hound"
	
*if dieroll = 10
	*set souse "rummy"
	
*if dieroll = 11
	*set souse "juicer"
	
*return