Esempio n. 1
0
def _set_adv(caller, raw_input):
    cmd, args = _args(raw_input)
    target = caller.ndb.editchar or caller
    choice = partial_match(cmd, ['essence', 'willpower'])
    stat = target.storyteller.stats_dict[choice]
    try:
        stat.rating = args
    except ValueError as err:
        _error(caller, str(err))
Esempio n. 2
0
def _set_attribute(caller, raw_input):
    cmd, args = _args(raw_input)
    target = caller.ndb.editchar or caller
    sheet_section = target.storyteller.sheet_dict['attribute']
    stats = sheet_section.choices
    if args:
        stat = partial_match(cmd, stats)
        if stat:
            try:
                stat.rating = args
            except ValueError as err:
                _error(caller, str(err))