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
def LevelupCheckSpells(obj): spell_enums = char_editor.get_spell_enums() for spInfo in spell_enums: spClass = spInfo.get_casting_class() if spClass != stat_level_bard: continue if spInfo.spell_enum == spell_vacant: return 0 return 1
def LevelupCheckSpells(obj): classLvl = obj.stat_level_get(classEnum) classLvlNew = classLvl + 1 maxSpellLvl = char_editor.get_max_spell_level(obj, classEnum, classLvlNew) spell_enums = char_editor.get_spell_enums() for spInfo in spell_enums: if spInfo.spell_enum == spell_vacant: if maxSpellLvl >= 4 and spInfo.spell_level == 0: # in case the cantrips are causing problems continue return 0 return 1
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
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
def LevelupCheckSpells(obj): spell_enums = char_editor.get_spell_enums() classLvl = obj.stat_level_get(classEnum) classLvlNew = classLvl + 1 if classLvlNew == 2: sp_lvl_1_count = 0 spKnown = char_editor.get_known_class_spells(obj, classEnum) for spInfo in spKnown: if spInfo.spell_level == 1: sp_lvl_1_count += 1 if sp_lvl_1_count > 20: # for scroll puffing maniacs return 1 for spInfo in spell_enums: if spInfo.spell_enum == spell_vacant: return 0 return 1
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
def LevelupCheckSpells(obj): spell_enums = char_editor.get_spell_enums() for spInfo in spell_enums: if spInfo.spell_enum == spell_vacant: return 0 return 1