Added combat system, too many changes went into this.
This commit is contained in:
parent
88a006407e
commit
d1e63b3e83
1 changed files with 130 additions and 75 deletions
205
main.go
205
main.go
|
|
@ -49,7 +49,7 @@ 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 std = false // what happens if you have connies
|
||||
var diseases = 0 // what happens if you 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)
|
||||
|
|
@ -61,7 +61,9 @@ var LSD = 0 // LSD in pills
|
|||
var bumfights = 25 // default number of homeless bum fights per day
|
||||
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
|
||||
|
||||
// Lipgloss - Props to
|
||||
var border = lipgloss.NewStyle().
|
||||
|
|
@ -87,8 +89,8 @@ var slutStyle = lipgloss.NewStyle().
|
|||
Width(75).
|
||||
BorderForeground(lipgloss.Color("228")).
|
||||
BorderBackground(lipgloss.Color("#ff00a2ff")).
|
||||
Foreground(lipgloss.Color("#ffffffff ")).
|
||||
Background(lipgloss.Color("#ff00a2ff"))
|
||||
Background(lipgloss.Color("#ffffffff ")).
|
||||
Foreground(lipgloss.Color("#ff00a2ff"))
|
||||
|
||||
var statsStyle = lipgloss.NewStyle().
|
||||
BorderStyle(lipgloss.NormalBorder()).
|
||||
|
|
@ -119,62 +121,95 @@ func breakRoom() {
|
|||
|
||||
func HitTheStreets() {
|
||||
ClearScreen()
|
||||
i := 0
|
||||
choice := ""
|
||||
for i < 1 {
|
||||
ClearScreen()
|
||||
CombatStats()
|
||||
fmt.Println(storyStyle.Render(hitTheStreets))
|
||||
fmt.Println(statsStyle.Render(statsCombat))
|
||||
fmt.Println("Your choice,")
|
||||
fmt.Print(green.Render(PlayerName), ">")
|
||||
fmt.Scan(&choice)
|
||||
if strings.ToUpper(choice) == "B" {
|
||||
bumHP := 100
|
||||
i := 1
|
||||
for playerHP > 0 {
|
||||
for i > 0 {
|
||||
ClearScreen()
|
||||
fmt.Println(storyStyle.Render("Bum Fight!"))
|
||||
fmt.Println()
|
||||
fmt.Println("You encounter a ", red.Render("homeless piece of shit!"))
|
||||
fmt.Println("")
|
||||
fmt.Println("What do you do?")
|
||||
fmt.Println("")
|
||||
CombatStats()
|
||||
fmt.Println(border.Render(statsCombat))
|
||||
fmt.Println("(A)ttack")
|
||||
fmt.Println("(E)scape")
|
||||
fmt.Println(storyStyle.Render(hitTheStreets))
|
||||
fmt.Println(statsStyle.Render(statsCombat))
|
||||
fmt.Println("Your choice,")
|
||||
fmt.Print(green.Render(PlayerName), ">")
|
||||
homelessPunch := ""
|
||||
fmt.Scan(&homelessPunch)
|
||||
if strings.ToUpper(homelessPunch) == "A" {
|
||||
chance := rand.IntN(100)
|
||||
if chance > 40 {
|
||||
fmt.Scan(&choice)
|
||||
if strings.ToUpper(choice) == "B" {
|
||||
bumHP = 100 * level
|
||||
outerLoop:
|
||||
for bumHP > 0 {
|
||||
ClearScreen()
|
||||
fmt.Println("You just hit the homeless bum with your police baton, it cracked his skull!")
|
||||
fmt.Println("You sprinkle some crack on him and move along.")
|
||||
MashEnterKey()
|
||||
experience = experience + 250
|
||||
money = money + 20
|
||||
bumfights = bumfights - 1
|
||||
i = 0
|
||||
} else {
|
||||
ClearScreen()
|
||||
fmt.Println(red.Render("You missed, and he got away!"))
|
||||
fmt.Println(storyStyle.Render("Bum Fight!"))
|
||||
fmt.Println()
|
||||
fmt.Println("Perhaps you should lay off the donuts...")
|
||||
bumfights = bumfights - 1
|
||||
MashEnterKey()
|
||||
i = 0
|
||||
fmt.Println("You are staring at a ", red.Render("homeless piece of shit!"), "with", bumHP, " HP")
|
||||
fmt.Println("")
|
||||
fmt.Println("What do you do?")
|
||||
fmt.Println("")
|
||||
CombatStats()
|
||||
fmt.Println(border.Render(statsCombat))
|
||||
fmt.Println("(F)ight")
|
||||
fmt.Println("(G)o back to HQ")
|
||||
fmt.Println("Your choice,")
|
||||
fmt.Print(green.Render(PlayerName), ">")
|
||||
homelessFight := ""
|
||||
fmt.Scan(&homelessFight)
|
||||
if strings.ToUpper(homelessFight) == "F" {
|
||||
chance := rand.IntN(100)
|
||||
if chance > 40 {
|
||||
attack := 20 // default attack power
|
||||
|
||||
switch {
|
||||
case fentanyl <= 0:
|
||||
attack = 20
|
||||
default:
|
||||
modifier := attack * fentanyl // default attack power multiplied by amount of fentanyl
|
||||
attack = attack + modifier
|
||||
}
|
||||
|
||||
bumHP = bumHP - attack
|
||||
ClearScreen()
|
||||
fmt.Println(red.Render("You smash the bum for "), attack, "hit points!")
|
||||
fmt.Println("The bum has ", bumHP, " HP left")
|
||||
MashEnterKey()
|
||||
|
||||
switch {
|
||||
|
||||
case bumHP <= 0:
|
||||
money = money + 200
|
||||
bumfights = bumfights - 1
|
||||
experienceGain := cocaines * 100
|
||||
levelGain := level * 100
|
||||
experience = experience + levelGain + experienceGain + 100
|
||||
break outerLoop
|
||||
}
|
||||
} else {
|
||||
ClearScreen()
|
||||
fmt.Println(red.Render("You missed, he dodged your attack!"))
|
||||
fmt.Println()
|
||||
homelessAttack := 20
|
||||
playerHP = playerHP - homelessAttack
|
||||
fmt.Println(red.Render("The homeless thug attacks you with a broken whiskey bottle for"), homelessAttack, " HP")
|
||||
fmt.Println("Perhaps you should lay off the donuts...")
|
||||
if playerHP < 0 {
|
||||
bumHP = 100
|
||||
break outerLoop
|
||||
}
|
||||
MashEnterKey()
|
||||
}
|
||||
} else {
|
||||
fmt.Println("You go back to HQ.")
|
||||
bumfights = bumfights - 1
|
||||
bumHP = 0
|
||||
MashEnterKey()
|
||||
MainMachine()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fmt.Println("You escape successfully.")
|
||||
bumfights = bumfights - 1
|
||||
MashEnterKey()
|
||||
i = 0
|
||||
} else if strings.ToUpper(choice) == "R" {
|
||||
MainMachine()
|
||||
}
|
||||
} else {
|
||||
i = 1
|
||||
}
|
||||
}
|
||||
|
||||
MainMachine()
|
||||
}
|
||||
|
||||
|
|
@ -195,6 +230,7 @@ func RedRoom() {
|
|||
fmt.Println("Your cash: $", strconv.Itoa(money))
|
||||
fmt.Println("")
|
||||
fmt.Println("Buy one sex slave (Y/N)?")
|
||||
fmt.Print(green.Render(PlayerName), ">")
|
||||
slavePurchase := ""
|
||||
fmt.Scan(&slavePurchase)
|
||||
if strings.ToUpper(slavePurchase) == "Y" {
|
||||
|
|
@ -221,6 +257,7 @@ func RedRoom() {
|
|||
fmt.Println("Your cash: $", strconv.Itoa(money))
|
||||
fmt.Println("")
|
||||
fmt.Println("Buy connies (Y/N)?")
|
||||
fmt.Print(green.Render(PlayerName), ">")
|
||||
lapPurchase := ""
|
||||
fmt.Scan(&lapPurchase)
|
||||
if strings.ToUpper(lapPurchase) == "Y" {
|
||||
|
|
@ -253,12 +290,13 @@ func RedRoom() {
|
|||
lapPurchase := ""
|
||||
fmt.Scan(&lapPurchase)
|
||||
if strings.ToUpper(lapPurchase) == "Y" {
|
||||
if money > 20 {
|
||||
if money >= 20 {
|
||||
money = money - 20
|
||||
ClearScreen()
|
||||
fmt.Println(slutStyle.Render("That slut grinds on your dick to the song 'I like it that way' by Backstreet Boys."))
|
||||
fmt.Println()
|
||||
fmt.Println("That shit was so hot, you came in your pants.")
|
||||
fmt.Println("That shit was so hot, you shot a hot load in your pants.")
|
||||
playerHP = playerHP + 100
|
||||
MashEnterKey()
|
||||
i = 0
|
||||
} else {
|
||||
|
|
@ -274,50 +312,66 @@ func RedRoom() {
|
|||
|
||||
} else if strings.ToUpper(choice) == "F" {
|
||||
ClearScreen()
|
||||
fmt.Println(border.Render("Get your Dick Wet at OPP McDick's"))
|
||||
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("Your cash: $", strconv.Itoa(money))
|
||||
fmt.Println("")
|
||||
fmt.Println("Buy an hour with a whore (Y/N)?")
|
||||
fmt.Print(green.Render(PlayerName), ">")
|
||||
fuckPurchase := ""
|
||||
fmt.Scan(&fuckPurchase)
|
||||
if strings.ToUpper(fuckPurchase) == "Y" {
|
||||
if money > 100 {
|
||||
if money >= 100 {
|
||||
money = money - 100
|
||||
if condoms == 0 {
|
||||
stdChance := rand.IntN(100)
|
||||
preggoChance := rand.IntN(100)
|
||||
if stdChance < 25 {
|
||||
std = true
|
||||
} else {
|
||||
|
||||
ClearScreen()
|
||||
fmt.Println(slutStyle.Render(wifeyFucked))
|
||||
fmt.Println("You just fucked a dirty whore! Oh... shit, it's your cousin!")
|
||||
MashEnterKey()
|
||||
|
||||
switch {
|
||||
case stdChance <= 50:
|
||||
diseases = diseases + 1
|
||||
ClearScreen()
|
||||
fmt.Println(red.Render("Uh oh!"))
|
||||
fmt.Println(slutStyle.Render("You got a disease!"))
|
||||
MashEnterKey()
|
||||
}
|
||||
if preggoChance > 15 {
|
||||
fmt.Println(border.Render("You got the whore pregnant! Do you want to sell the kid to"))
|
||||
fmt.Println(border.Render("Pakistan for $500 to sew soccer balls?"))
|
||||
|
||||
switch {
|
||||
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.Print(green.Render(PlayerName), "(Y/N) >")
|
||||
soccerBalls := ""
|
||||
fmt.Scan(&soccerBalls)
|
||||
if strings.ToUpper(soccerBalls) == "Y" {
|
||||
money = money + 500
|
||||
fmt.Println(border.Render("Bonus! You just made $500!"))
|
||||
fmt.Println(red.Render("Bonus! You just made $500... The kid is great at sewing soccer balls!"))
|
||||
MashEnterKey()
|
||||
} else {
|
||||
|
||||
fmt.Println(red.Render("You have too much of a heart to sell your kid. Now you have to pay child support!"))
|
||||
offspring = offspring + 1
|
||||
fmt.Println("")
|
||||
fmt.Println(red.Render("Fuck!"))
|
||||
MashEnterKey()
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
condoms = condoms - 1
|
||||
playerHP = playerHP + 200
|
||||
}
|
||||
ClearScreen()
|
||||
fmt.Println(slutStyle.Render(wifeyFucked))
|
||||
fmt.Println("You just fucked a dirty whore! Oh... shit, it's your cousin!")
|
||||
MashEnterKey()
|
||||
ClearScreen()
|
||||
i = 0
|
||||
} else {
|
||||
ClearScreen()
|
||||
fmt.Println(red.Render("Get some money, broke-ass!"))
|
||||
MashEnterKey()
|
||||
ClearScreen()
|
||||
i = 0
|
||||
}
|
||||
} else {
|
||||
|
|
@ -359,14 +413,14 @@ func DoctorsOffice() {
|
|||
if money > 100 {
|
||||
fmt.Println("You pay the doctor $100 and you and/or your 'friends' are cured.")
|
||||
money = money - 100
|
||||
std = false
|
||||
diseases = 0
|
||||
i = 1
|
||||
MashEnterKey()
|
||||
} else {
|
||||
fmt.Println("You're too poor to cure your disease.")
|
||||
fmt.Println("You're too poor to cure your diseases.")
|
||||
i = 1
|
||||
if std {
|
||||
fmt.Println("But you still have a disease.")
|
||||
if diseases >= 1 {
|
||||
fmt.Println("But you still have a diseases.")
|
||||
MashEnterKey()
|
||||
} else {
|
||||
fmt.Println()
|
||||
|
|
@ -376,7 +430,7 @@ func DoctorsOffice() {
|
|||
} else {
|
||||
ClearScreen()
|
||||
fmt.Println("No cure for you. I guess.")
|
||||
if std {
|
||||
if diseases >= 0 {
|
||||
fmt.Println("But you still have a disease.")
|
||||
MashEnterKey()
|
||||
} else {
|
||||
|
|
@ -495,7 +549,7 @@ func PropertyRoom() {
|
|||
func ClockOut() {
|
||||
choice := 0
|
||||
ClearScreen()
|
||||
fmt.Println(storyStyle.Render(wifey))
|
||||
fmt.Println(slutStyle.Render(wifey))
|
||||
for choice < 1 {
|
||||
fmt.Println("Your choice,")
|
||||
fmt.Print(green.Render(PlayerName), ">")
|
||||
|
|
@ -507,7 +561,6 @@ func ClockOut() {
|
|||
ClearScreen()
|
||||
if cocaines > 1 {
|
||||
fmt.Println(red.Render("You pull out 1kg of cocaine and smash it open all over your face"))
|
||||
cocaines = cocaines - 1
|
||||
fmt.Println(red.Render("You shout 'COKE SLAM!'"))
|
||||
fmt.Println(red.Render("You bust your wife right in the fucking face!"))
|
||||
fmt.Println(red.Render("YARRRRR! (You don't know why you're a pirate now)"))
|
||||
|
|
@ -515,6 +568,7 @@ func ClockOut() {
|
|||
ClearScreen()
|
||||
} else {
|
||||
fmt.Println(red.Render("You bust your wife right in the fucking face!"))
|
||||
MashEnterKey()
|
||||
}
|
||||
} else {
|
||||
ClearScreen()
|
||||
|
|
@ -545,11 +599,12 @@ func ClockOut() {
|
|||
GameOver()
|
||||
} else {
|
||||
days = days - 1
|
||||
if std {
|
||||
bumfights = bumfightsTotal - 15
|
||||
if diseases >= 1 {
|
||||
bumfights = bumfightsTotal - 15 - diseases
|
||||
} else {
|
||||
bumfights = bumfightsTotal
|
||||
}
|
||||
childsupport = offspring * 100
|
||||
prostituteIncome := whores*500 - childsupport
|
||||
money = money + taxes + prostituteIncome
|
||||
fmt.Println("Cha ching! You now have ", money)
|
||||
|
|
@ -571,7 +626,7 @@ func GameOver() {
|
|||
}
|
||||
|
||||
func CheckStats() {
|
||||
stats = "PLAYER STATS" + "\n\n" + "Name " + "\n" + PlayerName + "\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" + "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
|
||||
}
|
||||
|
||||
func CombatStats() {
|
||||
|
|
@ -596,7 +651,7 @@ func CombatStats() {
|
|||
} else {
|
||||
fmt.Println()
|
||||
}
|
||||
statsCombat = "Name: " + PlayerName + "\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
|
||||
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
|
||||
}
|
||||
|
||||
func MainMachine() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue