Private/Start-SoftIronAdventure.ps1
|
function Start-SoftIronAdventure { function Show-Room { param($room) # Don't clear screen if we're at a hypervisor - keep commands visible if (-not ($global:currentRoom -eq "backroom" -and $global:chosenHypervisor -ne "")) { clear-Host } Write-Host "`n================================" -ForegroundColor Cyan Write-Host $room.Name -ForegroundColor Yellow Write-Host "================================`n" -ForegroundColor Cyan Write-Host $room.Description Write-Host "" # Always show commands when at a hypervisor if ($global:currentRoom -eq "backroom" -and $global:chosenHypervisor -eq "expensive") { Write-Host "Available Commands:" -ForegroundColor Cyan if (-not $global:expensiveTasksAttempted.startVM) { Write-Host " [ ] Start-VM" -ForegroundColor White } else { Write-Host " [X] Start-VM" -ForegroundColor DarkGray } if (-not $global:expensiveTasksAttempted.deployApp) { Write-Host " [ ] Deploy-App" -ForegroundColor White } else { Write-Host " [X] Deploy-App" -ForegroundColor DarkGray } if (-not $global:expensiveTasksAttempted.deployGPU) { Write-Host " [ ] Deploy-GPU" -ForegroundColor White } else { Write-Host " [X] Deploy-GPU" -ForegroundColor DarkGray } if (-not $global:expensiveTasksAttempted.upgrade) { Write-Host " [ ] Upgrade" -ForegroundColor White } else { Write-Host " [X] Upgrade" -ForegroundColor DarkGray } Write-Host "" } elseif ($global:currentRoom -eq "backroom" -and $global:chosenHypervisor -eq "modern") { Write-Host "Available Commands:" -ForegroundColor Cyan if (-not $global:tasksCompleted.startVM) { Write-Host " [ ] Start-VM" -ForegroundColor Green } else { Write-Host " [✓] Start-VM" -ForegroundColor DarkGreen } if (-not $global:tasksCompleted.deployApp) { Write-Host " [ ] Deploy-App" -ForegroundColor Green } else { Write-Host " [✓] Deploy-App" -ForegroundColor DarkGreen } if (-not $global:tasksCompleted.deployGPU) { Write-Host " [ ] Deploy-GPU" -ForegroundColor Green } else { Write-Host " [✓] Deploy-GPU" -ForegroundColor DarkGreen } if (-not $global:tasksCompleted.upgrade) { Write-Host " [ ] Upgrade" -ForegroundColor Green } else { Write-Host " [✓] Upgrade" -ForegroundColor DarkGreen } if ($global:tasksCompleted.startVM -and $global:tasksCompleted.deployApp -and $global:tasksCompleted.deployGPU -and $global:tasksCompleted.upgrade) { Write-Host " [ ] Drop-OldHypervisor ✨" -ForegroundColor Cyan } Write-Host "" } } # Game state $global:currentRoom = "office" $global:hasKey = $false $global:hasBadge = $false $global:lightsOn = $false $global:powerRestored = $false $global:backpackOpened = $false $global:drawerUnlocked = $false $global:chosenHypervisor = "" $global:tasksCompleted = @{ startVM = $false deployApp = $false deployGPU = $false upgrade = $false } $global:expensiveTasksAttempted = @{ startVM = $false deployApp = $false deployGPU = $false upgrade = $false } # Define rooms/locations $rooms = @{ office = @{ Name = "Dark Office" Description = { $desc = "You wake up in a dark office, still clutching your Bloatcom Hypervisor license renewal quote. Your tears have mostly dried on your face. " if (-not $global:lightsOn) { $desc += "A dim red EXIT light glows over a door to the SOUTH. You can barely make out a BACKPACK in the corner, a DESK with drawers, and a LIGHT SWITCH next to the door." } else { $desc += "The fluorescent lights hum overhead. There's a BACKPACK in the corner" if (-not $global:backpackOpened) { $desc += " (unopened)" } $desc += ", a DESK with drawers" if (-not $global:drawerUnlocked) { $desc += " (locked)" } $desc += ", and a door to the SOUTH with a card reader." } return $desc } } hallway1 = @{ Name = "Hallway - Emergency Lighting" Description = "You're in a dimly lit hallway with emergency lights casting eerie shadows. The hallway continues EAST. There's also a door to the NORTH (back to the office)." } hallway2 = @{ Name = "Hallway Junction" Description = "You're at a junction. Emergency lights flicker above. You can go WEST (back to the entrance), NORTH, or EAST." } hallway3 = @{ Name = "Dead End" Description = { if (-not $global:powerRestored) { return "You've reached a dead end. There's an EXTERIOR DOOR here with a card reader, but the reader appears to be completely dead - no lights, no power. You can only go SOUTH." } else { return "You've reached the exterior door! The card reader is now LIT UP and powered! The lights are on! You can USE the DOOR to escape, or go SOUTH." } } } hallway4 = @{ Name = "Hallway - Datacenter Approach" Description = "The hallway continues. You can see a reinforced door to the NORTH labeled 'DATACENTER'. You can also go WEST (back) or EAST." } hallway5 = @{ Name = "Hallway - Storage Area" Description = "You're near some storage closets. The hall continues WEST. You can also go NORTH." } hallway6 = @{ Name = "Another Dead End" Description = "This leads nowhere. You can only go SOUTH." } datacenter = @{ Name = "Datacenter Entrance" Description = "You've entered the datacenter. The room is filled with the hum of servers. You can go SOUTH (exit) or EAST deeper into the datacenter." } datacenterHall = @{ Name = "Datacenter - Server Rows" Description = "You're walking between rows of blinking servers. You can go WEST (back), NORTH, or SOUTH." } datacenterNorth = @{ Name = "Datacenter - Network Equipment" Description = "Racks of switches and routers surround you, their LEDs blinking like Christmas lights. You can only go SOUTH." } datacenterSouth = @{ Name = "Datacenter - Storage Arrays" Description = "Massive storage arrays line the walls. You can go NORTH (back) or EAST." } backroom = @{ Name = "The Back Room" Description = { if ($global:chosenHypervisor -eq "") { return "You've reached the back room. On the LEFT side is a massive, expensive-looking hypervisor with a complicated control panel covered in buttons and warning labels. On the RIGHT side is a sleek, modern hypervisor with a clean interface. Both are humming quietly. Which do you choose? (Try: USE LEFT or USE RIGHT)" } elseif ($global:chosenHypervisor -eq "expensive") { return "You're standing at the expensive hypervisor on the LEFT. Its interface looks like it was designed in 2003 and requires three certifications to operate." } else { return "You're at the modern hypervisor on the RIGHT. Its clean interface practically invites you to use it. The emergency lights glint off its efficient design." } } } victory = @{ Name = "FREEDOM!" Description = "The lights are on! The building has power! You can see clearly now! You walk out the exterior door into the sunlight, your wallet significantly heavier without that Bloatcom Hypervisor renewal. You're free!" } } function Process-Command { param($command) $command = $command.ToLower().Trim() # Check for quit if ($command -eq "quit" -or $command -eq "exit game") { Write-Host "`nThanks for playing!" -ForegroundColor Green return "quit" } # Extract direction $direction = "" if ($command -match '\b(north|south|east|west|up|down)\b') { $direction = $matches[1] } # Room-specific actions switch ($global:currentRoom) { "office" { if ($command -match "light|switch|lights|turn on|flip") { if (-not $global:lightsOn) { $global:lightsOn = $true Write-Host "`nYou flip the switch. The lights flicker on, revealing your surroundings more clearly." -ForegroundColor Green Start-Sleep -Seconds 2 return "action" } else { Write-Host "`nThe lights are already on." -ForegroundColor Gray Start-Sleep -Seconds 1 return "action" } } elseif ($command -match "backpack|pack|bag|open backpack|search backpack") { if (-not $global:backpackOpened) { Write-Host "`nYou open the backpack and find a small KEY inside! You take it." -ForegroundColor Green $global:hasKey = $true $global:backpackOpened = $true Start-Sleep -Seconds 2 return "action" } else { Write-Host "`nThe backpack is empty now." -ForegroundColor Gray Start-Sleep -Seconds 1 return "action" } } elseif ($command -match "desk|drawer|unlock drawer|open drawer|use key") { if (-not $global:hasKey) { Write-Host "`nThe drawer is locked. You need a key." -ForegroundColor Red Start-Sleep -Seconds 2 return "action" } elseif (-not $global:drawerUnlocked) { Write-Host "`nYou use the key to unlock the desk drawer. Inside you find an ID BADGE! You take it." -ForegroundColor Green $global:hasBadge = $true $global:drawerUnlocked = $true Start-Sleep -Seconds 2 return "action" } else { Write-Host "`nThe drawer is empty now." -ForegroundColor Gray Start-Sleep -Seconds 1 return "action" } } elseif ($direction -eq "south" -or $command -match "door|use badge|badge|card reader|reader") { if (-not $global:hasBadge) { Write-Host "`nThe door has a card reader. You need an ID badge to unlock it." -ForegroundColor Red Start-Sleep -Seconds 2 return "action" } else { Write-Host "`nYou scan your ID badge. The door clicks open." -ForegroundColor Green Start-Sleep -Seconds 2 $global:currentRoom = "hallway1" return "move" } } elseif ($direction -eq "north" -or $direction -eq "east" -or $direction -eq "west") { Write-Host "`nYou can't go that way." -ForegroundColor Red Start-Sleep -Seconds 1 return "action" } } "hallway1" { if ($direction -eq "north") { $global:currentRoom = "office" return "move" } elseif ($direction -eq "east") { $global:currentRoom = "hallway2" return "move" } elseif ($direction -eq "west" -or $direction -eq "south") { Write-Host "`nYou can't go that way." -ForegroundColor Red Start-Sleep -Seconds 1 return "action" } } "hallway2" { if ($direction -eq "west") { $global:currentRoom = "hallway1" return "move" } elseif ($direction -eq "north") { $global:currentRoom = "hallway3" return "move" } elseif ($direction -eq "east") { $global:currentRoom = "hallway4" return "move" } } "hallway3" { if ($command -match "door|exterior|card reader|badge|use badge|use door|exit|escape|leave") { if (-not $global:powerRestored) { Write-Host "`nYou try to use your badge, but the card reader is completely dead. No power. There must be another way out." -ForegroundColor Red Start-Sleep -Seconds 2 return "action" } else { Write-Host "`nThe card reader lights up! You scan your badge and the door unlocks. You're free!" -ForegroundColor Green Start-Sleep -Seconds 2 $global:currentRoom = "victory" return "move" } } elseif ($direction -eq "north" -and $global:powerRestored) { Write-Host "`nThe card reader lights up! You scan your badge and the door unlocks. You're free!" -ForegroundColor Green Start-Sleep -Seconds 2 $global:currentRoom = "victory" return "move" } elseif ($direction -eq "south") { $global:currentRoom = "hallway2" return "move" } elseif ($direction -eq "north" -or $direction -eq "east" -or $direction -eq "west") { Write-Host "`nYou can't go that way." -ForegroundColor Red Start-Sleep -Seconds 1 return "action" } } "hallway4" { if ($direction -eq "west") { $global:currentRoom = "hallway2" return "move" } elseif ($direction -eq "north") { Write-Host "`nYou scan your badge on the datacenter door. It clicks open." -ForegroundColor Green Start-Sleep -Seconds 2 $global:currentRoom = "datacenter" return "move" } elseif ($direction -eq "east") { $global:currentRoom = "hallway5" return "move" } elseif ($direction -eq "south") { Write-Host "`nYou can't go that way." -ForegroundColor Red Start-Sleep -Seconds 1 return "action" } } "hallway5" { if ($direction -eq "west") { $global:currentRoom = "hallway4" return "move" } elseif ($direction -eq "north") { $global:currentRoom = "hallway6" return "move" } } "hallway6" { if ($direction -eq "south") { $global:currentRoom = "hallway5" return "move" } elseif ($direction -eq "north" -or $direction -eq "east" -or $direction -eq "west") { Write-Host "`nYou can't go that way." -ForegroundColor Red Start-Sleep -Seconds 1 return "action" } } "datacenter" { if ($direction -eq "south") { Write-Host "`nYou exit the datacenter back to the hallway." -ForegroundColor Yellow Start-Sleep -Seconds 1 $global:currentRoom = "hallway4" return "move" } elseif ($direction -eq "east") { $global:currentRoom = "datacenterHall" return "move" } } "datacenterHall" { if ($direction -eq "west") { $global:currentRoom = "datacenter" return "move" } elseif ($direction -eq "north") { $global:currentRoom = "datacenterNorth" return "move" } elseif ($direction -eq "south") { $global:currentRoom = "datacenterSouth" return "move" } } "datacenterNorth" { if ($direction -eq "south") { $global:currentRoom = "datacenterHall" return "move" } elseif ($direction -eq "north" -or $direction -eq "east" -or $direction -eq "west") { Write-Host "`nYou can't go that way." -ForegroundColor Red Start-Sleep -Seconds 1 return "action" } } "datacenterSouth" { if ($direction -eq "north") { $global:currentRoom = "datacenterHall" return "move" } elseif ($direction -eq "east") { $global:currentRoom = "backroom" return "move" } } "backroom" { if ($global:chosenHypervisor -eq "") { if ($command -match "(use |choose |select )?(left|expensive|complicated|old)") { Write-Host "`nYou approach the expensive hypervisor on the left..." -ForegroundColor Yellow Start-Sleep -Seconds 2 $global:chosenHypervisor = "expensive" return "action" } elseif ($command -match "(use |choose |select )?(right|modern|sleek|new|affordable)") { Write-Host "`nYou approach the modern hypervisor on the right. Its clean interface welcomes you." -ForegroundColor Green Start-Sleep -Seconds 2 $global:chosenHypervisor = "modern" return "action" } elseif ($command -match "use|choose|select") { Write-Host "`nWhich hypervisor? LEFT or RIGHT?" -ForegroundColor Yellow Start-Sleep -Seconds 1 return "action" } elseif ($direction -eq "west") { $global:currentRoom = "datacenterSouth" return "move" } } elseif ($global:chosenHypervisor -eq "expensive") { # Allow switching to the other hypervisor if ($command -match "(use |choose |select )?(right|modern|sleek|new|affordable)") { Write-Host "`nYou move over to the modern hypervisor on the right." -ForegroundColor Green Start-Sleep -Seconds 1 $global:chosenHypervisor = "modern" return "action" } # Expensive hypervisor commands - intentionally frustrating elseif ($command -match "start.*vm|start-vm|startvm") { if (-not $global:expensiveTasksAttempted.startVM) { Write-Host "`nYou attempt to start a VM..." -ForegroundColor Yellow Start-Sleep -Seconds 2 Write-Host "Error: Bloatcom Hypervisor license expired. Please contact your sales representative." -ForegroundColor Red Write-Host "Please purchase Bloatcom Hypervisor Enterprise Platinum." -ForegroundColor Red Write-Host "Estimated cost: `$5,995 per CPU." -ForegroundColor Red $global:expensiveTasksAttempted.startVM = $true Start-Sleep -Seconds 3 # Check if all tasks attempted if ($global:expensiveTasksAttempted.startVM -and $global:expensiveTasksAttempted.deployApp -and $global:expensiveTasksAttempted.deployGPU -and $global:expensiveTasksAttempted.upgrade) { Write-Host "`nYou've tried everything... it's all so complicated and expensive..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "You begin to cry... again..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "The tears won't stop..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "You cry yourself to sleep on the server room floor..." -ForegroundColor Magenta Start-Sleep -Seconds 3 Write-Host "`n...You wake up back in the office..." -ForegroundColor Cyan Write-Host "`nYou may not have made any progress, but at least you're still managing an overcomplicated cloud stack..." -ForegroundColor Cyan Start-Sleep -Seconds 2 Write-Host "`nIf only there were a better way..." -ForegroundColor Cyan Start-Sleep -Seconds 3 # Reset game state $global:currentRoom = "office" $global:chosenHypervisor = "" $global:expensiveTasksAttempted = @{ startVM = $false deployApp = $false deployGPU = $false upgrade = $false } return "move" } return "action" } else { Write-Host "`nYou already tried that. The license is still expired." -ForegroundColor Red Start-Sleep -Seconds 2 return "action" } } elseif ($command -match "deploy.*app|deploy.*stack|deploy-app") { if (-not $global:expensiveTasksAttempted.deployApp) { Write-Host "`nYou attempt to deploy an application stack..." -ForegroundColor Yellow Start-Sleep -Seconds 2 Write-Host "Error: Bloatcom Hypervisor license expired. Please contact your sales representative." -ForegroundColor Red Write-Host "Please purchase Bloatcom Hypervisor Enterprise Platinum." -ForegroundColor Red Write-Host "Estimated cost: `$5,995 per CPU." -ForegroundColor Red $global:expensiveTasksAttempted.deployApp = $true Start-Sleep -Seconds 3 # Check if all tasks attempted if ($global:expensiveTasksAttempted.startVM -and $global:expensiveTasksAttempted.deployApp -and $global:expensiveTasksAttempted.deployGPU -and $global:expensiveTasksAttempted.upgrade) { Write-Host "`nYou've tried everything... it's all so complicated and expensive..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "You begin to cry... again..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "The tears won't stop..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "You cry yourself to sleep on the server room floor..." -ForegroundColor Magenta Start-Sleep -Seconds 3 Write-Host "`n...You wake up back in the office..." -ForegroundColor Cyan Write-Host "`nYou may not have made any progress, but at least you're still managing an overcomplicated cloud stack..." -ForegroundColor Cyan Start-Sleep -Seconds 2 Write-Host "`nIf only there were a better way..." -ForegroundColor Cyan Start-Sleep -Seconds 3 # Reset game state $global:currentRoom = "office" $global:chosenHypervisor = "" $global:expensiveTasksAttempted = @{ startVM = $false deployApp = $false deployGPU = $false upgrade = $false } return "move" } return "action" } else { Write-Host "`nYou already tried that. Still need those licenses." -ForegroundColor Red Start-Sleep -Seconds 2 return "action" } } elseif ($command -match "deploy.*gpu|vgpu|deploy-gpu") { if (-not $global:expensiveTasksAttempted.deployGPU) { Write-Host "`nYou attempt to deploy a vGPU..." -ForegroundColor Yellow Start-Sleep -Seconds 2 Write-Host "Error: Bloatcom vGPU license not found." -ForegroundColor Red Write-Host "Required: Bloatcom vGPU package required (`$1,995 per CPU).." -ForegroundColor Red Write-Host "Plus: Good luck finding a compatible and current driver." -ForegroundColor Red Write-Host "Need help? Get out your checkbook." -ForegroundColor Red $global:expensiveTasksAttempted.deployGPU = $true Start-Sleep -Seconds 3 # Check if all tasks attempted if ($global:expensiveTasksAttempted.startVM -and $global:expensiveTasksAttempted.deployApp -and $global:expensiveTasksAttempted.deployGPU -and $global:expensiveTasksAttempted.upgrade) { Write-Host "`nYou've tried everything... it's all so complicated and expensive..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "You begin to cry... again..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "The tears won't stop..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "You cry yourself to sleep on the server room floor..." -ForegroundColor Magenta Start-Sleep -Seconds 3 Write-Host "`n...You wake up back in the office..." -ForegroundColor Cyan Write-Host "`nYou may not have made any progress, but at least you're still managing an overcomplicated cloud stack..." -ForegroundColor Cyan Start-Sleep -Seconds 2 Write-Host "`nIf only there were a better way..." -ForegroundColor Cyan Start-Sleep -Seconds 3 # Reset game state $global:currentRoom = "office" $global:chosenHypervisor = "" $global:expensiveTasksAttempted = @{ startVM = $false deployApp = $false deployGPU = $false upgrade = $false } return "move" } return "action" } else { Write-Host "`nYou already tried that. Still need those licenses." -ForegroundColor Red Start-Sleep -Seconds 2 return "action" } } elseif ($command -match "upgrade|system.*upgrade|perform.*upgrade") { if (-not $global:expensiveTasksAttempted.upgrade) { Write-Host "`nYou attempt to perform a system upgrade..." -ForegroundColor Yellow Start-Sleep -Seconds 2 Write-Host "Error: Upgrade requires Bloatcom Hypervisor Upgrade Management" -ForegroundColor Red Write-Host "Cost: `$2,875 per CPU." -ForegroundColor Red Write-Host "Note: Upgrade must be performed manually on all hosts and management components" -ForegroundColor Red Write-Host "Bloatcom consultant required: `$350/hour (minimum 8 hours)." -ForegroundColor Red $global:expensiveTasksAttempted.upgrade = $true Start-Sleep -Seconds 3 # Check if all tasks attempted if ($global:expensiveTasksAttempted.startVM -and $global:expensiveTasksAttempted.deployApp -and $global:expensiveTasksAttempted.deployGPU -and $global:expensiveTasksAttempted.upgrade) { Write-Host "`nYou've tried everything... it's all so complicated and expensive..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "You begin to cry... again..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "The tears won't stop..." -ForegroundColor Magenta Start-Sleep -Seconds 2 Write-Host "You cry yourself to sleep on the server room floor..." -ForegroundColor Magenta Start-Sleep -Seconds 3 Write-Host "`n...You wake up back in the office..." -ForegroundColor Cyan Write-Host "`nYou may not have made any progress, but at least you're still managing an overcomplicated cloud stack..." -ForegroundColor Cyan Start-Sleep -Seconds 2 Write-Host "`nIf only there were a better way..." -ForegroundColor Cyan Start-Sleep -Seconds 3 # Reset game state $global:currentRoom = "office" $global:chosenHypervisor = "" $global:expensiveTasksAttempted = @{ startVM = $false deployApp = $false deployGPU = $false upgrade = $false } return "move" } return "action" } else { Write-Host "`nYou already tried that. Still need those licenses and a consultant." -ForegroundColor Red Start-Sleep -Seconds 2 return "action" } } elseif ($command -match "help|commands|list") { Write-Host "`nThe commands are always displayed above. Just try them!" -ForegroundColor Yellow Start-Sleep -Seconds 1 return "action" } elseif ($direction -eq "west") { $global:currentRoom = "datacenterSouth" $global:chosenHypervisor = "" $global:expensiveTasksAttempted = @{ startVM = $false deployApp = $false deployGPU = $false upgrade = $false } return "move" } } elseif ($global:chosenHypervisor -eq "modern") { # Modern hypervisor commands - clean and simple # Check for Drop-OldHypervisor first before switching commands if ($command -match "drop.*old|drop-old|drop.*hypervisor|drop-oldhypervisor") { if ($global:tasksCompleted.startVM -and $global:tasksCompleted.deployApp -and $global:tasksCompleted.deployGPU -and $global:tasksCompleted.upgrade) { Write-Host "`nYou click 'Drop-OldHypervisor'..." -ForegroundColor Cyan Start-Sleep -Seconds 2 Write-Host "`nA confirmation dialog appears:" -ForegroundColor Yellow Write-Host "'Are you sure you want to decommission the expensive hypervisor?'" -ForegroundColor Yellow Write-Host "'Annual savings: `$458,000'" -ForegroundColor Green Start-Sleep -Seconds 3 Write-Host "`nYou click YES." -ForegroundColor Green Start-Sleep -Seconds 2 Write-Host "`n💰 The expensive hypervisor powers down. 💰" -ForegroundColor Green Start-Sleep -Seconds 2 Write-Host "`nSuddenly, you hear a HUMMMM..." -ForegroundColor Cyan Start-Sleep -Seconds 2 Write-Host "The lights in the datacenter flicker and turn ON!" -ForegroundColor Green Start-Sleep -Seconds 2 Write-Host "You hear the CLICK of card readers throughout the building powering up!" -ForegroundColor Green Start-Sleep -Seconds 2 Write-Host "`nWith the money saved from dropping the expensive hypervisor," -ForegroundColor Yellow Write-Host "you can now afford to power the building!" -ForegroundColor Yellow Start-Sleep -Seconds 3 $global:powerRestored = $true Write-Host "`nYou rush back through the datacenter halls to the exterior door..." -ForegroundColor Cyan Start-Sleep -Seconds 2 # Automatically move to the exit $global:currentRoom = "hallway3" return "move" } else { Write-Host "`nThat command isn't available yet. Complete all tasks first." -ForegroundColor Red Start-Sleep -Seconds 2 return "action" } } # Allow switching to the other hypervisor elseif ($command -match "(use |choose |select )?(left|expensive|complicated)") { Write-Host "`nYou move over to the expensive hypervisor on the left." -ForegroundColor Yellow Start-Sleep -Seconds 1 $global:chosenHypervisor = "expensive" return "action" } elseif ($command -match "start.*vm|start-vm|startvm") { if (-not $global:tasksCompleted.startVM) { Write-Host "`nYou click 'Start VM'. A simple dialog appears. You select your VM and click Start." -ForegroundColor Green Start-Sleep -Seconds 2 Write-Host "VM started successfully in 3 seconds. That was... easy?" -ForegroundColor Green $global:tasksCompleted.startVM = $true Start-Sleep -Seconds 2 return "action" } else { Write-Host "`nYou've already started a VM. Try another command." -ForegroundColor Yellow Start-Sleep -Seconds 1 return "action" } } elseif ($command -match "deploy.*app|deploy.*stack|deploy-app") { if (-not $global:tasksCompleted.deployApp) { Write-Host "`nYou select 'Deploy Application Stack'. A clean wizard appears with 3 simple steps." -ForegroundColor Green Start-Sleep -Seconds 2 Write-Host "Application stack deployed successfully. Total time: 45 seconds." -ForegroundColor Green Write-Host "No certifications required. No license keys needed." -ForegroundColor Green $global:tasksCompleted.deployApp = $true Start-Sleep -Seconds 2 return "action" } else { Write-Host "`nApplication already deployed. Try another command." -ForegroundColor Yellow Start-Sleep -Seconds 1 return "action" } } elseif ($command -match "deploy.*gpu|vgpu|deploy-gpu") { if (-not $global:tasksCompleted.deployGPU) { Write-Host "`nYou click 'Deploy vGPU'. A simple checkbox appears: 'Enable GPU passthrough?'" -ForegroundColor Green Start-Sleep -Seconds 2 Write-Host "You check the box. Done. vGPU deployed." -ForegroundColor Green Write-Host "No additional licenses. No vendor lock-in." -ForegroundColor Green $global:tasksCompleted.deployGPU = $true Start-Sleep -Seconds 2 return "action" } else { Write-Host "`nvGPU already configured. Try another command." -ForegroundColor Yellow Start-Sleep -Seconds 1 return "action" } } elseif ($command -match "upgrade|system.*upgrade|perform.*upgrade") { if (-not $global:tasksCompleted.upgrade) { Write-Host "`nYou select 'Perform System Upgrade'. A progress bar appears." -ForegroundColor Green Start-Sleep -Seconds 2 Write-Host "Upgrade completed. Zero downtime. Zero additional costs." -ForegroundColor Green Write-Host "No forced migration to subscription model." -ForegroundColor Green $global:tasksCompleted.upgrade = $true Start-Sleep -Seconds 2 # Check if all tasks complete if ($global:tasksCompleted.startVM -and $global:tasksCompleted.deployApp -and $global:tasksCompleted.deployGPU -and $global:tasksCompleted.upgrade) { Write-Host "`n✨ A new command appears on the interface: 'Drop-OldHypervisor' ✨" -ForegroundColor Cyan Start-Sleep -Seconds 2 } return "action" } else { Write-Host "`nSystem already upgraded. Try another command." -ForegroundColor Yellow Start-Sleep -Seconds 1 return "action" } } elseif ($direction -eq "west") { $global:currentRoom = "datacenterSouth" $global:chosenHypervisor = "" return "move" } } } "victory" { Write-Host "`n🎉 CONGRATULATIONS! YOU'VE ESCAPED! 🎉" -ForegroundColor Green Write-Host "`nBy choosing the modern, affordable hypervisor and dropping the expensive one," -ForegroundColor Yellow Write-Host "you saved enough money to literally power the building and walk free!" -ForegroundColor Yellow Write-Host "`nAnnual savings: `$458,000" -ForegroundColor Green Write-Host "Sanity restored: Priceless" -ForegroundColor Cyan Write-Host "`nThanks for playing!" -ForegroundColor Cyan return "quit" } } # Handle generic look command if ($command -match "^(look|l)$") { return "action" } # Default response Write-Host "`nI don't understand that command. Try: NORTH, SOUTH, EAST, WEST, LOOK, SEARCH, OPEN, USE, or QUIT" -ForegroundColor Red Start-Sleep -Seconds 1 return "action" } # Main game loop Clear-Host Write-Host @" ======================================================== HYPERVISOR PRISON BREAK: ESCAPE FROM VENDOR LOCK ======================================================== "@ -ForegroundColor Cyan Write-Host "You wake up clutching your Bloatcom Hypervisor renewal quote..." -ForegroundColor Yellow Write-Host "Can you escape the datacenter and your licensing nightmare?" -ForegroundColor Yellow Write-Host "`nCommands: Directions (NORTH/SOUTH/EAST/WEST), LOOK, USE, OPEN, or QUIT" -ForegroundColor Gray Write-Host "Press Enter to start..." -ForegroundColor Gray Read-Host while ($true) { $room = $rooms[$global:currentRoom] # Handle dynamic descriptions if ($room.Description -is [scriptblock]) { $room = @{ Name = $room.Name Description = & $room.Description } } Show-Room $room if ($global:currentRoom -eq "victory") { break } Write-Host "`nWhat do you do? " -ForegroundColor White -NoNewline $input = Read-Host $result = Process-Command $input if ($result -eq "quit") { break } } } function get-softironlogo { write-host " " write-host " .:-=++ ++- ++. :- " write-host " -+++++=-:::--==+++==-..:---:. " write-host " .+++++++= +++++++++++= :++- " write-host " ++++++++++==+++++++++++++++= " write-host " =++++++++++++++++++++++++++++ " write-host " =++++++++++++++- .++++++++ " write-host " :+++++++++++++++- +++++++=. " write-host " +++++++++++++-. " write-host " ++++++=: -@ " write-host " .++++. %@@% - " write-host " :++. :%* #@@@@@@@ " write-host " := %@@= -@@@@@@@ " write-host " . :@@@@+ @@@@@ : " write-host " %@@@@@# .@@@ =- " write-host " :@@@@@@@@ @@= .++- " write-host " -- -@@@- =+++: " write-host " +@= =++++++. " write-host " .=++++++++++= " write-host " :::::-=- :+++++++++++++++- " write-host " ++++++++ :+++++++++++++++ " write-host " :-=++++++++++++++++++++++++++ " write-host " =+++++++++++++++++++++++++++ " write-host " =++ +++++++++++- ++++++++: " write-host " .:-=. -+++++++==-:...+++++=: " write-host " -+- -++. ++- =+++-:. " write-host " " write-host " " write-host " " write-host " :@@@@@# .%@@@@@# @@@@@@@@: @@@@@@@@@. ++- .+++++++: .=+++++- .+++ :++- " write-host "+@@%+#@@% %@@@%#%@@@# @@@#+++- .++%@@@+++ ++- .+++:-=+++ .++++=-=+++: .++++. :++- " write-host "*@@%=. %@@= #@@+ @@@- :@@@ ++- .++- =++ =++: -++: .+++++.:++- " write-host " =@@@@@@- @@@ @@% @@@@@@% :@@@ ++- .++++++++- .+++ ++- .+++-+++++- " write-host " :@@@: %@@= %@@+ @@@. :@@@ ++- .++++++- =++: =++. .+++ :++++- " write-host "%@@%=+@@@. %@@@@%@@@@# @@@. :@@@ ++- .++- +++: =++++=++++: .+++ :+++- .:." write-host " -%@@@@#. .*@@@@%* @@@. :@@@ ++: .++: -++- .-++++=: =++ :++: .:." write-host " " } |