Prettier code

This commit is contained in:
Matyáš Caras 2022-05-16 15:59:06 +02:00
parent 71e430f61d
commit b9a3d5c5d4
2 changed files with 2 additions and 3 deletions

View file

@ -10,7 +10,7 @@ meta: # make sure every key is in lowercase
- wood_sword: - wood_sword:
atk: 1 atk: 1
starter: true starter: true
name: "Wooden Sword" name: "Wooden Sword"
- chainmail: - chainmail:
def: 2 def: 2
name: "Chainmail Armor" name: "Chainmail Armor"

View file

@ -151,13 +151,12 @@ class Game: # Hlavní třída, uchovává údaje o hře
sleep(3) sleep(3)
self.current = self.nodes[self.current]["actions"][0] # Přesune na první akci self.current = self.nodes[self.current]["actions"][0] # Přesune na první akci
self.print_text() self.print_text()
return
else: else:
# Hráč byl poražen TODO: Otestovat # Hráč byl poražen TODO: Otestovat
print(self.lang["defeat"].replace("$enemy",enemy["name"])) print(self.lang["defeat"].replace("$enemy",enemy["name"]))
sleep(3) sleep(3)
self.print_text() self.print_text()
return return
else: else:
m = MenuManager(actions_desc,self.parse_colors(self.nodes[self.current]["text"])) m = MenuManager(actions_desc,self.parse_colors(self.nodes[self.current]["text"]))
sel = m.selected sel = m.selected