Skip to content

Commit 727a1d2

Browse files
committed
Merge changes
2 parents 54473ab + e90ae28 commit 727a1d2

File tree

162 files changed

+9
-1809
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+9
-1809
lines changed

dungeon.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,8 @@ def __init__(self, tutorial=False, debug=False):
936936
else:
937937
self.drop_constant = 1
938938
while name_length == 0:
939-
name_length = self.get_name()
939+
name = self.get_name()
940+
name_length = name[0]
940941
if name_length == -1:
941942
warning = "Are you sure you want to close the window? (Hit escape to cancel, enter to confirm)"
942943
brlb.printf(self.screen_x//2 - len(warning)//2, self.screen_y//2 + 1, warning)
@@ -949,6 +950,9 @@ def __init__(self, tutorial=False, debug=False):
949950
elif key == brlb.TK_ESCAPE:
950951
name_length = 0
951952
break
953+
else:
954+
self.gamer = name[1]
955+
print(self.gamer)
952956
if name_length == -1:
953957
brlb.close()
954958
return
@@ -1029,7 +1033,7 @@ def descend(self, game_start=False):
10291033
elif not game_start:
10301034
self.dungeon = self.dungeons[self.dungeons.index(self.dungeon) + 1]
10311035
else:
1032-
self.dungeons.append(Dungeon(len(self.dungeons) + 1, name=self.dungeon_name))
1036+
self.dungeons.append(Dungeon(len(self.dungeons) + 1, name=self.dungeon_name, animate=False))
10331037
self.dungeon = self.dungeons[-1]
10341038
self.log.update()
10351039
self.log.log('Welcome to level {l} of '.format(l=self.dungeon.level) + self.dungeon.name)
@@ -1080,8 +1084,8 @@ def get_name(self):
10801084
brlb.color(brlb.color_from_argb(255, 255, 255, 255))
10811085
brlb.layer(2)
10821086
user_input = brlb.read_str(start_x, start_y, self.gamer, 24)
1083-
# print(user_input)
1084-
return user_input[0]
1087+
print(user_input)
1088+
return user_input
10851089
# brlb.refresh()
10861090

10871091

@@ -1669,7 +1673,7 @@ def on_move_events(self):
16691673
character.map_direction = "up"
16701674
if self.character.hp <= 0:
16711675
self.log.log(self.character.name.capitalize() + ' died')
1672-
self.log.log(self.character.name.capitalize() + ' killed ' + str(self.kills) + ' enemies')
1676+
self.log.log(self.character.name.capitalize() + ' killed ' + str(self.character.kills) + ' enemies')
16731677
self.end_game()
16741678
moved_ids = []
16751679
for item in self.inventory.items:

0 commit comments

Comments
 (0)