#include #include #include #include #include #include using namespace std; #define r0(n) ((rand() % n)) #define r(n) (t[n][r0(s[n])]) int main(void) { int n = 16, i; vector t[n]; t[0] = { "" }; t[1] = { "Disaster", "Catastrophe", "Voyage", "Wreck", "Collision", "Cataclysm", "Destruction", "Razing", "Journey", "Disappearance", "Mishap", "Devastation", "Shadow", "Flight", "Travel", "Wandering", "Mission", "Week", "Day", "Hour" }; t[2] = { "Sector", "Darkness", "Void", "Black", "Emptiness", "Big Empty", "Nothingness", "Nowhere", "Gap", "Vacuum", "Solitude", "Vacuity", "Twilight", "Dark", "Vastness", "Miasma", "Shadows" }; t[3] = { "The ", "A ", "", "The ", "The ", "The ", "A ", "", "One " }; t[4] = { " in ", " in ", " in ", " in ", " in ", " of " }; t[5] = { "Battle", "Bloodbath", "Conflict", "Confrontation", "Massacre", "Skirmish", "Firefight", "Truce", "Faceoff", "Struggle", "Payback", "Fight", "Donnybrook" }; t[6] = { "Aliens", "Bugs", "Buggers", "Zero", "Monsters", "Invaders", "Attackers", "Enemy", "Foe", "Opposition", "Parasites" }; t[7] = { " With ", " With ", " With ", " With ", " of ", " of ", " by ", " Against " }; t[8] = { "Cox", "Tom" }; t[9] = { "Cox", "Tom", "Jack", "Sam", "Chen" }; t[10] = { "Cox", "Tom", "Jack", "Sam", "Chen", "Jack Junior", "Becca", "Brady" }; t[11] = { "Cox", "Tom", "Sam", "Chen", "Jack Junior", "Becca", "Brady", "Tawny" }; t[12] = { "crisis", "problem", "difficulty", "choice", "dilemma", "issue", "question", "puzzle", "challenge", "danger", "threat" }; t[13] = { ".", ".", ".", ".", ".", ".", ".", "!" }; t[14] = { "darn", "shav", "read", "fold", "hear", "carv", "shak", "drink", "watch", "smok", "eat", "digest", "gargl", "squeez", "throw", "shoot", "invert", "sideswip", "hammer", "imitat", "rewrit", "understat", "rewir", "manufactur", "investigat", "bak", "fry" }; t[15] = { "pants", "teeth", "crew", "dog", "log recorder", "chair", "bedsheets", "shirt", "pencil", "socks", "boots", "phaser", "face", "hair", "watch", "collar", "statue of Zefram Cochrane", "friendship bracelet", "random noun", "future prospects", "brain" }; int s[n], c; for(i = 0; i < n; ++i) s[i] = t[i].size(); ifstream inf; ofstream outf; string fn, ch, ev, it; srand(time(NULL)); for(i=1; i<709; ++i) { fn = "e\\" + to_string(i) + "."; outf.open(fn); //title if(r0(12) == 1) outf << r(1) << "s" << r(4) << "the " << r(2) << endl; else if(r0(4) == 1) outf << r(3) << r(5) << r(7) << "the " << r(6) << endl; else outf << r(3) << r(1) << r(4) << "the " << r(2) << endl; //blurb if (i < 120) c = 8; else if (i < 440) c = 9; else if (i < 660) c = 10; else c = 11; ch = r(c); ev = r(12); it = r(15); switch(r0(10)) { case 0: outf << ch << " must face a new " << ev << r(13) << endl; break; case 1: outf << "Can " << ch << " survive this latest " << ev << "?" << endl; break; case 2: outf << "Will this " << ev << " be our heroes' last " << r(12) << "?" << endl; break; case 3: outf << "Once again, " << ch << " faces a deadly " << ev << r(13) << endl; break; case 4: outf << "What will happen to " << ch << " upon confronting this " << ev << "?" << endl; break; case 5: outf << ch << " deals with an unexpected " << ev << r(13) << endl; break; case 6: outf << "A sudden " << ev << " for " << ch << "!" << endl; break; case 7: outf << ch << " has a new " << ev << " to handle" << r(13) << endl; break; case 8: outf << "It's time for " << ch << " to tackle a serious " << ev << r(13) << endl; break; case 9: outf << ch << ", barely alive after the last " << ev << ", must face another!" << endl; break; } // episode outf << "zeke\n" << (i-1)/12 +1 << "\nApril 1\n2018\n1\n-\n" << endl; outf << "Captain's Log: Yep, we're still in the Big Empty. I've started " << r(14) << "ing my " << it << ".\n

" << endl; outf << "" << ch << ": Uh oh, a " << ev << "!
" << endl; outf << "(" << r0(60) << " minutes later)
" << endl; outf << "" << ch << ": Whew, that was a close one.\n

" << endl; outf << "Zero: ATTACK!
\nAnbar: *narrowly escapes*
\nZero: CURSES!\n

" << endl; outf << "Captain's Log: Still here. It's big. And empty. And what happened to my " << it << "?
\n(The Anbar drifts along at Ludicrous Speed)\n

" << endl; outf << "THE END" << endl; outf.close(); } return 0; }