-
Notifications
You must be signed in to change notification settings - Fork 1
/
game.rb
170 lines (147 loc) · 11.3 KB
/
game.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
puts <<-'EOF'
___ _ _
/ _ \ | __ _ _ __ ___| |_
/ /_)/ |/ _` | '_ \ / _ \ __|
/ ___/| | (_| | | | | __/ |_
\/ |_|\__,_|_| |_|\___|\__|
__ _ _ _
/ / __ _| (_) ___| |__ _ _
/ / / _` | | |/ __| '_ \| | | |
/ /__| (_| | | | (__| | | | |_| |
\____/\__,_|_|_|\___|_| |_|\__,_|
by Selam, Cynthia, and Miguel
EOF
def you_win
puts '
██╗░░░██╗░█████╗░██╗░░░██╗ ░██╗░░░░░░░██╗██╗███╗░░██╗██╗
╚██╗░██╔╝██╔══██╗██║░░░██║ ░██║░░██╗░░██║██║████╗░██║██║
░╚████╔╝░██║░░██║██║░░░██║ ░╚██╗████╗██╔╝██║██╔██╗██║██║
░░╚██╔╝░░██║░░██║██║░░░██║ ░░████╔═████║░██║██║╚████║╚═╝
░░░██║░░░╚█████╔╝╚██████╔╝ ░░╚██╔╝░╚██╔╝░██║██║░╚███║██╗
░░░╚═╝░░░░╚════╝░░╚═════╝░ ░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚══╝╚═╝'
end
def game_over
puts '
░██████╗░░█████╗░███╗░░░███╗███████╗ ░█████╗░██╗░░░██╗███████╗██████╗░
██╔════╝░██╔══██╗████╗░████║██╔════╝ ██╔══██╗██║░░░██║██╔════╝██╔══██╗
██║░░██╗░███████║██╔████╔██║█████╗░░ ██║░░██║╚██╗░██╔╝█████╗░░██████╔╝
██║░░╚██╗██╔══██║██║╚██╔╝██║██╔══╝░░ ██║░░██║░╚████╔╝░██╔══╝░░██╔══██╗
╚██████╔╝██║░░██║██║░╚═╝░██║███████╗ ╚█████╔╝░░╚██╔╝░░███████╗██║░░██║
░╚═════╝░╚═╝░░╚═╝╚═╝░░░░░╚═╝╚══════╝ ░╚════╝░░░░╚═╝░░░╚══════╝╚═╝░░╚═╝
'
end
def game
puts "Welcome to Planet Lalichu. We don't have time for an introduction because the planet is under attack by the evil humanoids of Planet Earth. All inhabitants are moving to camp Wup-Ash to sign up for the fight to save their planet."
# name entry
puts "SPEAK, the commander of Wup-Ash has asked for your name."
name = gets.chomp + 'chu'
puts "Hello, #{name}. What is your element?"
# choosing your element
puts element_arr = ['1. Earth', '2. Wind', '3. Fire', '4. Water']
puts "Enter a number between 1-4."
element = gets.chomp
# choice chain
if element == '1'
puts '█▀▀ ▄▀█ █▀█ ▀█▀ █░█'
puts '██▄ █▀█ █▀▄ ░█░ █▀█'
puts "Wow, you have earth powers!"
elsif element == '2'
puts '█░█░█ █ █▄░█ █▀▄'
puts '▀▄▀▄▀ █ █░▀█ █▄▀'
puts "Wow, you have wind poweers!"
elsif element == '3'
puts '█▀▀ █ █▀█ █▀▀'
puts '█▀░ █ █▀▄ ██▄'
puts "Wow, you have fire powers!"
elsif element == '4'
puts '█░█░█ ▄▀█ ▀█▀ █▀▀ █▀█'
puts '▀▄▀▄▀ █▀█ ░█░ ██▄ █▀▄'
puts "Wow, you have water powers!"
else
puts "Sure, if that's all you got."
end
# description of missions and ask for user's choice.
puts "Commander: 'Alrighty then, we don't have time for training. It's time to assign your ash a mission.'"
puts ['1. sneak', '2. frontlines', '3. rescue']
puts 'Enter a number between 1-3.'
mission = gets.chomp
if mission == '1'
puts "I hope you're sneaky enough for this sneak mission #{name}."
puts "3 years later, Lalichu has been colonized by the evil humanoids and your body was never recovered from your sneak mission. We'd like to think you'd put in a good fight but apparently you failed."
puts game_over
elsif mission == '2'
puts "Wow, what a soldier! You have chosen the frontline mission #{name}."
puts "3 years later, Lalichu has been colonized by the evil humanoids and your body was never recovered from frontlines."
puts game_over
elsif mission == '3'
puts "The commanders applauds your courage and stoops down to whisper in your ear. It tickles but you must keep your game face on. He whispers, 'Save the almightiest Shalomar from the humanoids. They have him locked up in that one cave where everyone makes out after dark. It shouldn't be hard to find. Good luck #{name}."
if element == '1'
puts "Because you're an Earth element, you have the following powers:"
puts ["1. Earth Mimicry: Lather yourself in mud", "2. Agrokinesis: Manipulate plants", "3. Geokinesis: Throw a smooth rock"]
puts 'Enter a number between 1-3.'
earthpower = gets.chomp
if earthpower == '1'
puts "You're lathered in mud and the guards are too grossed out to chase you. You get into the cave where you find shalomar and lather them in mud as well so the two of you can escape without a fight."
puts "Congratulations, you saved the planet Lalichu and have brought honour to your family's name."
puts you_win
elsif earthpower == '2'
puts 'You muster all your energy to grow a rose bush that fails to impress the guards. They take offence by your feeble approach and shackle you along with shalomar.'
puts game_over
elsif earthpower == '3'
puts "You throw a smooth rock that turns into the infamous Dwayne 'The Rock' Johnson. You forget he's a humanoid as well..FUGE! He hits you with the 'Rock Bottom' and you immediately crumble to dust, rejoining your ancestors."
puts game_over
end
elsif element == '2'
puts "Because you're a Wind element, you have the following powers:"
puts ["1. Aerokinesis: Throw a gas bomb", "2. Aeroportation: Teleport", "3. Mimicry: Transform into a cloud of gas."]
puts 'Enter a number between 1-3.'
windpower = gets.chomp
if windpower == '1'
puts "You eat your magic beans, the guards look at you puzzled. Before they can react, you stuff your hands into your backpocket and reveal the biggest gas bomb. They faint at the stench and you walk through the cave to rescue shalomar, who is also unconscious."
puts "Congratulations, you saved the planet Lalichu and have brought honour to your family's name."
puts you_win
elsif windpower == '2'
puts "You see the guards, and think, 'Easy peasy, I'll fly over these humanoids' but to your surprise, they fling an enlarged fly zapper and sting you to your death."
puts game_over
elsif windpower == '3'
puts "You transform into a cloud of gas but to your surprise a gust of wind carries you back to your momma's house."
puts game_over
end
elsif element == '3'
puts "Because you're a Fire element, you have the following powers:"
puts ["1. Pyrokinesis: Create and control fire with the mind.", "2. Droolava: You can spit lava", "3. SmokeyEyes: You fill the room with smoke. "]
puts 'Enter a number between 1-3.'
firepower = gets.chomp
if firepower == '1'
puts "You swivel your middle fingers forming a fire at the tips. The guards laugh and it infuriates you. You throw your fire at them but it fails to reach them--DAMMIT! The guards move quick, and throw a fire blanket at your heated body."
puts game_over
elsif firepower == '2'
puts "You see the guards, and you can't help but think how attractive they are. You begin to drool and produce lava that follows the guards to their own demise. You're saddened by the loss, but remain faithful to the mission. You save Shalomar, closing your eyes as to not scorch him with your droollava because Shalomar is attractive as well."
puts "Congratulations, you saved the planet Lalichu and have brought honour to your family's name."
puts you_win
elsif firepower == '3'
puts 'You fill the area with smoke and the guards begin to cough, but it becomes so smokey that you no longer can see. You walk pass the cave and onto a cliff where you fall to your smokey demise.'
puts game_over
end
elsif element == '4'
puts "Because you're a Water element, you have the following powers:"
puts ["1. Perspirate: Sweat profusely and become extra slippery.", "2. Waterworks: When others see you cry, they do anything within their power to make you feel better.", "3. Raindance: Makes it rain for 5 hours."]
puts 'Enter a number between 1-3.'
waterpower = gets.chomp
if waterpower == "You summon the rain gods and the Jabbawockeez appear! You and the group perform the dopest dance routine to pour rapid rain on the guards. They're unphased and begin a dance battle. The rain disappears and the guards perform the last pop-lock-and drop it move that results in your limbs being dismembered."
puts game_over
elsif waterpower == '2'
puts "You begin to cry that grows into sobbing. You're a pathetic sight. In the blur of all your tears you look up to see the guards are unphased. They yell, 'Get out of here with your water works'."
puts game_over
elsif waterpower == '1'
puts "As you walk up to the guards, you're an absolute nervous wreck. Its audacious and the guards are puzzled. You begin to profusely perspirate. One guard attempts to grab your arm and her fingers slide off, picking up a disgusting sticky residue that eats her alive. Her partner screams in terror and runs off to tell his commander. You're no longer nervous and your skin returns to its skaley nature. You walk into the cave and complete the mission to save Shalomar."
puts "Congratulations, you saved the planet Lalichu and have brought honour to your family's name."
puts you_win
end
else
puts "your #{element} literally does nothing for us, you should have followed the rules."
puts game_over
end
end
end
puts game