From d47bd10dad4b04ccc0e6f4ccd4baffd7cd6e02eb Mon Sep 17 00:00:00 2001 From: doug1234 Date: Wed, 4 Sep 2024 22:58:43 -0400 Subject: [PATCH 1/2] Added fix for raise dead and aasumars. --- tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py b/tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py index 2f1bf3ce8..95c54a673 100644 --- a/tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py +++ b/tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py @@ -14,9 +14,16 @@ def OnSpellEffect( spell ): spell.duration = 0 target_item = spell.target_list[0] + 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: @@ -65,6 +72,10 @@ def OnSpellEffect( spell ): spell.spell_end( spell.id, 1 ) + 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" From 92510d972b51e1deea8c0cc58580160d93f8b569 Mon Sep 17 00:00:00 2001 From: doug1234 Date: Wed, 4 Sep 2024 23:02:11 -0400 Subject: [PATCH 2/2] Add some comments to aasumar and tiefling raise dead fix. --- tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py b/tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py index 95c54a673..170844e03 100644 --- a/tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py +++ b/tpdatasrc/co8infra/scr/Spell379 - Raise Dead.py @@ -14,6 +14,7 @@ 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) @@ -72,6 +73,7 @@ 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)