Ejemplo n.º 1
0
    def create_item_by(self, being, name):
        first = name.strip().split(" ")[0]
        klass = Equipment.klass_by_name(first)
        third = name.strip().split(" of ")[1]
        stack = EquipmentStack.from_cls(klass, third)

        tile = self.tile_for(being)
        tile.inventory.append(stack)
        return stack
Ejemplo n.º 2
0
    def _create_player(self):
        player = Being(self.controller, Species("player"), is_player=True)

        # get everything!
        for klass in equipment_classes:
            for item in AttrReader.items_from_klass(klass):
                item = EquipmentStack.from_cls(klass, item.name)
                player.inventory.append(item)

        player.wizard = self.settings["model", "wizard"]

        return player