Ejemplo n.º 1
0
    def __init__(self, redis, features={}):
        NPC.__init__(self, redis, features, 'npc')
        self.logger = logging.getLogger(__name__)

        self.generate_features('deity')

        self.select_portfolio()
Ejemplo n.º 2
0
    def __init__(self, redis, features={}):
        NPC.__init__(self, redis, features, 'npc')
        self.logger = logging.getLogger(__name__)

        self.generate_features('leader')
        #generates self.scope = "country"

        self.generate_features('leader' + self.scope)
        # generate self.kind from scope; scope.kind = absolutemonarchy
        self.generate_features('leader' + self.kind)
        # generate self.leader from leaderabsolutemonarchy_leader
        # generate leader.description from leaderabsolutemonarchy_leader_description

        if self.scope == 'country':
            self.location = country.Country(self.redis, {'leader': self})
        elif self.scope == 'city':
            self.location = city.City(self.redis, {'leader': self})
        elif self.scope == 'organization':
            self.location = organization.Organization(self.redis,
                                                      {'leader': self})
        else:
            self.location = organization.Organization(self.redis,
                                                      {'leader': self})
            self.scope = 'organization'

        self.name.title = self.leader_description[self.sex['name']]
        #re-render the name with the title.
        self.name.render()
Ejemplo n.º 3
0
    def __init__(self, redis, features={}):
        NPC.__init__(self, redis, features, 'npc')
        self.logger = logging.getLogger(__name__)

        self.generate_features('leader')
        #generates self.scope = "country"

        self.generate_features('leader' + self.scope)
        # generate self.kind from scope; scope.kind = absolutemonarchy
        self.generate_features('leader' + self.kind)
        # generate self.leader from leaderabsolutemonarchy_leader
        # generate leader.description from leaderabsolutemonarchy_leader_description

        if self.scope == 'country':
            self.location = country.Country(self.redis, {'leader': self})
        elif self.scope == 'city':
            self.location = city.City(self.redis, {'leader': self})
        elif self.scope == 'organization':
            self.location = organization.Organization(self.redis, {'leader': self})
        else:
            self.location = organization.Organization(self.redis, {'leader': self})
            self.scope='organization'

        self.name.title = self.leader_description[self.sex['name']]
        #re-render the name with the title.
        self.name.render()
Ejemplo n.º 4
0
 def __init__(self, name, level, hp, min_dmg, max_dmg, armor, light=0):
     NPC.__init__(self, name, level, hp, min_dmg, max_dmg, armor)
     self.exp = 0
     self.light = light