def genscroll(cclass, level): if Dice.D(1, 100) < (level * 3): scroll = Dice.tableroller(scrolltable[cclass])[1] if type(scroll) is tuple: scrollspells = Spells.genscroll(scroll[0], scroll[1]) scroll = "Scroll of %s Spells: %s" \ % (classnames[cclass], string.join(scrollspells, ", ")) return scroll return ""
def _genscroll(row): spells = Spells.genscroll(*row[2]) return (0, "%s: %s" % (row[1], string.join(spells, ", ")))