示例#1
0
    def __init__(self, terrain_type=None):
        Locatable.super(Agent, self).__init__()
        CellPositionable.super(Agent, self).__init__()
        super(Terrain, self).__init__()

        self.name = None
        self.color = None
        self.glyph = None
        self.terrain_type = terrain_type
示例#2
0
    def __init__(self, components=[]):
        Locatable.super(Actor, self).__init__()
        CellPositionable.super(Actor, self).__init__()
        super(Actor, self).__init__(components + self.__class__.components)

        # Text information (cosmetic)
        self.name = 'Default monster'
        self.description = 'This is the description'
        self.voice = "speak"

        # Appearance (cosmetic)
        self.glyph = '@'
        self.color = 'magenta-black'

        # Highly mutable actor state
#        self.register_component(self, component, domain=None):
#        self.body = body.Humanoid(self)
        self.component_registry["Body"] = [body.Humanoid(self)]

        self.base_skills = {}

        self.hp_spent = 0
        self.fp_spent = 0
        self.mp_spent = 0

        self.alive = True

        # More static information: points spent on your character
        self.points = {
            "total": 0,
            "unspent" : 0,
            "skills" : {},
            "techniques" : {},
            "traits" : {
                "ST" : 0,
                "DX" : 0,
                "IQ" : 0,
                "HT" : 0,
            },
        }

        # The 'character sheet': derived from points spent in the above
        # categories, and changing only when they do.
        self.attributes = {}
        self.skills = {}
        self.techniques = {}
        self.advantages = {}
        self.disadvantages = {}

        # Purely interface nicety
        self.letters = {}

        # Whether this thing accepts keyboard control currently
        self.controlled = False

        self.generator = "default"
        self.loadouts = None

        self.posture = "standing"

        self.knowledge = {}