当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 星期五乐趣:新惊悚片修订版

作者:精品下载站 日期:2024-12-14 07:39:25 浏览:14 分类:玩电脑

星期五乐趣:新惊悚片修订版


[玩转系统] 星期五乐趣:新惊悚片修订版


$title = "The Omega Plan","Deep Rising","The Last Icon","Exit 1","The Silver Goose","The Last Man Standing","Old MacDonald's Farm","redrum","Running on Empty","Paradise City","The Hidden Door","No Yesterdays","The Xipher Cipher","Whiskey Tango Foxtrot" | Get-Random
$name = "Tim Burr","Jack Frost","Paul Bunyan","Roy Biv","Calvin Hobbes","Art Deco","Rocky Cliff","Wes Lathers","Jim Shorts","Wayne Manner" | Get-Random
$first = ($name | Get-Random).Split()[0]
$former = "Navy SEAL","Army Ranger","NASA shuttle astronaut","Green Beret","NSA analyst","Secret Service agent","CIA agent","IT administrator","Delta Team commander" | Get-Random
$villian = "The Society","The Guild","SPECTRE","The Brotherhood","The Guardians","Google","Microsoft","The Illuminati","The Shadow","The Black List","Microsoft","Google","Oracle","Yahoo" | Get-Random
$family = "son","daughter","wife","mother","father","dog","hamster","sister","brother","twin" | Get-Random
$tragedy = "the tragic loss of his $family","the nightmares of war","a missing library book","a toothache","a fear of flying", "the Cubs losing record","the failure of Windows Vista" | Get-Random
$mystery = "Clippy","Bieber Fever","who shot J.R.","Google Glass","Macchu Pichu","meatloaf","Atlantis","the missing Mayans","alien abductions","Easter Island","chocolate covered bacon","Anastasia","the Holy Grail","the last pharoah","the secret Pope" | Get-Random
$backdrop = "North Dakota","ancient Egypt","ancient Greece","Istanbul","Redmond","Omaha","Singapore","Antarctica","the Hindu Kush","the Amazon rain forest","Disney World","the Gobi Desert","Newark" | Get-Random -Count 2
$loveInterest = "Sheila","Brandi","Betty","Layla","Emma","Elizabeth","Alice","Rebecca" | Get-Random
$loveBackstory = "a former student","his ex-wife","his mentor's daughter","the librarian","a Harvard symbologist" | Get-Random

$blurb = @"
'$Title' throws former $former $Name in the 
middle of an extraordinary adventure that will
push him beyond the breaking point. While on a seemingly
idyllic holiday $first quickly finds himself trapped 
in the middle of a series of catastrophic events 
unleashed by the sinister organization $villian,
that threaten not only his sanity but the very fabric
of society. Haunted by $tragedy, $first must overcome
a complex and diabolic plot surrounding the mystery of 
$mystery. Swept up by forces unseen, $loveinterest, 
$loveBackStory, is paired with $first in an uneasy 
alliance that will test them both. 

Set amidst the exotic backdrops of $($backdrop[0]) and 
$($backdrop[1]), $first and $loveInterest will make a 
discovery that will change their world and ours, forever. 
Hunted relentlessly by $villian, $first and $loveInterest
have but one chance to stop them. But can they do it before 
time runs out?"
"@

#get a random color EXCEPT what is being used for the current background color
$fg= [enum]::GetValues([system.consolecolor]) | where {$_ -notcontains $host.ui.rawui.backgroundcolor} | Get-Random

Write-Host $blurb -ForegroundColor $fg

脚本的第一部分定义了故事简介的必要元素。每个项目数组都通过管道传输到 Get-Random 以返回单个值。除了 $backdrop 之外,它从列表中获取 2 个随机元素。 $blurb 变量是一个此处字符串,它将所有变量替换为其值。唯一棘手的是背景需要一些额外的帮助,因为 $backdrop 是一个数组,所以我必须使用子表达式。

另一个纯粹是装饰性且有趣的变化是,我获得了随机的控制台颜色,并使用该颜色将简介写入屏幕。因为我不希望颜色与当前背景颜色相同,所以我过滤掉了该值。您可能仍然会得到一些难以阅读的深色。但这无论如何只是为了好玩。

以下是一些惊悚片示例:

“深升”将前 NASA 航天飞机宇航员保罗·班扬 (Paul Bunyan) 抛入深渊
一段非凡的冒险之旅将
把他推到突破点。虽然看似
田园诗般的假期保罗很快发现自己被困
处于一系列灾难性事件之中
由邪恶组织兄弟会释放,
这不仅威胁到他的理智,还威胁到他的结构
社会的。饱受战争噩梦困扰的保罗必须克服
围绕着神秘事物的复杂而邪恶的情节
比伯狂热。被看不见的力量席卷了,艾玛,
图书管理员,与保罗处于不安的配对
联盟将考验他们俩。

坐落在戈壁沙漠的异国背景中
奥马哈、保罗和艾玛将制作
这些发现将永远改变他们和我们的世界。
被兄弟会、保罗和艾玛无情地追捕
只有一次机会阻止他们。但他们能做到吗
时间到了?”

“Xipher 密码”将前绿色贝雷帽蒂姆·伯尔 (Tim Burr) 抛入
一段非凡的冒险之旅将
把他推到突破点。虽然看似
田园诗般的假期蒂姆很快发现自己被困
处于一系列灾难性事件之中
由微软邪恶组织发动,
这不仅威胁到他的理智,还威胁到他的结构
社会的。蒂姆被一本丢失的图书馆书所困扰,必须克服
围绕着神秘事物的复杂而邪恶的情节
巧克力培根。被看不见的力量席卷了,贝蒂,
他导师的女儿,与蒂姆的配对
联盟将考验他们俩。

坐落在雷德蒙德的异国情调背景中
新加坡,蒂姆和贝蒂将制作
这些发现将永远改变他们和我们的世界。
微软、蒂姆和贝蒂的无情追捕
只有一次机会阻止他们。但他们能做到吗
时间到了?”

我的下一步是解析单词,使每行大约有 80 个字符,并且可以在单词边界处中断。我开始使用正则表达式来处理这个问题,但时间不够了。所以也许下次吧。享受并快乐的阅读!

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯