Skip to content

Commit

Permalink
Merge pull request #789 from doug1234/RaiseAasumar
Browse files Browse the repository at this point in the history
Added fix for raise dead and aasumars and tieflings
  • Loading branch information
doug1234 authored Sep 7, 2024
2 parents ec378eb + 92510d9 commit 706b588
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ def OnSpellEffect( spell ):
spell.duration = 0
target_item = spell.target_list[0]

#For aasumars and tieflings temporarily remove the outsider tag so raise dead will work
prevType = 0
if target_item.obj.is_category_type( mc_type_outsider ) and target_item.obj.is_category_subtype(mc_subtype_human):
subrace = target_item.obj.stat_base_get(stat_subrace)
if (subrace == human_subrace_aasumar or subrace == human_subrace_tiefling):
prevType = target_item.obj.obj_get_int64(obj_f_critter_monster_category)
target_item.obj.obj_set_int64(obj_f_critter_monster_category, mc_type_humanoid)

target_item.obj.condition_add_with_args( 'sp-Raise Dead', spell.id, spell.duration, 0 )
#target_item.partsys_id = game.particles( 'sp-Raise Dead', target_item.obj )

if target_item.obj.stat_level_get( stat_level ) == 1:
game.global_vars[752] = 0
elif target_item.obj.stat_level_get( stat_level ) == 2:
Expand Down Expand Up @@ -65,6 +73,11 @@ def OnSpellEffect( spell ):

spell.spell_end( spell.id, 1 )

#Restore the outsider tag if necessary
if prevType != 0:
target_item = spell.target_list[0]
target_item.obj.obj_set_int64(obj_f_critter_monster_category, prevType)

def OnBeginRound( spell ):
spell.spell_end( spell.id, 1 )
print "Raise Dead OnBeginRound"
Expand Down

0 comments on commit 706b588

Please sign in to comment.