printf$CHARtable("A weapon","A tool","A piece of clothing","A photograph","A book or diary","A recording","A musical instrument","A piece of jewelery","A toy","A letter","Most Valued Possession");
printf$CHAR"AGE: ";
my$age=roll(6,1)+roll(6,1);
print$CHAR$age+16;
printf$CHAR$age+16;
printf$CHAR"\n\n";
while($age>=0){
@ -161,7 +152,7 @@ sub generate {
lastSWITCH;
};
$var==6&&do{
printf$CHAR"Lover, friend, or relative killed. You lost someone you really cared about (named ".name().") ";
printf$CHAR"Lover, friend, or relative killed. You lost someone you really cared about (named ".name($_[0],$_[1],$_[2],\@SEXES,1).") ";
my$how=roll(10,1);
if($how<=5){
printf$CHAR"They died accidentally.\n\n";
@ -238,18 +229,12 @@ sub generate {
}elsif($var<=6){
$var=roll(10,1);
if($var<=5){
my$ch=name();
printf$CHAR"You made a friend named [".substr($ch,0,-1)."](".substr($ch,0,-1).".html).\n\n";
my$ch=name($_[0],$_[1],$_[2],\@SEXES);
printf$CHAR"You made a friend named [".$ch."](".$ch.".html).\n\n";
printf$CHARtable("They are like a big brother/sister to you.","They are like a kid sister/brother to you.","They are like a teacher or mentor.","They are like a partner or co-worker.","They're an old lover.","They're an old enemy.","They are like a foster parent to you.","They're a relative.","You've reconnected with an old childhood friend.","You met through a common interest.","Your relationship");
if($_[2]<depth){
generate($_[0],substr($ch,0,-1),$_[2]+1);
}
}else{
my$ch=name();
printf$CHAR"You made an enemy named [".substr($ch,0,-1)."](".substr($ch,0,-1).".html).\n\n";
if($_[2]<depth){
generate($_[0],substr($ch,0,-1),$_[2]+1);
}
my$ch=name($_[0],$_[1],$_[2],\@SEXES);
printf$CHAR"You made an enemy named [".$ch."](".$ch.".html).\n\n";
printf$CHARtable("Ex friend.","Ex lover.","Relative.","Childhood enemy.","Person working for you.","Person you work for.","Partner or co-worker.","Booster gang member.","Corporate Exec.","Government official.","Who are they");
my$why=roll(10,1);
SWITCH:{
@ -308,17 +293,30 @@ sub generate {
}
}
}elsif($var<=8){
my$ch=name();
printf$CHAR"You had a romance! With someone named [".substr($ch,0,-1)."](".substr($ch,0,-1).".html).\n\n";
my$ch=name($_[0],$_[1],$_[2],\@ORIENTATION);
printf$CHAR"You had a romance! With someone named [".$ch."](".$ch.".html).\n\n";
printf$CHARromance();
if($_[2]<depth){
generate($_[0],substr($ch,0,-1),$_[2]+1);
}
}elsif($var<=10){
printf$CHAR"You have an uneventful year\n\n";
}
$age=$age-1;
}
printf$CHAR"Name: ".$_[1]."\n\n";
printf$CHAR"INT: ".$INT."\n";
printf$CHAR"REF: ".$REF."\n";
printf$CHAR"CL: ".$CL."\n";
printf$CHAR"TECH: ".$TECH."\n";
printf$CHAR"LK: ".$LK."\n";
printf$CHAR"ATT: ".$ATT."\n";
printf$CHAR"MA: ".$MA."\n";
printf$CHAR"EMP: ".$EMP."\n";
printf$CHAR"BT: ".$BT."\n\n";
printf$CHAR"Gender: ".$GENDER."\n";
printf$CHAR$SEX;
printf$CHAR"Orientation: ";
foreachmy$item(@ORIENTATION){
printf$CHAR$item." ";
}
printf$CHAR"\n\n";
close($CHAR);
}
@ -328,63 +326,50 @@ sub roll{
}
subname{
my$name=`notwhoami|head -n1`;
$name=~s/ /_/g;
return$name
my$name;
my$flip;
my$named=0;
my@POSSEX=@{$_[3]};
if(scalar@POSSEX==0){
@POSSEX=@SEXES;
}
my$genderroll=roll(scalar@POSSEX-1,0);
my$GENDER=$POSSEX[$genderroll];
$flip=roll(depth*1.5,1);
if($flip<=$_[2]&&$_[2]<depth&&!defined$_[4]){
my$dir="./".$ARGV[0]."/".$GENDER;
$name=File::Random::random_file(
-dir=>"$dir",
-follow=>1,
-recursive=>1
);
if($namene$_[1]&&$namene""){
$named=1;
}
}
if($named==0){
$name=`notwhoami|head -n1`;
$name=~s/ /_/g;
chomp($name);
if($_[2]<depth&&!defined$_[4]){
generate($_[0],$name,$_[2]+1,\@POSSEX);
}
}
$name=~s/.md$//g;
return$name;
}
subtable{
my$return;
$return=$_[10].": ";
my$var=roll(10,1);
SWITCH:{
$var==1&&do{
$return=$return.$_[0];
lastSWITCH;
};
$var==2&&do{
$return=$return.$_[1];
lastSWITCH;
};
$var==3&&do{
$return=$return.$_[2];
lastSWITCH;
};
$var==4&&do{
$return=$return.$_[3];
lastSWITCH;
};
$var==5&&do{
$return=$return.$_[4];
lastSWITCH;
};
$var==6&&do{
$return=$return.$_[5];
lastSWITCH;
};
$var==7&&do{
$return=$return.$_[6];
lastSWITCH;
};
$var==8&&do{
$return=$return.$_[7];
lastSWITCH;
};
$var==9&&do{
$return=$return.$_[8];
lastSWITCH;
};
$var==10&&do{
$return=$return.$_[9];
lastSWITCH;
};
}
$return=$return."\n\n";
my$length=scalar@_;
$return=$_[$length-1].": ";
my$var=roll($length-2,1);
$return=$return.$_[$var]."\n\n";
return$return;
}
subwin{
my$return;
$return=$return."You had a big win!\n\n";
$return="You had a big win!\n\n";
my$win=roll(10,1);
SWITCH:{
$win==1&&do{
@ -443,7 +428,7 @@ sub win{
}
subromance{
my$return;
my$return="";
my$workedout=roll(10,1);
if($workedout<=4){
$return=$return."You had a happy love affair, it worked out well\n\n";