diff --git a/.gitignore b/.gitignore index 9c01e652..f818b92e 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,4 @@ nwn/nwnprc/trunk/makefile.temp nwn/nwnprc/trunk/scripts/old_lich_alter.nss nwn/nwnprc/trunk/makefile.temp *.temp +nwn/nwnprc/trunk/makefile.temp diff --git a/nwn/nwnprc/trunk/makefile.temp b/nwn/nwnprc/trunk/makefile.temp index 52f67b3e..2ca9aae0 100644 --- a/nwn/nwnprc/trunk/makefile.temp +++ b/nwn/nwnprc/trunk/makefile.temp @@ -2474,6 +2474,7 @@ spells\sp_flesh_rip.nss \ spells\sp_floatingdisk.nss \ spells\sp_fogcloud.nss \ spells\sp_forceblast.nss \ +spells\sp_forcemissiles.nss \ spells\sp_forceorb.nss \ spells\sp_foresight.nss \ spells\sp_frogs_fish.nss \ @@ -5075,6 +5076,7 @@ spellobjs\sp_flesh_rip.ncs \ spellobjs\sp_floatingdisk.ncs \ spellobjs\sp_fogcloud.ncs \ spellobjs\sp_forceblast.ncs \ +spellobjs\sp_forcemissiles.ncs \ spellobjs\sp_forceorb.ncs \ spellobjs\sp_foresight.ncs \ spellobjs\sp_frogs_fish.ncs \ @@ -32269,6 +32271,8 @@ spellobjs\sp_fogcloud.ncs: spells\sp_fogcloud.nss include\prc_inc_spells.nss inc spellobjs\sp_forceblast.ncs: spells\sp_forceblast.nss include\prc_inc_spells.nss include\spinc_bolt.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\inc_item_props.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_damage.nss include\prc_inc_sb_const.nss include\inc_2dacache.nss include\inc_debug.nss include\prc_inc_switch.nss include\prc_inc_array.nss include\prc_class_const.nss include\prc_effect_inc.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss include\prc_add_spell_dc.nss +spellobjs\sp_forcemissiles.ncs: spells\sp_forcemissiles.nss include\prc_sp_func.nss include\prc_inc_spells.nss include\x2_inc_spellhook.nss include\prc_alterations.nss include\prc_inc_unarmed.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\prc_inc_natweap.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_sb_const.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss include\prc_x2_craft.nss include\prc_inc_combat.nss include\prc_inc_itmrstr.nss include\prc_inc_burn.nss include\pnp_shft_main.nss include\inc_dynconv.nss include\inc_npc.nss include\prc_add_spell_dc.nss include\prc_inc_onhit.nss include\prc_inc_fork.nss include\prc_getbest_inc.nss include\prc_inc_function.nss include\prc_inc_util.nss include\prc_inc_stunfist.nss include\inc_nwnx_funcs.nss include\prc_template_con.nss + spellobjs\sp_forceorb.ncs: spells\sp_forceorb.nss include\prc_inc_spells.nss include\prc_add_spell_dc.nss include\prc_inc_sp_tch.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\inc_item_props.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_damage.nss include\prc_inc_sb_const.nss include\inc_2dacache.nss include\inc_debug.nss include\prc_inc_switch.nss include\prc_inc_array.nss include\prc_class_const.nss include\prc_effect_inc.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss include\prc_inc_combat.nss include\prc_inc_unarmed.nss include\prc_inc_onhit.nss include\prc_inc_fork.nss include\prc_inc_natweap.nss include\inc_abil_damage.nss spellobjs\sp_foresight.ncs: spells\sp_foresight.nss include\prc_alterations.nss include\prc_inc_spells.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_sb_const.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss diff --git a/nwn/nwnprc/trunk/scripts/tmp_m_saint.nss b/nwn/nwnprc/trunk/scripts/tmp_m_saint.nss index a8a6d723..0d8b6359 100644 --- a/nwn/nwnprc/trunk/scripts/tmp_m_saint.nss +++ b/nwn/nwnprc/trunk/scripts/tmp_m_saint.nss @@ -82,12 +82,11 @@ void main() //:: Not being called from an event but from EvalPRCFeats. No non-good Saints. if(nEvent == FALSE && GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD) { - //:: Any living creature of good alignment that is not an outsider or an elemental + //:: Any living creature of good alignment that is not an or an elemental (removed outsider check as Saints are outsiders) int nRace = MyPRCGetRacialType(oPC); if(!(nRace == RACIAL_TYPE_CONSTRUCT || nRace == RACIAL_TYPE_ELEMENTAL || nRace == RACIAL_TYPE_OOZE || - nRace == RACIAL_TYPE_OUTSIDER || nRace == RACIAL_TYPE_UNDEAD)) { //:: Add Darkvision @@ -217,7 +216,7 @@ void main() IPSafeAddItemProperty(oSkin, iHolyTouch, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, FALSE, FALSE); } - //:: Keep property on armor or hide + //:: Keep property on current armor or hide ExecuteScript ("prc_keep_onhit_a", oPC); //:: Setup Holy Touch extra damage vs evil diff --git a/nwn/nwnprc/trunk/spells/sp_chasperfect.nss b/nwn/nwnprc/trunk/spells/sp_chasperfect.nss index 8a89359c..ed73796a 100644 --- a/nwn/nwnprc/trunk/spells/sp_chasperfect.nss +++ b/nwn/nwnprc/trunk/spells/sp_chasperfect.nss @@ -128,8 +128,11 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent) void main() { +//:: Check the Spellhook if (!X2PreSpellCastCode()) return; - PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION); + +//:: Set the Spell School + PRCSetSchool(GetSpellSchool(PRCGetSpellId())); object oCaster = OBJECT_SELF; object oTarget = PRCGetSpellTargetObject(); @@ -154,5 +157,6 @@ void main() DecrementSpellCharges(oCaster); } } +//:: Unset the Spell school PRCSetSchool(); } \ No newline at end of file diff --git a/nwn/nwnprc/trunk/spells/sp_forcemissiles.nss b/nwn/nwnprc/trunk/spells/sp_forcemissiles.nss index ad4c0274..0e2b0495 100644 --- a/nwn/nwnprc/trunk/spells/sp_forcemissiles.nss +++ b/nwn/nwnprc/trunk/spells/sp_forcemissiles.nss @@ -157,6 +157,12 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent) void main() { +//:: Check the Spellhook + if (!X2PreSpellCastCode()) return; + +//:: Set the Spell School + PRCSetSchool(GetSpellSchool(PRCGetSpellId())); + object oCaster = OBJECT_SELF; object oTarget = PRCGetSpellTargetObject(); @@ -165,11 +171,7 @@ void main() int nTargets; int nCnt = 1; float fDist, fDelay, fDelay2, fTime; - - PRCSetSchool(GetSpellSchool(PRCGetSpellId())); - - if (!X2PreSpellCastCode()) return; - + int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags if(!nEvent) //normal cast { @@ -188,6 +190,7 @@ void main() DecrementSpellCharges(oCaster); } } +//:: Unset the Spell school PRCSetSchool(); }