diff --git a/pokete.py b/pokete.py index 5b2e0117..5298c12b 100755 --- a/pokete.py +++ b/pokete.py @@ -265,8 +265,8 @@ def attack(self, attac, enem): self.enem = enem enem.oldhp = enem.hp self.oldhp = self.hp - effectivity = 1.5 if enem.type.name in attac.type.effective else 0.5 if enem.type.name in attac.type.ineffective else 1 - n_hp = round((self.atc * attac.factor / (enem.defense if enem.defense > 1 else 1))*random.choices([0, 0.75, 1, 1.26], weights=[attac.miss_chance+self.miss_chance, 1, 1, 1], k=1)[0]*effectivity) + effectivity = 1.3 if enem.type.name in attac.type.effective else 0.5 if enem.type.name in attac.type.ineffective else 1 + n_hp = round((self.atc * attac.factor / (enem.defense if enem.defense >= 1 else 1))*random.choices([0, 0.75, 1, 1.26], weights=[attac.miss_chance+self.miss_chance, 1, 1, 1], k=1)[0]*effectivity) enem.hp -= n_hp if n_hp >= 0 else 0 if enem.hp < 0: enem.hp = 0 @@ -920,7 +920,7 @@ def roadmap(): global ev ev = "" mapbox.add(movemap, movemap.width-mapbox.width, 0) - [i for i in Station.obs if i.associate == [j for j in [figure.map, figure.oldmap] if j not in [centermap, playmap_5, playmap_9, playmap_10]][0]][0].choose() + [i for i in Station.obs if i.associate == [j for j in [figure.map, figure.oldmap] if j in [k.associate for k in Station.obs]][0]][0].choose() movemap.show() while True: if ev in ["'w'", "'a'", "'s'", "'d'"]: @@ -1448,6 +1448,11 @@ def recogniser(): playmap_13 = PlayMap(background=" ", height=35, width=70, name="playmap_13", pretty_name="Deepens forest", trainers = [Trainer("Citizen", "He", Poke("vogli", 600, player=False), [" < Hello fellow stranger!", " < This town is known for it's bird Poketes"], [" < Haha, you're bad!"], [" < I see you don't have a living Pokete"], [" < Damn!"], 5, 31),], poke_args = {"pokes": ["voglo", "vogli", "owol", "rato"], "minlvl": 300, "maxlvl": 480}) +playmap_14 = PlayMap(background=" ", height=15, width=30, name="playmap_14", pretty_name="Arena", + trainers = [Trainer("First trainer", "He", Poke("owol", 650, player=False), [" < Welcome to the Deepest forest Pokete Arena", " < I'm your first enemy!"], [" < Haha, you're bad!"], [" < I see you don't have a living Pokete"], [" < Good luck!"], 17, 10), + Trainer("Second trainer", "She", Poke("voglo", 700, player=False), [" < Now it's my turn!"], [" < Haha, you're bad!"], [" < I see you don't have a living Pokete"], [" < Good luck with the last trainer!"], 22, 10), + Trainer("Third trainer", "She", Poke("treenator", 750, player=False), [" < Let's see what Poketes else you have!"], [" < Haha, you're bad!"], [" < I see you don't have a living Pokete"], [" < Good luck with the last trainer!"], 22, 5), + Trainer("Last trainer", "He", Poke("ostri", 780, player=False), [" < I'm your last enemy!"], [" < Haha, you're bad!"], [" < I see you don't have a living Pokete"], [" < Oh!", " < You were able to defeat me?", " < You can now leave Deepest forest"], 17, 5)]) # mapmap mapbox = Box(11, 40, "Roadmap") diff --git a/pokete_data/__pycache__/maps.cpython-39.pyc b/pokete_data/__pycache__/maps.cpython-39.pyc index c8b5a756..26344322 100644 Binary files a/pokete_data/__pycache__/maps.cpython-39.pyc and b/pokete_data/__pycache__/maps.cpython-39.pyc differ diff --git a/pokete_data/maps.py b/pokete_data/maps.py index befdd7b1..edb9e6bc 100644 --- a/pokete_data/maps.py +++ b/pokete_data/maps.py @@ -1337,6 +1337,16 @@ "y": 34, "args": '{"map": playmap_12, "x": 72, "y": 1}' }, + "dor_playmap_14_1": { + "x": 32, + "y": 4, + "args": '{"map": playmap_14, "x": 14, "y": 13}' + }, + "dor_playmap_14_2": { + "x": 33, + "y": 4, + "args": '{"map": playmap_14, "x": 15, "y": 13}' + }, }, "balls": { "ball_1": { @@ -1353,6 +1363,42 @@ }, } }, + "playmap_14": { + "hard_obs": { + "inner_walls": { + "x": 2, + "y": 1, + "txt": """ +___________________________ +|__________| |___________| +| | +| | +| | +|____________________ | +|___________________| | +| | +| | +| | +|___________ ____________| +|__________| |___________|"""}, + }, + "soft_obs": { + }, + "dors": { + "dor_playmap_13_1": { + "x": 14, + "y": 14, + "args": '{"map": playmap_13, "x": 32, "y": 5}' + }, + "dor_playmap_13_2": { + "x": 15, + "y": 14, + "args": '{"map": playmap_13, "x": 33, "y": 5}' + }, + }, + "balls": { + } + }, } if __name__ == "__main__":