*label smart

*set move_counter +1

🌌  [b]Current Location[/b]: Quadrant ${quadrant}, Sector Zero

*temp codegen ""
*temp number 1
*temp codeletter ""
*gosub codegen

*temp code ""

*temp mark 1
*temp bearing 1

*rand mark 1 24
*rand bearing 1 365
*rand dieroll 11425 17621

*if sound
	*sound spacehailer.wav

Navigation has identified an 🌕 [b]Artificial Moon[/b] bearing ${bearing}, mark ${mark}, range ${dieroll} kilometers.

*label com_report

📟 Communications reports an incoming tight-beam personal message locked to your voice ID.

*if rp
	${rp_emoji} "Oh my god, I bet that's a message from your ${brother}, ${name}!"
	
*label sec_menu

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

*fake_choice
	#🗣️ Unlock the tight-beam message
		*goto unlock_msg
	#📶 Hail the artificial moon
		*goto hail_moon
	#🛰️ Scan the artificial moon
		*goto scan_moon
	#🛥️ Explore another sector
		*goto_scene startrip_main impulse
	#💫 Warp to another quadrant
		*goto_scene startrip_main warp
	
*label sec_menu2

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

*fake_choice
	#📶 Hail the artificial moon
		*goto hail_moon
	#🛰️ Scan the artificial moon
		*goto scan_moon
	#🛥️ Explore another sector
		*goto_scene startrip_main impulse
	#💫 Warp to another quadrant
		*goto_scene startrip_main warp
	
*label unlock_msg

🌌  [b]Current Location[/b]: Quadrant ${quadrant}, Sector Zero

"Unlock message," you say.

*set sz_bro_msg_read + 1

A moment later, the text of the message displays on the forward screen:

*if sz_bro_msg_read > 1
	*goto second_msg

[i]"Thank the Galactic Spirit, you made it! [/i]

[i]I wasn't sure if I was ever going to see you again, especially after I got that message that said "$!{brother_reply}"[/i]

[i]Please come pick me up at the northwestern corner of the fortified spaceship hangar.[/i]

[i]I've managed to get hack the security system to get a temporary clearance code for you to land - it is [b]${codegen}[/b].[/i]

[i]If you try to approach this place without the right clearance code, the security system will blow your ship to bits, so make sure you enter it CORRECTLY.[/i]

[i]See you soon, ${myrel}!!!![/i]

*goto sec_menu2

*label second_msg

[i]$!{myrel}, what are you waiting for??[/i]

[i]Come get me at the northwestern corner of the fortified spaceship hangar![/i]

[i]Use the code [b]${codegen}[/b] to get clearance to land.[/i]

[i]Now hurry up, will ya??[/i]

*goto sec_menu2

*label scan_moon

🌌  [b]Current Location[/b]: Quadrant ${quadrant}, Sector Zero

*if sound
	*sound scan.wav
	
Your scans of the 🌕 [b]Artificial Moon[/b] reveal that it is a heavily protected military installation of some kind:

📡 12 ground-based radar stations
*line_break
🔦 24 ground-based phaser arrays
*line_break
🚀 10 missile tubes
*line_break
✈️ 1 fortified spaceship hangar
*line_break

*goto com_report

*label hail_moon

*if sound
	*sound stcommunicator.wav

🌌  [b]Current Location[/b]: Quadrant ${quadrant}, Sector Zero

📶 You hail the Artificial Moon on the public frequency:

"Artificial moon, by voice ID, I am Captain ${name} of the ${ship_name}.  My vessel registration number is ${regnumber}-Alpha. Requesting permission to land."

Only after a full minute has passed do you receive a reply:

📶 🌕  [i]"This is a restricted security area, vessel ${regnumber}-Alpha.  You must enter a valid clearance code in order to proceed.  Failure to provide a correct clearance code will result in the immediate destruction of your ship."[/i]

*label after_msg_menu

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

*fake_choice
	#🗣️ Transmit a clearance code
		*goto code_enter
	*disable_reuse #🛰️ Scan the artificial moon
		*goto scan_moon
	#🛥️ Explore another sector
		*goto_scene startrip_main impulse
	#💫 Warp to another quadrant
		*goto_scene startrip_main warp
	
*label code_enter

🌌  [b]Current Location[/b]: Quadrant ${quadrant}, Sector Zero

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

*input_text code

🌌  [b]Current Location[/b]: Quadrant ${quadrant}, Sector Zero

*if sound
	*sound stcommunicator.wav

📶 You hail the Artificial Moon on the public frequency:

"Artificial moon, now transmitting clearance code ${code}."

*if rp
	${rp_emoji} "Oh my god, my heart is beating so fast right now."

*if code != codegen
	*page_break 

	📶 🌕  "Incorrect code.  Launching missiles now."
	
	*if rp
		${rp_emoji} "${name}, you idiot?  What have you done?  You're gonna get us killed!"
		
	*goto warp

A very long moment indeed passes before you receive a reply:

📶 🌕  [i]"Code confirmed.  You are cleared to approach, ${ship_name}."[/i]

*if rp
	${rp_emoji} "Thank the Galactic Spirit!"
	
[b]:::[/b] What do you want to do, Captain?

*fake_choice
	#🚀 Land on the artificial moon
		*goto moon_landing
	#🛥️ Explore another sector
		*goto_scene startrip_main impulse
	#💫 Warp to another quadrant
		*goto_scene startrip_main warp
	
*label moon_landing

🌕 [b]Current Location[/b]: The surface of an Artificial Moon

*if sound
	*sound fuelburn.mp3
	
*set on_moon true

Carefully adjusting your thrusters, you see the fortified spaceship hangar come into view.

There is a large paved area adjacent to the northwestern corner of the hangar which is perfect for a landing, so you quickly touch down there.

Once you are safely on the surface of the artificial moon, you begin anxiously looking out the forward view screen, but you see no sign of your ${brother}, and there are no new incoming messages on the console.

Just then, a security officer appears and runs towards your ship's forward hatch.

💂 "You, inside that spaceship!  Step outside slowly with your hands up!"

You can see that the security officer is armed with what looks like a next-generation phaser rifle.

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

*fake_choice
	#✋ Step outside with your hands up
		*goto surrender
	#🗣️  Try to bluff the guard
		*goto bluff_guard
	#🚀 Perform an emergency blastoff
		*goto emergency_blastoff
	
*label bluff_guard

🌕 [b]Current Location[/b]: The surface of an Artificial Moon

Carefully, you unseal the forward hatch and step out, both of your hands in plain sight.

"Is there a problem here, officer? I've got permission to land on this artificial moon.  I'd be happy to tell you my clearance code, if you want," you say.

*goto confused
	
*label surrender

🌕 [b]Current Location[/b]: The surface of an Artificial Moon

Pressing the button, you unlock the forward hatch and step through with both hands raised high in the air.

"I'm unarmed and surrendering peacefully," you say.

*label confused

💂 "Good!  Now turn around and get back on your ship."

"What?" you say, utterly confused.

💂 "Galactic Spirit!  Seems like you don't recognize me in this uniform, ${myrel}."

An enormous smile splits your face as you recognize that it is, indeed, your ${brother} ${brother_name}.

💂 "Hurry, we need to get on the ship and go right now!"

"Of course!" you chirp, happily.  

A moment later, the two of you are on board the ${ship_name}, and you quickly seal the forward hatch.

"Strap in, ${brother_name}!" you call out.

*page_break 🚀 Blastoff

*achieve sibling_rescued

*set on_moon false

🌌  [b]Current Location[/b]: Quadrant ${quadrant}, Sector Zero

"Oh, great Galactic Spirit, I can't believe you're here," you cry out after the ${ship_name} breaks atmosphere.

💂 "I was beginning to think you'd never come, ${myrel}.  It's been ${move_counter} days since I sent my first message to you."

"I got here as fast as I could," you reply.

💂 "It doesn't matter how long you took.  What matters is that you came through!  And now, together, we will destroy those villains of the Syndicate once and for all and restore our family's honor."

*if rp
	${rp_emoji} "Oh my Galactic Spirit, it's so nice to finally meet you, ${brother_name}."

"Okay, where to?  I don't want to hang around here too long.  Someone is going to discover that you're missing," you say.

💂 "Relax, ${myrel}.  I'm the last one standing.  One of my friends supplied me with that phaser rifle, and I took care of the rest.  There were only a handful of guards in my way.  The only hard part was hacking through the automated security system."

[b]:::[/b] How do you want to reply to your ${brother}?

*fake_choice
	#🗣️  "Sounds like quite a violent endeavor."
	#🗣️  "I'm just glad you're free now, ${brother_name}."
	#🗣️  "We'll have plenty of time to catch up on the trip home."
		
🌌  [b]Current Location[/b]: Quadrant ${quadrant}, Sector Zero

💂 "Come on, ${myrel}!  Fire up that warp drive and get us to our family Estate.  Now, if you'll tell me where a spare bunk is, I need to get out of this security officer uniform."

"Oh, of course," you say, jumping to your feet.

A few moments later, you get your brother sorted with some of your spare clothes and a place to freshen up.

*if rp
	${rp_emoji} "It's so amazing that you completed your mission, name!  You're a real hero."
	
Smiling to yourself, you input the coordinates for your family Estate into the navigation computer.

*page_break 💫 Engage!

*rand sector 1 11
*rand quadrant 1151 3191

🌌  [b]Current Location[/b]: Quadrant ${quadrant}, Sector ${sector}

*temp mark 1
*temp bearing 1

*rand mark 1 24
*rand bearing 1 365
*rand dieroll 5001 8961

*if sound
		*sound bing.wav
		
*set planet_name "Domus Aurea"

🧭 Navigation has identified the planet 🪐 ${planet_name}, bearing ${bearing}, mark ${mark}, range ${dieroll} kilometers.

${brother_emoji} "Ah, home at last.  Good job, ${myrel}.  And thanks for the clothes.  I feel a lot more like my old self now."

"No problem. Mother and Father will be ecstatic when I tell them you're here," you reply.

${brother_emoji} "No!  Do not transmit anything until we get home.  Just continue to pretend to be an ordinary trading captain for now.  The Syndicate are monitoring all of the transmissions to our Estate, so we won't be safe until we're on the ground."

"All right," you say.

*page_break 😌

🌌  [b]Current Location[/b]: Quadrant ${quadrant}, Sector ${sector}

With a wistful smile, you realize this may be the last time you will ever get to do this.

*if rp
	${rp_emoji} "Wow, so crazy that you might never get to do this again, ${name}."

📶 Opening a communications frequency, you hail ${planet_name} Planetary Control.

"This is Captain ${name} of the ${ship_name}, requesting permission to land," you say.

A moment later comes the reply:

🛂 "[i]"Speak your truth now or forever shame your virtue, ${ship_name}.[/i]"

*fake_choice
	#🗣️ Give a culturally appropriate response
	*selectable_if (move_counter > 999999) #🛰️ Scan the planet
		ERROR
		*ending
		
🌌  [b]Current Location[/b]: Quadrant Zero, Sector ${sector}

📶 "All is fair in love and war, Planetary Control," you reply over the communications channel.

*if rp
	${rp_emoji} "I wonder what that's supposed to mean."

*set move_counter +1

A moment later comes the response from ${planet_name}:

🛂 [i]"Dwell on the beauty of life. Watch the stars, and see yourself running with them, ${ship_name}.  You are cleared to land."[/i]

${brother_emoji} "Excellent, we're in!  Good job, ${myrel}."

Leaning back in your captain's chair, you close the communications channel.

"I truly cannot wait to see the looks on Mother and Father's faces when they see you," you say.

${brother_emoji} "It's all thanks to you, ${myrel}."

*if rp
	${rp_emoji} "I guess no one is going to properly introduce me.  Thanks a lot!"

⏬  A few minutes later, you make a successful landing at the spaceport.

*page_break 🧭 Explore ${planet_name}

*set on_planet true

🏠 [b]Your Family Estate on ${planet_name}[/b]

With a huge grin, you thumb the com-link at the entrance to your Estate.

A moment later, ${butler} opens the door.

💁 "Oh my stars!  Is it really you, ${brother_name}?  You are home at last!"

Laughing and crying, ${brother_name} rushes to hug ${butler}, and you soon join in.

${brother_emoji} "Good to see you, too, old goat!"

💁 "The Galactic Spirit has answered your parents' prayers.  Come inside at once, you two!"

Smiling, the three of you enter the Estate.

*page_break

🏠 [b]Your Family Estate on ${planet_name}[/b]

💁 "Your Mother and Father are currently off-world to manage a minor crisis on one of the colonies, but I'll tight-beam them immediately to let them know that ${brother_name} has been rescued from the clutches of the Syndicate."

${brother_emoji} "Thank you.  That will be all, ${butler}."

As ${butler} turns to leave, ${brother_name} turns to face you.

${brother_emoji} "You did it, ${myrel}.  You got me home, safe and sound.  Soon, Mother and Father will get here, and then we shall plot our course back to our rightful position as stewards of the Galactic Council and put those scoundrels of the Syndicate behind bars.  But what about you?  Will you go back to the university?  Will you join us in our fight?  Or perhaps you want to return to wandering the stars a little more."

[b]:::[/b] What do you want to tell ${brother_name}?

*fake_choice
	#🗣️ "That was enough excitement for now.  I'm going back to being a humble university student."
		*set response "That was enough excitement for now.  I'm going back to being a humble university student."
	#🗣️ "I want to join the fight to restore our family's glory!"
		*set response "I want to join the fight to restore our family's glory!"
	#🗣️ "I think that I want to explore the galaxy some more."
		*set response "I think that I want to explore the galaxy some more."
		*goto arcade_mode
	
*label en_fin

🏠 [b]Your Family Estate on ${planet_name}[/b]

*if sound
	*sound winner2.wav

"${response}" you say.

${brother_emoji} "Wow, you've really grown up fast, ${myrel}.  I shall inform Mother and Father of your decision.  But for now, shall we go get something to eat?  I've been dying for some proper food for months, now!"

"Excellent idea, ${brother}," you say with a smile.  

Linking arms, the two of you make your way towards the kitchen where you pester Cook until she agrees with a happy grin to prepare an enormous feast for ${brother_name}.

As you sit and listen to your ${brother} regale the servants with tales from what life was like, imprisoned on Sector Zero, you smile to yourself with happiness, secure in the knowledge that you did whatever it took to keep your family together. 

There is a long battle ahead before your family and its allies can defeat the Syndicate, but seeing ${brother_name} restored to your family's Estate makes you confident that you [i]will[/i] triumph, in the end.

After all, there is no stronger bond than the one between family!

*page_break THE END

*sound clapping.wav

THE END

*ending

*label arcade_mode
		
🏠 [b]Your Family Estate on ${planet_name}[/b]

"${response}" you say.

${brother_emoji} "Are you serious?  You'd rather go tripping around the galaxy instead of staying here with the family?"

"I'm pretty sure that you have things under control," you say.  "Besides, I kind of got used to being the captain of my own ship."

${brother_emoji} "Well, good luck to you then, ${myrel}.  Keep your comm systems open because I'm [i]definitely[/i] going to be sending you some tight-beam messages."

"Don't worry, I will," you say with a happy smile.

You then embrace ${brother_name} in a long hug.

"I'll be in touch," you say as you wipe a tear from your cheek.

${brother_emoji} "I'm counting on it, ${myrel}!"

And with that, you summon a ride-hail to take you back to the spaceport and your ship, the ${ship_name}.

You are not sure what is in front of you, but you cannot wait to find out!

*page_break 🌠 Explore the galaxy

[i]Which emoji bests suits you?[/i]

*fake_choice
	#👨‍✈️
		*set player_emoji "👨‍✈️"
	#👩‍✈️
		*set player_emoji "👩‍✈️"
	#🧑‍🎨
		*set player_emoji "🧑‍🎨"
	#🐴
		*set player_emoji "🐴"
	#🦄
		*set player_emoji "🦄"

*set story_mode false
*set sound true
*set qdrive_installed false
*set rp false

*set sector starbase1_sector
*set quadrant starbase1_quadrant

*goto_scene startrip_main

*comment below here dont worry about it
*label codegen

*if number > 11
	*return

*rand dieroll 1 36

*if dieroll = 1
	*set codeletter "1"
	
*if dieroll = 2
	*set codeletter "2"
	
*if dieroll = 3
	*set codeletter "3"
	
*if dieroll = 4
	*set codeletter "4"
	
*if dieroll = 5
	*set codeletter "5"
	
*if dieroll = 6
	*set codeletter "6"
	
*if dieroll = 7
	*set codeletter "7"
	
*if dieroll = 8
	*set codeletter "8"
	
*if dieroll = 9
	*set codeletter "9"
	
*if dieroll = 10
	*set codeletter "0"
	
*if dieroll = 11
	*set codeletter "a"
	
*if dieroll = 12
	*set codeletter "b"
	
*if dieroll = 13
	*set codeletter "c"
	
*if dieroll = 14
	*set codeletter "d"
	
*if dieroll = 15
	*set codeletter "e"
	
*if dieroll = 16
	*set codeletter "f"
	
*if dieroll = 17
	*set codeletter "g"
	
*if dieroll = 18
	*set codeletter "h"
	
*if dieroll = 19
	*set codeletter "i"
	
*if dieroll = 20
	*set codeletter "j"
	
*if dieroll = 21
	*set codeletter "k"
	
*if dieroll = 22
	*set codeletter "l"
	
*if dieroll = 23
	*set codeletter "m"
	
*if dieroll = 24
	*set codeletter "n"
	
*if dieroll = 25
	*set codeletter "o"
	
*if dieroll = 26
	*set codeletter "p"
	
*if dieroll = 27
	*set codeletter "q"
	
*if dieroll = 28
	*set codeletter "r"
	
*if dieroll = 29
	*set codeletter "s"
	
*if dieroll = 30
	*set codeletter "t"
	
*if dieroll = 31
	*set codeletter "u"
	
*if dieroll = 32
	*set codeletter "v"
	
*if dieroll = 33
	*set codeletter "w"
	
*if dieroll = 34
	*set codeletter "x"
	
*if dieroll = 35
	*set codeletter "y"
	
*if dieroll = 36
	*set codeletter "z"
	
*set codegen &"${codeletter}"

*set number + 1

*goto codegen

*label warp

*set on_moon false

*if sound
	*sound emergency.wav

Without hesitating, you punch in the codes to execute an emergency warp jump in order to escape the incoming missile strike from the Artificial Moon.

*page_break 💫 Engage!

*if sound
	*sound fuelburn.mp3
	
*rand dieroll 1 11
*temp gringo ""
*set gringo "starbase${dieroll}_quadrant"
*set quadrant {gringo}
*set gringo "starbase${dieroll}_sector"
*set sector {gringo}

*temp fuel_burn 0
*set fuel_burn fuel

*set fuel (fuel / 4)
*set fuel round(fuel)
*set fuel_burn (fuel_burn - fuel)

*if fuel < 1
	*set fuel 0

🔥 Fuel burned: ${fuel_burn}
*line_break
Fuel remaining: ${fuel}
*line_break
*goto_scene startrip_main

*label emergency_blastoff

*set on_moon false

*if sound
	*sound emergency.wav

Without hesitating, you punch in the codes to execute an emergency blastoff from the Artificial Moon.

*page_break 🔥 Blastoff!
*goto smart