def insert_kingdom_resource_detail(curs, section_id, bp=None, lot=None, kingdom=None, discount=None, magic_items=None, settlement=None, special=None, limit=None, upgrade_from=None, upgrade_to=None, **kwargs): values = [ section_id, bp, lot, kingdom, discount, magic_items, settlement, special, limit, upgrade_from, upgrade_to ] test_args(kwargs) sql = '\n'.join([ "INSERT INTO kingdom_resource_details", " (section_id, bp, lot, kingdom, discount, magic_items, settlement," " special, resource_limit, upgrade_from, upgrade_to)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ]) curs.execute(sql, values)
def insert_animal_companion_detail(curs, section_id, ac=None, attack=None, cmd=None, ability_scores=None, special_abilities=None, special_qualities=None, special_attacks=None, size=None, speed=None, bonus_feat=None, level=None, **kwargs): values = [ section_id, ac, attack, cmd, ability_scores, special_abilities, special_qualities, special_attacks, size, speed, bonus_feat, level ] test_args(kwargs) sql = '\n'.join([ "INSERT INTO animal_companion_details", " (section_id, ac, attack, cmd, ability_scores, special_abilities, " " special_qualities, special_attacks, size, speed, bonus_feat, level)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ]) curs.execute(sql, values)
def insert_spell_detail(curs, section_id, school=None, subschool_text=None, descriptor_text=None, level_text=None, domain_text=None, component_text=None, casting_time=None, preparation_time=None, range=None, duration=None, saving_throw=None, spell_resistance=None, as_spell_id=None, **kwargs): values = [section_id, school, subschool_text, descriptor_text, level_text, domain_text, component_text, casting_time, preparation_time, range, duration, saving_throw, spell_resistance, as_spell_id] testa = kwargs.copy() if testa.has_key('spell_detail_id'): del testa['spell_detail_id'] if testa.has_key('level'): del testa['level'] if testa.has_key('levels'): del testa['levels'] if testa.has_key('subschool'): del testa['subschool'] if testa.has_key('descriptor'): del testa['descriptor'] if testa.has_key('components'): del testa['components'] if testa.has_key('effects'): del testa['effects'] test_args(testa) sql = '\n'.join([ "INSERT INTO spell_details", " (section_id, school, subschool_text, descriptor_text, level_text,", " domain_text, component_text, casting_time, preparation_time, range," " duration, saving_throw, spell_resistance, as_spell_id)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"]) curs.execute(sql, values)
def insert_mythic_spell_detail(curs, section_id, spell_source=None, **kwargs): values = [section_id, spell_source] test_args(kwargs) sql = '\n'.join([ "INSERT INTO mythic_spell_details", " (section_id, spell_source)", " VALUES", " (?, ?)"]) curs.execute(sql, values)
def insert_animal_companion_detail(curs, section_id, ac=None, attack=None, ability_scores=None, special_qualities=None, special_attacks=None, size=None, speed=None, level=None, **kwargs): values = [section_id, ac, attack, ability_scores, special_qualities, special_attacks, size, speed, level] test_args(kwargs) sql = '\n'.join([ "INSERT INTO animal_companion_details", " (section_id, ac, attack, ability_scores, special_qualities, special_attacks, size, speed, level)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?)"]) curs.execute(sql, values)
def insert_spell_detail( curs, section_id, school=None, subschool=None, descriptor_text=None, level_text=None, casting_time=None, preparation_time=None, range=None, duration=None, saving_throw=None, spell_resistance=None, as_spell_id=None, **kwargs ): values = [ section_id, school, subschool, descriptor_text, level_text, casting_time, preparation_time, range, duration, saving_throw, spell_resistance, as_spell_id, ] testa = kwargs.copy() if testa.has_key("spell_detail_id"): del testa["spell_detail_id"] if testa.has_key("level"): del testa["level"] if testa.has_key("levels"): del testa["levels"] if testa.has_key("descriptor"): del testa["descriptor"] if testa.has_key("components"): del testa["components"] if testa.has_key("effects"): del testa["effects"] test_args(testa) sql = "\n".join( [ "INSERT INTO spell_details", " (section_id, school, subschool, descriptor_text, level_text, casting_time, preparation_time, range, duration, saving_throw, spell_resistance, as_spell_id)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", ] ) curs.execute(sql, values)
def insert_resource_detail(curs, section_id, benefit=None, create=None, earnings=None, rooms=None, size=None, skills=None, teams=None, time=None, upgrade_from=None, upgrade_to=None, wage=None, **kwargs): values = [section_id, benefit, create, earnings, rooms, size, skills, teams, time, upgrade_from, upgrade_to, wage] test_args(kwargs) sql = '\n'.join([ "INSERT INTO resource_details", " (section_id, benefit, resource_create, earnings, rooms, size, skills," " teams, time, upgrade_from, upgrade_to, wage)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"]) curs.execute(sql, values)
def insert_kingdom_resource_detail(curs, section_id, bp=None, lot=None, kingdom=None, discount=None, magic_items=None, settlement=None, special=None, limit=None, upgrade_from=None, upgrade_to=None, **kwargs): values = [section_id, bp, lot, kingdom, discount, magic_items, settlement, special, limit, upgrade_from, upgrade_to] test_args(kwargs) sql = '\n'.join([ "INSERT INTO kingdom_resource_details", " (section_id, bp, lot, kingdom, discount, magic_items, settlement," " special, resource_limit, upgrade_from, upgrade_to)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"]) curs.execute(sql, values)
def insert_army_detail(curs, section_id, xp=None, creature_type=None, alignment=None, size=None, hp=None, acr=None, dv=None, om=None, special=None, speed=None, consumption=None, tactics=None, resources=None, note=None, **kwargs): values = [section_id, xp, creature_type, alignment, size, hp, acr, dv, om, special, speed, consumption, tactics, resources, note] test_args(kwargs) sql = '\n'.join([ "INSERT INTO army_details", " (section_id, xp, creature_type, alignment, size, hp, acr, dv, om," " special, speed, consumption, tactics, resources, note)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"]) curs.execute(sql, values)
def insert_vehicle_detail(curs, section_id, size=None, vehicle_type=None, squares=None, cost=None, ac=None, hardness=None, hp=None, base_save=None, maximum_speed=None, acceleration=None, cmb=None, cmd=None, ramming_damage=None, propulsion=None, driving_check=None, forward_facing=None, driving_device=None, driving_space=None, decks=None, weapons=None, crew=None, passengers=None, **kwargs): values = [section_id, size, vehicle_type, squares, cost, ac, hardness, hp, base_save, maximum_speed, acceleration, cmb, cmd, ramming_damage, propulsion, driving_check, forward_facing, driving_device, driving_space, decks, weapons, crew, passengers] test_args(kwargs) sql = '\n'.join([ "INSERT INTO vehicle_details", " (section_id, size, vehicle_type, squares, cost, ac, hardness, hp, base_save, maximum_speed,", " acceleration, cmb, cmd, ramming_damage, propulsion, driving_check, forward_facing,", " driving_device, driving_space, decks, weapons, crew, passengers)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?,", " ?, ?, ?, ?, ?, ?, ?,", " ?, ?, ?, ?, ?, ?)"]) curs.execute(sql, values)
def insert_settlement_detail(curs, section_id, alignment=None, settlement_type=None, size=None, corruption=None, crime=None, economy=None, law=None, lore=None, society=None, qualities=None, danger=None, disadvantages=None, government=None, population=None, base_value=None, purchase_limit=None, spellcasting=None, minor_items=None, medium_items=None, major_items=None, **kwargs): values = [section_id, alignment, settlement_type, size, corruption, crime, economy, law, lore, society, qualities, danger, disadvantages, government, population, base_value, purchase_limit, spellcasting, minor_items, medium_items, major_items] test_args(kwargs) sql = '\n'.join([ "INSERT INTO settlement_details", " (section_id, alignment, settlement_type, size, corruption, crime, economy, law, lore, society,", " qualities, danger, disadvantages, government, population, base_value, purchase_limit,", " spellcasting, minor_items, medium_items, major_items)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"]) curs.execute(sql, values)
def insert_spell_detail(curs, section_id, school=None, subschool_text=None, descriptor_text=None, level_text=None, domain_text=None, component_text=None, casting_time=None, preparation_time=None, range=None, duration=None, saving_throw=None, spell_resistance=None, as_spell_id=None, **kwargs): values = [ section_id, school, subschool_text, descriptor_text, level_text, domain_text, component_text, casting_time, preparation_time, range, duration, saving_throw, spell_resistance, as_spell_id ] testa = kwargs.copy() if testa.has_key('spell_detail_id'): del testa['spell_detail_id'] if testa.has_key('level'): del testa['level'] if testa.has_key('levels'): del testa['levels'] if testa.has_key('subschool'): del testa['subschool'] if testa.has_key('descriptor'): del testa['descriptor'] if testa.has_key('components'): del testa['components'] if testa.has_key('effects'): del testa['effects'] test_args(testa) sql = '\n'.join([ "INSERT INTO spell_details", " (section_id, school, subschool_text, descriptor_text, level_text,", " domain_text, component_text, casting_time, preparation_time, range," " duration, saving_throw, spell_resistance, as_spell_id)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ]) curs.execute(sql, values)
def insert_creature_detail(curs, section_id, sex=None, super_race=None, level=None, cr=None, mr=None, xp=None, alignment=None, size=None, creature_type=None, creature_subtype=None, init=None, senses=None, aura=None, ac=None, hp=None, fortitude=None, reflex=None, will=None, resist=None, defensive_abilities=None, dr=None, immune=None, sr=None, weaknesses=None, speed=None, melee=None, ranged=None, space=None, reach=None, special_attacks=None, strength=None, dexterity=None, constitution=None, intelligence=None, wisdom=None, charisma=None, base_attack=None, cmb=None, cmd=None, feats=None, skills=None, racial_modifiers=None, languages=None, special_qualities=None, gear=None, combat_gear=None, other_gear=None, boon=None, environment=None, organization=None, treasure=None, hit_dice=None, natural_armor=None, breath_weapon=None, **kwargs): values = [section_id, sex, super_race, level, cr, mr, xp, alignment, size, creature_type, creature_subtype, init, senses, aura, ac, hp, fortitude, reflex, will, resist, defensive_abilities, dr, immune, sr, weaknesses, speed, melee, ranged, space, reach, special_attacks, strength, dexterity, constitution, intelligence, wisdom, charisma, base_attack, cmb, cmd, feats, skills, racial_modifiers, languages, special_qualities, gear, combat_gear, other_gear, boon, environment, organization, treasure, hit_dice, natural_armor, breath_weapon] targs = kwargs.copy() if targs.has_key('spells'): del targs['spells'] test_args(targs) sql = '\n'.join([ "INSERT INTO creature_details", " (section_id,", " sex, super_race, level, cr, mr, xp, alignment, size, creature_type, creature_subtype, init, senses, aura,", " ac, hp, fortitude, reflex, will, resist, defensive_abilities, dr, immune, sr, weaknesses,", " speed, melee, ranged, space, reach, special_attacks,", " strength, dexterity, constitution, intelligence, wisdom, charisma,", " base_attack, cmb, cmd, feats, skills, racial_modifiers, languages,", " special_qualities, gear, combat_gear, other_gear, boon,", " environment, organization, treasure,", " hit_dice, natural_armor, breath_weapon)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?," " ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,", " ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,", " ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,", " ?, ?, ?, ?, ?, ?, ?)"]) curs.execute(sql, values)
def insert_creature_detail(curs, section_id, sex=None, super_race=None, level=None, cr=None, mr=None, xp=None, alignment=None, size=None, creature_type=None, creature_subtype=None, init=None, senses=None, aura=None, ac=None, hp=None, fortitude=None, reflex=None, will=None, resist=None, defensive_abilities=None, dr=None, immune=None, sr=None, weaknesses=None, speed=None, melee=None, ranged=None, space=None, reach=None, special_attacks=None, strength=None, dexterity=None, constitution=None, intelligence=None, wisdom=None, charisma=None, base_attack=None, cmb=None, cmd=None, feats=None, skills=None, racial_modifiers=None, languages=None, special_qualities=None, gear=None, combat_gear=None, other_gear=None, boon=None, environment=None, organization=None, treasure=None, hit_dice=None, natural_armor=None, breath_weapon=None, **kwargs): values = [ section_id, sex, super_race, level, cr, mr, xp, alignment, size, creature_type, creature_subtype, init, senses, aura, ac, hp, fortitude, reflex, will, resist, defensive_abilities, dr, immune, sr, weaknesses, speed, melee, ranged, space, reach, special_attacks, strength, dexterity, constitution, intelligence, wisdom, charisma, base_attack, cmb, cmd, feats, skills, racial_modifiers, languages, special_qualities, gear, combat_gear, other_gear, boon, environment, organization, treasure, hit_dice, natural_armor, breath_weapon ] targs = kwargs.copy() if targs.has_key('spells'): del targs['spells'] test_args(targs) sql = '\n'.join([ "INSERT INTO creature_details", " (section_id,", " sex, super_race, level, cr, mr, xp, alignment, size, creature_type, creature_subtype, init, senses, aura,", " ac, hp, fortitude, reflex, will, resist, defensive_abilities, dr, immune, sr, weaknesses,", " speed, melee, ranged, space, reach, special_attacks,", " strength, dexterity, constitution, intelligence, wisdom, charisma,", " base_attack, cmb, cmd, feats, skills, racial_modifiers, languages,", " special_qualities, gear, combat_gear, other_gear, boon,", " environment, organization, treasure,", " hit_dice, natural_armor, breath_weapon)", " VALUES", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?," " ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,", " ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,", " ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,", " ?, ?, ?, ?, ?, ?, ?)" ]) curs.execute(sql, values)