Python

No description

fork
loading
Files
  • main.py
  • Vigle.py
main.py
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
import sys
import time
import os
import random


class color:
   PURPLE = '\033[95m'
   CYAN = '\033[96m'
   DARKCYAN = '\033[36m'
   BLUE = '\033[94m'
   GREEN = '\033[92m'
   YELLOW = '\033[93m'
   RED = '\033[91m'
   BOLD = '\033[1m'
   UNDERLINE = '\033[4m'
   END = '\033[0m'

Loading = 0
load = True
Health = 100

def slow_print(str):
  for char in str:
    time.sleep(.06)
    sys.stdout.write(char)
    sys.stdout.flush()
    
#——————————————
Theif = '''\

                       __.------.                          
                      (__  ___   )                         
                        .)e  )\ /                          
                       /_.------                           
                       _/_    _/                           
                   __.'  / '   `-.__                       
                  / <.--'           `\                     
                 /   \   \c           |                    
                /    /    )       x    \                   
                |   /\    |c     / \.-  \                  
                \__/  )  /(     (   \   <>'\               
                     / _/ _\-    `-. \/_|_ /<>             
                    / /--/,-\     _ \     <>.`.            
                    \/`--\_._) - /   `-/\    `.\           
                     /        `.     /   )     `\          
                     \      \   \___/----'                 
                     |      /    `(                        
                     \    ./\_   _ \                       
                     /     |  )    '|                      
                    /   \     \   
                   /     |     |____.)                     
                  /      \  a88a\___/88888a.               
                 \_      :)8888888888888888888a.           
                /` `-----'  `Y88888888888888888            
                \____|         `88888888888P'              
                                                           
'''

Ant = '''\
 \       /
  \     /  
   \.-./ 
  (o\^/o)  _   _   _     __
   ./ \.\ ( )-( )-( ) .-'  '-.
    {-} \(//  ||   \\/ (   )) '-.
         //-__||__.-\\.       .-'
        (/    ()     \)'-._.-'
        ||    ||      \\
        ('    ('       ')
'''
Goblin = '''\
            /(.-""-.)\
        |\  \/      \/  /|
        | \ / =.  .= \ / |
        \( \   o\/o   / )/
         \_, '-/  \-' ,_/
           /   \__/   \
           \ \__/\__/ /
         ___\ \|--|/ /___
       /`    \      /    `\
      /       '----'       \
'''

Sign = '''\
 ___________________
/     Vigal Vally ↑  \\n
!       10 KM        !
!                    !
\____________________/
         !  !
         !  !
         !  !
         !  !
         !  !
         !  !
         !  !
         !  !
         !  !
         !  !
         !  !
         \__/ 
  
'''
Spider = '''\
              (
               )
              (
        /\  .-"""-.  /\\
       //\\/  ,,,  \//\\
       |/\| ,;;;;;, |/\\
       //\\\;-"""-;///\\
      //  \/   .   \/  \\
     (| ,-_| \ | / |_-, |)
       //`__\.-.-./__`\\
      // /.-(() ())-.\ \\
     (\ |)   '---'   (| /)
      ` (|           |) `
        \)           (/
'''

Cup = '''\

                        (
                          )     (
                   ___...(-------)-....___
               .-""       )    (          ""-.
         .-'``'|-._             )         _.-|
        /  .--.|   `""---...........---""`   |
       /  /    |                             |
       |  |    |                             |
        \  \   |                             |
         `\ `\ |                             |
           `\ `|                             |
           _/ /\                             /
          (__/  \                           /
       _..---""` \                         /`""---.._
    .-'           \                       /          '-.
   :               `-.__             __.-'              :
   :                  ) ""---...---"" (                 :
    '._               `"--...___...--"`              _.'
      \""--..__                              __..--""/
       '._     """----.....______.....----"""     _.'
          `""--..,,_____            _____,,..--""`
                        `"""----"""`
'''                        
Cyclops = '''\

            _......._
        .-'.'.'.'.'.'.`-.
      .'.'.'.'.'.'.'.'.'.`.
     /.'.'               '.\
     |.'    _.--...--._     |
     \    `._.-.....-._.'   /
     |     _..- .-. -.._   |
  .-.'    `.   ((@))  .'   '.-.
 ( ^ \      `--.   .-'     / ^ )
  \  /         .   .       \  /
  /          .'     '.  .-    \
 ( _.\    \ (_`-._.-'_)    /._\)
  `-' \   ' .--.          / `-'
      |  / /|_| `-._.'\   |
      |   |       |_| |   /-.._
  _..-\   `.--.______.'  |
       \       .....     |
        `.  .'      `.  /
          \           .'
           `-..___..-`
'''
Slash = 5
Stab = 5
BadBreath = 3
STPot = 0.6
Spat = 3
BluntDagger = 1.3
SharpendDagger = 1.6
powerTimer = 0
Power = 1
Smacked = 4
startTimer = 0
skip = 0
LLBeast = ['OverGrown Spider', 'Goblin', 'OverGrown Ant', 'Cyclops', 'Theif']
MLBeast = []
HLBeat = []
InventoryNames = []
Inventory = []
MonAttacks = [BadBreath, Spat, Smacked]
MonAttackNames = ['Bad Breath', 'Spit', 'Smack']
AttackNames = ['1.Slash', '2.Stab']
AttackNamesn = ['Slash', 'Stab']
Attacks = [Slash, Stab]
Walking = False
timeWalking = 0

def MonsterAttack():
  global randMonAttack
  randMonAttack = random.randint(0, 2)

def Fight():
  global inFight
  global dammageDelt
  global WepEq
  global powerTimer
  global setHealth
  global Health
  global startTimer
  setHealth = 25
  while inFight:
    if WepEq == BluntDagger:
      Power = 1.3
      if startTimer == 1 and powerTimer != 3:
        Power += 0.6
      else:
        Power = 1.3
    elif WepEq == SharpendDagger:
      Power = 1.6
      if startTimer == 1 and powerTimer != 3:
        Power += 0.6
      else:
        Power = 1.6
    os.system('clear')
    MonsterAttack()
    DrawBeast()
    slow_print(color.RED + color.BOLD + '\n\n\nThe ' +''.join(Beast) +' used ' + MonAttackNames[randMonAttack] + ' and did %s Dammage to you!' % MonAttacks[randMonAttack])
    Health -= MonAttacks[randMonAttack]
    time.sleep(2)
    os.system('clear')
    FightLog = input(color.END + color.BOLD + 'Health %s\n1.Attacks\n2.Inventory\n3.Wait\nYou Choose: ' % Health)
    if FightLog == '1':
      os.system('clear')
      AttackLog = input('\n'.join(AttackNames) + '\nYou Choose: ')
      if startTimer == 1:
        powerTimer += 1
      elif powerTimer == 3:
        print('Potion Ran Out')
        
      dammageDelt = Power * (Attacks[int(AttackLog)-1])
      setHealth -= dammageDelt
      if setHealth <= 0:
        setHealth = 0
      slow_print(('\nYou used ' + AttackNamesn[int(AttackLog)-1] + ' and it did %d dammage to the ' % round(dammageDelt)) + (''.join(Beast) + ', its health is now %d' % setHealth))
      time.sleep(2)
        
    elif FightLog == '2':
      os.system('clear')
      print('Please Type name not number')
      time.sleep(2)
      os.system('clear')
      InvSel = input('\n'.join(InventoryNames) + '\nExit' +'\nYou Choose: ')
      InvSel = InvSel.lower()
      if InvSel == 'st potion':
        Power += 0.6
        powerTimer = 0
        startTimer = 1
        print('\nYour Potion will last 3 rounds.')
        time.sleep(2)
        InventoryNames.remove('ST Potion')
        Inventory.remove(STPot)
      elif InvSel == 'blunt dagger':
        print('Equipped Blunt Dagger')
        WepEq = BluntDagger
      elif InvSel == 'sharpend dagger':
        print('Equipped Sharpend Dagger')
        WepEq = SharpendDagger
      elif InvSel == 'exit':
        print('')
    else:
      print('Try again')
      time.sleep(1)
        
      
      
    if Health <= 0:
      Death = True
      slow_print('You Died, Game Over')
      time.sleep(1)
      exit()
    if setHealth <= 0:
      os.system('clear')
      slow_print('\nNice job!\n')
      time.sleep(1)
      inFight = False
      Story()

def Walking():
  global timeWalking
  Walking = True
  while Walking:
    os.system('clear')
    if timeWalking == 3:
      Walking = False
    slow_print('Walking')
    time.sleep(0.5)
    os.system('clear')
    print('Walking .')
    time.sleep(0.5)
    os.system('clear')
    print('Walking ..')
    time.sleep(0.5)
    os.system('clear')
    print('Walking ...')
    time.sleep(0.5)
    os.system('clear')
    print('Walking ..')
    time.sleep(0.5)
    os.system('clear')
    print('Walking .')
    time.sleep(0.5)
    os.system('clear')
    timeWalking += 1

def Story():
  os.system('clear')
  slow_print('you killed it but your weapon is blunt, i think theres a Grinder over in that room.\n')
  Move = input('1.Go to room\n2.Leave\nYou Choose: ')
  if Move == '1':
    os.system('clear')
    slow_print('You walked into the room\n')
    Move = input('1.Sharpen\n2.Leave\nYou Choose: ')
    if Move == '1':
      InventoryNames.remove('Blunt Dagger')
      Inventory.remove(BluntDagger)
      InventoryNames.append('Sharpend Dagger')
      Inventory.append(SharpendDagger)
      os.system('clear')
      slow_print('You sharpend the dagger')
      time.sleep(1)
  os.system('clear')
  slow_print('You said goodbye and left')
  time.sleep(1)
  os.system('clear')
  time.sleep(1)
  Walking()
  slow_print('You see a sign up ahead,\n\n')
  time.sleep(1)
  os.system('clear')
  print(Sign)
  time.sleep(2.5)
  slow_print('\n\n\nDo you want to Head twords the town or skip it?')
  os.system('clear')
  print(Sign)
  VigleVally = input('\n\n\nDo you want to Head twords the town or skip it?\n1.Go to the Town\n2.Keep walking\nYou Choose: ')
  if VigleVally == '1':
    import Vigle
  elif VigleVally == '2':
    Walking()
    Encounter()
  
  
  
  
  
def DrawBeast():
  if (''.join(Beast)) == 'OverGrown Spider':
    print(color.END + color.BOLD + Spider + color.END)
  elif (''.join(Beast)) == 'OverGrown Ant':
    print(color.END + color.BOLD + Ant + color.END)
  elif (''.join(Beast)) == 'Goblin':
    print(color.END + color.BOLD + Goblin + color.END)
  elif (''.join(Beast)) == 'Bad Guy':
    print(color.END + color.BOLD + Theif + color.END)
  elif (''.join(Beast)) == 'Cyclops':
    print(color.END + color.BOLD + Cyclops + color.END)
  
def Encounter():
  global inFight
  global Beast
  os.system('clear')
  inFight = True
  LowLevelBeast = random.randint(1, 5)
  Beast = LLBeast[LowLevelBeast-1:LowLevelBeast]
  DrawBeast()
  slow_print(color.RED + '\n\n\nYou encounterd a '+''.join(Beast)+'!')
  time.sleep(1.5)
  Fight()

    
def Tutorial():
  global WepEq
  global Loading
  global load
  slow_print('This is a project that I will not quit and finish/Update.')
  time.sleep(1)
  os.system('clear')
  slow_print('lets start')
  time.sleep(0.5)
  os.system('clear')
  slow_print(color.BOLD + 'This is a ProtoType you will experience bugs' + color.END)
  time.sleep(0.5)
  os.system('clear')
  x = 1
  while load:
    print(color.BOLD + color.RED +'Loading ' + color.END + str(Loading))
    time.sleep(0.04)
    Loading += 1
    os.system('clear')
    if Loading == 100:
      load = False
      print(color.BOLD + color.GREEN + 'Loading Complete' + color.END)
      time.sleep(1.5)
      os.system('clear')
      slow_print(color.BOLD + color.CYAN + 'This is your traning! ')
      time.sleep(1)
      slow_print('take this Blunt Dagger and Strength Potion and get ready. ' )
      time.sleep(1)
      slow_print('Im going to spawn a beast that you have to fight.' + color.END)
      slow_print(color.GREEN + '\n+1 Blunt Dagger\n+1 ST Potion')
      InventoryNames.append('Blunt Dagger')
      Inventory.append(BluntDagger)
      WepEq = BluntDagger
      Inventory.append(STPot)
      InventoryNames.append('ST Potion')
      time.sleep(2)
      Encounter()
os.system('clear')
if __name__ == '__main__':
  Tutorial()