Ejemplo n.º 1
0
 def __init__(self, name="BobDwarf19", explo_class=None):
     self.name = name
     self.party = list()
     self.scene = None
     self.entrance = None
     self.destination = None
     self.contents = container.ContainerList()
     self.scripts = container.ContainerList()
     self.uniques = set()
     self.explo_class = explo_class
Ejemplo n.º 2
0
 def __init__( self, name = "BobDwarf19", scene=None, entrance=None, xp_scale = 0.65 ):
     self.name = name
     self.party = list()
     self.graveyard = list()
     self.scene = scene
     self.entrance = entrance
     self.destination = None
     self.contents = container.ContainerList()
     self.scripts = container.ContainerList()
     self.known_spells = list()
     self.fight = None
     self.gold = 300
     self.day = 1
     self.xp_scale = xp_scale
Ejemplo n.º 3
0
 def __init__( self, scene=None, pos=(0,0), plot_locked=False, desc=None, anchor=None ):
     """Place this waypoint in a scene."""
     if scene:
         self.place( scene, pos )
     self.contents = container.ContainerList(owner=self)
     self.plot_locked = plot_locked
     if desc:
         self.desc = desc
     if anchor:
         self.anchor = anchor
Ejemplo n.º 4
0
    def __init__(self,width=128,height=128,sprites=None,biome=None,setting=None,fac=None,desctags=(),name=""):
        self.name = name
        self.width = width
        self.height = height
        self.contents = container.ContainerList(owner=self)
        self.sprites = DEFAULT_SPRITES.copy()
        if sprites:
            self.sprites.update( sprites )
        self.biome=biome
        self.setting=setting
        self.desctags = desctags
        self.fac = fac
        self.scripts = container.ContainerList()
        self.parent_scene = None
        self.in_sight = set()

        self.last_updated = 0
        self.monster_zones = list()

        # Fill the map with empty tiles
        self.map = [[ Tile()
            for y in range(height) ]
                for x in range(width) ]
Ejemplo n.º 5
0
 def __init__(self,
              width=None,
              height=None,
              tags=(),
              anchor=None,
              parent=None):
     self.width = width or random.randint(7, 12)
     self.height = height or random.randint(7, 12)
     self.tags = tags
     self.anchor = anchor
     self.area = None
     self.contents = container.ContainerList(owner=self)
     # special_c lists contents that will be treated specially by the generator.
     self.special_c = dict()
     if parent:
         parent.contents.append(self)
Ejemplo n.º 6
0
 def __init__(self):
     # Create a random 15x15 world map.
     self.contents = container.ContainerList()