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

Edited grammar and spelling #130

Merged
merged 19 commits into from
Jun 11, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
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
58 changes: 29 additions & 29 deletions pokete.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ def playmap_17_boy(npc):
if "choka" in [i.identifier for i in figure.pokes[:6]]:
npc.text([" < Oh, cool!", " < You have a Choka!",
" < I've never seen one before!",
" < Here you go, 200$"])
" < Here you go, have $200!"])
if ask_bool(mvp.movemap,
"Young boy gifted you 200$. Do you want to accept it?"):
"Young boy gifted you $200. Do you want to accept it?"):
figure.add_money(200)
npc.set_used()
else:
npc.text([" < In this region lives the würgos Pokete.",
npc.text([" < In this region lives the Würgos Pokete.",
f" < At level {p_data.pokes['würgos']['evolve_lvl']} \
it evolves to Choka.",
It evolves into Choka.",
" < I have never seen one before!"])

@staticmethod
Expand All @@ -109,7 +109,7 @@ def playmap_50_npc_29(npc):
npc.text([" < Here you can leave one of your Poketes for some time \
and we will train it."])
if ask_bool(mvp.movemap, "Do you want to put a Pokete into the \
Pokete-Care"):
Pokete-Care?"):
if (index := deck.deck(6, "Your deck", True)) is not None:
pokete_care.poke = figure.pokes[index]
pokete_care.entry = timer.time.time
Expand All @@ -135,7 +135,7 @@ def playmap_50_npc_29(npc):
def playmap_23_npc_8(npc):
"""Interaction with npc_8"""
if ask_bool(mvp.movemap,
"The man gifted you 100$. Do you want to accept it?"):
"The man gifted you $100. Do you want to accept it?"):
npc.set_used()
figure.add_money(100)

Expand Down Expand Up @@ -191,35 +191,35 @@ def playmap_42_npc_21(npc):
if i.lvl() >= 50 and i.identifier == "mowcow"]
if len(poke_list) > 0:
poke = poke_list[0]
npc.text([" < Oh great!", " < You're my saviour!",
npc.text([" < Oh great!", " < You're my hero!",
f" < You brought me a level {poke.lvl()} Mowcow!",
" < I'm thanking you!",
" < Now I can still serve the best MowCow-Burgers!",
" < Now I can still serve the best Mowcow-Burgers!",
bubstance marked this conversation as resolved.
Show resolved Hide resolved
" < Can I have it?"])
if ask_bool(mvp.movemap,
"Do you want to give your Mowcow to the cook?"):
figure.pokes[figure.pokes.index(poke)] = Poke("__fallback__", 0)
npc.text([" < Here you go, 1000$"])
npc.text([" < Here you go, have $1000!"])
if ask_bool(mvp.movemap,
"The cook gifted you 1000$. "
"The cook gifted you $1000. "
"Do you want to accept it?"):
figure.add_money(1000)
npc.set_used()
else:
npc.text([" < Ohhh man...", " < All of our beef is empty...",
" < How are we going to serve the best MowCow-Burgers "
" < How are we going to serve the best Mowcow-Burgers "
"without beef?",
" < If only someone here could bring me a fitting "
"Mowcow!?",
" < But it has to be at least on level 50, to fit our "
" < But it has to be at least on level 50 to meet our "
"high quality standards.",
" < I will pay a good price!"])

@staticmethod
def playmap_39_npc_25(npc):
"""Interaction with npc_25"""
if not NPC.get("Sebastian the leader").used:
npc.text([" < I can't let you go.",
if not NPC.get("Leader Sebastian").used:
npc.text([" < I can't let you go!",
" < You first have to defeat our arena leader!"])
figure.set(figure.x + 1, figure.y)
else:
Expand Down Expand Up @@ -317,7 +317,7 @@ def __init__(self, _he, _wi):
self.trader = NPC("trader",
[" < I'm a trader.",
" < Here you can trade one of your Poketes for \
another players' one."],
one from another trainer."],
"swap_poke")
# adding
self.dor_back1.add(self, int(self.width / 2), 8)
Expand Down Expand Up @@ -402,7 +402,7 @@ def set_args(self, _si):
def add_money(self, money):
"""Adds money
ARGS:
money: Amount of money beeing added"""
money: Amount of money being added"""
self.set_money(self.__money + money)

def get_money(self):
Expand All @@ -415,12 +415,12 @@ def set_money(self, money):
"""Sets the money to a certain value
ARGS:
money: New value"""
assert money >= 0, "money has to be positive"
logging.info("[Figure] Money set to %d$ from %d$",
assert money >= 0, "Money has to be positive."
logging.info("[Figure] Money set to $%d from $%d",
money, self.__money)
self.__money = money
for cls in [inv, buy]:
cls.money_label.rechar(str(self.__money) + "$")
cls.money_label.rechar("$" + str(self.__money))
bubstance marked this conversation as resolved.
Show resolved Hide resolved
cls.box.set_ob(cls.money_label,
cls.box.width - 2 - len(cls.money_label.text), 0)

Expand All @@ -444,7 +444,7 @@ def add_poke(self, poke, idx=None):

def give_item(self, item, amount=1):
"""Gives an item to the player"""
assert amount > 0, "Amounts have to be positive"
assert amount > 0, "Amounts have to be positive."
bubstance marked this conversation as resolved.
Show resolved Hide resolved
if item not in self.inv:
self.inv[item] = amount
else:
Expand All @@ -464,10 +464,10 @@ def remove_item(self, item, amount=1):
ARGS:
item: Generic item name
amount: Amount of items beeing removed"""
assert amount > 0, "Amounts have to be positive"
assert item in self.inv, f"Item {item} is not in the inventory"
assert amount > 0, "Amounts have to be positive."
bubstance marked this conversation as resolved.
Show resolved Hide resolved
assert item in self.inv, f"Item {item} is not in the inventory."
bubstance marked this conversation as resolved.
Show resolved Hide resolved
assert self.inv[item] - amount >= 0, f"There are not enought {item}s \
in the inventory"
in the inventory."
bubstance marked this conversation as resolved.
Show resolved Hide resolved
self.inv[item] -= amount
logging.info("[Figure] %d %s(s) removed", amount, item)

Expand Down Expand Up @@ -748,7 +748,7 @@ def save():


def read_save():
"""Reads form savefile
"""Reads from savefile
RETURNS:
session_info dict"""
Path(HOME + SAVEPATH).mkdir(parents=True, exist_ok=True)
Expand Down Expand Up @@ -1047,12 +1047,12 @@ def intro():
"Welcome to Pokete!\nPlease choose your name!\n",
"Name:", "", "Name", 17)
mvp.movemap.name_label_rechar(figure.name)
mvp.movemap.text(4, 3, [" < Hello my child.",
mvp.movemap.text(4, 3, [" < Hello, my child.",
" < You're now ten years old.",
" < And I think it's now time for you to travel \
" < I think it's now time for you to travel \
the world and be a Pokete-trainer.",
" < Therefore I give you this powerfull 'Steini', \
15 'Poketeballs' to catch Poketes and a "
" < Therefore, I give you this powerful 'Steini', \
15 'Poketeballs' to catch Poketes, and a "
"'Healing potion'.",
" < You will be the best Pokete-Trainer in Nice \
town.",
Expand All @@ -1072,7 +1072,7 @@ def parse_obj(_map, name, obj, _dict):


def gen_obs():
"""Genrates all objests on the maps"""
"""Generates all objects on the maps"""
map_data = p_data.map_data
npcs = p_data.npcs
trainers = p_data.trainers
Expand Down
Loading