# Base URL for Ordinals content $baseOrdinalUrl = "https://ordinals.com/content/" # Keep window open on crash trap { Write-Host "" Write-Host " Something went sideways: $_" -ForegroundColor Red Write-Host " Press Enter to close..." -ForegroundColor Green Read-Host exit 1 } # Safe console setup try { $Host.UI.RawUI.BackgroundColor = "Black" } catch {} try { $Host.UI.RawUI.ForegroundColor = "Green" } catch {} try { Clear-Host } catch {} # ART function Show-Title { Write-Host "" Write-Host " Journey to Greeblis " -ForegroundColor Green Write-Host "" Write-Host " Featuring: Montgummery - Sparkakus - Gorbo" -ForegroundColor Green Write-Host "" Write-Host " ~~~ You step through the portal ~~~" -ForegroundColor Green Write-Host "" } function Show-Spark { Write-Host " /\_____/\" -ForegroundColor Yellow Write-Host " / o o \" -ForegroundColor Yellow Write-Host " ( ^ )" -ForegroundColor Yellow Write-Host " ) APP APP (" -ForegroundColor Yellow Write-Host " ( )" -ForegroundColor Yellow Write-Host " ( | | )" -ForegroundColor Yellow Write-Host " (__|__________|__)" -ForegroundColor Yellow Write-Host " [ Sparkakus - The Loyal Hound ]" -ForegroundColor Green } function Show-Mont { Write-Host " _____" -ForegroundColor Blue Write-Host " [ ]" -ForegroundColor Blue Write-Host " | * *|" -ForegroundColor Blue Write-Host " | _ |" -ForegroundColor Blue Write-Host " \_____/" -ForegroundColor Blue Write-Host " | |" -ForegroundColor Blue Write-Host " / \" -ForegroundColor Blue Write-Host " |_____|" -ForegroundColor Blue Write-Host " [ Montgummery - The Civil Servant ]" -ForegroundColor Green } function Show-Gorbo { Write-Host " 0---0 " -ForegroundColor Cyan Write-Host " / \" -ForegroundColor Cyan Write-Host " l | O |" -ForegroundColor Cyan Write-Host " \ \____ /" -ForegroundColor Cyan Write-Host " \ / \ " -ForegroundColor Cyan Write-Host " ( )" -ForegroundColor Cyan Write-Host " \ /" -ForegroundColor Cyan Write-Host " [ Gorbo - The Restaurateur ]" -ForegroundColor Green } # GAME STATE $script:player = @{ Name = "" Vibe = "" Level = 1 FunXP = 0 FunXPToNext = 100 Joy = 100 MaxJoy = 100 Silliness = 10 Charm = 5 Snacks = 30 Hat = "No Hat" Shoes = "Bare Feet" HatBonus = 0 ShoesBonus = 0 Backpack = [System.Collections.ArrayList]@() FriendshipSpark = 0 FriendshipMont = 0 FriendshipGorbo = 0 DayCount = 1 MilestonesSpark = [System.Collections.ArrayList]@() MilestonesMont = [System.Collections.ArrayList]@() MilestonesGorbo = [System.Collections.ArrayList]@() } $script:parkSpots = @( "Gorbo's house", "The Mayor's office", "dog park", "Forest", "Pond", "The Pretzel Path", "The Greeblis Top-Secret Treehouse", "The Portal" ) $script:challenges = @( @{ Name = "very evil light post"; Stamina = 20; Silly = 5; Charm = 1; XP = 15; Snacks = 5; Win = "The light color changes from red to blue." } @{ Name = "pixel creature"; Stamina = 10; Silly = 8; Charm = 2; XP = 10; Snacks = 3; Win = "It seems to have escaped a computer." } @{ Name = "wild cow"; Stamina = 30; Silly = 10; Charm = 3; XP = 20; Snacks = 8; Win = "You feed the cow a candy bar." } @{ Name = "honest ATM machine"; Stamina = 25; Silly = 12; Charm = 4; XP = 25; Snacks = 10; Win = "The ATM begins crying. It's inconsolable." } @{ Name = "tree with strong opinions"; Stamina = 50; Silly = 18; Charm = 6; XP = 45; Snacks = 20; Win = "You won the debate using a logical fallacy." } @{ Name = "malfunctioning ice cream cart"; Stamina = 60; Silly = 20; Charm = 7; XP = 55; Snacks = 25; Win = "Fire shoots out of the cart. By design." } @{ Name = "control freak caterpillar"; Stamina = 40; Silly = 22; Charm = 8; XP = 60; Snacks = 22; Win = "You did a wiggle dance. The caterpillar bowed." } @{ Name = "rogue kite with attitude"; Stamina = 70; Silly = 28; Charm = 10; XP = 80; Snacks = 35; Win = "You tamed the kite by singing to it softly." } @{ Name = "legendary park monkey"; Stamina = 100; Silly = 35; Charm = 14; XP = 120; Snacks = 60; Win = "The monkey bowed, left a tiny gold banana" } @{ Name = "Park Ranger Bobert"; Stamina = 100; Silly = 35; Charm = 14; XP = 120; Snacks = 60; Win = "He's just happy to be in the game." } ) $script:shopItems = @( @{ Name = "ice tea"; Type = "Drink"; Cost = 8; Effect = 30; Desc = "Restores 30 Joy - very refreshing!" } @{ Name = "coke"; Type = "Drink"; Cost = 25; Effect = 80; Desc = "Restores 80 Joy - more sugar, more joy!" } @{ Name = "silly straw hat"; Type = "Hat"; Cost = 30; Effect = 4; Desc = "+4 Silliness - you wear it on your head" } @{ Name = "rabbit's hat"; Type = "Hat"; Cost = 75; Effect = 10; Desc = "+10 Silliness - it looks like this used to belong to a rabbit" } @{ Name = "baseball cap"; Type = "Hat"; Cost = 200; Effect = 20; Desc = "+20 Silliness - Go Dodgers!" } @{ Name = "fur socks"; Type = "Shoes"; Cost = 20; Effect = 3; Desc = "+3 Charm - *not real fur" } @{ Name = "boots with the fur"; Type = "Shoes"; Cost = 90; Effect = 9; Desc = "+9 Charm - *not real boots" } @{ Name = "rubber boots"; Type = "Shoes"; Cost = 300; Effect = 18; Desc = "+18 Charm - 100% waterproof" } ) $script:sparkSayings = @( "Sparkakus: My master Gorbo has been expecting you.", "Sparkakus: Sorry, I was distracted by the latest market exchange rates, my investments are doing swimmingly.", "Sparkakus: I chewed up the Mayor's favorite Atari 2600 controller. Now, he's threatening to become the city's first dogcatcher.", "*Sparkakus' eyes glow orange*", "Sparkakus: Another visitor has informed me that carrot stocks are up!", "*Sparkakus digs a tiny hole, puts a leaf in it, covers it back up*", "*Sparkakus sees a nearby cat... his *APP* patches begin flashing orange*", "*Sparkakus is sniffing the air*", "Sparkakus: Gorbo may seem strange but he really does have a heart of gold." ) $script:montSayings = @( "*Montgummery's screen shows a slideshow of clouds* Very calming.", "*Montgummery beeps twice and hands you a tiny printed receipt parking ticket*", "*Montgummery's WiFi antenna wiggles*", "*Montgummery displays a loading bar that reaches 99% and stays there* Symbolic.", "*Montgummery shakes hands with a nearby lamppost* They seem to get along great.", "*Montgummery's screen projects a movie onto the grass* Seems he filmed the grass.", "*Montgummery's chest opens and a tiny fan pops out. It blows exactly one leaf* Another win for the parks department.", "*Montgummery beeps rhythmically* He has discovered beatboxing.", "*Montgummery eats a VHS tape*" ) $script:gorboSayings = @( "*Gorbo vibrates gently*", "*Gorbo emits a soft hum*", "*Gorbo discharges goo all over the floor*", "*Gorbo makes the sound of a dial-up modem in a very good mood*", "*Gorbo is preparing spaghetti for his pet*", "*Gorbo bounces exactly once*", "Gorbo opens his mouth and says dfsfgasgargdfgadfhgafjgkajdfgjfagalgafdlhjlfdalk. You have no idea what he means by this.", "*Gorbo drops a single gold coin onto the ground* You leave it since money is useless here.", "*Gorbo looks worried about the recent health inspections*" ) # HELPER FUNCTIONS function Check-LevelUp { while ($script:player.FunXP -ge $script:player.FunXPToNext) { $script:player.FunXP -= $script:player.FunXPToNext $script:player.Level++ $script:player.FunXPToNext = [int]($script:player.FunXPToNext * 1.5) $script:player.MaxJoy += 25 $script:player.Joy = $script:player.MaxJoy $script:player.Silliness += 3 $script:player.Charm += 2 Write-Host "" Write-Host " *** LEVEL UP! You are now Level $($script:player.Level)! ***" -ForegroundColor Green Write-Host " MaxJoy +25 | Silliness +3 | Charm +2 | Joy fully restored!" -ForegroundColor Green Write-Host " Gorbo wiggles! Mont beeps! Spark howls! They are proud of you!" -ForegroundColor Green Start-Sleep -Milliseconds 800 } } function Get-RandomSaying { $roll = Get-Random -Minimum 0 -Maximum 3 if ($roll -eq 0) { return ($script:sparkSayings | Get-Random) } if ($roll -eq 1) { return ($script:montSayings | Get-Random) } return ($script:gorboSayings | Get-Random) } function Show-FriendBar { param([int]$lvl, [string]$name, [string]$col) $f = [math]::Min(10, [math]::Floor($lvl / 10)) $e = 10 - $f $bar = "[" + ("*" * $f) + ("-" * $e) + "]" Write-Host " $name $bar ($lvl/100)" -ForegroundColor $col } function Use-DrinkItem { param([string]$itemName) $def = $script:shopItems | Where-Object { $_.Name -eq $itemName -and $_.Type -eq "Drink" } | Select-Object -First 1 if ($null -ne $def) { $heal = [math]::Min($def.Effect, ($script:player.MaxJoy - $script:player.Joy)) $script:player.Joy += $heal $idx = $script:player.Backpack.IndexOf($itemName) if ($idx -ge 0) { $script:player.Backpack.RemoveAt($idx) } Write-Host " You gulp down a $itemName! Restored $heal Joy!" -ForegroundColor Green Write-Host " Joy: $($script:player.Joy) / $($script:player.MaxJoy)" -ForegroundColor Green } } function Check-FriendMilestones { param([string]$friendName) $fKey = "Friendship$friendName" $mKey = "Milestones$friendName" $fVal = $script:player[$fKey] $milestones= $script:player[$mKey] $rewards = @( @{ Threshold = 50; Msg50Spark = "Spark presents you with a hand-typed stock report."; Msg50Mont = "Mont prints a certificate. It says CERTIFIED FRIEND in an official font."; Msg50Gorbo = "Gorbo presents you with a jar of premium goo. A gift."; Snacks = 20; Joy = 30 } @{ Threshold = 100; Msg100Spark = "Spark officially adds you to his investment portfolio as a dependent."; Msg100Mont = "Mont renames his WELCOME BACK banner to include your name specifically."; Msg100Gorbo = "Gorbo names a dish after you. You don't want to know what's in it."; Snacks = 50; Joy = 999 } ) foreach ($r in $rewards) { $t = $r.Threshold if ($fVal -ge $t -and -not $milestones.Contains($t)) { $null = $milestones.Add($t) Write-Host "" Write-Host " *** FRIENDSHIP MILESTONE: $friendName $t/100! ***" -ForegroundColor Green $msgKey = "Msg$($t)$friendName" Write-Host " $($r[$msgKey])" -ForegroundColor Green $script:player.Snacks += $r.Snacks $heal = [math]::Min($r.Joy, ($script:player.MaxJoy - $script:player.Joy)) $script:player.Joy += $heal Write-Host " Reward: +$($r.Snacks) Snacks! +$heal Joy!" -ForegroundColor Green Start-Sleep -Milliseconds 600 } } } function Invoke-ChallengeWin { param($ch, [string]$cheerFriend) Write-Host "" Write-Host " SUCCESS! $($ch.Win)" -ForegroundColor Green $script:player.Snacks += [int]$ch.Snacks $script:player.FunXP += [int]$ch.XP $fk = "Friendship$cheerFriend" $b = Get-Random -Minimum 5 -Maximum 15 $script:player[$fk] = [math]::Min(100, $script:player[$fk] + $b) Write-Host " Gained: $([int]$ch.XP) FunXP and $([int]$ch.Snacks) Snacks! $cheerFriend friendship +$b!" -ForegroundColor Green Check-FriendMilestones -friendName $cheerFriend Check-LevelUp } # SHOWDOWN function Start-Challenge { param($ch) $pSilly = $script:player.Silliness + $script:player.HatBonus $pCharm = $script:player.Charm + $script:player.ShoesBonus $stamina = [int]$ch.Stamina $cheerFriend = @("Spark","Mont","Gorbo") | Get-Random Write-Host "" Write-Host " Showdown vs. $($ch.Name)!" -ForegroundColor Green Write-Host " $cheerFriend is cheering you on!" -ForegroundColor Green Start-Sleep -Milliseconds 600 while ($true) { if ($script:player.Joy -le 0 -or $stamina -le 0) { break } Write-Host "" $jc = if ($script:player.Joy -lt ($script:player.MaxJoy * 0.3)) { "Red" } else { "Green" } Write-Host " Your Joy : $($script:player.Joy)/$($script:player.MaxJoy)" -ForegroundColor $jc Write-Host " Their Stubbornness: $stamina" -ForegroundColor Green Write-Host "" Write-Host " 1. Dance 2. Charming Smile 3. Use Snack 4. Run Away" $act = Read-Host " Action" $eDmg = [math]::Max(1, ([int]$ch.Silly - $pCharm + (Get-Random -Minimum -2 -Maximum 5))) if ($act -eq "1") { $dmg = [math]::Max(1, ($pSilly - [int]$ch.Silly + (Get-Random -Minimum -2 -Maximum 6))) $stamina -= $dmg $mv = @("You performed the worm!","You did the boogie!","You attempted the Griddy!","You invented The Confused Flamingo!") Write-Host " $($mv | Get-Random) (-$dmg stubborn!)" -ForegroundColor Green if ($stamina -le 0) { Invoke-ChallengeWin -ch $ch -cheerFriend $cheerFriend return } $script:player.Joy -= $eDmg Write-Host " It is unfazed. Deeply, profoundly unfazed. (-$eDmg Joy)" -ForegroundColor Green } elseif ($act -eq "2") { $dmg = [math]::Max(1, ($pCharm - [int]$ch.Charm + (Get-Random -Minimum -2 -Maximum 6))) $stamina -= $dmg $sm = @("You smiled so hard that you hurt your face.","You blinked slowly like a cat.","You tilted your head.") Write-Host " $($sm | Get-Random) (-$dmg stubborn!)" -ForegroundColor Green if ($stamina -le 0) { Invoke-ChallengeWin -ch $ch -cheerFriend $cheerFriend return } $script:player.Joy -= $eDmg Write-Host " It is not charmed. Not even a little. (-$eDmg Joy)" -ForegroundColor Green } elseif ($act -eq "3") { if ($script:player.Backpack.Count -eq 0) { Write-Host " Your backpack is empty!" -ForegroundColor Green } else { for ($i = 0; $i -lt $script:player.Backpack.Count; $i++) { Write-Host " $($i+1). $($script:player.Backpack[$i])" } $pk = Read-Host " Use which? (0 to cancel)" if ($pk -match '^\d+$') { $pi = [int]$pk if ($pi -ge 1 -and $pi -le $script:player.Backpack.Count) { Use-DrinkItem -itemName $script:player.Backpack[$pi - 1] } } } $script:player.Joy -= $eDmg Write-Host " While you snacked, your opponent ate some grass. (-$eDmg Joy)" -ForegroundColor Green } elseif ($act -eq "4") { if ((Get-Random -Maximum 10) -ge 3) { Write-Host " You ran away! The $($ch.Name) watches you go, confused." -ForegroundColor Green return } else { Write-Host " Couldn't escape!" -ForegroundColor Green $script:player.Joy -= $eDmg Write-Host " Disappointment (-$eDmg Joy)" -ForegroundColor Green } } else { Write-Host " You just stood there being a person. Interesting strategy." -ForegroundColor Green $script:player.Joy -= $eDmg Write-Host " It was still weird at you. (-$eDmg Joy)" -ForegroundColor Green } if ($script:player.Joy -le 0) { $script:player.Joy = 0 Write-Host "" Write-Host " You ran out of joy!" -ForegroundColor Green Write-Host " Gorbo shoots goo all over. Montgummery plays a jingle from some forgotten old '80s ad. Spark is busy reading the New York Times." -ForegroundColor Green Write-Host " Joy restored to 50%! (Lost 5 snacks - they got squished)" -ForegroundColor Green $script:player.Joy = [math]::Floor($script:player.MaxJoy * 0.5) $script:player.Snacks = [math]::Max(0, $script:player.Snacks - 5) return } } } # FUNCTIONS function Do-Explore { $spot = $script:parkSpots | Get-Random Write-Host "" Write-Host " You wander over to: $spot" -ForegroundColor Green Start-Sleep -Milliseconds 400 $roll = Get-Random -Minimum 1 -Maximum 11 if ($roll -le 4) { $who = @("Spark","Mont","Gorbo") | Get-Random Write-Host "" Write-Host " You bump into $who!" -ForegroundColor Green if ($who -eq "Spark") { Show-Spark Write-Host " $($script:sparkSayings | Get-Random)" -ForegroundColor Green $g = Get-Random -Minimum 5 -Maximum 20 $script:player.FriendshipSpark = [math]::Min(100, $script:player.FriendshipSpark + $g) $script:player.FunXP += 15 Write-Host " Friendship with Spark +$g! FunXP +15" -ForegroundColor Green Check-FriendMilestones -friendName "Spark" } elseif ($who -eq "Mont") { Show-Mont Write-Host " $($script:montSayings | Get-Random)" -ForegroundColor Green $g = Get-Random -Minimum 5 -Maximum 20 $script:player.FriendshipMont = [math]::Min(100, $script:player.FriendshipMont + $g) $script:player.FunXP += 15 Write-Host " Friendship with Mont +$g! FunXP +15" -ForegroundColor Green Check-FriendMilestones -friendName "Mont" } else { Show-Gorbo Write-Host " $($script:gorboSayings | Get-Random)" -ForegroundColor Green $g = Get-Random -Minimum 5 -Maximum 20 $script:player.FriendshipGorbo = [math]::Min(100, $script:player.FriendshipGorbo + $g) $script:player.FunXP += 15 Write-Host " Friendship with Gorbo +$g! FunXP +15" -ForegroundColor Green Check-FriendMilestones -friendName "Gorbo" } Check-LevelUp } elseif ($roll -le 7) { $max = [math]::Min($script:player.Level + 1, $script:challenges.Count - 1) $min = [math]::Max(0, $script:player.Level - 2) if ($min -gt $max) { $min = $max } $idx = Get-Random -Minimum $min -Maximum ($max + 1) $ch = $script:challenges[$idx] Write-Host "" Write-Host " Oh! You encounter: $($ch.Name)!" -ForegroundColor Green Start-Challenge -ch $ch } elseif ($roll -le 9) { $found = Get-Random -Minimum 3 -Maximum 18 $d = @( "A coin on the ground. How useless.", "Someone left snacks unattended. You feel slightly guilty.", "A note in the grass says FOR YOU and has snacks attached.", "The vending machine gave you a snack and then winked at you. They look to be related to Montgummery.", "You find a carrot growing in the grass.", "You find a pizza left unattended. You take it." ) Write-Host "" Write-Host " $($d | Get-Random)" -ForegroundColor Green Write-Host " Found $found Snacks!" -ForegroundColor Green $script:player.Snacks += $found $script:player.FunXP += 10 } else { $m = @( "The sun is perfect. The sky is blue. You could stay here forever.", "You hear soft music from somewhere far off.", "You see many birds of fantastic colors flying above.", "A cloud above looks exactly like Gorbo. What could this mean.", "A UFO flies past!", "Flowers of every shape and size rest around you." ) Write-Host "" Write-Host " $($m | Get-Random)" -ForegroundColor Green $boost = Get-Random -Minimum 5 -Maximum 20 $script:player.Joy = [math]::Min($script:player.MaxJoy, $script:player.Joy + $boost) Write-Host " +$boost Joy! Life is good." -ForegroundColor Green } } function Do-HangSpark { Clear-Host Write-Host "" Write-Host " ---- Hanging with Sparkakus ----" -ForegroundColor Green Show-Spark Write-Host "" Write-Host " 1. Play Fetch (Spark throws the stick at YOU)" Write-Host " 2. Race Around the Park" Write-Host " 3. Lay in the grass and watch the clouds" Write-Host " 4. Let Spark teach you a new Human trick" Write-Host " 5. Take a photo" $c = Read-Host " Your choice" if ($c -eq "1") { Write-Host "" Write-Host " Spark picks up a stick and hurls it with shocking force." -ForegroundColor Green Write-Host " You retrieve it. Spark seems deeply satisfied." -ForegroundColor Green Write-Host " You do this 12 more times. Having so much fun." -ForegroundColor Green $g = Get-Random -Minimum 10 -Maximum 25 $script:player.FriendshipSpark = [math]::Min(100, $script:player.FriendshipSpark + $g) $script:player.FunXP += 20 Write-Host " Friendship +$g! FunXP +20!" -ForegroundColor Green } elseif ($c -eq "2") { Write-Host "" Write-Host " *Spark runs so fast that his legs become a blur*" -ForegroundColor Green if ((Get-Random -Minimum 1 -Maximum 10) -ge 7) { Write-Host " You actually kept up! Spark is genuinely surprised and pleased!" -ForegroundColor Green } else { Write-Host " Spark wins, obviously, but waits patiently for you." -ForegroundColor Green } $g = Get-Random -Minimum 8 -Maximum 20 $script:player.FriendshipSpark = [math]::Min(100, $script:player.FriendshipSpark + $g) $script:player.FunXP += 15 $script:player.Silliness += 1 Write-Host " Friendship +$g! FunXP +15! Silliness +1!" -ForegroundColor Green } elseif ($c -eq "3") { Write-Host "" Write-Host " You and Spark lie on the grass side by side." -ForegroundColor Green Write-Host " A cloud looks like an Atari 2600 controller. *Spark wags*" -ForegroundColor Green Write-Host " A cloud looks like Mont. *Spark hides his eyes*" -ForegroundColor Green $j = Get-Random -Minimum 15 -Maximum 30 $script:player.Joy = [math]::Min($script:player.MaxJoy, $script:player.Joy + $j) $g = Get-Random -Minimum 12 -Maximum 22 $script:player.FriendshipSpark = [math]::Min(100, $script:player.FriendshipSpark + $g) $script:player.FunXP += 18 Write-Host " +$j Joy! Friendship +$g! FunXP +18!" -ForegroundColor Green } elseif ($c -eq "4") { Write-Host "" $t = @( "Spark teaches YOU to sit. Good human.", "You attempt stay.", "You attempt demonstrate roll over. Spark teaches you the Voltage Spin instead.", "You attempt to speak. Spark writes down your words for analysis." ) Write-Host " $($t | Get-Random)" -ForegroundColor Green $g = Get-Random -Minimum 15 -Maximum 30 $script:player.FriendshipSpark = [math]::Min(100, $script:player.FriendshipSpark + $g) $script:player.FunXP += 25 Write-Host " Friendship +$g! FunXP +25!" -ForegroundColor Green } elseif ($c -eq "5") { Write-Host "" Write-Host " Sparkakus poses, he gives big grin. You raise your camera." -ForegroundColor Green Write-Host " The camera flash seems to cause sparks to come off him." -ForegroundColor Green Write-Host "" $inscriptionId = "4baa329dea2b5633d30c7f1537f219550050d3c0cef0f349dc08cc8154a31809i0" $outputFileName = "Sparkakus.jpg" $fullContentUrl = "$baseOrdinalUrl$inscriptionId" $outputPath = Join-Path $PSScriptRoot $outputFileName Write-Host " Downloading Sparkakus' photo..." -ForegroundColor Green try { Invoke-WebRequest -Uri $fullContentUrl ` -OutFile $outputPath ` -TimeoutSec 120 ` -MaximumRedirection 10 ` -Headers @{ "User-Agent" = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" } ` -ErrorAction Stop Write-Host " Photo saved to: $outputPath" -ForegroundColor Green Write-Host " Sparkakus howls!" -ForegroundColor Green } catch { Write-Host " The photo didn't come through. Bad signal in Greeblis." -ForegroundColor Green Write-Host " (Error: $($_.Exception.Message))" -ForegroundColor Green } $g = Get-Random -Minimum 15 -Maximum 28 $script:player.FriendshipSpark = [math]::Min(100, $script:player.FriendshipSpark + $g) $script:player.FunXP += 20 Write-Host " Friendship +$g! FunXP +20!" -ForegroundColor Green } else { Write-Host " You just stood near Spark. That was also fine. Spark is chill." -ForegroundColor Green } Check-FriendMilestones -friendName "Spark" Check-LevelUp } function Do-HangMont { Clear-Host Write-Host "" Write-Host " ---- Hanging with Montgummery ----" -ForegroundColor Green Show-Mont Write-Host "" Write-Host " 1. Watch Mont's screen" Write-Host " 2. Feed Mont a VHS tape" Write-Host " 3. Have a dance battle" Write-Host " 4. Debug Mont's program" Write-Host " 5. Take a photo" $c = Read-Host " Your choice" if ($c -eq "1") { Write-Host "" $s = @( "A PowerShell program opens on Mont's screen.", "Mont's screen scrolls through endless lines of spaghetti code. He must be getting hungry.", "Strange pixel creatures appear on Mont's screen and then walk off screen.", "A tiny pixel Mont appears on the screen and does nothing for 8 minutes.", "A cooking show begins to play. The souffle contains vinyl records and magnetic tape." ) Write-Host " $($s | Get-Random)" -ForegroundColor Green $j = Get-Random -Minimum 10 -Maximum 25 $script:player.Joy = [math]::Min($script:player.MaxJoy, $script:player.Joy + $j) $g = Get-Random -Minimum 10 -Maximum 22 $script:player.FriendshipMont = [math]::Min(100, $script:player.FriendshipMont + $g) $script:player.FunXP += 18 Write-Host " +$j Joy! Friendship +$g! FunXP +18!" -ForegroundColor Green } elseif ($c -eq "2") { Write-Host "" Write-Host " Mont is very hungry." -ForegroundColor Green $n = Get-Random -Minimum 3 -Maximum 12 Write-Host " Collected $n VHS tapes! Mont beeps $n times. Gratitude confirmed." -ForegroundColor Green $g = Get-Random -Minimum 12 -Maximum 25 $script:player.FriendshipMont = [math]::Min(100, $script:player.FriendshipMont + $g) $script:player.FunXP += 22 Write-Host " Friendship +$g! FunXP +22!" -ForegroundColor Green } elseif ($c -eq "3") { Write-Host "" Write-Host " Mont's speakers start up. Now THAT is some vaporwave." -ForegroundColor Green Write-Host " Mont does the Robot." -ForegroundColor Green Write-Host " You do your best. Mont beeps encouragingly." -ForegroundColor Green $script:player.Silliness += 2 $g = Get-Random -Minimum 15 -Maximum 28 $script:player.FriendshipMont = [math]::Min(100, $script:player.FriendshipMont + $g) $script:player.FunXP += 25 Write-Host " Silliness +2! Friendship +$g! FunXP +25!" -ForegroundColor Green } elseif ($c -eq "4") { Write-Host "" $d = @( "ERROR 404: Mayoral qualifications not found.", "PROCESSING: Maximum joy detected.", "WARNING: Overflow of spaghetti code found: I'll have the Carbonara!", "DIAGNOSTIC: Something living that is built like this should not exist on any world.", "LOG: All headers appear to be written in Esperanto." ) Write-Host " Screen displays: $($d | Get-Random)" -ForegroundColor Green $script:player.Charm += 1 $g = Get-Random -Minimum 18 -Maximum 30 $script:player.FriendshipMont = [math]::Min(100, $script:player.FriendshipMont + $g) $script:player.FunXP += 28 Write-Host " Charm +1! Friendship +$g! FunXP +28!" -ForegroundColor Green } elseif ($c -eq "5") { Write-Host "" Write-Host " Montgummery poses, a large smile emoji appears on his screen. You raise your camera." -ForegroundColor Green Write-Host " :) This is his best look." -ForegroundColor Green Write-Host "" $inscriptionId = "91ddc15caac7bd4910658d14865086f2dd8632ee90b43c4e9f435da19648dde3i0" $outputFileName = "Montgummery.jpg" $fullContentUrl = "$baseOrdinalUrl$inscriptionId" $outputPath = Join-Path $PSScriptRoot $outputFileName Write-Host " Downloading Montgummery's photo..." -ForegroundColor Green try { Invoke-WebRequest -Uri $fullContentUrl ` -OutFile $outputPath ` -TimeoutSec 120 ` -MaximumRedirection 10 ` -Headers @{ "User-Agent" = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" } ` -ErrorAction Stop Write-Host " Photo saved to: $outputPath" -ForegroundColor Green Write-Host " Montgummery beeps." -ForegroundColor Green } catch { Write-Host " The photo didn't come through. Bad signal in Greeblis." -ForegroundColor Green Write-Host " (Error: $($_.Exception.Message))" -ForegroundColor Green } $g = Get-Random -Minimum 15 -Maximum 28 $script:player.FriendshipMont = [math]::Min(100, $script:player.FriendshipMont + $g) $script:player.FunXP += 20 Write-Host " Friendship +$g! FunXP +20!" -ForegroundColor Green } else { Write-Host " You stood near Mont. You can hear an internal fan humming." -ForegroundColor Green } Check-FriendMilestones -friendName "Mont" Check-LevelUp } function Do-HangGorbo { Clear-Host Write-Host "" Write-Host " ---- Visiting Gorbo's house ----" -ForegroundColor Green Show-Gorbo Write-Host "" Write-Host " 1. Help Gorbo clean his house" Write-Host " 2. Wrestle with Gorbo" Write-Host " 3. Have a staring contest" Write-Host " 4. Play a video game with Gorbo" Write-Host " 5. Take a photo" $c = Read-Host " Your choice" if ($c -eq "1") { Write-Host "" Write-Host " There is goo on everything around you." -ForegroundColor Green Write-Host " You grab a mop and help Gorbo out!" -ForegroundColor Green Write-Host " Gorbo's tentacle sucks up all the dirt from his floor." -ForegroundColor Green $j = Get-Random -Minimum 20 -Maximum 40 $script:player.Joy = [math]::Min($script:player.MaxJoy, $script:player.Joy + $j) $g = Get-Random -Minimum 15 -Maximum 28 $script:player.FriendshipGorbo = [math]::Min(100, $script:player.FriendshipGorbo + $g) $script:player.FunXP += 20 Write-Host " +$j Joy! Friendship +$g! FunXP +20!" -ForegroundColor Green } elseif ($c -eq "2") { Write-Host "" Write-Host " Gorbo feels like polyurethane foam." -ForegroundColor Green $n = Get-Random -Minimum 5 -Maximum 20 Write-Host " You pin Gorbo down and count $n !" -ForegroundColor Green Write-Host " At count $([math]::Floor($n/2)), you let Gorbo up. You attempt to high-five Gorbo but he has no hands." -ForegroundColor Green $g = Get-Random -Minimum 12 -Maximum 25 $script:player.FriendshipGorbo = [math]::Min(100, $script:player.FriendshipGorbo + $g) $script:player.FunXP += 22 Write-Host " Friendship +$g! FunXP +22!" -ForegroundColor Green } elseif ($c -eq "3") { Write-Host "" Write-Host " You lock eyes with Gorbo. The silence is profound." -ForegroundColor Green $sec = Get-Random -Minimum 5 -Maximum 30 Write-Host " ...counting... $sec seconds pass..." -ForegroundColor Green if ((Get-Random -Minimum 1 -Maximum 10) -ge 5) { Write-Host " Gorbo blinks! YOU WIN! Gorbo wiggles in defeat." -ForegroundColor Green $script:player.Charm += 1 Write-Host " Charm +1! Your stare is legendary now." -ForegroundColor Green } else { Write-Host " You blinked! But Gorbo seems happy you tried." -ForegroundColor Green } $g = Get-Random -Minimum 10 -Maximum 22 $script:player.FriendshipGorbo = [math]::Min(100, $script:player.FriendshipGorbo + $g) $script:player.FunXP += 18 Write-Host " Friendship +$g! FunXP +18!" -ForegroundColor Green } elseif ($c -eq "4") { Write-Host "" $l = @( "Gorbo boots up RuneScape", "Gorbo attempts to untangle his controllers but makes the situation worse.", "Gorbo has 99 in Slayer", "Gorbo has the biggest video game collection that you've ever seen.", "Gorbo boots Greeblis-mon the most popular video game in this strange world." ) Write-Host " $($l | Get-Random)" -ForegroundColor Green $g = Get-Random -Minimum 18 -Maximum 32 $script:player.FriendshipGorbo = [math]::Min(100, $script:player.FriendshipGorbo + $g) $script:player.FunXP += 30 Write-Host " Friendship +$g! FunXP +30!" -ForegroundColor Green } elseif ($c -eq "5") { Write-Host "" Write-Host " Gorbo poses magnificently. You raise your camera." -ForegroundColor Green Write-Host " Gorbo wiggles. This is his best look." -ForegroundColor Green Write-Host "" $inscriptionId = "698ac50d7efe84bd6cdbe50ad48ad23fe3153b709bf327bf9f42957f82f8f4e6i0" $outputFileName = "Gorbo.jpg" $fullContentUrl = "$baseOrdinalUrl$inscriptionId" $outputPath = Join-Path $PSScriptRoot $outputFileName Write-Host " Downloading Gorbo's photo..." -ForegroundColor Green try { Invoke-WebRequest -Uri $fullContentUrl ` -OutFile $outputPath ` -TimeoutSec 120 ` -MaximumRedirection 10 ` -Headers @{ "User-Agent" = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" } ` -ErrorAction Stop Write-Host " Photo saved to: $outputPath" -ForegroundColor Green Write-Host " Gorbo is very pleased with himself." -ForegroundColor Green } catch { Write-Host " The photo didn't come through. Bad signal in Greeblis." -ForegroundColor Green Write-Host " (Error: $($_.Exception.Message))" -ForegroundColor Green } $g = Get-Random -Minimum 15 -Maximum 28 $script:player.FriendshipGorbo = [math]::Min(100, $script:player.FriendshipGorbo + $g) $script:player.FunXP += 20 Write-Host " Friendship +$g! FunXP +20!" -ForegroundColor Green } else { Write-Host " You stood near Gorbo. Great now your shoes are covered in goo." -ForegroundColor Green } Check-FriendMilestones -friendName "Gorbo" Check-LevelUp } function Do-SnackStand { Clear-Host Write-Host "" Write-Host " ==== The Greeblis park snack stand ====" -ForegroundColor Green Write-Host " * a raccoon in a little hat appears * " -ForegroundColor Green Write-Host " HELLO FRIEND! EVERYTHING IS DELICIOUS!" -ForegroundColor Green while ($true) { Write-Host "" Write-Host " Your Snacks: $($script:player.Snacks)" -ForegroundColor Green Write-Host "" for ($i = 0; $i -lt $script:shopItems.Count; $i++) { $it = $script:shopItems[$i] Write-Host " $($i+1). $($it.Name) ($($it.Cost) snacks) - $($it.Desc)" } Write-Host " $($script:shopItems.Count+1). Leave" Write-Host "" $pk = Read-Host " What will it be?" if ($pk -match '^\d+$') { $pi = [int]$pk if ($pi -eq ($script:shopItems.Count + 1)) { Write-Host " You wave goodbye. The raccoon waves back." -ForegroundColor Green break } elseif ($pi -ge 1 -and $pi -le $script:shopItems.Count) { $it = $script:shopItems[$pi - 1] if ($script:player.Snacks -ge $it.Cost) { $script:player.Snacks -= $it.Cost if ($it.Type -eq "Drink") { $null = $script:player.Backpack.Add($it.Name) Write-Host " Bought a $($it.Name)! Stashed in backpack." -ForegroundColor Green } elseif ($it.Type -eq "Hat") { $script:player.HatBonus = [int]$it.Effect $script:player.Hat = $it.Name Write-Host " New hat: $($it.Name)! Silliness bonus: +$($it.Effect)!" -ForegroundColor Green Write-Host " The raccoon says MAGNIFICENT CHOICE!" -ForegroundColor Green } elseif ($it.Type -eq "Shoes") { $script:player.ShoesBonus = [int]$it.Effect $script:player.Shoes = $it.Name Write-Host " New shoes: $($it.Name)! Charm bonus: +$($it.Effect)!" -ForegroundColor Green Write-Host " The raccoon smiles." -ForegroundColor Green } } else { Write-Host " Not enough snacks!" -ForegroundColor Green } } else { Write-Host " That option doesn't exist." -ForegroundColor Green } } else { Write-Host " *You wave goodbye*" -ForegroundColor Green break } } } function Do-Stats { Clear-Host $p = $script:player Write-Host "" Write-Host " $($p.Name) the $($p.Vibe)" -ForegroundColor Green Write-Host " human - Level $($p.Level) | Day $($p.DayCount)" -ForegroundColor Green Write-Host " Joy : $($p.Joy) / $($p.MaxJoy)" -ForegroundColor Green Write-Host " FunXP : $($p.FunXP) / $($p.FunXPToNext)" -ForegroundColor Green Write-Host " Silliness : $($p.Silliness + $p.HatBonus) (base $($p.Silliness) + hat $($p.HatBonus))" -ForegroundColor Green Write-Host " Charm : $($p.Charm + $p.ShoesBonus) (base $($p.Charm) + shoes $($p.ShoesBonus))" -ForegroundColor Green Write-Host " Snacks : $($p.Snacks)" -ForegroundColor Green Write-Host " Hat : $($p.Hat)" -ForegroundColor Green Write-Host " Shoes : $($p.Shoes)" -ForegroundColor Green Write-Host "" Write-Host " --- FRIENDSHIPS ---" -ForegroundColor Green Show-FriendBar -lvl $p.FriendshipSpark -name "Spark" -col "Green" Show-FriendBar -lvl $p.FriendshipMont -name "Mont " -col "Blue" Show-FriendBar -lvl $p.FriendshipGorbo -name "Gorbo" -col "Cyan" Write-Host "" Write-Host " --- BACKPACK ---" -ForegroundColor Green if ($p.Backpack.Count -eq 0) { Write-Host " (empty - the backpack itself is very stylish though)" -ForegroundColor Green } else { foreach ($item in $p.Backpack) { Write-Host " - $item" -ForegroundColor Green } } Write-Host "" Write-Host " --- TODAY'S WISDOM ---" -ForegroundColor Green Write-Host " $(Get-RandomSaying)" -ForegroundColor Green } function Do-Picnic { Clear-Host Write-Host "" $p = $script:player if ($p.Snacks -lt 100) { Write-Host " You need at least 100 Snacks to host the Grand Finale BBQ! Gather more first!" -ForegroundColor Green Write-Host " (Currently: $($p.Snacks) Snacks)" -ForegroundColor Green return } if ($p.FriendshipSpark -lt 80 -or $p.FriendshipMont -lt 80 -or $p.FriendshipGorbo -lt 80) { Write-Host " This is the Grand Finale BBQ - you'll need to know your friends a lot better first!" -ForegroundColor Green Write-Host " (You need 80+ friendship with Spark, Mont, AND Gorbo first.)" -ForegroundColor Green Write-Host "" Write-Host " Spark:$($p.FriendshipSpark)/80 Mont:$($p.FriendshipMont)/80 Gorbo:$($p.FriendshipGorbo)/80" -ForegroundColor Green return } Write-Host " ~~~ GRAND FINALE BBQ!! ~~~" -ForegroundColor Green Write-Host " *you fire up the grill*" -ForegroundColor Green Write-Host " Spark arrives first, carrying a copy of the Wall Street Journal as fire starter." -ForegroundColor Green Show-Spark Write-Host " Mont arrives and then projects a table setting on the picnic table." -ForegroundColor Green Show-Mont Write-Host " Gorbo arrives covering every surface in goo. You are suddenly not very hungry." -ForegroundColor Green Show-Gorbo Write-Host "" Write-Host " You share 100 snacks and have the nicest afternoon." -ForegroundColor Green $m = @( "Spark has fallen asleep in the grass. You can see sparks coming off his body as he dreams.", "Mont has a big smile displayed on his screen.", "Gorbo turns slightly pink with happiness. ...or maybe a sunburn.", "A UFO passes. Everyone watches it. Nobody speaks.", "Spark forgets about the economy and just enjoys the summer air.", "Mont projects little pointer arrows above everyone.", "Gorbo gives you a flower. It's very gooey." ) $shuffled = $m | Get-Random -Count $m.Count Write-Host " $($shuffled[0])" -ForegroundColor Green Write-Host " $($shuffled[1])" -ForegroundColor Green $script:player.Snacks -= 100 $script:player.Joy = $script:player.MaxJoy $script:player.FriendshipSpark = [math]::Min(100, $script:player.FriendshipSpark + 20) $script:player.FriendshipMont = [math]::Min(100, $script:player.FriendshipMont + 20) $script:player.FriendshipGorbo = [math]::Min(100, $script:player.FriendshipGorbo + 20) $script:player.FunXP += 50 Write-Host "" Write-Host " Joy FULLY RESTORED! All Friendships +20! FunXP +50!" -ForegroundColor Green Check-FriendMilestones -friendName "Spark" Check-FriendMilestones -friendName "Mont" Check-FriendMilestones -friendName "Gorbo" Check-LevelUp Write-Host "" Start-Sleep -Milliseconds 800 Write-Host " Friends from the whole world of Greeblis appear! " -ForegroundColor Green Write-Host "" Start-Sleep -Milliseconds 600 Write-Host " Over the hill, then another, and another..." -ForegroundColor Green Write-Host " More Greeblis creatures arrive. Dozens of them." -ForegroundColor Green Write-Host " Pixel ones. Blobby ones. Square ones. Very round ones." -ForegroundColor Green Write-Host " One shows up that appears to be made entirely of goo." -ForegroundColor Green Write-Host " They all heard there was a BBQ." -ForegroundColor Green Write-Host "" Start-Sleep -Milliseconds 600 Write-Host " Spark organizes the new arrivals with military precision." -ForegroundColor Green Write-Host " Mont projects a WELCOME banner in 32 languages." -ForegroundColor Green Write-Host " Gorbo vibrates with joy." -ForegroundColor Green Write-Host "" Write-Host " You look around at the strange and wonderful crowd." -ForegroundColor Green Write-Host " It occurs to you that you really belong here." -ForegroundColor Green Write-Host "" $bonusSnacks = Get-Random -Minimum 60 -Maximum 100 $script:player.Snacks += $bonusSnacks $script:player.FunXP += 150 Write-Host " Potluck bonus: +$bonusSnacks Snacks! FunXP +150!" -ForegroundColor Green Check-LevelUp Write-Host "" Write-Host " The whole crowd is gathering for a group photo." -ForegroundColor Green Write-Host " 1. Take the group photo!" Write-Host " 2. Just take it all in" $groupPhotoChoice = Read-Host " Your choice" if ($groupPhotoChoice -eq "1") { Write-Host "" Write-Host " Everyone squishes together for the photo" -ForegroundColor Green Write-Host " Spark sits in the front row with immaculate posture." -ForegroundColor Green Write-Host " Mont's screen shows a countdown: 3 2 1..." -ForegroundColor Green Write-Host " Gorbo does something with his face." -ForegroundColor Green Write-Host "" $inscriptionId = "b55f64ace734d32eb6fbeee279b333f099d74a2be9b3f3e1208884921df3f1c3i0" $outputFileName = "GroupPhoto.jpg" $fullContentUrl = "$baseOrdinalUrl$inscriptionId" $outputPath = Join-Path $PSScriptRoot $outputFileName Write-Host " Downloading group photo..." -ForegroundColor Green try { Invoke-WebRequest -Uri $fullContentUrl ` -OutFile $outputPath ` -TimeoutSec 120 ` -MaximumRedirection 10 ` -Headers @{ "User-Agent" = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" } ` -ErrorAction Stop Write-Host " Photo saved to: $outputPath" -ForegroundColor Green Write-Host " This is the best photo you have ever taken." -ForegroundColor Green } catch { Write-Host " The photo didn't come through. The moment lives on in your heart." -ForegroundColor Green Write-Host " (Error: $($_.Exception.Message))" -ForegroundColor Green } } else { Write-Host "" Write-Host " You close your eyes and listen to the noise of it all." -ForegroundColor Green Write-Host " It will be a good while before you forget any of this." -ForegroundColor Green } } function Do-Nap { Write-Host "" Write-Host " You find the ideal tree. The shade is impeccable." -ForegroundColor Green Write-Host " *you close your eyes*" -ForegroundColor Green Start-Sleep -Milliseconds 500 Write-Host " zzz" -ForegroundColor Green Start-Sleep -Milliseconds 600 Write-Host " ZZZ" -ForegroundColor Green Start-Sleep -Milliseconds 500 $d = @( "You dream that you can stay here forever.", "You dream that summer never has to end.", "You dream of the long summers when you were still very young.", "You dream of all the creatures living under the sea.", "You dream that the park is infinite and contains exactly what everyone needs.", "You dream that the raccoon snack vendor is selling your favorite food.", "You dream that you can fly." ) Write-Host "" Write-Host " Dream: $($d | Get-Random)" -ForegroundColor Green Write-Host "" Write-Host " You wake up feeling rested." -ForegroundColor Green $r = Get-Random -Minimum 30 -Maximum 60 $script:player.Joy = [math]::Min($script:player.MaxJoy, $script:player.Joy + $r) $script:player.FunXP += 8 Write-Host " +$r Joy! FunXP +8!" -ForegroundColor Green Write-Host " Gorbo was watching over you the whole time. They say nothing." -ForegroundColor Green Check-LevelUp } function Do-Save { $savePath = Join-Path $PSScriptRoot "greeblis_save.json" $sd = [ordered]@{ Name = $script:player.Name Vibe = $script:player.Vibe Level = $script:player.Level FunXP = $script:player.FunXP FunXPToNext = $script:player.FunXPToNext Joy = $script:player.Joy MaxJoy = $script:player.MaxJoy Silliness = $script:player.Silliness Charm = $script:player.Charm Snacks = $script:player.Snacks Hat = $script:player.Hat Shoes = $script:player.Shoes HatBonus = $script:player.HatBonus ShoesBonus = $script:player.ShoesBonus Backpack = @($script:player.Backpack) FriendshipSpark = $script:player.FriendshipSpark FriendshipMont = $script:player.FriendshipMont FriendshipGorbo = $script:player.FriendshipGorbo DayCount = $script:player.DayCount MilestonesSpark = @($script:player.MilestonesSpark) MilestonesMont = @($script:player.MilestonesMont) MilestonesGorbo = @($script:player.MilestonesGorbo) } $sd | ConvertTo-Json | Set-Content -Path $savePath -Encoding UTF8 Write-Host "" Write-Host " Saved to: $savePath" -ForegroundColor Green Write-Host " Mont's screen shows a saving in progress bar reach 100%" -ForegroundColor Green } function Do-Load { $savePath = Join-Path $PSScriptRoot "greeblis_save.json" if (Test-Path $savePath) { $ld = Get-Content $savePath -Raw -Encoding UTF8 | ConvertFrom-Json $script:player.Name = [string]$ld.Name $script:player.Vibe = [string]$ld.Vibe $script:player.Level = [int]$ld.Level $script:player.FunXP = [int]$ld.FunXP $script:player.FunXPToNext = [int]$ld.FunXPToNext $script:player.Joy = [int]$ld.Joy $script:player.MaxJoy = [int]$ld.MaxJoy $script:player.Silliness = [int]$ld.Silliness $script:player.Charm = [int]$ld.Charm $script:player.Snacks = [int]$ld.Snacks $script:player.Hat = [string]$ld.Hat $script:player.Shoes = [string]$ld.Shoes $script:player.HatBonus = [int]$ld.HatBonus $script:player.ShoesBonus = [int]$ld.ShoesBonus $script:player.Backpack = [System.Collections.ArrayList]@($ld.Backpack) $script:player.FriendshipSpark = [int]$ld.FriendshipSpark $script:player.FriendshipMont = [int]$ld.FriendshipMont $script:player.FriendshipGorbo = [int]$ld.FriendshipGorbo $script:player.DayCount = [int]$ld.DayCount # Load milestones if present (handles saves from older version gracefully) if ($null -ne $ld.MilestonesSpark) { $script:player.MilestonesSpark = [System.Collections.ArrayList]@($ld.MilestonesSpark) } if ($null -ne $ld.MilestonesMont) { $script:player.MilestonesMont = [System.Collections.ArrayList]@($ld.MilestonesMont) } if ($null -ne $ld.MilestonesGorbo) { $script:player.MilestonesGorbo = [System.Collections.ArrayList]@($ld.MilestonesGorbo) } Write-Host "" Write-Host " Welcome back, $($script:player.Name) the $($script:player.Vibe)!" -ForegroundColor Green Write-Host " Spark is already at the park gate, tail wagging." -ForegroundColor Green Write-Host " Mont projects a WELCOME BACK banner in a pixel font." -ForegroundColor Green Write-Host " Gorbo is discharging goo all over in excitement." -ForegroundColor Green } else { Write-Host "" Write-Host " No saved game found." -ForegroundColor Green } } # MENU $script:menuActions = @( @{ Label = "Explore the Park"; Fn = "Do-Explore" } @{ Label = "Hang Out with Sparkakus"; Fn = "Do-HangSpark" } @{ Label = "Hang Out with Montgummery";Fn = "Do-HangMont" } @{ Label = "Hang Out with Gorbo"; Fn = "Do-HangGorbo" } @{ Label = "Visit the Snack Stand"; Fn = "Do-SnackStand"} @{ Label = "Check Backpack & Stats"; Fn = "Do-Stats" } @{ Label = "Grand Finale BBQ!"; Fn = "Do-Picnic" } @{ Label = "Nap Under a Tree"; Fn = "Do-Nap" } @{ Label = "Save Your Day"; Fn = "Do-Save" } @{ Label = "Load Saved Day"; Fn = "Do-Load" } ) # HOME MENU function Show-Menu { Clear-Host $p = $script:player Write-Host " GREEBLIS PARK [Lv.$($p.Level) $($p.Vibe) | Joy $($p.Joy)/$($p.MaxJoy) | Snacks $($p.Snacks) | XP $($p.FunXP)/$($p.FunXPToNext)]" -ForegroundColor Green Write-Host " Spark:$($p.FriendshipSpark)/100 Mont:$($p.FriendshipMont)/100 Gorbo:$($p.FriendshipGorbo)/100 Day:$($p.DayCount)" -ForegroundColor Green Write-Host " ---------------------------------------------------------------" -ForegroundColor Green $n = $script:menuActions.Count $half = [math]::Ceiling($n / 2) for ($i = 0; $i -lt $half; $i++) { $li = $i + 1 $lbl = "$li. $($script:menuActions[$i].Label)" $ri = $i + $half $rbl = if ($ri -lt $n) { "$($ri+1). $($script:menuActions[$ri].Label)" } else { "" } Write-Host (" {0,-42}{1}" -f $lbl, $rbl) } $qn = $n + 1 Write-Host "" Write-Host " $qn. Go Home for the Day" -ForegroundColor Green Write-Host "" return (Read-Host " What would you like to do?") } # CHARACTER CREATION function New-ParkPal { Clear-Host Show-Title Write-Host " Welcome to the world of Greeblis" -ForegroundColor Green Write-Host " The creatures of Greeblis need help preparing for a BBQ!" -ForegroundColor Green Write-Host "" do { $script:player.Name = (Read-Host " What's your name?").Trim() if ($script:player.Name -eq "") { Write-Host " (You have to be called something. Even Gorbo has a name.)" -ForegroundColor Green } } while ($script:player.Name -eq "") Write-Host "" $validVibe = $false while (-not $validVibe) { Write-Host " What is your vibe today?" -ForegroundColor Green Write-Host " 1. Energetic Explorer " Write-Host " 2. Chill Cloud-Watcher " Write-Host " 3. Average Snack Enthusiast " Write-Host " 4. Free Spirit" Write-Host "" $vp = Read-Host " Choose your vibe (1-4)" switch ($vp) { "1" { $script:player.Vibe = "Energetic Explorer" $script:player.Silliness += 8 $script:player.MaxJoy += 20 $script:player.Joy += 20 $validVibe = $true } "2" { $script:player.Vibe = "Chill Cloud-Watcher" $script:player.Charm += 10 $null = $script:player.Backpack.Add("ice tea") $validVibe = $true } "3" { $script:player.Vibe = "Average Snack Enthusiast" $script:player.Snacks += 40 $script:player.Charm += 5 $script:player.Silliness += 5 $validVibe = $true } "4" { $script:player.Vibe = "Free Spirit" $script:player.Silliness += 4 $script:player.Charm += 4 $script:player.MaxJoy += 10 $script:player.Joy += 10 $validVibe = $true } default { Write-Host " Hmm. That's not a vibe. Try again." -ForegroundColor Green Write-Host "" } } } Write-Host "" Write-Host " Wonderful! $($script:player.Name) the $($script:player.Vibe) enters the park!" -ForegroundColor Green Write-Host "" Write-Host " The gate swings open. The grass is perfectly green." -ForegroundColor Green Write-Host " In the distance: three shapes. One pixely. One boxy. One blobby." -ForegroundColor Green Write-Host " They wave. (Gorbo waves with his entire body)" -ForegroundColor Green Write-Host "" Write-Host " Your park adventure begins." -ForegroundColor Green Start-Sleep -Seconds 3 } # ENTRY POINT Clear-Host Show-Title Write-Host " 1. New Day at the Park" -ForegroundColor Green Write-Host " 2. Continue a Saved Day" -ForegroundColor Green Write-Host "" $startChoice = Read-Host " Choose" if ($startChoice -eq "2") { Do-Load Start-Sleep -Seconds 2 } else { New-ParkPal } # MAIN LOOP $quitNum = ($script:menuActions.Count + 1).ToString() while ($true) { $choice = Show-Menu if ($choice -eq $quitNum) { Clear-Host Write-Host "" Write-Host " The sun is getting low. Time to head home." -ForegroundColor Green Write-Host "" Write-Host " Spark walks you to the portal and sits there watching you go." -ForegroundColor Green Write-Host " Mont's emoji changes to a sad face." -ForegroundColor Green Write-Host " Gorbo waves. (He does so with his entire body.)" -ForegroundColor Green Write-Host "" $script:player.DayCount++ Write-Host " It was a good day in Greeblis Park. Day $($script:player.DayCount - 1) complete." -ForegroundColor Green Write-Host " It always is." -ForegroundColor Green Write-Host "" Write-Host " Press Enter to close..." -ForegroundColor Green Read-Host exit 0 } elseif ($choice -match '^\d+$') { $ci = [int]$choice if ($ci -ge 1 -and $ci -le $script:menuActions.Count) { & $script:menuActions[$ci - 1].Fn Write-Host "" Read-Host " Press Enter to continue..." } else { Write-Host " Hmm. You stood there and thought about it. Valid." -ForegroundColor Green Start-Sleep -Seconds 1 } } else { Write-Host " Hmm. You stood there and thought about it. Valid." -ForegroundColor Green Start-Sleep -Seconds 1 } }