Skip to content

Commit

Permalink
slight modifacation to the game
Browse files Browse the repository at this point in the history
  • Loading branch information
HungerGames682 committed Nov 28, 2022
1 parent f2bbc8d commit 5de2079
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 276 deletions.
11 changes: 9 additions & 2 deletions Level_builderv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,17 @@ def damageswitch(damage):
# Switches the type of interactibel it is or something
def typeswitch(type):
if type == "Chest":
type = "Null"
type = "Wall"

elif type == "Wall":
type = "Door"

elif type == "Null":
elif type == "Door":
type = "Chest"




typeicon.clear()
typeicon.write("Type is " + type)
return type
Expand Down
31 changes: 0 additions & 31 deletions colli.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,3 @@
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
39 changes: 4 additions & 35 deletions color.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,4 @@
red
red
red
yellow
yellow
blue
blue
blue
blue
blue
blue
blue
blue
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
yellow
brown
brown
brown
black
72 changes: 5 additions & 67 deletions cords.txt
Original file line number Diff line number Diff line change
@@ -1,70 +1,8 @@
80
0
40
-90
-80
-90
-170
-90
-170
20
20
130
-20
130
-50
130
-80
130
-10
150
-10
170
-10
190
-10
210
210
110
210
-190
160
-190
100
210
90
210
80
210
70
210
60
210
50
210
40
210
-190
30
210
20
210
10
210
0
210
-190
-20
210
-30
210
-50
210
-60
210
-80
210
-90
210
-110
210
-120
210
-140
210
-150
31 changes: 0 additions & 31 deletions damage.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,4 @@
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2 changes: 0 additions & 2 deletions level_1/colli.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
1
1
1
1
1
14 changes: 6 additions & 8 deletions level_1/color.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
red
blue
blue
blue
blue
yellow
yellow
green
green
red
red
red
red
red
red
30 changes: 13 additions & 17 deletions level_1/cords.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
-90
70
40
110
40
110
40
110
160
-80
0
0
-70
0
-110
-110
-200
-40
10
-40
90
20
0
-140
-50
-130
-70
-100
-70
-70
-70
2 changes: 0 additions & 2 deletions level_1/damage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
1
1
1
1
1
10 changes: 4 additions & 6 deletions level_1/lock.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
2
2
2
4
8
9
0
0
0
0
0
0
0
16 changes: 7 additions & 9 deletions level_1/type.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Chest
Chest
Chest
Chest
Chest
Chest
Chest
Null
Null
Wall
Wall
Wall
Wall
Wall
Wall
Wall
35 changes: 2 additions & 33 deletions lock.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,4 @@
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
9
9
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
item_holder = turtle.Turtle()
item_holder.penup()
item_holder.speed(10)
interact_dis = 50

sc = turtle.Screen()

Expand Down Expand Up @@ -380,6 +381,9 @@ def playermove(speed,movement,walkthrough, offset, stop,li,cur_health,level,pick
else:
# Lets you pick a lock if it is nearby
if keyboard.is_pressed("e"):

# Detects if you are close to a chest
if dis[0] <= interact_dis and dis[4] == "Chest\n":
fff = -1
new_picked_list = []
# Builds the list of locks that you have already picked
Expand All @@ -395,7 +399,7 @@ def playermove(speed,movement,walkthrough, offset, stop,li,cur_health,level,pick

chosen = min(new_picked_list)
# Gives you the item in the cheast if it does not have a lock or something
if dis[0] <= 24 and dis[4] == "Chest\n" and dis[5] == 0:
if dis[0] <= interact_dis and dis[4] == "Chest\n" and dis[5] == 0:
# Gives them items based on what is determined in the list
with open(chest_inventory,'r') as cinven:
give_what = cinven.readlines()
Expand Down Expand Up @@ -428,7 +432,7 @@ def playermove(speed,movement,walkthrough, offset, stop,li,cur_health,level,pick
break

# Detects if you have the lockpick in your inventory
if dis[0] <= 24 and dis[4] == "Chest\n" and dis[5] != 0:
if dis[0] <= interact_dis and dis[4] == "Chest\n" and dis[5] != 0:
if inventory[0] == lcok_pick_item_skin:


Expand Down
Loading

0 comments on commit 5de2079

Please sign in to comment.