Example #1
0
    def at_object_creation(self):
        super(NPC, self).at_object_creation()

        # initialize traits
        npc = Archetype()
        for key, kwargs in npc.traits.iteritems():
            self.traits.add(key, **kwargs)

        apply_skills(self)
Example #2
0
    def at_object_creation(self):
        super(NPC, self).at_object_creation()

        self.db.emote_aggressive = "stares about angrily"

        self.db.slots = {'wield': None, 'armor': None}

        # initialize traits
        npc = Archetype()
        for key, kwargs in npc.traits.iteritems():
            self.traits.add(key, **kwargs)

        apply_skills(self)
Example #3
0
    },
    'spirit': {
        'desc':
        'The Spirit focus symbolizes an abundance in mystical powers '
        'swirling with mana. Characters with the spirit focus are '
        'naturally gifted to channelling the magical powers of spells.',
        'bonuses': {
            'VIT': 1,
            'MAG': 2,
            'FORT': 1,
            'REFL': 1,
            'WILL': 1
        }
    }  # +2 language
}
_ARC = Archetype()


def load_race(race):
    """Returns an instance of the named race class.

    Args:
        race (str): case-insensitive name of race to load

    Returns:
        (Race): instance of the appropriate subclass of `Race`
    """
    race = race.capitalize()
    if race in ALL_RACES:
        return globals()[race]()
    else: