-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpokemon (1).py
3101 lines (3081 loc) · 151 KB
/
pokemon (1).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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import time
import random
import AuxFunctions
import pyglet
"""
David W.
Program Complete (for now....)
v.1.2
"""
#############################################
outputFile = 'C:/Python33/David/Pokemon/Output/'
player = pyglet.media.Player()
nametank = ["Trimonocole","Trimonocle X","Almighty Trimonocle","Windowsaur","Rocketman","Karateking","Jujitschamp","Pokeon","Monpoke","Megladon","Macsquito","Drago","Packman","Monkeyman","Superman","Man","Beestorm","Olympio","Slithero","Boultron","Digitalus","Misterio","Frogbob","Longnorm","Pokemontisaurus","Candyman","Bicyclone","Blazetron","Hydron","Volta","Brain Man","Ironsaur","Naveen","Naveen","Boss A","Boss B"]
powers = ["Champ","Champion","Allchamp","Ground","Flying","Fight","Fight","Normal","Normal","Water","Bug","Dragon","Dark","Grass","Flying","Normal","Bug","Ghost","Grass","Rock","Metal","Normal","Adaptive","Normal","Dragon","Ice","Normal","Fire","Water","Electric","Psychic","Steel","ASDF","ASDF","Champ","Champ"]
#money/bank
a = 0
b = 0
op = random.randint(1,len(powers)-3)
opower = powers[op]
mypower = 'Normal'
quefight = 0
money = int(100)
moneybank = int(0)
deposit = int(0)
strdeposit = int(0)
depoadd = int(0)
withdraw = int(0)
#hps
hp = int(100)
hunger = int(100)
cow = int(0)
chicken = int(0)
plantfood = int(0)
wheat = 0
bread = 0
totalfood = cow + chicken + plantfood
fail = 0
#quest
q1 = int(0)
q2 = int(0)
q3 = int(0)
distance = int(0)
opphp = 100
#pp's
pp1 = int(5)
pp2 = int(10)
pp3 = int(20)
pp4 = int(2)
pp5 = int(10)
#potion
ppp = int(10)
#berry
berry = int(5)
#pokeball
pokepp = int(20)
ultrapp = int(5)
#other potions and heals
hppp = int(1)
fppp = int(0)
frpp = int(0)
ppill = int(1)
#other battle items in inventory
stone = int(0)
rock = int(0)
bould = int(0)
#market
#blaster
blaster = int(0)
blaster2 = int(0)
blaster3 = int(0)
blaster4 = int(0)
blaster_ammo = int(0)
#HPdecreaser
HPdecreaser = int(0)
HPdecreaser2 = int(0)
HPdecreaser3 = int(0)
HPdecreaser4 = int(0)
arrow = int(0)
Powerup = int(0)
#more inv
defc = int(0)
win = int(0)
#move after battle
mab = int(0)
#pokemon
power1n = 'Normal'
power2n = ''
power3n = ''
power4n = ''
power5n = ''
power6n = ''
p1n = 'Digisaurus'
p2n = ''
p3n = ''
p4n = ''
p5n = ''
p6n = ''
h1n = 100
h2n = 101
h3n = 102
h4n = 103
h5n = 104
h6n = 105
pp1n1 = 5
pp1n2 = 5
pp1n3 = 5
pp1n4 = 5
pp1n5 = 5
pp1n6 = 5
pp2n1 = 10
pp2n2 = 10
pp2n3 = 10
pp2n4 = 10
pp2n5 = 10
pp2n6 = 10
pp3n1 = 20
pp3n2 = 20
pp3n3 = 20
pp3n4 = 20
pp3n5 = 20
pp3n6 = 20
pp4n1 = 2
pp4n2 = 2
pp4n3 = 2
pp4n4 = 2
pp4n5 = 2
pp4n6 = 2
pp5n1 = 10
pp5n2 = 10
pp5n3 = 10
pp5n4 = 10
pp5n5 = 10
pp5n6 = 10
pokemon1 = [1,1,h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n]
pokemon2 = [0,0,h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2, p2n,power2n]
pokemon3 = [0,0,h3n,pp1n3,pp2n3,pp3n3,pp4n3,pp5n3, p3n,power3n]
pokemon4 = [0,0,h4n,pp1n4,pp2n4,pp3n4,pp4n4,pp5n4, p4n,power4n]
pokemon5 = [0,0,h5n,pp1n5,pp2n5,pp3n5,pp4n5,pp5n5, p5n,power5n]
pokemon6 = [0,0,h6n,pp1n6,pp2n6,pp3n6,pp4n6,pp5n6, p6n,power6n]
totalife = 1
totactiv = 1
averohp = (h1n + h2n + h3n + h4n + h5n + h6n)/6
whoh = """Pokemon is a game where you battle other pokemon. You win if your opponent loses all of his/her HP(or health points.
You have a certain amount times that you can use a move (PP, or playing points)if all PP for a certain move run out, then you can't use that move.
Typically, stronger moves have smaller PP's, so it would be more fair.
Pokeballs are used to catch another pokemon. It makes that pokemon your own.
When the opponent's pokemon has lower HP, then it is easier to catch."""
credits1 = """Made by David W.(Real) Copyrights by Nintendo and Game Freak. Version 1.7(BETA)leaves BETA when all save is DONE.
Thanks to many people:
"""
credits2 ="""I appreciate that you have played this game.
Veritas Liberat!
"""
"""
*********************************************************************************
"""
##################################################
name = input("Hello sir or ma'am! You have just fallen from the sky!What is your name?(if you remember it.)")
[name,hp,win,money,Powerup,opphp,pp1,pp2,pp3,pp4,pp5,diff,lig,blaster,blaster2,blaster3,blaster4,blaster_ammo,HPdecreaser,HPdecreaser2,HPdecreaser3,HPdecreaser4,arrow,hunger,cow,chicken,plantfood,deposit,moneybank,strdeposit,depoadd,withdraw,pokemon1,pokemon2,pokemon3,pokemon4,pokemon5,pokemon6,h1n,h2n,h3n,h4n,h5n,h6n,pp1n1,pp1n2,pp1n3,pp1n4,pp1n5,pp1n6,pp2n1,pp2n2,pp2n3,pp2n4,pp2n5,pp2n6,pp3n1,pp3n2,pp3n3,pp3n4,pp3n5,pp3n6,pp4n1,pp4n2,pp4n3,pp4n4,pp4n5,pp4n6,pp5n1,pp5n2,pp5n3,pp5n4,pp5n5,pp5n6,p1n,p2n,p3n,p4n,p5n,p6n,power1n,power2n,power3n,power4n,power5n,power6n,totactiv,totalife,mypower,op,ppill] = AuxFunctions.CheckName(outputFile,name)
opower = powers[op]
mus = input("Would you like music?(y/n)")
print("Good Luck on your adventure!")
if opphp > 0:
print("Well, a wild pokemon appeared.")
print("It is a",nametank[op])
print("It's type is",opower)
print("Your battle will begin in:")
for i in range(5, 0, -1):
print(i)
time.sleep(0.45)
if lig.lower() == "l" or lig.lower() == "long":
hp = hp + 400
opphp = opphp + 400
pp1 = pp1 + 5
pp2 = pp2 + 5
pp3 = pp3 + 10
pp4 = pp4 + 2
elif lig.lower() == "m" or lig.lower() == "medium":
hp = hp + 200
opphp = opphp + 200
pp1 = pp1 + 2
pp2 = pp2 + 2
pp3 = pp3 + 4
pp4 = pp4 + 1
if mus.lower() == "y":
player.eos_action = player.EOS_LOOP
while 1:
if mus == "y":
try:
sound = pyglet.media.load('./wild_pokemon.mp3', streaming=False)
player.queue(sound)
player.play()
except WindowsError:
print("Sorry about the audio error, at least the game didn't crash!")
while totalife >= 1 and totactiv >= 1:
def FixLifeBug(pokemon1,pokemon2,pokemon3,pokemon4,pokemon5,pokemon6):
if h1n > 0 and p1n != "":
pokemon1[0] = 1
pokemon1[8] = p1n
if h2n > 0 and p2n != "":
pokemon2[0] = 1
pokemon2[8] = p2n
if h3n > 0 and p1n != "":
pokemon3[0] = 1
pokemon3[8] = p3n
if h4n > 0 and p1n != "":
pokemon4[0] = 1
pokemon4[8] = p4n
if h5n > 0 and p5n != "":
pokemon5[0] = 1
pokemon5[8] = p5n
if h6n > 0 and p6n != "":
pokemon6[0] = 1
pokemon6[8] = p6n
return [pokemon1,pokemon2,pokemon3,pokemon4,pokemon5,pokemon6]
aaaaa = FixLifeBug(pokemon1,pokemon2,pokemon3,pokemon4,pokemon5,pokemon6)
pokemon1 = aaaaa[0]
pokemon2 = aaaaa[1]
pokemon3 = aaaaa[2]
pokemon4 = aaaaa[3]
pokemon5 = aaaaa[4]
pokemon6 = aaaaa[5]
if hp < 0:
totalife = 0
totactiv = 0
totalife = int(pokemon1[0]) + int(pokemon2[0]) + int(pokemon3[0]) + int(pokemon4[0]) + int(pokemon5[0]) + int(pokemon6[0])
totactiv = int(pokemon1[1]) + int(pokemon2[1]) + int(pokemon3[1]) + int(pokemon4[1]) + int(pokemon5[1]) + int(pokemon6[1])
if pokemon1[0] == 1 and pokemon1[1] == 1:
mypower = pokemon1[len(pokemon1)-1]
h1n = hp
pp1n1 = pp1
pp2n1 = pp2
pp3n1 = pp3
pp4n1 = pp4
pp5n1 = pp5
pokemon1 = [1,1,h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n]
if h1n <= 0:
pokemon1[0] = 0
pokemon1[1] = 0
totalife = pokemon1[0] + pokemon2[0] + pokemon3[0] + pokemon4[0] + pokemon5[0] + pokemon6[0]
totactiv = pokemon1[1] + pokemon2[1] + pokemon3[1] + pokemon4[1] + pokemon5[1] + pokemon6[1]
elif pokemon2[0] == 1 and pokemon2[1] == 1:
mypower = power2n
h2n = hp
pp1n2 = pp1
pp2n2 = pp2
pp3n2 = pp3
pp4n2 = pp4
pp5n2 = pp5
pokemon2 = [1,1,h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2, p2n,power2n]
if h2n <= 0:
pokemon2[0] = 0
pokemon2[1] = 0
totalife = pokemon1[0] + pokemon2[0] + pokemon3[0] + pokemon4[0] + pokemon5[0] + pokemon6[0]
elif pokemon3[0] == 1 and pokemon3[1] == 1:
mypower = power3n
h3n = hp
pp1n3 = pp1
pp2n3 = pp2
pp3n3 = pp3
pp4n3 = pp4
pp5n3 = pp5
pokemon3 = [1,1,h3n,pp1n3,pp2n3,pp3n3,pp4n3,pp5n3, p3n,power3n]
if h3n <= 0:
pokemon3[0] = 0
pokemon3[1] = 0
totalife = pokemon1[0] + pokemon2[0] + pokemon3[0] + pokemon4[0] + pokemon5[0] + pokemon6[0]
totactiv = pokemon1[1] + pokemon2[1] + pokemon3[1] + pokemon4[1] + pokemon5[1] + pokemon6[1]
elif pokemon4[0] == 1 and pokemon4[1] == 1:
mypower = power4n
h4n = hp
pp1n4 = pp1
pp2n4 = pp2
pp3n4 = pp3
pp4n4 = pp4
pp5n4 = pp5
pokemon4 = [1,1,h4n,pp1n4,pp2n4,pp3n4,pp4n4,pp5n4, p4n,power4n]
if h4n <= 0:
pokemon4[0] = 0
pokemon4[1] = 0
totalife = pokemon1[0] + pokemon2[0] + pokemon3[0] + pokemon4[0] + pokemon5[0] + pokemon6[0]
totactiv = pokemon1[1] + pokemon2[1] + pokemon3[1] + pokemon4[1] + pokemon5[1] + pokemon6[1]
elif pokemon5[0] == 1 and pokemon5[1] == 1:
mypower = power5n
h5n = hp
pp1n5 = pp1
pp2n5 = pp2
pp3n5 = pp3
pp4n5 = pp4
pp5n5 = pp5
pokemon5 = [1,1,h5n,pp1n5,pp2n5,pp3n5,pp4n5,pp5n5, p5n,power5n]
if h5n <= 0:
pokemon5[0] = 0
pokemon5[1] = 0
totalife = pokemon1[0] + pokemon2[0] + pokemon3[0] + pokemon4[0] + pokemon5[0] + pokemon6[0]
totactiv = pokemon1[1] + pokemon2[1] + pokemon3[1] + pokemon4[1] + pokemon5[1] + pokemon6[1]
elif pokemon6[0] == 1 and pokemon6[1] == 1:
mypower = power6n
h6n = hp
pp1n6 = pp1
pp2n6 = pp2
pp3n6 = pp3
pp4n6 = pp4
pp5n6 = pp5
pokemon6 = [1,1,h6n,pp1n6,pp2n6,pp3n6,pp4n6,pp5n6, p6n,power6n]
if h6n <= 0:
pokemon6[0] = 0
pokemon6[1] = 0
totalife = pokemon1[0] + pokemon2[0] + pokemon3[0] + pokemon4[0] + pokemon5[0] + pokemon6[0]
totactiv = pokemon1[1] + pokemon2[1] + pokemon3[1] + pokemon4[1] + pokemon5[1] + pokemon6[1]
def discheck(diswho):
if diswho == 1:
if pokemon1[0] == 1:
return True
else:
return False
elif diswho == 2:
if pokemon2[0] == 1:
return True
else:
return False
elif diswho == 3:
if pokemon3[0] == 1:
return True
else:
return False
elif diswho == 4:
if pokemon4[0] == 1:
return True
else:
return False
elif diswho == 5:
if pokemon5[0] == 1:
return True
else:
return False
elif diswho == 6:
if pokemon6[0] == 1:
return True
else:
return False
else:
return False
damage = random.randint(0,20)
fullpo = random.randint(100,150)
pokeball = random.randint(1,10)
pokeball1 = random.randint(1,5)
pokeball2 = random.randint(1,20)
pokeball3 = random.randint(1,2)
standard = random.randint(1,100)
thiefr = random.randint(1,10)
rstone = random.randint(5,15)
rrock = random.randint(10,20)
rbould = random.randint(20,30)
rblaster = random.randint(50,110)
rblaster2 = random.randint(65,125)
rblaster3 = random.randint(80,140)
rblaster4 = random.randint(95,165)
rHPdecreaser = random.randint(30,90)
rHPdecreaser2 = random.randint(45,105)
rHPdecreaser3 = random.randint(60,120)
rHPdecreaser4 = random.randint(75,135)
def criticalb(damage):
if damage >= 15:
print("That was a critical hit to you.")
else:
return False
def Pokeballinput(h1n, h2n,h3n,h4n,h5n,h6n,opphp, opower, nametank,power1n,power2n,power3n,power4n,power5n,power6n,pp1n1, pp2n1,pp3n1,pp4n1,pp5n1,pp1n2, pp2n2,pp3n2,pp4n2,pp5n2,pp1n3, pp2n3,pp3n3,pp4n3,pp5n3,pp1n4, pp2n4,pp3n4,pp4n4,pp5n4,pp1n5, pp2n5,pp3n5,pp4n5,pp5n5,pp1n6, pp2n6 ,pp3n6,pp4n6,pp5n6,p1n,p2n,p3n,p4n,p5n,p6n,pokemon1,pokemon2,pokemon3,pokemon4,pokemon5,pokemon6):
AuxFunctions.PokemonLive(pokemon1,pokemon2,pokemon3, pokemon4,pokemon5,pokemon6)
if AuxFunctions.PokemonLive(pokemon1,pokemon2,pokemon3, pokemon4,pokemon5,pokemon6) == 1:
h1n = opphp
pp1n1 = 5
pp2n1 = 10
pp3n1 = 20
pp4n1 = 2
pp5n1 = 10
p1n = nametank[op]
power1n = opower
pokemon1 = [1,0,h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n]
elif AuxFunctions.PokemonLive(pokemon1,pokemon2,pokemon3, pokemon4,pokemon5,pokemon6) == 2:
h2n = opphp
pp1n2 = 5
pp2n2 = 10
pp3n2 = 20
pp4n2 = 2
pp5n2 = 10
p2n = nametank[op]
power2n = opower
pokemon2 = [1,0,h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2,p2n,power2n]
elif AuxFunctions.PokemonLive(pokemon1,pokemon2,pokemon3, pokemon4,pokemon5,pokemon6) == 3:
h3n = opphp
pp1n3 = 5
pp2n3 = 10
pp3n3 = 20
pp4n3 = 2
pp5n3 = 10
p3n = nametank[op]
power3n = opower
pokemon3 = [1,0,h3n,pp1n3,pp2n3,pp3n3,pp4n3,pp5n3,p3n,power3n]
elif AuxFunctions.PokemonLive(pokemon1,pokemon2,pokemon3, pokemon4,pokemon5,pokemon6) == 4:
h4n = opphp
pp1n4 = 5
pp2n4 = 10
pp3n4 = 20
pp4n4 = 2
pp5n4 = 10
p4n = nametank[op]
power4n = opower
pokemon4 = [1,0,h4n,pp1n4,pp2n4,pp3n4,pp4n4,pp5n4,p4n,power4n]
elif AuxFunctions.PokemonLive(pokemon1,pokemon2,pokemon3, pokemon4,pokemon5,pokemon6) == 5:
h5n = opphp
pp1n5 = 5
pp2n5 = 10
pp3n5 = 20
pp4n5 = 2
pp5n5 = 10
p5n = nametank[op]
power5n = opower
pokemon5 = [1,0,h5n,pp1n5,pp2n5,pp3n5,pp4n5,pp5n5,p5n,power5n]
elif AuxFunctions.PokemonLive(pokemon1,pokemon2,pokemon3, pokemon4,pokemon5,pokemon6) == 6:
h6n = opphp
pp1n6 = 5
pp2n6 = 10
pp3n6 = 20
pp4n6 = 2
pp5n6 = 10
p6n = nametank[op]
power6n = opower
pokemon6 = [1,0,h6n,pp1n6,pp2n6,pp3n6,pp4n6,pp5n6,p6n,power6n]
else:
print("Glitch, serious glitch, please revise glitch.")
return [1,h1n, h2n,h3n,h4n,h5n,h6n,opphp, pp1n1, pp2n1,pp3n1,pp4n1,pp5n1, pp1n2, pp2n2,pp3n2,pp4n2,pp5n2, pp1n3, pp2n3,pp3n3,pp4n3,pp5n3, pp1n4, pp2n4,pp3n4,pp4n4,pp5n4,pp1n5, pp2n5,pp3n5,pp4n5,pp5n5, pp1n6, pp2n6 ,pp3n6,pp4n6,pp5n6,pokemon1,pokemon2,pokemon3,pokemon4,pokemon5,pokemon6,p1n,p2n,p3n,p4n,p5n,p6n,power1n,power2n,power3n,power4n,power5n,power6n]
def thief():
if thiefr >= 5:
return True
else:
return False
class Pokeball(object):
def __init__(self,opphp,standard,pokeball,pokeball1,pokeball2,pokeball3):
self.opphp = opphp
self.standard = standard
self.pokeball = pokeball
self.pokeball1 = pokeball1
self.pokeball2 = pokeball2
self.pokeball3 = pokeball3
def ultrarl(self):
if self.opphp < 10:
if self.standard >= 20:
return True
else:
return False
def ultral(self):
if self.opphp >= 10 and self.opphp < 20:
if self.standard >= 30:
return True
else:
return False
def ultraml(self):
if self.opphp >= 20 and self.opphp < 30:
if self.standard >= 40:
return True
else:
return False
def ultram(self):
if self.opphp >= 30 and self.opphp < 40:
if self.standard >= 50:
return True
else:
return False
def ultramm(self):
if self.opphp >= 40 and self.opphp < 50:
if self.standard >= 60:
return True
else:
return False
def ultrabm(self):
if self.opphp >= 50 and self.opphp < 60:
if self.standard >= 65:
return True
else:
return False
def ultrahbm(self):
if self.opphp >= 60 and self.opphp < 70:
if self.standard >= 70:
return True
else:
return False
def ultrahhm(self):
if self.opphp >= 70 and self.opphp < 80:
if self.standard >= 75:
return True
else:
return False
def ultrah(self):
if self.opphp >= 80 and self.opphp < 90:
if self.standard >= 80:
return True
else:
return False
def ultrahhh(self):
if self.opphp >= 90:
if self.standard >= 85:
return True
else:
return False
def pokeballh(self):
if self.opphp >= 65 and self.pokeball2 == 20:
return True
else:
return False
def pokeballm(self):
if self.opphp < 65 and self.opphp >= 35 and self.pokeball >= 1:
return True
else:
return False
def pokeballs(self):
if self.opphp < 35 and self.opphp >= 10 and self.pokeball1 == 1:
return True
else:
return False
def pokeballes(self):
if self.opphp < 10 and self.opphp > 0 and self.pokeball3 == 1:
return True
else:
return False
moveffect = Pokeball(opphp,standard,pokeball,pokeball1,pokeball2,pokeball3)
def rampage(soup):
if soup == 5 and pp4 > 0:
return True
return False
######################
damage = damage - defc
######################
if diff.lower() == "easy" or diff.lower() == "e":
if damage >=5:
damage = round(damage * (1 + (win/10)))-5
else:
damage = round(damage * (1 + (win/10)))
elif diff.lower() == "h" or diff.lower() == "hard":
damage = round(damage * (1.5 + (win/10)))
elif diff.lower() == "ex" or diff.lower() == "expert":
damage = round(damage * (1.75 + (win/10)))
elif diff.lower() == "extreme expert" or diff.lower() == "ee":
damage = round(damage * (2 + (win/10)))
else:
damage = round(damage * (1.1 + (win/10)))
if opphp > 0 and totalife > 0 and totactiv > 0:
print("Here are your choices:\n")
print("\t\tCredits- view credits")
print("\t\tHelp - Clear up any confusion")
print("\t\tInventory- use your belongings")
print("\t\tPokeball - If you want to catch a pokemon")
print("\t\tAttack- Attack your opponent")
print("\t\tSummary - Summarizes your current state")
print("\t\tHint - Provides a basic hint at what to do")
print("\t\tCheck - Check your pokemon and their stats")
print("\t\tSout(stands for Switch Out), where you can switch out your pokemon.")
print("\t\tDiscard, where you can let your pokemon go. You get a small pay for them.")
print("\t\tSave - Saves your information, so you can continue later")
print("\t\tRun - Flee the battlefield.")
origc = input("What do you choose?")
if origc.lower() == "credits" or origc.lower() == "c":
print("Pocket Monster Python Game Credits:")
time.sleep(1)
print("Created by Satoshi Tajiri in 1996")
time.sleep(1)
print("This is the second-most successful video game in the world, behind Mario.")
time.sleep(1.4)
print("This game is developed by Game Freak.")
time.sleep(1)
print("Made by David W, I didn't invent pokemon, but did make it better.")
elif origc.lower() == "check":
checkc = input("Check what?(Your pokemon(yp), your opponent(o), or powers/types and how effective they are(t or p)")
if checkc.lower() == "yp":
print("Quick Explanation: For Active and Alive: 1 = True, 0 = False")
print("%-10s%-10s%-5s%-5s%-5s%-5s%-5s%-5s%-16s%-5s"% ("Alive","Active","HP","PP1","PP2","PP3","PP4","PP5","Name","Type"))
print("")
print("%-10d%-10d%-5d%-5d%-5d%-5d%-5d%-5d%-16s%-10s"% (pokemon1[0],pokemon1[1],h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n))
print("%-10d%-10d%-5d%-5d%-5d%-5d%-5d%-5d%-16s%-10s"% (pokemon2[0],pokemon2[1],h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2,p2n,power2n))
print("%-10d%-10d%-5d%-5d%-5d%-5d%-5d%-5d%-16s%-10s"% (pokemon3[0],pokemon3[1],h3n,pp1n3,pp2n3,pp3n3,pp4n3,pp5n3,p3n,power3n))
print("%-10d%-10d%-5d%-5d%-5d%-5d%-5d%-5d%-16s%-10s"% (pokemon4[0],pokemon4[1],h4n,pp1n4,pp2n4,pp3n4,pp4n4,pp5n4,p4n,power4n))
print("%-10d%-10d%-5d%-5d%-5d%-5d%-5d%-5d%-16s%-10s"% (pokemon5[0],pokemon5[1],h5n,pp1n5,pp2n5,pp3n5,pp4n5,pp5n5,p5n,power5n))
print("%-10d%-10d%-5d%-5d%-5d%-5d%-5d%-5d%-16s%-10s"% (pokemon6[0],pokemon6[1],h6n,pp1n6,pp2n6,pp3n6,pp4n6,pp5n6,p6n,power6n))
elif checkc.lower() == "o":
print(opower,":Opponent's Type")
print(nametank[op],":Opponent's Name")
print(opphp)
elif checkc.lower() == "powers" or checkc.lower() == "p" or checkc.lower() == "t":
AuxFunctions.PowerInfo()
elif origc.lower() == "discard":
diswho = int(input("Discard which one (1- 6)?"))
if discheck(diswho):###
if diswho == 1:
pokemon1[0] = 0
if pokemon1[1] == 1:
pp1 = 5
pp2 = 10
pp3 = 20
pp4 = 2
pp5 = 10
hp = 100
pokemon1[1] = 0
h1n = 100
pp1n1 = 5
pp2n1 = 10
pp3n1 = 20
pp4n1 = 2
pp5n1 = 20
p1n = ''
power1n = ''
money += 50
elif diswho == 2:
pokemon2[0] = 0
if pokemon2[1] == 1:
pp1 = 5
pp2 = 10
pp3 = 20
pp4 = 2
pp5 = 10
hp = 100
pokemon2[1] = 0
h2n = 100
pp1n2 = 5
pp2n2 = 10
pp3n2 = 20
pp4n2 = 2
pp5n2 = 20
p2n = ''
power2n = ''
money += 50
elif diswho == 3:
pokemon3[0] = 0
if pokemon3[1] == 1:
pp1 = 5
pp2 = 10
pp3 = 20
pp4 = 2
pp5 = 10
hp = 100
pokemon3[1] = 0
h3n = 100
pp1n3 = 5
pp2n3 = 10
pp3n3 = 20
pp4n3 = 2
pp5n3 = 20
p3n = ''
power3n = ''
money += 50
elif diswho == 4:
pokemon4[0] = 0
if pokemon4[1] == 1:
pp1 = 5
pp2 = 10
pp3 = 20
pp4 = 2
pp5 = 10
hp = 100
pokemon4[1] = 0
h4n = 100
pp1n4 = 5
pp2n4 = 10
pp3n4 = 20
pp4n4 = 2
pp5n4 = 20
p4n = ''
power4n = ''
money += 50
elif diswho == 5:
pokemon5[0] = 0
if pokemon5[1] == 1:
pp1 = 5
pp2 = 10
pp3 = 20
pp4 = 2
pp5 = 10
hp = 100
pokemon5[1] = 0
h5n = 100
pp1n5 = 5
pp2n5 = 10
pp3n5 = 20
pp4n5 = 2
pp5n5 = 20
p5n = ''
power5n = ''
money += 50
elif diswho == 6:
pokemon6[0] = 0
if pokemon6[1] == 1:
pp1 = 5
pp2 = 10
pp3 = 20
pp4 = 2
pp5 = 10
hp = 100
pokemon6[1] = 0
h6n = 100
pp1n6 = 5
pp2n6 = 10
pp3n6 = 20
pp4n6 = 2
pp5n6 = 20
p6n = ''
power6n = ''
money += 50
elif origc.lower() == "sout":
try:
so = int(input("Switch out who(1-6)?"))
except ValueError:
print("Careful...")
try:
to = int(input("And to whom?(1-6)"))
except ValueError:
print("Careful...")
time.sleep(1)
if so == 1:
if pokemon1[0] == 1 and pokemon1[1] == 1:
if to == 2:
if pokemon2[0] == 1 and pokemon2[1] == 0:
pokemon2 = [1,1,h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2,p2n,power2n]
print("Okay?")
h1n = hp
pp1n1 = pp1
pp2n1 = pp2
pp3n1 = pp3
pp4n1 = pp4
pp5n1 = pp5
mypower = power2n
pokemon1 = [1,0,h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n]
hp = h2n
pp1 = pp1n2
pp2 = pp2n2
pp3 = pp3n2
pp4 = pp4n2
pp5 = pp5n2
print("Okay")
print(pokemon2)
elif to == 3:
if pokemon3[0] == 1 and pokemon2[1] == 0:
pokemon3 = [1,1,h3n,pp1n3,pp2n3,pp3n3,pp4n3,pp5n3,p3n,power3n]
print("Okay?")
h1n = hp
pp1n1 = pp1
pp2n1 = pp2
pp3n1 = pp3
pp4n1 = pp4
pp5n1 = pp5
mypower = power3n
pokemon1 = [1,0,h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n]
hp = h3n
pp1 = pp1n3
pp2 = pp2n3
pp3 = pp3n3
pp4 = pp4n3
pp5 = pp5n3
print("Okay")
print(pokemon3)
elif to == 4:
if pokemon4[0] == 1 and pokemon4[1] == 0:
pokemon4 = [1,1,h4n,pp1n4,pp2n4,pp3n4,pp4n4,pp5n4,p4n,power4n]
print("Okay?")
h1n = hp
pp1n1 = pp1
pp2n1 = pp2
pp3n1 = pp3
pp4n1 = pp4
pp5n1 = pp5
mypower = power4n
pokemon1 = [1,0,h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n]
hp = h4n
pp1 = pp1n4
pp2 = pp2n4
pp3 = pp3n4
pp4 = pp4n4
pp5 = pp5n4
print("Okay")
print(pokemon4)
elif to == 5:
if pokemon5[0] == 1 and pokemon5[1] == 0:
pokemon5 = [1,1,h5n,pp1n5,pp2n5,pp3n5,pp4n5,pp5n5,p5n,power5n]
print("Okay?")
h1n = hp
pp1n1 = pp1
pp2n1 = pp2
pp3n1 = pp3
pp4n1 = pp4
pp5n1 = pp5
mypower = power5n
pokemon1 = [1,0,h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n]
hp = h5n
pp1 = pp1n5
pp2 = pp2n5
pp3 = pp3n5
pp4 = pp4n5
pp5 = pp5n5
print("Okay")
print(pokemon5)
elif to == 6:
if pokemon6[0] == 1 and pokemon6[1] == 0:
pokemon6 = [1,1,h6n,pp1n6,pp2n6,pp3n6,pp4n6,pp5n6,p6n,power6n]
print("Okay?")
h1n = hp
pp1n1 = pp1
pp2n1 = pp2
pp3n1 = pp3
pp4n1 = pp4
pp5n1 = pp5
mypower = power6n
pokemon1 = [1,0,h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n]
hp = h6n
pp1 = pp1n6
pp2 = pp2n6
pp3 = pp3n6
pp4 = pp4n6
pp5 = pp5n6
print("Okay")
print(pokemon6)
else:
print("")
else:
print("Not in your inventory")
elif so == 2:
if pokemon2[0] == 1 and pokemon2[1] == 1:
if to == 1:
if pokemon1[0] == 1 and pokemon1[1] == 0:
pokemon1 = [1,1,h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n]
print("Okay?")
h2n = hp
pp1n2 = pp1
pp2n2 = pp2
pp3n2 = pp3
pp4n2 = pp4
pp5n2 = pp5
mypower = power1n
pokemon2 = [1,0,h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2,p2n,power2n]
hp = h1n
pp1 = pp1n1
pp2 = pp2n1
pp3 = pp3n1
pp4 = pp4n1
pp5 = pp5n1
print("Okay")
print(pokemon1)
elif to == 3:
if pokemon3[0] == 1 and pokemon3[1] == 0:
pokemon3 = [1,1,h3n,pp1n3,pp2n3,pp3n3,pp4n3,pp5n3,p3n,power3n]
print("Okay?")
h2n = hp
pp1n2 = pp1
pp2n2 = pp2
pp3n2 = pp3
pp4n2 = pp4
pp5n2 = pp5
mypower = power3n
pokemon2 = [1,0,h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2,p2n,power2n]
hp = h3n
pp1 = pp1n3
pp2 = pp2n3
pp3 = pp3n3
pp4 = pp4n3
pp5 = pp5n3
print("Okay")
print(pokemon3)
elif to == 4:
if pokemon4[0] == 1 and pokemon4[1] == 0:
pokemon4 = [1,1,h4n,pp1n4,pp2n4,pp3n4,pp4n4,pp5n4,p4n,power4n]
print("Okay?")
h2n = hp
pp1n2 = pp1
pp2n2 = pp2
pp3n2 = pp3
pp4n2 = pp4
pp5n2 = pp5
mypower = power4n
pokemon2 = [1,0,h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2,p2n,power2n]
hp = h4n
pp1 = pp1n4
pp2 = pp2n4
pp3 = pp3n4
pp4 = pp4n4
pp5 = pp5n4
print("Okay")
print(pokemon4)
elif to == 5:
if pokemon5[0] == 1 and pokemon5[1] == 0:
pokemon5 = [1,1,h5n,pp1n5,pp2n5,pp3n5,pp4n5,pp5n5,p5n,power5n]
print("Okay?")
h2n = hp
pp1n2 = pp1
pp2n2 = pp2
pp3n2 = pp3
pp4n2 = pp4
pp5n2 = pp5
mypower = power5n
pokemon2 = [1,0,h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2,p2n,power2n]
hp = h5n
pp1 = pp1n5
pp2 = pp2n5
pp3 = pp3n5
pp4 = pp4n5
pp5 = pp5n5
print("Okay")
print(pokemon5)
elif to == 6:
if pokemon6[0] == 1 and pokemon6[1] == 0:
pokemon6 = [1,1,h6n,pp1n6,pp2n6,pp3n6,pp4n6,pp5n6,p6n,power6n]
print("Okay?")
h2n = hp
pp1n2 = pp1
pp2n2 = pp2
pp3n2 = pp3
pp4n2 = pp4
pp5n2 = pp5
mypower = power6n
pokemon2 = [1,0,h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2,p2n,power2n]
hp = h6n
pp1 = pp1n6
pp2 = pp2n6
pp3 = pp3n6
pp4 = pp4n6
pp5 = pp5n6
print("Okay")
print(pokemon6)
else:
print("You have a max of 6 pokemon")
else:
print("Not in your inventory")
elif so == 3:
if pokemon3[0] == 1 and pokemon3[1] == 1:
if to == 1:
if pokemon1[0] == 1 and pokemon1[1] == 0:
pokemon1 = [1,1,h1n,pp1n1,pp2n1,pp3n1,pp4n1,pp5n1,p1n,power1n]
print("Okay?")
h3n = hp
pp1n3 = pp1
pp2n3 = pp2
pp3n3 = pp3
pp4n3 = pp4
pp5n3 = pp5
pokemon3 = [1,0,h3n,pp1n3,pp2n3,pp3n3,pp4n3,pp5n3,p3n,power3n]
hp = h1n
pp1 = pp1n1
pp2 = pp2n1
pp3 = pp3n1
pp4 = pp4n1
pp5 = pp5n1
print("Okay")
print(pokemon1)
elif to == 2:
if pokemon2[0] == 1 and pokemon2[1] == 0:
pokemon2 = [1,1,h2n,pp1n2,pp2n2,pp3n2,pp4n2,pp5n2,p2n,power2n]
print("Okay?")
h3n = hp
pp1n3 = pp1
pp2n3 = pp2
pp3n3 = pp3
pp4n3 = pp4
pp5n3 = pp5
pokemon3 = [1,0,h3n,pp1n3,pp2n3,pp3n3,pp4n3,pp5n3,p3n,power3n]
hp = h2n
pp1 = pp1n2
pp2 = pp2n2
pp3 = pp3n2
pp4 = pp4n2
pp5 = pp5n2
print("Okay")
print(pokemon2)
elif to == 4:
if pokemon4[0] == 1 and pokemon4[1] == 0:
pokemon4 =[1,1,h4n,pp1n4,pp2n4,pp3n4,pp4n4,pp5n4,p4n,power4n]
print("Okay?")
h3n = hp
pp1n3 = pp1
pp2n3 = pp2
pp3n3 = pp3
pp4n3 = pp4
pp5n3 = pp5
pokemon3 = [1,0,h3n,pp1n3,pp2n3,pp3n3,pp4n3,pp5n3,p3n,power3n]
hp = h4n
pp1 = pp1n4
pp2 = pp2n4
pp3 = pp3n4
pp4 = pp4n4
pp5 = pp5n4
print("Okay")
print(pokemon4)
elif to == 5:
if pokemon5[0] == 1 and pokemon5[1] == 0:
pokemon5 = [1,1,h5n,pp1n5,pp2n5,pp3n5,pp4n5,pp5n5,p5n,power5n]