Ejemplo n.º 1
0
    def test_take_all_does_not_take_items_that_are_not_discovered(self):
        desk = Surface(self.game, "desk")
        desk.inv_item = False
        desk.desc_reveal = False  # don't reveal the contents with "look"
        desk.moveTo(self.start_room)
        hat = Thing(self.game, "hat")
        hat.moveTo(desk)

        self.game.turnMain("l")
        self.game.turnMain("take all")

        self.assertTrue(self.game.me.containsItem(hat))
Ejemplo n.º 2
0
    def test_take_all_takes_known_objects_from_sub_locations(self):
        desk = Surface(self.game, "desk")
        desk.inv_item = False
        desk.desc_reveal = True
        desk.moveTo(self.start_room)
        hat = Thing(self.game, "hat")
        hat.moveTo(desk)

        self.game.turnMain("l")
        self.game.turnMain("take all")

        self.assertTrue(self.game.me.containsItem(hat))