Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 146 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
5b7ba6d
Setting up GitHub Classroom Feedback
github-classroom[bot] Apr 26, 2024
e9151d1
Penambahan fungsi LCG
bukananda Apr 28, 2024
386636b
Pengubahan bitnya
bukananda Apr 28, 2024
d4b5243
Pengubahan bit
bukananda Apr 28, 2024
0e7c82f
docs : adding of inital csvs
kirisame-ame Apr 28, 2024
e63fded
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
kirisame-ame Apr 28, 2024
7b32e8b
Memasukkan menu dan help
bukananda Apr 29, 2024
e6def22
Memasukkan menu dan help
bukananda Apr 29, 2024
67703cc
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
bukananda Apr 29, 2024
74d11c3
Modifikasi sedikit pada menu_help
bukananda Apr 29, 2024
93bab3d
Perubahan Algoritma LCG
bukananda Apr 30, 2024
20efb10
Perubahan Algoritma LCG
bukananda Apr 30, 2024
73540dc
Add files via upload
wisadinutama Apr 30, 2024
d8984d6
Delete data/danville_map.py
wisadinutama Apr 30, 2024
d34f7f5
docs : adding of danville map
wisadinutama Apr 30, 2024
7acd2e5
refactor : changed the argument of functions
wisadinutama Apr 30, 2024
2358b95
fix : new init folder for beginning states
kirisame-ame Apr 30, 2024
cb47550
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
kirisame-ame Apr 30, 2024
8f6ba70
feat : load function
kirisame-ame Apr 30, 2024
2116f89
Upload Login(F02) and Logout(F03)
MFalihR May 1, 2024
3e8f52c
fix : csv_reader now reads last column
kirisame-ame May 1, 2024
efc5187
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
kirisame-ame May 1, 2024
daad6cc
Add files via upload
feodorashanice May 5, 2024
b4e5d86
feat: add new function "menu_help"
bukananda May 5, 2024
d210d15
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
bukananda May 5, 2024
ec9dbe3
fix : Last Row now appends
kirisame-ame May 6, 2024
e9c8fbe
feat: Penambahan fitur monster_manage
bukananda May 6, 2024
7d76531
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
bukananda May 6, 2024
4f5799f
fix: penghapusan file dummy
bukananda May 6, 2024
10b91ad
fix: penghapusan file dummy
bukananda May 6, 2024
0aa0c8d
fix: Perbaikan pada file "monster_manage"
bukananda May 6, 2024
050afd3
refactor: Menggantikan fungsi validasi menjadi .isdigit()
bukananda May 7, 2024
91e9949
feat: Penambahan fungsi tabel()
bukananda May 7, 2024
e93284a
fix : load handles existence of blank line at End of File
kirisame-ame May 9, 2024
5e975e5
feat : save function implementation
kirisame-ame May 9, 2024
c95aa9d
fix : init save files has blank line at EoF
kirisame-ame May 9, 2024
27019b4
feat : new save files from save testing
kirisame-ame May 9, 2024
2d9c21e
style : add comments and PEP8 formatted
kirisame-ame May 9, 2024
b4ee9ef
fix: Perubahan jenis seed lcg
bukananda May 9, 2024
54887f6
feat: penambahan fitur battle dan monster algoritma
bukananda May 10, 2024
0ebe419
feat: Penambahan aksi Attack
bukananda May 10, 2024
9a9197e
feat: added shop.py
May 10, 2024
1b2c0d9
refactor: Perubahan parameter fungsi dan penambahan comment
bukananda May 11, 2024
c302399
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
bukananda May 11, 2024
f542913
feat: inventory
MFalihR May 11, 2024
44044b2
feat: Penambahan fitur potion dan penambahan fitur pada battle
bukananda May 11, 2024
2583f5d
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
bukananda May 11, 2024
7cfaf1a
fix: Kesalahan saat menambahkan O.W.C.A coin
bukananda May 11, 2024
f401d38
fix: inventory function and testing
MFalihR May 14, 2024
7e541ad
fix: inventory function and testing it
MFalihR May 14, 2024
e9c4775
feat: function to convert real values (integer)
MFalihR May 14, 2024
601a671
feat: add new print if there is'nt anany inventory user have
MFalihR May 14, 2024
ac79707
update register.py
feodorashanice May 14, 2024
ae9fa70
refactor : change input type and PEP8 compliant
kirisame-ame May 14, 2024
a3c3d80
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
kirisame-ame May 14, 2024
74aaab4
fix : int columns converted to str
kirisame-ame May 14, 2024
c13841f
fix : added sys.path to ease imports
kirisame-ame May 14, 2024
cc7d90f
feat : added new ascii art
kirisame-ame May 14, 2024
216d7e4
feat : added gacha mechanic
kirisame-ame May 14, 2024
e0854ef
styling : ryou ascii edit
kirisame-ame May 14, 2024
1ffb144
fix : restructured gains out of else
kirisame-ame May 14, 2024
7e4bbc4
feat: added lab.py
May 15, 2024
a3aab61
feat : exit func
kirisame-ame May 16, 2024
54d667c
fix : register overhaul fix
kirisame-ame May 16, 2024
7442e2c
fix : improved load code
kirisame-ame May 16, 2024
fe0e5df
fix : overhaul fix of login func
kirisame-ame May 16, 2024
5365ca5
feat : function implementations
kirisame-ame May 16, 2024
ed9a1a1
fix : capitalization handled in login and register
kirisame-ame May 16, 2024
9c05528
style : added comments
kirisame-ame May 16, 2024
2224a15
fix : login/register returns username
kirisame-ame May 16, 2024
2e8d721
fix : changed how the menu&help func works
kirisame-ame May 16, 2024
df059b6
style : reformatting
kirisame-ame May 16, 2024
1bc2a15
fix : renamed UI
kirisame-ame May 16, 2024
8d2bc79
fix : exit_kill now kills program
kirisame-ame May 16, 2024
14b7325
fix : removed loading
kirisame-ame May 16, 2024
bd6384b
style : restyling ui
kirisame-ame May 16, 2024
fc42bbc
fix : code will return on any condition
kirisame-ame May 16, 2024
5b3c76a
fix : logout overhaul
kirisame-ame May 16, 2024
74c2c60
docs : test_data changed as test
kirisame-ame May 16, 2024
0c2f7c9
refactor : input uses upper
kirisame-ame May 16, 2024
9e2057e
feat : main.py now implements several functions
kirisame-ame May 16, 2024
32c5b06
Add files via upload
feodorashanice May 17, 2024
7867e57
feat: arena function
MFalihR May 18, 2024
4770b53
fix: stop testing in battle
MFalihR May 18, 2024
e5c92d1
fix: Penambahan algoritma pada main.py
bukananda May 18, 2024
164f788
Merge pull request #2 from Labpro-21/branch_battle
bukananda May 18, 2024
4023153
fix: Penambahan algoritma monster_manage pada main
bukananda May 18, 2024
b3ac1c9
update management_shop.py
feodorashanice May 18, 2024
d5ec1a3
fix : temporary shop_manage fix
kirisame-ame May 19, 2024
1530387
fix: Perbaikan algoritma tabel
bukananda May 19, 2024
f00e12c
fix: fix bug validation in battle-arena
MFalihR May 19, 2024
60fbdd6
fix: Perubahan algoritma pada main dan shop
bukananda May 19, 2024
ead0ec8
fix: Perbaikan pada arena dan shop
bukananda May 19, 2024
98276ca
style : reformatting of main
kirisame-ame May 19, 2024
73616d3
style : reformatting inventory
kirisame-ame May 19, 2024
c8df14a
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
May 19, 2024
c94b940
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
May 19, 2024
fd92b75
fix : wrong key on register
kirisame-ame May 19, 2024
94f8e63
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
kirisame-ame May 19, 2024
78951d7
fix : looped whole main
kirisame-ame May 19, 2024
4682d65
fix: bug because use (tanda petik ganda) in f-string
MFalihR May 19, 2024
aea655f
style : reformatting mons_manage
kirisame-ame May 19, 2024
c856a3b
fix : Update and rename Logout.py to logout.py
kirisame-ame May 19, 2024
67fa39c
fix : Update and rename Login.py to login.py
kirisame-ame May 19, 2024
fc0bc72
fix: bug issue in inventory if input string in id
MFalihR May 19, 2024
5e19ca8
feat: fixed lab.py so that it can be called succesfully in main
wisadinutama May 19, 2024
83d4a0a
feat: fixed a couple of mislabelled variable
wisadinutama May 19, 2024
ef8b77d
feat: added code to call lab.py
wisadinutama May 19, 2024
4899d56
fix : readded while True
kirisame-ame May 19, 2024
95fc7b9
fix: Perbaikan pada algoritma battle
bukananda May 19, 2024
7842dbc
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
bukananda May 19, 2024
7f682f3
fix : jackpot now shows total gains/losses
kirisame-ame May 19, 2024
37b05ce
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
kirisame-ame May 19, 2024
04d5a7d
style : gacha roll add space
kirisame-ame May 19, 2024
e30b781
fix : casted oc to int
kirisame-ame May 19, 2024
259fc26
fix : shop_management final fix
kirisame-ame May 19, 2024
c408b41
style : battle rearranging
kirisame-ame May 19, 2024
35eb1c0
style : lab reformatting
kirisame-ame May 19, 2024
d7bdc23
style : shop reformatting
kirisame-ame May 19, 2024
440d8ef
fix : shop final fix
kirisame-ame May 19, 2024
d4dddd7
fix : added price count before confirmation
kirisame-ame May 19, 2024
3a2e714
feat: adjusted shop.py conditionals and ui
wisadinutama May 19, 2024
d7b87cc
feat: adjusted ui
wisadinutama May 19, 2024
4e13fb1
feat: minor adjustment
wisadinutama May 19, 2024
47f0248
feat: minor adjustment
wisadinutama May 19, 2024
fcc0a21
style : changed init data
kirisame-ame May 19, 2024
6c3398c
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
kirisame-ame May 19, 2024
b9c07f7
style : changed data names in init
kirisame-ame May 19, 2024
d962c37
fix : shop re-fix
kirisame-ame May 19, 2024
ce02046
fix : lab re-fix
kirisame-ame May 19, 2024
e64a866
fix:change code in battle.py so it can use in arena too
MFalihR May 19, 2024
1034a7f
fix: bug in select_monster
MFalihR May 20, 2024
64cee10
fix : changed arguments passed to battle
kirisame-ame May 20, 2024
629a063
fix : out of index fixed
kirisame-ame May 20, 2024
a9f491c
fix: database error in battle and arena
MFalihR May 20, 2024
9d0a732
fix : middle delete index fix
kirisame-ame May 20, 2024
137e7c2
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
kirisame-ame May 20, 2024
b12bb6a
fix: remova database testing and unused import
MFalihR May 20, 2024
cf434bb
style : cleanup
kirisame-ame May 20, 2024
a90084a
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
kirisame-ame May 20, 2024
5c81386
docs: added laporanTB_K08-C
wisadinutama May 20, 2024
c5d9a83
Add files via upload
feodorashanice May 20, 2024
6d0ca8e
fix : fix unfinished
kirisame-ame May 20, 2024
19f928f
Merge branch 'main' of https://github.com/Labpro-21/if1210-2024-tubes…
kirisame-ame May 20, 2024
1044455
fix : final fix shop_manage
kirisame-ame May 20, 2024
8495e10
Update README.md
kirisame-ame May 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,12 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
#.idea/
.idea/workspace.xml
.idea/vcs.xml
.idea/modules.xml
.idea/misc.xml
.idea/inspectionProfiles/profiles_settings.xml
.idea/if1210-2024-tubes-k08-c.iml
data/init/test_extract_csv.py
data/init/load test.py
Binary file added IF1210_LaporanTB_K08-C.pdf
Binary file not shown.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
> Tugas Besar - IF1210 Dasar Pemrograman 2024

# About

A game about monsters
# Contributors

# Features

# How to Run
# How to Run
run python main.py {load_folder}
6 changes: 6 additions & 0 deletions data/init/item_inventory.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
user_id;type;quantity
2;strength;5
2;resilience;3
3;resilience;7
4;healing;3
5;strength;20
4 changes: 4 additions & 0 deletions data/init/item_shop.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type;stock;price
strength;10;50
resilience;5;30
healing;3;20
7 changes: 7 additions & 0 deletions data/init/monster.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
id;type;atk_power;def_power;hp
1;Daz;200;20;600
2;Peroro;50;50;1200
3;Todome;300;20;300
4;Bozaro;99;15;800
5;Ordos;123;45;678
6;Bruaka;68;32;750
8 changes: 8 additions & 0 deletions data/init/monster_inventory.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
user_id;monster_id;level
2;1;1
3;2;2
3;3;1
4;4;1
5;5;5
6;3;1
7;6;5
6 changes: 6 additions & 0 deletions data/init/monster_shop.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
monster_id;stock;price
1;10;500
2;4;700
3;3;1000
4;8;550
5;7;600
8 changes: 8 additions & 0 deletions data/init/user.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
id;username;password;role;oc
1;Mr_Monogram;monogrammer77;admin;0
2;Asep_Spakbor;asepwow123;agent;9999
3;Agen_P;platypus123;agent;0
4;B4ngk1dd0ssss;bangkitganteng;agent;1337
5;Kenny_agen_rahasia;kribogeming55;agent;6699
6;mr_beat;sabskrep;agent;99999
7;kawakaze;azure;agent;3000
6 changes: 6 additions & 0 deletions data/test_save/item_inventory.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
user_id;type;quantity
2;strength;5
2;resilience;3
3;resilience;7
4;healing;3
5;strength;20
4 changes: 4 additions & 0 deletions data/test_save/item_shop.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type;stock;price
strength;10;50
resilience;5;30
healing;3;20
7 changes: 7 additions & 0 deletions data/test_save/monster.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
id;type;atk_power;def_power;hp
1;Daz;200;20;600
2;Peroro;50;50;1200
3;Todome;300;20;300
4;Bozaro;99;15;800
5;Ordos;123;45;678
6;Bruaka;68;32;750
8 changes: 8 additions & 0 deletions data/test_save/monster_inventory.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
user_id;monster_id;level
2;1;1
3;2;2
3;3;1
4;4;1
5;5;5
6;3;1
7;6;5
6 changes: 6 additions & 0 deletions data/test_save/monster_shop.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
monster_id;stock;price
1;10;500
2;4;700
3;3;1000
4;8;550
5;7;600
7 changes: 7 additions & 0 deletions data/test_save/user.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
id;username;password;role;oc
1;Mr_Monogram;monogrammer77;admin;0
2;Asep_Spakbor;asepwow123;agent;10159
3;Agen_P;platypus123;agent;0
4;B4ngk1dd0ssss;bangkitganteng;agent;1337
5;Kenny_agen_rahasia;kribogeming55;agent;6699
6;sorasaki_hina;gehenna;agent;0
Binary file added doc/IF1210_LaporanTB_K08-C.docx
Binary file not shown.
82 changes: 82 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "src"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "data"))

import src.load as load
import src.save as save
import src.ascii_art as art
import src.jackpot as gacha
import src.register as register
import src.login as login
import src.exit_kill as exit_kill
import src.menu_help as menu
import src.logout as logout
import src.management_shop as shop_mng
import src.inventory as inv
import src.battle as bat
import src.monster_manage as mons_mng
import src.shop as shop
import src.arena as arena
import src.lab as lab

# data loading

user_data, monster_data, inv_item_data, inv_monster_data, shop_item_data, shop_monster_data = load.load_files()

while True:
# login phase
print("Before entering system, please Login/Register/Exit")
logged_in = False
logged_id = -999
logged_username = ""
while not logged_in:
login_choice = input("LOGIN / REGISTER / EXIT: ").upper()
if login_choice == "LOGIN":
logged_username, logged_id, logged_in, = login.login(user_data)
elif login_choice == "REGISTER":
logged_username, logged_id, logged_in, inv_monster_data \
= register.register_ui(user_data, monster_data, inv_monster_data)
elif login_choice == "EXIT":
exit_kill.exit_kill(user_data, monster_data, inv_item_data, inv_monster_data, shop_item_data, shop_monster_data)
else:
print("choose a valid option")
logged_status = user_data[logged_id - 1]['role']
# main game phase
while logged_in:
# coin refresher
logged_coin = int(user_data[logged_id - 1]['oc'])
print("Use the command 'HELP' to see available actions")
game_choice = input("").upper()
if logged_status == "admin":
if game_choice == "MONSTER":
mons_mng.ui_monster(monster_data)
if game_choice == "HELP":
menu.help_ui(logged_status, logged_username)
elif game_choice == "LOGOUT":
logout.logout()
break
elif game_choice == "SHOP":
if logged_status == "agent":
shop.shop(shop_monster_data, monster_data, inv_monster_data, shop_item_data, inv_item_data, user_data,
logged_id)
elif logged_status == "admin":
shop_item_data, shop_monster_data = shop_mng.shop_management(monster_data, shop_item_data,
shop_monster_data)
elif game_choice == "INVENTORY":
inv.inventory(logged_id, user_data, inv_item_data, inv_monster_data, monster_data)
elif game_choice == "LAB":
lab.laboratory(inv_monster_data, monster_data,user_data,logged_id)
elif game_choice == "BATTLE":
bat.battle(logged_id, user_data, inv_item_data, inv_monster_data, monster_data, 0, 0, [], 0, 0)
elif game_choice == "ARENA":
arena.arena(logged_id, user_data, inv_item_data, inv_monster_data, monster_data)
elif game_choice == "GACHA":
user_data, inv_monster_data = gacha.gacha(logged_id, logged_coin, user_data, monster_data, inv_monster_data)
elif game_choice == "SAVE":
save.save(user_data, monster_data, inv_item_data, inv_monster_data, shop_item_data, shop_monster_data)
elif game_choice == "EXIT":
exit_kill.exit_kill(user_data, monster_data, inv_item_data, inv_monster_data, shop_item_data, shop_monster_data)
else:
print("Enter a valid command")
12 changes: 12 additions & 0 deletions src/additionals/code_functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# fungsi untuk mengecek keberadaan suatu elemen dalam list of dictionaries
def exist(list_of_dict,n,category):
for i in range(len(list_of_dict)):
if list_of_dict[i][category] == n:
return True
return False

# fungsi untuk mengembalikan indeks dari suatu elemen yang dicari dalam list of dictionaries
def index(list_of_dict,n,category):
for i in range(len(list_of_dict)):
if list_of_dict[i][category] == n:
return i
5 changes: 5 additions & 0 deletions src/additionals/design_functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# fungsi untuk membuat textbox (hiasan)
def textbox(text):
print("╔" + "═"*(len(text)+2) + "╗")
print("║" + " " + text + " " + "║")
print("╚" + "═"*(len(text)+2) + "╝")
70 changes: 70 additions & 0 deletions src/arena.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import battle
import monster
import potion
import lcg




# REALISASI FUNGSI LAIN
def ui_arena(result:str,oc_received:int, stage:int,damage_dealt:int,damage_received:int):
def ui_stats(result:str,oc_received:int, stage:int,damage_dealt:int,damage_received:int):
if not(result == "menang"):
stage -= 1
print(f"""============== STATS ==============
Total hadiah : {oc_received} OC
Jumlah stage : {stage}
Damage diberikan : {damage_dealt}
Damage diterima : {damage_received}
""")
if result == "menang":
print(f"""STAGE CLEARED! Anda akan mendapatkan {oc_received} OC pada sesi ini!
""")
if stage == 5:
print("""Selamat, Anda berhasil menyelesaikan seluruh stage Arena !!!
""")
ui_stats(result,oc_received,stage,damage_dealt,damage_received)
else:
print(f"""Memulai stage berikutnya...
""")
elif result == "kalah":
print(f"""GAME OVER! Sesi latihan berakhir pada stage {stage}!
""")
ui_stats(result,oc_received,stage,damage_dealt,damage_received)
else: #result == 'quit'
ui_stats(result,oc_received,stage,damage_dealt,damage_received)

# PROGRAM UTAMA
def arena (user_id:int, user_data: list[dict], item_inventory: list[dict], monster_inventory: list[dict], monster : list[dict]):
print("""
Selamat datang di Arena!!
""")
list_monster_user = battle.user_id_monster(monster_inventory,user_id)
pilihan,list_player_monster,max_hp_player,base_hp_player = battle.select_monster(user_id,user_data,list_monster_user,monster)

stage = 1
damage_dealt = 0
damage_received = 0
oc_received = [0,20,50,90,140,200]
while True and stage <= 5:
print(f"""
============= STAGE {stage} =============""")
result,dmg_dealt,dmg_received = battle.battle(user_id,user_data,item_inventory,monster_inventory,monster,stage,pilihan,list_player_monster,max_hp_player,base_hp_player)
damage_dealt += dmg_dealt
damage_received += dmg_received
if result == "menang":
ui_arena(result,oc_received[stage],stage,damage_dealt,damage_received)
stage +=1
list_player_monster[2] = max_hp_player
elif result =="kalah":
ui_arena(result,oc_received[stage-1],stage,damage_dealt,damage_received)
return oc_received[stage-1]
break
else: #result == 'quit'
ui_arena(result,oc_received[stage-1],stage,damage_dealt,damage_received)
return oc_received[stage-1]
break
return oc_received[stage-1]

# TESTING
# print(arena('3',user,item_inventory,monster_inventory,monster_dict))
23 changes: 23 additions & 0 deletions src/ascii_art.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
def ryou_jackpot():
print("""
:- @@@*.+*#+***+%+=****=**#***#****%@@ #==== #
.. :::: @@@:=*#*+**+%*+*+*+***+* %@=%*****@@ .. # # # || #
--::: @@*#=+*+**+**++++%*++*@@#@ @*==*-*@% # # # # # || #
.: -@@-==*+***++=+*+@=+### *%@ @*****+%@# # # # # # #
:- .: @@@:+=%=***=@==. :::*% *#@+ @%%#*#=%@=. # ## ## @@ #
.: @-:=+*@=--=%@@@@@@@@@ :%@@ @@ %##+#@* + # # ====#
::...@#=#==. @@@@@ =====- .@@@ % @.#@%@# # # #########
:....@@=%--@@#-::+@ @ @ ======= @@ @ # # # #
.... :%:@.*%%+@@@*@ @::@ @ @ @@@ : --- # # ===# ##
:. .@.@ =@#:-=*@@ @:@ @@@ # ===# ##
. : *@@@@:@+==+=* +@@# # ===# ##
:. @@@@%@@@+=+*%@@@ --- @=@@
:.. @@@%%#@@*.:*% = .@@@@@@ :=. (ちょっとだけお金を借りしてもいい?)
. @@@@@@@@@@@%-% : +@@@@ .@@ @@@ @@ :.:
.. @@@@@ @@@@@ @@ @@@ = :=
:. @@@@@ @@%@@ :- @: @@: % .:
@@@@@: @@@@ @@ @@ + @ % * +
@@@@@@ :@ =@%@@ @ @@ . @ -
@@@@@@@ % @%@@ @= @ @@ .... =@@ @
%+*=- @:-@ % @ *-:#*
""")
Loading