Esempio n. 1
0
 def __init__(this, quantity=1):
     super().__init__(
         "Gross Souvenier", "consumable", 25,
         display.add_newlines(
             "A gross bit of a monster. Just get rid of it."), quantity, {
                 "icon":
                 " \\bg\\fr~*\n\\bx\\fw \\bg\\fr@\\bx\\fw \n\\bg\\fr/|\\\\"
             })
Esempio n. 2
0
    def update(this, delta_time):
        "Talks to player if they're standing next to it."
        for plr in world.players:
            if plr.X + 1 >= this.X and plr.X - 1 <= this.X and plr.Y + 1 >= this.Y and plr.Y - 1 <= this.Y:
                if plr not in this.attributes[
                        "talking_players"]:  # Not talking to them already
                    diag = copy.deepcopy(this.attributes["dialogue"])
                    diag.linked_player = plr
                    if not player_flags.get_flag(
                            plr, player_flags.TUT_MONEY_GIVEN
                    ):  # Don't have tut money, so give it
                        diag.nodes[
                            "start"].text += "\nYou're new. Take this money.\nUse it to buy some gear\n at the (\\fyM\\fw) Merchant"
                        diag.nodes["start"].options = [("Thanks!", "money")]
                    elif tutorial_quest_items.any_rare_reward(
                    ) in plr.attributes["items"]:
                        diag.nodes["start"].text += "\n" + display.add_newlines(
                            "Hey, what's that gross monster bit you have? You really shouldn't hold on to that. \nLet me take it off your hands."
                        )
                        diag.nodes["start"].options = [("Sure", "give_reward"),
                                                       ("No thanks", "exit")]
                    elif plr.attributes["level"] < 5:
                        diag.nodes[
                            "start"].text += "\nGo to the (\\fb0\\fw) portal at\n the right.\nCome back when you're\n stronger."
                    else:
                        diag.nodes[
                            "start"].text += "\nNice job!\nGo to the " + this.attributes[
                                "next_portal"] + " portal\n for a bigger challenge."
                    this.attributes["talking_players"][plr] = diag

        left_players = []
        for plr, diag in this.attributes["talking_players"].items():
            if plr.X + 1 >= this.X and plr.X - 1 <= this.X and plr.Y + 1 >= this.Y and plr.Y - 1 <= this.Y and plr in world.players:
                diag.run()
            else:
                left_players.append(plr)

        for gone in left_players:
            del this.attributes["talking_players"][gone]
            gone.attributes["current_menu"] = None

        if ("HP" in this.attributes) and (this.attributes["HP"] <= 0):
            world.to_del.append(this)
Esempio n. 3
0
 def __init__(this, quantity=1):
     super().__init__("Oops", "consumable", 10,
                      display.add_newlines("Huh? You shouldn't have this."),
                      quantity, {"icon": "   \n   \n   "})
Esempio n. 4
0
 def __init__(this, quantity=1):
     super().__init__(
         "Slime tea", "consumable", 10,
         display.add_newlines("A tea made of gross slime. Don't drink it."),
         quantity, {"icon": "|\\fg~\\fw|\n|\\fx\\bg#\\fw\\bx|\n\\\\_/"})
Esempio n. 5
0
 def __init__(this, quantity=1):
     super().__init__(
         "What not to collect", "consumable", 25,
         display.add_newlines(
             "Gives +5 luck permanately. One usable per player."), quantity,
         {"icon": "\\fy|==\n|==\n|==\\fw"})
Esempio n. 6
0
 def __init__(this, quantity = 1):
     super().__init__("What not to collect", "consumable", 25, display.add_newlines("Gives +5 luck permanately. One usable per player."), quantity, {"icon" : "\\fy|==\n|==\n|==\\fw"})
Esempio n. 7
0
 def __init__(this, quantity = 1):
     super().__init__("Gross Souvenier", "consumable", 25, display.add_newlines("A gross bit of a monster. Just get rid of it."), quantity, {"icon" : " \\bg\\fr~*\n\\bx\\fw \\bg\\fr@\\bx\\fw \n\\bg\\fr/|\\\\"})
Esempio n. 8
0
 def __init__(this, quantity = 1):
     super().__init__("Oops", "consumable", 10, display.add_newlines("Huh? You shouldn't have this."), quantity, {"icon" : "   \n   \n   "})
Esempio n. 9
0
 def __init__(this, quantity = 1):
     super().__init__("Slime tea", "consumable", 10, display.add_newlines("A tea made of gross slime. Don't drink it."), quantity, {"icon" : "|\\fg~\\fw|\n|\\fx\\bg#\\fw\\bx|\n\\\\_/"})