Example #1
0
    def on_yell(self, handler: Handler, player: Player, command_input: CommandInput, is_there_response=False):
        if player[EventsObject].knows_laura:
            super().on_yell(handler, player, command_input, False)
        else:
            super().on_yell(handler, player, command_input, True)
            player.send_message("You feel a hand go over your mouth.")
            player.send_message("You see a rock coming at your fa-")
            player.clear_screen()

            player.send_wait(1)
            laura = handler.get_livings(LauraPerson, 1)[0]
            laura.tell(player, "Who are you?")
            player.send_wait(0.5)
            laura.tell(player, Message("You have {}'s wallet! What did you do to them?",
                                       named_variables=[player[PlayerFriend]]))
            player.send_wait(0.3)
            player.tell(player, "He's my fri-")
            laura.tell(player, "Lies!")
            player.send_wait(1.2)
            player.clear_screen()

            player.send_wait(1)
            laura.tell(player, Message("Hi I'm {}. Sorry about that. Everything is cleared up now.",
                                       named_variables=[laura]))
            player[EventsObject].knows_laura = True  # make sure this code isn't run for the player again
            sword = Sword(SwordType.WOODEN)  # we just need this variable to reference in named_variables
            sword.change_holder(None, player.location)
            laura.tell(player, Message("How about for all your troubles I'll give you this {}. Take it.",
                                       named_variables=[sword]))
            Sword(SwordType.CHINESE_STEEL).change_holder(None, player.location)
Example #2
0
 def on_enter(self, player: Player, previous_location: Optional[Location], handler: Handler):
     self._send_welcome(player)
     if not player[EventsObject].been_introduced_to_furry:
         player.send_message("You hear screaming.")
         player.send_wait(0.3)
         player[PlayerFriend].tell(player, "H-Help me! This furry monster is chasing me!")
         player[PlayerFriend].tell(player,
                                   "Take my wallet! It's on the ground! Maybe you can distract it!")
         wallet = Wallet()
         penny = Coin.PENNY.create()
         wallet.change_holder(None, player.location)
         penny.change_holder(None, wallet)