Пример #1
0
def domain_pass(struct):
	d = find_section(struct, name="Domains", section_type='section')
	if d:
		domains = find_all_sections(struct, name=re.compile('^.*Domain$'), section_type='section')
		for domain in domains:
			remove_section(struct, domain)
			domain['subtype'] = 'cleric_domain'
			add_section(d, domain)
	return struct
Пример #2
0
def domain_pass(struct):
    d = find_section(struct, name="Domains", section_type="section")
    if d:
        domains = find_all_sections(struct, name=re.compile("^.*Domain$"), section_type="section")
        for domain in domains:
            remove_section(struct, domain)
            domain["subtype"] = "cleric_domain"
            add_section(d, domain)
    return struct
Пример #3
0
def domain_pass(struct):
    d = find_section(struct, name="Domains", section_type='section')
    if d:
        domains = find_all_sections(struct,
                                    name=re.compile('^.*Domain$'),
                                    section_type='section')
        for domain in domains:
            remove_section(struct, domain)
            domain['subtype'] = 'cleric_domain'
            add_section(d, domain)
    return struct
Пример #4
0
def bloodline_pass(struct):
	s = find_section(struct, name="Sorcerer Bloodlines", section_type='section')
	if s:
		collect = False
		bloodlines = []
		for section in struct['sections']:
			if collect:
				bloodlines.append(section)
			elif s == section:
				collect = True
		for bloodline in bloodlines:
			bloodline['subtype'] = 'sorcerer_bloodline'
			remove_section(struct, bloodline)
			add_section(s, bloodline)
	return struct
Пример #5
0
def arcane_school_pass(struct):
    s = find_section(struct, name="Arcane Schools", section_type='section')
    if s:
        collect = False
        schools = []
        for section in struct['sections']:
            if section.get('name') == 'Familiars':
                collect = False
            elif collect:
                schools.append(section)
            elif s == section:
                collect = True
        for school in schools:
            school['subtype'] = 'arcane_school'
            remove_section(struct, school)
            add_section(s, school)
    return struct
Пример #6
0
def bloodline_pass(struct):
    s = find_section(struct,
                     name="Sorcerer Bloodlines",
                     section_type='section')
    if s:
        collect = False
        bloodlines = []
        for section in struct['sections']:
            if collect:
                bloodlines.append(section)
            elif s == section:
                collect = True
        for bloodline in bloodlines:
            bloodline['subtype'] = 'sorcerer_bloodline'
            remove_section(struct, bloodline)
            add_section(s, bloodline)
    return struct
Пример #7
0
def arcane_school_pass(struct):
	s = find_section(struct, name="Arcane Schools", section_type='section')
	if s:
		collect = False
		schools = []
		for section in struct['sections']:
			if section.get('name') == 'Familiars':
				collect = False
			elif collect:
				schools.append(section)
			elif s == section:
				collect = True
		for school in schools:
			school['subtype'] = 'arcane_school'
			remove_section(struct, school)
			add_section(s, school)
	return struct
Пример #8
0
def arcane_school_pass(struct):
    s = find_section(struct, name="Arcane Schools", section_type="section")
    if s:
        collect = False
        schools = []
        for section in struct["sections"]:
            if section.get("name") == "Familiars":
                collect = False
            elif collect:
                schools.append(section)
            elif s == section:
                collect = True
        for school in schools:
            school["subtype"] = "arcane_school"
            remove_section(struct, school)
            add_section(s, school)
    return struct