-
Notifications
You must be signed in to change notification settings - Fork 1
/
witcher3.sh
executable file
·219 lines (197 loc) · 4.89 KB
/
witcher3.sh
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
#!/bin/bash
#Intro Page/Line
echo "===== T H E W I T C H E R I I I ====="
echo "Created by Layomi"
echo " "
echo " "
divider="=========================================================="
echo "$divider"
#Classes, set damage and player type
echo "Choose your Class, Magician or Swordsman (Enter M or S)"
read class
if [[ $class == "M" ]]; then
echo "You have selected Magician"
health="50"
damage="60"
classt="Magician"
elif [[ $class == "S" ]]; then
echo "You have selected Swordsman"
health="70"
damage="40"
classt="Swordsman"
else
echo "You did not select a class and will be a Muppet"
health="50"
damage="40"
classt="Muppet"
fi
echo "$divider"
echo " "
#Start
echo "Enter s to start or x to exit..."
read prompt
#condition
if [[ $prompt == "s" ]]; then
echo "In the land of Atmora..."
elif [[ $prompt == "x" ]]; then
exit 1
else
echo "uhh, okay..."
sleep 1
fi
echo "$divider"
#First boss
echo "You hear wings in the distance..."
sleep 1
#boss loop
bhealth="120"
while [[ $bhealth -ge "10" ]]
do
echo "$health ===== THE ROYAL GRIFFIN ===== $(($bhealth * 50))"
sleep 1
echo "$(whoami) You have $health Health left"
echo "$(whoami), Pick a number between 0 and 1"
read attac
sleep 1
#Battle odds
if [[ ($attac == "$(( $RANDOM % 2 ))") || ( $attac == "yen" ) ]]; then
echo "You, $(whoami) attacked the Royal Griffin and did $damage Damage"
health="$(( $health + 10 ))"
bhealth="$(( $bhealth - $damage ))"
else
echo "It sank it's talons into your shoulder, you are injured and lost 20 health"
health="$(( $health - 20 ))"
fi
echo " "
echo "$divider"
if [[ $health -le "0" ]]; then
exit 1
else
echo " "
fi
done
#boss loop ends
#Current Hp
echo "$USER You currently have $health Health"
#Second boss
echo "ARH-WOOOOOOOOOOOOOOOOOOOO"
sleep 1
echo "$health ===== T H E K I N G O F W O L V E S ===== 10"
sleep 1
echo "Enter a number (0 / 1)"
read attac
sleep 1
#Battle odds
if [[ $attac == "$(( $RANDOM % 2))" ]]; then
echo "You defeated The King Of Wolves and gained 10 health"
health="$(( $health + 10 ))"
else
echo "You were torn limb from limb and lost 20 health"
health="$(( $health - 20 ))"
fi
echo " "
echo "$divider"
#Current Hp
echo "You currently have $health Health"
#second prompt
echo "Do you wish to continue? (y / n)"
read prompt
if [[ $prompt == "y" ]]; then
echo "Well those were easy, goodluck"
elif [[ $prompt == "n" ]]; then
echo "Ya, run"
sleep 1
exit 1
else
echo "TBH idk what you want, so just go face the boss"
fi
echo " "
echo "$divider"
#Final boss
bhealth="1000"
bdamage="10"
#looping...
while [[ $bhealth -ge "1" ]]
do
echo "$health ===== G R E G O I R E D E G O R G O N =====$(($bhealth * 1000))"
sleep 1
echo "$(whoami), Choose a weapon: D for Dual Katanas, G for Golden Greatsword, S for Staff of Eredin, W for Witchs broom"
read weapon
#Weapon Choices
if [[ $weapon == "D" ]]; then
echo "You hold both katanas, and take a defensive stance"
weapon="Both Dual Katanas"
weapont="Sword"
elif [[ $weapon == "G" ]]; then
echo "You wrap both hands on the hilt of your sword... tightly..."
weapon="The Golden GreatSword"
weapont="Sword"
elif [[ $weapon == "S" ]]; then
echo "Your staff materializes as you strech forth your left hand"
weapon="The Staff of Eredin"
weapont="Magic"
elif [[ $weapon == "W" ]]; then
echo "You call your broom"
weapon="The Witchs Broom"
weapont="Magic"
else
echo "You grab some rocks off the floor"
weapon="Some Rocks"
weapont="Toy"
fi
#Battle odds
echo "Choose a number between 0 and 4 (0 / 4)"
read attac
sleep 2
if [[ $attac == "$(( $RANDOM % 5))" || $attac == yen ]]; then
echo "You attack with $weapon"
if [[ $weapont == "Sword" && $classt == "Swordsman" ]]; then
damage="$(($damage + $(($damage / 2))))"
if [[ $weapon == "Both Dual Katanas" ]]; then
echo "++ Bloody Slashes ++"
else
echo "++ Tyrant's Summit ++"
fi
echo "You did $damage Damage"
bhealth=$(( $bhealth - $damage ))
elif [[ $weapont == "Magic" && $classt == "Magician" ]]; then
damage="$(($damage + $(($damage / 2))))"
if [[ $weapon == "The Staff of Eredin" ]]; then
echo "++ Fiend Golem Crush ++"
else
echo "++ Poisonous Sweep ++"
fi
echo "You did $damage Damage"
bhealth=$(( $bhealth - $damage ))
elif [[ $weapont == "Toy" && $classt == "Muppet" ]]; then
damage="$(($damage + $(($damage / 2))))"
echo "++ Rock Throw ++"
echo "You did $damage Damage"
bhealth=$(( $bhealth - $damage ))
else
echo "you did $damage Damage"
bhealth=$(( $bhealth - $damage ))
fi
echo "Gregoire de Gorgon staggers."
echo "You gained 40 Health"
health="$(( $health + 40 ))"
else
echo "Gergoire de Godgon"
echo "~~~~ Tyrant's Sword Crush ~~~~~"
health="$(( $health - 60 ))"
fi
#end Health
if [[ $health -ge "0" ]]; then
echo "Still got the moves"
else
echo "You died bozo"
exit 1
fi
done
sleep 2
echo "With $weapon, you defeat the knight. sending his soul to outworld"
echo " Boss Defeated "
echo "You win, $(whoami)."
sleep 3
echo "This is where we say goodbye'
exit 1