Ejemplo n.º 1
0
def LevelupSpellsFinalize(obj, classLvlNew=-1):
    spEnums = char_editor.get_spell_enums()
    char_editor.spell_known_add(
        spEnums
    )  # internally takes care of duplicates and the labels/vacant slots

    # add weapon focus / specialization
    newLvl = obj.stat_level_get(classEnum) + 1
    if newLvl != 3 and newLvl != 12 and classLvlNew != 1:
        return

    omg = obj.obj_get_int(obj_f_critter_deity)
    deity_weapon = game.get_deity_favored_weapon(omg)
    #print "deity weap " + str(deity_weapon)
    if newLvl == 3:
        weap_foc_feat = feat_weapon_focus_gauntlet + deity_weapon
        obj.feat_add(weap_foc_feat)
        print "added " + str(weap_foc_feat)
    if newLvl == 12:
        weap_sp_feat = feat_weapon_specialization_gauntlet + deity_weapon
        obj.feat_add(weap_sp_feat)
        print "added " + str(weap_sp_feat)
    if classLvlNew == 1:
        weap_prof_feat = game.get_feat_for_weapon_type(deity_weapon)
        if weap_prof_feat != feat_simple_weapon_proficiency:
            obj.feat_add(weap_prof_feat)
            print "added " + str(weap_prof_feat)
    return
Ejemplo n.º 2
0
def LevelupSpellsFinalize( obj, classLvlNew = -1 ):
	classLvl = obj.stat_level_get(classEnum)
	classLvlNew = classLvl + 1
	if classLvlNew < 4: # late-starting caster
		return 0
	maxSpellLvl = char_editor.get_max_spell_level( obj, classEnum, classLvlNew )
	class_spells = char_editor.get_learnable_spells(obj, classEnum, maxSpellLvl)
	char_editor.spell_known_add(class_spells)
	return 0
Ejemplo n.º 3
0
def LevelupSpellsFinalize(obj, classLvlNew=-1, classLvlIncrement=1):
    classLvl = obj.stat_level_get(classEnum)
    if classLvlNew <= 0:
        classLvlNew = classLvl + 1

    maxSpellLvl = char_editor.get_max_spell_level(obj, classEnum, classLvlNew)
    class_spells = char_editor.get_learnable_spells(obj, classEnum,
                                                    maxSpellLvl)
    char_editor.spell_known_add(class_spells)
    return 0
Ejemplo n.º 4
0
def LevelupSpellsFinalize( obj, classLvlNew = -1 ):
	#Add the normal spells
	classLvl = obj.stat_level_get(classEnum)
	if classLvlNew <= 0:
		classLvlNew = classLvl + 1

	maxSpellLvl = char_editor.get_max_spell_level( obj, classEnum, classLvlNew )
	class_spells = char_editor.get_learnable_spells(obj, classEnum, maxSpellLvl)
	char_editor.spell_known_add(class_spells) # internally takes care of duplicates and the labels/vacant slots	
	
	#Add Anything from advanced learning
	spEnums = char_editor.get_spell_enums()
	char_editor.spell_known_add(spEnums) # internally takes care of duplicates and the labels/vacant slots	
	return 0
Ejemplo n.º 5
0
def LevelupSpellsFinalize(obj, classLvlNew=-1):
    spEnums = char_editor.get_spell_enums()
    char_editor.spell_known_add(
        spEnums
    )  # internally takes care of duplicates and the labels/vacant slots

    classLvl = obj.stat_level_get(classEnum)
    if classLvlNew <= 0:
        classLvlNew = classLvl + 1
    if classLvlNew > 1:
        return 0
    # for new wizards, add all cantrips
    cantrips = char_editor.get_learnable_spells(obj, classEnum, 0)
    char_editor.spell_known_add(cantrips)
    return 0
Ejemplo n.º 6
0
def LevelupSpellsFinalize( obj, classLvlNew = -1 ):
	classLvl = obj.stat_level_get(classEnum)
	if classLvlNew <= 0:
		classLvlNew = classLvl + 1

	maxSpellLvl = char_editor.get_max_spell_level(obj, classEnum, classLvlNew)
	class_spells = char_editor.get_learnable_spells(obj, classEnum, maxSpellLvl)
	char_editor.spell_known_add(class_spells)

	# for paladins - change to evil
	algn = obj.obj_get_int(obj_f_critter_alignment)
	if algn & ALIGNMENT_GOOD:
		algn = algn ^ ALIGNMENT_GOOD

	algn = algn | ALIGNMENT_EVIL
	obj.obj_set_int(obj_f_critter_alignment, algn)

	pal_lvl = obj.stat_level_get(stat_level_paladin)
	if pal_lvl >= 1:
		obj.feat_add("Smite Good")
	if pal_lvl >= 5:
		obj.feat_add(feat_sneak_attack)
	return 0
Ejemplo n.º 7
0
def LevelupSpellsFinalize( obj, classLvlNew = -1 ):
	classLvl = obj.stat_level_get(classEnum)
	if classLvlNew <= 0:
		classLvlNew = classLvl + 1

	maxSpellLvl = char_editor.get_max_spell_level( obj, classEnum, classLvlNew )
	class_spells = char_editor.get_learnable_spells(obj, classEnum, maxSpellLvl)
	char_editor.spell_known_add(class_spells)

	# Domain spells:
	domain_1 = obj.obj_get_int(obj_f_critter_domain_1)
	domain_2 = obj.obj_get_int(obj_f_critter_domain_2)
	domain_1_spells = char_editor.get_learnable_spells(obj, domain_1, maxSpellLvl, 1)
	domain_2_spells = char_editor.get_learnable_spells(obj, domain_2, maxSpellLvl, 1)
	char_editor.spell_known_add(domain_1_spells)
	char_editor.spell_known_add(domain_2_spells)
	return 0
Ejemplo n.º 8
0
def LevelupSpellsFinalize(obj, classLvlNew=-1):
    spEnums = char_editor.get_spell_enums()
    char_editor.spell_known_add(
        spEnums
    )  # internally takes care of duplicates and the labels/vacant slots
    return