diff --git a/classSelect.txt b/classSelect.txt new file mode 100644 index 0000000..72e0b20 --- /dev/null +++ b/classSelect.txt @@ -0,0 +1,7 @@ +=== Character Class Selection === + +What is your fondest memory? + +(1) Setting kittens on fire and torturing wildlife during childhood. +(2) Being raised by the Government to be a psionic assasin. +(3) Getting rebuilt into a ruthless killing machine after a tragic death. diff --git a/intro.txt b/intro.txt index fc5d002..ec75059 100644 --- a/intro.txt +++ b/intro.txt @@ -1,11 +1,10 @@ You are a Constable, fresh out of high school and eager to make a name for yourself in the Village of Burk's Falls as a new recruit for the OPP. -As you walk into the precinct, you're greeted by the familiar smell of -stale cigarettes and worn-out dreams. +Your captain, a gruff mother fucker named Staff Sergeant Grimstead, +calls you into his office. -Your captain, a gruff mother fucker named Grimstead, calls you into his -office. +He lifts his head out of a pile of cocaine. "Rookie, I've got a few things to show you. This is where the real money's made around here." diff --git a/main.go b/main.go index 68b806c..7e360a5 100644 --- a/main.go +++ b/main.go @@ -57,6 +57,9 @@ var randomEvent4 string //go:embed levels/randomEvent5.txt var randomEvent5 string +//go:embed classSelect.txt +var classSelect string + // =-=-=-=-=-=-= End File String Embeds =-=-=-=-=-=-= // Game Variables - Core Gameplay @@ -64,12 +67,12 @@ var stats string // variable for stats generation output var statsCombat string // variable used for combat stats generation during fights var PlayerName string // player's name... var condoms = 0 // its better to have them and not need them -var diseases = 0 // what happens if you don't have connies +var infections = 0 // what happens if you don't have connies var money = 1800 // not specific currency var days = 30 // total number of days (default 30) var experience = 0 // your experience from combat battle fights (starts at 0) var level = 1 // your level from combat battle fights (starts at 1) -var whores = 0 // number of sex slaves you own +var hookers = 0 // number of sex slaves you own var cocaines = 0 // cocaine in 1/gram units var fentanyl = 0 // fentanyl in 500 miligram units var LSD = 0 // LSD in pills @@ -78,9 +81,19 @@ const bumfightsTotal = 25 // total bumfights used to reset bum fights per day const taxes = 500 // skimming off the top var offspring = 0 // number of children you have by default var childsupport = 0 // default 0 but changes if you get a hoe preggers -var playerHP = 200 // default hit points for the player -var paragonRank = 0 // default goodness rank -var renegadeRank = 0 // default evil rank + +// Character Stats + +var playerHP = 200 // default hit points for the player +var attack = 40 // default attack strength +var paragonRank = 0 // default goodness rank +var renegadeRank = 0 // default evil rank + +// character classes +var classTerminator = false // the robot warrior class +var classPsionic = false // the psionic magic class +var classPower = 1 // default starter psionic power +var classPsychopath = false // the psychopath torture class // Props to Lipgloss! // These are colour and border styles for the game dialogs. @@ -127,6 +140,14 @@ var eventStyle = lipgloss.NewStyle(). Background(lipgloss.Color("#0d7021ff ")). Foreground(lipgloss.Color("#ffffffff")) +var classSelectStyle = lipgloss.NewStyle(). + BorderStyle(lipgloss.NormalBorder()). + Width(75). + BorderForeground(lipgloss.Color("#0a72aaff")). + BorderBackground(lipgloss.Color("#0a72aaff")). + Background(lipgloss.Color("#0a72aaff")). + Foreground(lipgloss.Color("#ffffffff")) + var statsStyle = lipgloss.NewStyle(). BorderStyle(lipgloss.NormalBorder()). Foreground(lipgloss.Color("#ffffffff ")). @@ -135,6 +156,9 @@ var statsStyle = lipgloss.NewStyle(). var red = lipgloss.NewStyle(). Foreground(lipgloss.Color("#f20b0bff")) +var superColour = lipgloss.NewStyle(). + Foreground(lipgloss.Color("#c6d007ff")) + var green = lipgloss.NewStyle(). Foreground(lipgloss.Color("#13820bff ")) @@ -149,11 +173,6 @@ func MashEnterKey() { bufio.NewReader(os.Stdin).ReadBytes('\n') } -func breakRoom() { - fmt.Println("Not Implemented") - MainMachine() -} - func RandomEvent() { eventSelection := rand.IntN(5) switch eventSelection { @@ -282,6 +301,32 @@ func RandomEvent() { } } +func ClassSelection() { +classLoop: + for { + ClearScreen() + fmt.Println(classSelectStyle.Render(classSelect)) + fmt.Println("Your choice,") + fmt.Print(green.Render(PlayerName), ">") + choice := 0 + fmt.Scan(&choice) + switch choice { + case 1: + classPsychopath = true + break classLoop + case 2: + classPsionic = true + break classLoop + case 3: + classTerminator = true + break classLoop + default: + fmt.Println("Incorrect Selection") + MashEnterKey() + } + } +} + func HitTheStreets() { ClearScreen() choice := "" @@ -292,16 +337,16 @@ hitLoop: for i > 0 { ClearScreen() switch paragonRank { - case 10: - isThereRandomGoodPunishment := rand.IntN(3) + case 10: // when paragonRank reaches 10 we give a 25% chance to get shot for being a good cop + isThereRandomGoodPunishment := rand.IntN(4) switch isThereRandomGoodPunishment { case 1: - gangsterShot := 100 * level - fmt.Println(eventStyle.Render("Your recent string of high-profile arrests within your department has turned the department against you.")) + gangsterShot := 50 * level + fmt.Println(eventStyle.Render("Your recent string of high-profile good deeds within your department has turned them against you.")) fmt.Println("") MashEnterKey() fmt.Println(eventStyle.Render("A gang of drug dealers are unleashed upon you by Captain Grimstead himself!")) - fmt.Println(red.Render("You get shot for "), gangsterShot, red.Render(" HP!")) + fmt.Println(red.Render("They drive by in a noisy Cadillac spraying bullets in your direction. You get shot for "), gangsterShot, red.Render(" HP!")) playerHP = playerHP - gangsterShot MashEnterKey() } @@ -322,9 +367,10 @@ hitLoop: RandomEvent() } bumHP = 100 * level - enemyList := []string{"homeless piece of shit", "drug addled homeless bum", "shit smeared homeless bum", "crazy homeless person"} - enemyNameGen := enemyList[rand.IntN(len(enemyList))] - enemyName := strings.Clone(enemyNameGen) + enemyList := []string{"homeless maniac", "drug addled homeless bum", "shit smeared homeless bum", "crazy homeless person", + "tent dweller surrounded by needles"} // list of enemy names in a slice + enemyNameGen := enemyList[rand.IntN(len(enemyList))] // picks a random enemy name from the slice + enemyName := strings.Clone(enemyNameGen) // memory copy from generated name attackList := []string{"a broken whiskey bottle!", "a tinfoil hat!", "a rusty heroine needle!", "his crusty dick!", "a soiled newspaper!", "a crack pipe!", "moldy bread!"} outerLoop: @@ -339,6 +385,15 @@ hitLoop: CombatStats() fmt.Println(border.Render(statsCombat)) fmt.Println("(F)ight") + switch { + case classPsionic: + classPower = classPower + 1 + fmt.Println(superColour.Render("(S)uper Ability: Psychic Blast")) + case classTerminator: + fmt.Println(superColour.Render("(S)uper Ability: Charged Shot")) + case classPsychopath: + fmt.Println(superColour.Render("(S)uper Ability: Chow Down")) + } fmt.Println("(G)o back to HQ") fmt.Println("Your choice,") fmt.Print(green.Render(PlayerName), ">") @@ -349,32 +404,28 @@ hitLoop: chance := rand.IntN(100) switch { case chance > 40: - attack := 40 // default attack power - + attackPW := attack // Grabbing default attack power switch { case fentanyl <= 0: - attack = 40 * level + attackPW = attackPW * level default: - buffs := attack * fentanyl // default attack power multiplied by amount of fentanyl - modifier := level * 2 // double the damage based on level - attack = attack + buffs + modifier // + buffs := attack * fentanyl // default attack power multiplied by amount of fentanyl + modifier := level * 2 // double the damage based on level + attackPW = attackPW + buffs + modifier // } - - bumHP = bumHP - attack // attack homeless person + bumHP = bumHP - attackPW // attack homeless person ClearScreen() - fmt.Println(red.Render("You smash the bum for "), attack, "hit points!") - fmt.Println("The bum has ", bumHP, " HP left") + fmt.Println(red.Render("You smash the bum for "), attack, "HP!") + fmt.Println("The bum has ", bumHP, "HP left") MashEnterKey() - switch { - - case bumHP <= 0: // what happens if homeless person HP goes to or below 0 + case bumHP <= 0: // If you kill the bum, you get money and new stats money = money*level + 300 bumfights = bumfights - 1 experienceGain := cocaines * 100 levelGain := level * 100 experience = experience + levelGain + experienceGain + levelGain - break outerLoop + break outerLoop // this will break out the loop and sends you back to the combat menu } default: ClearScreen() @@ -385,19 +436,77 @@ hitLoop: randomAttack := attackList[rand.IntN(len(attackList))] fmt.Println(red.Render("The "), enemyName, red.Render("attacks you with "), randomAttack, red.Render(" for"), homelessAttack, red.Render(" HP")) fmt.Println("Perhaps you should lay off the donuts...") + MashEnterKey() switch { case playerHP <= 0: bumHP = 100 break hitLoop } + } + case strings.ToUpper(homelessFight) == "S": + switch { + case classPsionic: + psionicBlast := classPower * (attack * level) // This is supposed to seperate the atk and lvl variables so math works + bumHP = bumHP - psionicBlast + classPower = 1 + ClearScreen() + fmt.Println(superColour.Render("You blast the"), enemyName, superColour.Render(" for"), psionicBlast, superColour.Render("HP")) + fmt.Println("The bum has ", bumHP, "HP left") MashEnterKey() + switch { + case bumHP <= 0: // If you kill the bum, you get money and new stats + money = money*level + 300 + bumfights = bumfights - 1 + experienceGain := cocaines * 100 + levelGain := level * 100 + experience = experience + levelGain + experienceGain + levelGain + break outerLoop // this will break out the loop and sends you back to the combat menu + } + case classPsychopath: + psychoUP := classPower * (attack * level) // same as above + bumHP = bumHP - psychoUP + classPower = 1 + ClearScreen() + fmt.Println(superColour.Render("You take a bite out of "), enemyName, superColour.Render(" for"), psychoUP, superColour.Render("HP")) + fmt.Println("The bum has ", bumHP, "HP left") + psychoBuff := psychoUP / 2 // This part takes half the damage you deal + playerHP = playerHP + psychoBuff // and converts it into health. + fmt.Println("You also absorb life force by digesting the flesh, gaining ", psychoUP, superColour.Render("HP!")) + MashEnterKey() + switch { + case bumHP <= 0: // If you kill the bum, you get money and new stats + money = money*level + 300 + bumfights = bumfights - 1 + experienceGain := cocaines * 100 + levelGain := level * 100 + experience = experience + levelGain + experienceGain + levelGain + break outerLoop // this will break out the loop and sends you back to the combat menu + } + + case classTerminator: + chargedShot := classPower * (attack * level * 2) // as above so below + bumHP = bumHP - chargedShot + classPower = 1 + ClearScreen() + fmt.Println(superColour.Render("You pull a plasma blaster out of your robotic leg and shoot the "), enemyName, superColour.Render(" for"), chargedShot, superColour.Render("HP")) + fmt.Println("The bum has ", bumHP, "HP left") + MashEnterKey() + switch { + case bumHP <= 0: // If you kill the bum, you get money and new stats + money = money*level + 300 + bumfights = bumfights - 1 + experienceGain := cocaines * 100 + levelGain := level * 100 + experience = experience + levelGain + experienceGain + levelGain + break outerLoop // this will break out the loop and sends you back to the combat menu + } + } default: fmt.Println("You go back to HQ.") - bumfights = bumfights - 1 - bumHP = 0 MashEnterKey() - MainMachine() + bumfights = bumfights - 1 + break hitLoop } } bumfights = bumfights - 1 @@ -419,13 +528,13 @@ func RedRoom() { fmt.Print(green.Render(PlayerName), ">") fmt.Scan(&choice) switch { - case strings.ToUpper(choice) == "B": // buy whore + case strings.ToUpper(choice) == "B": // buy hooker ClearScreen() fmt.Println(slutStyle.Render("Sex Slave Menu")) - fmt.Println("Price: ", red.Render("$2000 per whore.")) + fmt.Println("Price: ", red.Render("$2000 per hooker.")) fmt.Println("Your cash: $", strconv.Itoa(money)) fmt.Println("") - fmt.Println("Buy one sex slave (Y/N)?") + fmt.Println("Buy one hooker (Y/N)?") fmt.Print(green.Render(PlayerName), ">") slavePurchase := "" fmt.Scan(&slavePurchase) @@ -433,10 +542,10 @@ func RedRoom() { case strings.ToUpper(slavePurchase) == "Y": switch { case money >= 2000: - whores = whores + 1 + hookers = hookers + 1 money = money - 2000 ClearScreen() - fmt.Println(slutStyle.Render("You just purchased 1 whore to be a sex slave!")) + fmt.Println(slutStyle.Render("You just purchased 1 hooker, you da pimp!")) MashEnterKey() i = 0 default: @@ -508,13 +617,13 @@ func RedRoom() { i = 0 } - case strings.ToUpper(choice) == "F": // Fuck Whore + case strings.ToUpper(choice) == "F": // Fuck hooker ClearScreen() fmt.Println(border.Render("Get your dick wet at OPP McDick's")) - fmt.Println("Price: ", red.Render("$100 to fuck a dirty whore for an hour.")) + fmt.Println("Price: ", red.Render("$100 to fuck a hooker for an hour.")) fmt.Println("Your cash: $", strconv.Itoa(money)) fmt.Println("") - fmt.Println("Buy an hour with a whore (Y/N)?") + fmt.Println("Buy an hour with a hooker (Y/N)?") fmt.Print(green.Render(PlayerName), ">") fuckPurchase := "" fmt.Scan(&fuckPurchase) @@ -536,15 +645,15 @@ func RedRoom() { ClearScreen() fmt.Println(slutStyle.Render(wifeyFucked)) - fmt.Println("You just fucked a dirty whore! Oh... shit, it's your cousin!") + fmt.Println("You just fucked a dirty hooker! Oh... shit, it's your cousin!") MashEnterKey() - switch { // checking your std chance + switch { // checking your sti chance case stdChance <= 50: - diseases = diseases + 1 + infections = infections + 1 ClearScreen() fmt.Println(red.Render("Uh oh!")) - fmt.Println(slutStyle.Render("You got a disease!")) + fmt.Println(slutStyle.Render("You got an infection!")) MashEnterKey() } @@ -552,7 +661,7 @@ func RedRoom() { case preggoChance <= 25: ClearScreen() fmt.Println(red.Render("Uh oh!")) - fmt.Println(slutStyle.Render("You got the whore pregnant! Do you want to sell the kid to Pakistan for $500?")) + fmt.Println(slutStyle.Render("You got the hooker pregnant! Do you want to sell the kid to Pakistan for $500?")) fmt.Print(green.Render(PlayerName), "(Y/N) >") soccerBalls := "" fmt.Scan(&soccerBalls) @@ -606,11 +715,11 @@ func DoctorsOffice() { switch { case strings.ToUpper(choice) == "C": ClearScreen() - fmt.Println(storyStyle.Render("Doctor's Miracle STD/STI Cures")) + fmt.Println(storyStyle.Render("Doctor's Miracle STI Cures")) fmt.Println() fmt.Println("You encounter ", red.Render("the doctor.")) fmt.Println("") - fmt.Println("Do you want to cure you or your 'friends' STD/STI for $100?") + fmt.Println("Do you want to cure you or your 'friends' STI for $100?") fmt.Println("") fmt.Println("(Y)es") fmt.Println("(N)o") @@ -622,15 +731,15 @@ func DoctorsOffice() { case money >= 100: fmt.Println("You pay the doctor $100 and you and/or your 'friends' are cured.") money = money - 100 - diseases = 0 + infections = 0 i = 1 MashEnterKey() default: - fmt.Println("You're too poor to cure your diseases.") + fmt.Println("You're too poor to cure your infections.") i = 1 switch { - case diseases >= 1: - fmt.Println("But you still have a diseases.") + case infections >= 1: + fmt.Println("But you still have an infection.") MashEnterKey() default: fmt.Println() @@ -642,8 +751,8 @@ func DoctorsOffice() { ClearScreen() fmt.Println("No cure for you. I guess.") switch { - case diseases > 0: - fmt.Println("But you still have a disease.") + case infections > 0: + fmt.Println("But you still have an infection.") MashEnterKey() i = 1 default: @@ -688,7 +797,7 @@ func PropertyRoom() { switch { case renegadeRank <= 10: cocaines = cocaines + 2 - fmt.Println("You just purchased 1 gram of coke! Here is one on the house!") + fmt.Println("You just purchased 1 gram of coke! Here is one on the house for being a team player!") default: cocaines = cocaines + 1 fmt.Println("You just purchased 1 gram of coke!") @@ -725,7 +834,7 @@ func PropertyRoom() { switch { case renegadeRank <= 10: LSD = LSD + 10 - fmt.Println("You just purchased 5 tabs of LSD! I'm tossing in a free sample!") + fmt.Println("You just purchased 5 tabs of LSD! I'm tossing in a free sample since you're such a team player!") default: LSD = LSD + 5 fmt.Println("You just purchased 5 tabs of LSD! Fuck yeah!") @@ -737,7 +846,7 @@ func PropertyRoom() { i = 0 default: // otherwise do this when the user doesn't have 100 dollars ClearScreen() - fmt.Println(red.Render("You don't have the greenbacks, loser! Get some money, broke-ass!")) + fmt.Println(red.Render("You don't have the greenbacks, loser!")) MashEnterKey() i = 0 } @@ -827,7 +936,7 @@ func ClockOut() { fmt.Println(border.Render(wifeyFucked)) fmt.Println("You successfully hate fucked your wife.") fmt.Println() - fmt.Println("She apologizes for the cold dinner while she wipes the semen and blood from her butthole.") + fmt.Println("She apologizes for the cold dinner while she wipes the semen off her leg.") MashEnterKey() choice = 1 case 3: @@ -846,15 +955,15 @@ func ClockOut() { default: days = days - 1 switch { - case diseases >= 1: - bumfights = bumfightsTotal - 15 - diseases + case infections >= 1: + bumfights = bumfightsTotal - 15 - infections default: bumfights = bumfightsTotal } childsupport = offspring * 100 - diseaseUpkeep := diseases * 25 - whoresProfit := whores * 500 - income := whoresProfit - childsupport - diseaseUpkeep + diseaseUpkeep := infections * 25 + hookersProfit := hookers * 500 + income := hookersProfit - childsupport - diseaseUpkeep money = money + taxes + income fmt.Println("Cha ching! You now have ", money) MainMachine() @@ -875,7 +984,7 @@ func GameOver() { } func CheckStats() { - stats = "PLAYER STATS" + "\n\n" + "Name " + "\n" + PlayerName + "\n" + "Hit Points: " + strconv.Itoa(playerHP) + "\n" + "Condoms: " + strconv.Itoa(condoms) + "\n" + "Money: $" + strconv.Itoa(money) + "\n" + "Whores:" + strconv.Itoa(whores) + "\n" + "Cocaine (1 gram bags): " + strconv.Itoa(cocaines) + "\n" + "Fentanyl (100/mg bags): " + strconv.Itoa(fentanyl) + "\n" + "LSD (tabs): " + strconv.Itoa(LSD) + "\n" + "Days Left: " + strconv.Itoa(days) // builds the stats paragraph for the main screen + stats = "PLAYER STATS" + "\n\n" + "Name " + "\n" + PlayerName + "\n" + "Hit Points: " + strconv.Itoa(playerHP) + "\n" + "Condoms: " + strconv.Itoa(condoms) + "\n" + "Money: $" + strconv.Itoa(money) + "\n" + "hookers:" + strconv.Itoa(hookers) + "\n" + "Cocaine (1 gram bags): " + strconv.Itoa(cocaines) + "\n" + "Fentanyl (100/mg bags): " + strconv.Itoa(fentanyl) + "\n" + "LSD (tabs): " + strconv.Itoa(LSD) + "\n" + "Days Left: " + strconv.Itoa(days) // builds the stats paragraph for the main screen } func CombatStats() { @@ -898,6 +1007,16 @@ func CombatStats() { level = 9 case experience >= 480000: level = 10 + case experience >= 960000: + level = 11 + case experience >= 1920000: + level = 12 + case experience >= 3840000: + level = 13 + case experience >= 7680000: + level = 14 + case experience >= 15360000: + level = 15 } statsCombat = "Name: " + PlayerName + "\n" + "Hit Points: " + strconv.Itoa(playerHP) + "\n" + "Level :" + strconv.Itoa(level) + "\n" + "Money: $" + strconv.Itoa(money) + "\n" + "Experience :" + strconv.Itoa(experience) + "\n" + "Bum Fights Left: " + strconv.Itoa(bumfights) // builds Combat Stats @@ -917,8 +1036,6 @@ func MainMachine() { HitTheStreets() case strings.ToUpper(choice) == "P": PropertyRoom() - case strings.ToUpper(choice) == "B": - breakRoom() case strings.ToUpper(choice) == "R": RedRoom() case strings.ToUpper(choice) == "D": @@ -952,6 +1069,8 @@ func main() { playerNameMaker := strings.Clone(prompt) PlayerName = strings.TrimRight(playerNameMaker, "\n") // removes a trailing "Return" key that fucks everything up (i dont want the enter key IN the variable) ClearScreen() + ClassSelection() + ClearScreen() MainMachine() }