diff --git a/nwn/nwnprc/trunk/2das/spells.2da b/nwn/nwnprc/trunk/2das/spells.2da index 0212ad23..fcf3aad0 100644 --- a/nwn/nwnprc/trunk/2das/spells.2da +++ b/nwn/nwnprc/trunk/2das/spells.2da @@ -2531,7 +2531,7 @@ 2527 CALL_DRETCH_HORDE 16829490 is_call_dretch C S vs 0x38 0x0c sp_call_dretch **** **** **** **** **** 5 5 1500 head VCO_MEHEDEVIL01 **** **** SCO_MEHEDEVIL01 VS_CHANT_CONJ_HM VS_CHANT_CONJ_HF up 1000 **** **** **** sff_summevil 0 **** **** **** **** **** **** 1 **** **** **** **** **** 15 **** 1 16829491 1 0 **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 2528 CALL_LEMURE_HORDE 16829492 is_call_lemure C S vs 0x38 0x0c sp_call_lemure **** **** **** **** **** 5 5 1500 head VCO_MEHEDEVIL01 **** **** SCO_MEHEDEVIL01 VS_CHANT_CONJ_HM VS_CHANT_CONJ_HF up 1000 **** **** **** sff_summevil 0 **** **** **** **** **** **** 1 **** **** **** **** **** 15 **** 1 16829493 1 0 **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 2529 CLAWS_OF_THE_BEBILITH 16829494 is_claw_bebil T P vs 0x3a 0x09 sp_claw_bebil **** 5 5 **** **** 5 5 1500 head VCO_MEHEDEVIL01 **** **** SCO_MEGRDEVIL01 VS_CHANT_CONJ_HM VS_CHANT_CONJ_HF self 1000 VCO_MEHEDEVIL01 **** **** SDR_WEB 0 **** **** **** **** **** **** 0 **** **** **** **** **** 7 **** 1 16829495 1 0 **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 5 **** 5 **** -2530 CLAWS_OF_THE_SAVAGE 16829496 is_claws_savage T P vs 0x3b 0x2b sp_claws_savage **** 4 4 **** **** **** 4 1500 head VCO_MEHEDEVIL01 **** **** SCO_MEGRDEVIL01 vs_chant_conj_lm vs_chant_conj_lf self 1000 VCO_MEHEDEVIL01 **** **** SDR_PARALYZED 0 **** **** **** **** **** **** 0 **** **** **** **** **** 7 **** 1 16829497 1 0 **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** 4 **** **** **** **** **** **** **** +2530 CLAWS_OF_THE_SAVAGE 16829496 is_claws_savage T P vs 0x0b 0x2b sp_claws_savage **** 4 4 **** **** **** 4 1500 head VCO_MEHEDEVIL01 **** **** SCO_MEGRDEVIL01 vs_chant_conj_lm vs_chant_conj_lf self 1000 VCO_MEHEDEVIL01 **** **** SDR_PARALYZED 0 **** **** **** **** **** **** 0 **** **** **** **** **** 7 **** 1 16829497 1 0 **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** 4 **** **** **** **** **** **** **** 2531 CLOUD_OF_THE_ACHAIERAI 16829498 is_cloud_achai C P vs 0x3a 0x0c sp_cloud_achai **** 6 **** **** **** **** 6 1500 hand **** VCO_MEHANEVIL03 **** SCO_LGRINEVIL01 VS_CHANT_CONJ_HM VS_CHANT_CONJ_HF area 1000 **** VCA_OUTNEG **** SAR_CONEDISEA 0 **** **** **** **** **** **** 0 **** **** **** **** **** 11 **** 1 16829499 1 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 2532 CLUTCH_OF_ORCUS 16829500 is_clutch_orcus N M vs 0x38 0x0a sp_clutch_orcus **** 3 **** **** **** **** 3 1500 hand **** VCO_MEHANEVIL02 **** SCO_LGRINEVIL01 VS_CHANT_NECR_HM vs_chant_necr_hf out 1000 **** VCA_OUTEVIL01 **** SCA_OUTNEG 0 **** **** **** **** **** **** 1 **** **** **** **** **** 2 **** 1 16829501 1 0 **** 1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 2533 CRUSHING_FIST_OF_SPITE 16829502 is_crush_fs V M vs 0x3a 0x0c sp_crush_fs **** **** **** **** **** 9 9 1500 head VCO_MEHEDEVIL01 **** **** SCO_MEGRDEVIL01 VS_CHANT_EVOC_HM VS_CHANT_EVOC_HF up 1000 **** **** **** SDR_GHOSTLY 0 **** **** **** **** **** **** 1 **** **** **** **** **** 1 **** 1 16829503 1 0 **** 1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** @@ -18930,7 +18930,7 @@ 18926 KrensharMaskTotemBind 16836826 is_AcidFog V M 0 **** 0x02 moi_mld_krnshrft **** **** **** **** **** **** 6 1500 head **** vco_mebalacid01 **** sco_mebalacid01 vs_chant_conj_hm vs_chant_conj_hf area 1000 **** **** **** **** 1 vpr_ectoacid01 homing hand spr_ectoacid01 path Acid 1 **** **** **** **** **** 11 **** 1 6096 0 0 **** 1 **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 18927 LammasuMantleTotemBind 16836833 is_BurnHands T S 0 **** 0x3E moi_mld_lmsmntft **** **** **** **** **** **** 1 1500 hand **** vco_smhanfire01 **** sco_mehanfire01 vs_chant_ench_lm vs_chant_ench_lf out 1700 **** var_conefire **** sar_conefire 0 **** **** **** **** **** Fire 1 **** **** **** **** **** 11 **** 1 6106 0 0 **** 1 **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 18928 LandsharkBootsFeetBind 16836836 is_ShadShld T P 0 **** 0x01 moi_mld_lndshrkf **** **** **** **** **** **** 8 1500 hand **** **** vco_lgrinodd01 sco_lgrinodd01 vs_chant_illu_hm vs_chant_illu_hf self 1000 **** **** **** **** 0 **** **** **** **** **** **** 0 **** **** **** **** **** 12 **** 1 16836717 0 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -18929 LandsharkBootsTotemBind 16836837 is_BurnHands T S 0 **** 0x02 moi_mld_lndshrkt **** **** **** **** **** **** 1 1500 hand **** vco_smhanfire01 **** sco_mehanfire01 vs_chant_ench_lm vs_chant_ench_lf out 1700 **** var_conefire **** sar_conefire 0 **** **** **** **** **** Fire 1 **** **** **** **** **** 11 **** 1 6106 0 0 **** 1 **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** +18929 LandsharkBootsTotemBind 16836837 is_BurnHands T S 0 **** 0x02 moi_mld_lndshrkt **** **** **** **** **** **** 1 1500 hand **** **** vco_lgrinfire01 sco_mehanfire01 vs_chant_ench_lm vs_chant_ench_lf out 1700 **** **** VCA_UPHEXFIRE01 sar_conefire 0 **** **** **** **** **** **** 1 **** **** **** **** **** 11 **** 1 6106 0 0 **** 1 **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 18930 LifebondVestmentsHeal 16836840 is_CurCrWnds C T 0 **** 0x02 moi_mld_lfbndft **** **** **** **** **** **** 1 1500 head vco_mehanheal03 **** **** sco_mehanheal03 vs_chant_conj_hm vs_chant_conj_hf touch 1000 **** **** **** **** 0 **** **** **** **** **** Positive 1 **** **** **** **** **** 5 **** 1 6127 0 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 18931 LifebondVestmentsArmsBind 16836841 is_CurCrWnds C M 0 **** 0x02 moi_mld_lfbndft **** **** **** **** **** **** 1 1500 head vco_mehanheal03 **** **** sco_mehanheal03 vs_chant_conj_hm vs_chant_conj_hf touch 1000 **** **** **** **** 0 **** **** **** **** **** Positive 1 **** **** **** **** **** 5 **** 1 6127 0 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 18932 LightningGauntletsZap 16836844 is_ChLightn V T 0 **** 0x02 moi_mld_lghtgnzp **** **** **** **** **** **** 6 1500 hand **** vco_mebalelec01 **** sco_mebalelec01 vs_chant_evoc_hm vs_chant_evoc_hf area 1000 **** **** **** **** 0 **** linked hand **** path Electricity 1 **** **** **** **** **** 1 **** 1 6110 0 0 **** 1 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** diff --git a/nwn/nwnprc/trunk/include/moi_inc_moifunc.nss b/nwn/nwnprc/trunk/include/moi_inc_moifunc.nss index 62af8585..12f5e008 100644 --- a/nwn/nwnprc/trunk/include/moi_inc_moifunc.nss +++ b/nwn/nwnprc/trunk/include/moi_inc_moifunc.nss @@ -1425,10 +1425,25 @@ int GetTotalEssentia(object oMeldshaper) return nEssentia; } -int GetTotalUsableEssentia(object oMeldshaper) +int GetTotalUsableEssentia(object oMeldshaper) +{ + int nBase = GetTotalEssentia(oMeldshaper) - GetFeatLockedEssentia(oMeldshaper); + + // Add Incarnum Overload bonus if active + if(GetLocalInt(oMeldshaper, "IncandescentOverload")) + { + int nChaBonus = GetAbilityModifier(ABILITY_CHARISMA, oMeldshaper); + if(nChaBonus < 1) nChaBonus = 1; + nBase += nChaBonus; + } + + return nBase; +} + +/* int GetTotalUsableEssentia(object oMeldshaper) { return GetTotalEssentia(oMeldshaper) - GetFeatLockedEssentia(oMeldshaper); -} +} */ int GetIncarnumFeats(object oMeldshaper) { diff --git a/nwn/nwnprc/trunk/include/prc_x2_itemprop.nss b/nwn/nwnprc/trunk/include/prc_x2_itemprop.nss index 829fd80b..d837ffea 100644 --- a/nwn/nwnprc/trunk/include/prc_x2_itemprop.nss +++ b/nwn/nwnprc/trunk/include/prc_x2_itemprop.nss @@ -729,14 +729,17 @@ if(nItem == BASE_ITEM_BASTARDSWORD || nItem == BASE_ITEM_CRAFTED_STAFF || nItem == BASE_ITEM_CRAFTED_SCEPTER || nItem == 300 //CEP Trident + || nItem == 301 //CEP Heavy Pick + || nItem == 302 //CEP Light PIck || nItem == 303 //CEP Sai || nItem == 304 //CEP nunchaku || nItem == 305 //CEP falchion + || nItem == 308 //CEP Sap || nItem == 309 //CEP assassin dager || nItem == 310 //CEP katar || nItem == 312 //CEP light mace 2 || nItem == 313 //CEP kukri2 - || nItem == 316 //CEP falchion + || nItem == 316 //CEP falchion 2 || nItem == 317 //CEP heavymace || nItem == 318 //CEP maul || nItem == 319 //CEP sh_x1_mercuryls @@ -745,6 +748,7 @@ if(nItem == BASE_ITEM_BASTARDSWORD || nItem == 322 //CEP goad || nItem == 323 //CEP windfirewheel || nItem == 324 //CEP maugdoublesword + || nItem == 330 //CEP Longsword 2 ) { return TRUE; diff --git a/nwn/nwnprc/trunk/include/spinc_cone.nss b/nwn/nwnprc/trunk/include/spinc_cone.nss index 4b7ce3bc..aa723471 100644 --- a/nwn/nwnprc/trunk/include/spinc_cone.nss +++ b/nwn/nwnprc/trunk/include/spinc_cone.nss @@ -15,85 +15,80 @@ ///////////////////////////////////////////////////////////////////// #include "prc_inc_spells" -#include "prc_add_spell_dc" +#include "prc_add_spell_dc"' -void DoCone (int nDieSize, int nBonusDam, int nDieCap, int nConeEffect /* unused */, - int nVictimEffect, int nDamageType, int nSaveType, - int nSchool = SPELL_SCHOOL_EVOCATION, int nSpellID = -1) -{ - PRCSetSchool(nSchool); - - // Get the spell ID if it was not given. - if (-1 == nSpellID) nSpellID = PRCGetSpellId(); - - // Get effective caster level and hand it to the SR engine. Then - // cap it at our die cap. - int nCasterLvl = PRCGetCasterLevel(OBJECT_SELF); - int nPenetr = nCasterLvl + SPGetPenetr(); - - - if (nCasterLvl > nDieCap) nCasterLvl = nDieCap; - - // Figure out where the cone was targetted. - location lTargetLocation = PRCGetSpellTargetLocation(); - - // Adjust the damage type of necessary. - nDamageType = PRCGetElementalDamageType(nDamageType, OBJECT_SELF); - - - - //Declare major variables - int nDamage; - float fDelay; - object oTarget; - - // Declare the spell shape, size and the location. Capture the first target object in the shape. - // Cycle through the targets within the spell shape until an invalid object is captured. - oTarget = MyFirstObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - while(GetIsObjectValid(oTarget)) - { - if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - //Fire cast spell at event for the specified target - PRCSignalSpellEvent(oTarget, TRUE, nSpellID); - - //Get the distance between the target and caster to delay the application of effects - fDelay = PRCGetSpellEffectDelay(lTargetLocation, oTarget); - - //Make SR check, and appropriate saving throw(s). - if(!PRCDoResistSpell(OBJECT_SELF, oTarget,nPenetr, fDelay) && (oTarget != OBJECT_SELF)) - { - int nSaveDC = PRCGetSaveDC(oTarget,OBJECT_SELF); - // Roll damage for each target - int nDamage = PRCGetMetaMagicDamage(nDamageType, nCasterLvl, nDieSize, nBonusDam); - // Acid Sheath adds +1 damage per die to acid descriptor spells - if (GetHasDescriptor(nSpellID, DESCRIPTOR_ACID) && GetHasSpellEffect(SPELL_MESTILS_ACID_SHEATH, OBJECT_SELF)) - nDamage += nCasterLvl; - nDamage += SpellDamagePerDice(OBJECT_SELF, nCasterLvl); - // Adjust damage according to Reflex Save, Evasion or Improved Evasion - nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nSaveDC, nSaveType); - - // Apply effects to the currently selected target. - if(nDamage > 0) - { - effect eDamage = PRCEffectDamage(oTarget, nDamage, nDamageType); - effect eVis = EffectVisualEffect(nVictimEffect); - DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget)); - PRCBonusDamage(oTarget); - } - } - } - - //Select the next target within the spell shape. - oTarget = MyNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } - - // Let the SR engine know that we are done and clear out school local var. - - PRCSetSchool(); +void DoCone (int nDieSize, int nBonusDam, int nDieCap, int nConeEffect /* unused */, + int nVictimEffect, int nDamageType, int nSaveType, + int nSchool = SPELL_SCHOOL_EVOCATION, int nSpellID = -1, int bIgnoreSR = FALSE) +{ + PRCSetSchool(nSchool); + + // Get the spell ID if it was not given. + if (-1 == nSpellID) nSpellID = PRCGetSpellId(); + + // Get effective caster level and hand it to the SR engine. Then + // cap it at our die cap. + int nCasterLvl = PRCGetCasterLevel(OBJECT_SELF); + int nPenetr = nCasterLvl + SPGetPenetr(); + + if (nCasterLvl > nDieCap) nCasterLvl = nDieCap; + + // Figure out where the cone was targetted. + location lTargetLocation = PRCGetSpellTargetLocation(); + + // Adjust the damage type of necessary. + nDamageType = PRCGetElementalDamageType(nDamageType, OBJECT_SELF); + + //Declare major variables + int nDamage; + float fDelay; + object oTarget; + + // Declare the spell shape, size and the location. Capture the first target object in the shape. + // Cycle through the targets within the spell shape until an invalid object is captured. + oTarget = MyFirstObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + while(GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + PRCSignalSpellEvent(oTarget, TRUE, nSpellID); + + //Get the distance between the target and caster to delay the application of effects + fDelay = PRCGetSpellEffectDelay(lTargetLocation, oTarget); + + //Make SR check, and appropriate saving throw(s). + if((bIgnoreSR || !PRCDoResistSpell(OBJECT_SELF, oTarget,nPenetr, fDelay)) && (oTarget != OBJECT_SELF)) + { + int nSaveDC = PRCGetSaveDC(oTarget,OBJECT_SELF); + // Roll damage for each target + int nDamage = PRCGetMetaMagicDamage(nDamageType, nCasterLvl, nDieSize, nBonusDam); + // Acid Sheath adds +1 damage per die to acid descriptor spells + if (GetHasDescriptor(nSpellID, DESCRIPTOR_ACID) && GetHasSpellEffect(SPELL_MESTILS_ACID_SHEATH, OBJECT_SELF)) + nDamage += nCasterLvl; + nDamage += SpellDamagePerDice(OBJECT_SELF, nCasterLvl); + // Adjust damage according to Reflex Save, Evasion or Improved Evasion + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nSaveDC, nSaveType); + + // Apply effects to the currently selected target. + if(nDamage > 0) + { + effect eDamage = PRCEffectDamage(oTarget, nDamage, nDamageType); + effect eVis = EffectVisualEffect(nVictimEffect); + DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget)); + PRCBonusDamage(oTarget); + } + } + } + + //Select the next target within the spell shape. + oTarget = MyNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } + + // Let the SR engine know that we are done and clear out school local var. + PRCSetSchool(); } - // Test main -//void main(){} +// void main(){} diff --git a/nwn/nwnprc/trunk/newspellbook/moi_mld_lghtgnhn.nss b/nwn/nwnprc/trunk/newspellbook/moi_mld_lghtgnhn.nss index 08f2fba3..b035dd94 100644 --- a/nwn/nwnprc/trunk/newspellbook/moi_mld_lghtgnhn.nss +++ b/nwn/nwnprc/trunk/newspellbook/moi_mld_lghtgnhn.nss @@ -8,7 +8,49 @@ You can add the electricity damage dealt by lightning gauntlets to one attack pe #include "moi_inc_moifunc" -void main() +void main() +{ + int nEvent = GetRunningEvent(); + object oMeldshaper = OBJECT_SELF; + object oItem; + int nEssentia = GetEssentiaInvested(oMeldshaper, MELD_LIGHTNING_GAUNTLETS); + + // We aren't being called from any event, instead from EvalPRCFeats + if(nEvent == FALSE) + { + if(!TakeMoveAction(oMeldshaper)) return; + oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oMeldshaper); + IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER, 1), 60.0, X2_IP_ADDPROP_POLICY_KEEP_EXISTING); + AddEventScript(oItem, EVENT_ITEM_ONHIT, "moi_mld_lghtgnhn", TRUE, FALSE); + } + else if(nEvent == EVENT_ITEM_ONHIT) + { + oItem = GetSpellCastItem(); + object oTarget = PRCGetSpellTargetObject(); + if(DEBUG) DoDebug("moi_mld_lghtgnhn: OnHit:\n" + + "oMeldshaper = " + DebugObject2Str(oMeldshaper) + "\n" + + "oItem = " + DebugObject2Str(oItem) + "\n" + + "oTarget = " + DebugObject2Str(oTarget) + "\n" + ); + + // Check if already used this round + if (!GetLocalInt(oMeldshaper, "LightningGauntlets_UsedThisRound")) + { + // Apply damage + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(d6(nEssentia+1), DAMAGE_TYPE_ELECTRICAL), oTarget); + + // Mark as used this round + SetLocalInt(oMeldshaper, "LightningGauntlets_UsedThisRound", TRUE); + + // Clear the flag at start of next round (6 seconds) + DelayCommand(6.0, DeleteLocalInt(oMeldshaper, "LightningGauntlets_UsedThisRound")); + } + + // Don't remove the OnHitCastSpell property - let it persist for future rounds + }// end if - Running OnHit event +} + +/* void main() { int nEvent = GetRunningEvent(); object oMeldshaper = OBJECT_SELF; @@ -37,5 +79,5 @@ void main() RemoveEventScript(oItem, EVENT_ITEM_ONHIT, "moi_mld_lghtgnhn", TRUE, FALSE); RemoveSpecificProperty(oItem, ITEM_PROPERTY_ONHITCASTSPELL, IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER, 0, 1, "", 1, DURATION_TYPE_TEMPORARY); }// end if - Running OnHit event -} +} */ diff --git a/nwn/nwnprc/trunk/newspellbook/moi_mld_lndshrkt.nss b/nwn/nwnprc/trunk/newspellbook/moi_mld_lndshrkt.nss index 1ebdc76f..c7600009 100644 --- a/nwn/nwnprc/trunk/newspellbook/moi_mld_lndshrkt.nss +++ b/nwn/nwnprc/trunk/newspellbook/moi_mld_lndshrkt.nss @@ -47,7 +47,7 @@ void main() { AssignCommand(oMeldshaper, ClearAllActions(TRUE)); effect eJump = EffectDisappearAppear(GetLocation(oMeldshaper)); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eJump, oMeldshaper, 3.1); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eJump, oMeldshaper, 2.0); DelayCommand(0.0, SharkAttack(oTarget, oMeldshaper)); } diff --git a/nwn/nwnprc/trunk/scripts/ft_vowofpoverty.nss b/nwn/nwnprc/trunk/scripts/ft_vowofpoverty.nss index d40f78a0..23ecf2d4 100644 --- a/nwn/nwnprc/trunk/scripts/ft_vowofpoverty.nss +++ b/nwn/nwnprc/trunk/scripts/ft_vowofpoverty.nss @@ -270,7 +270,8 @@ void main() && !(GetTag(oItem) == "H2_SenseiAmulet") && !(GetResRef(oItem) == "prc_sk_mblade_bs") && !(GetResRef(oItem) == "prc_sk_mblade_th") - && !(GetResRef(oItem) == "prc_sk_mblade_ss") + && !(GetResRef(oItem) == "prc_sk_mblade_ss") + && !(GetResRef(oItem) == "psi_sk_tshield_0") && !(GetResRef(oItem) == "prc_sk_mblade_ls")) { if ((GetIsItemPropertyValid(GetFirstItemProperty(oItem)) && !(GetItemPropertyTag(GetFirstItemProperty(oItem)) == "Tag_PRC_OnHitKeeper") @@ -326,7 +327,8 @@ void main() && !(GetTag(oItem) == "H2_SenseiAmulet") && !(GetResRef(oItem) == "prc_sk_mblade_bs") && !(GetResRef(oItem) == "prc_sk_mblade_th") - && !(GetResRef(oItem) == "prc_sk_mblade_ss") + && !(GetResRef(oItem) == "prc_sk_mblade_ss") + && !(GetResRef(oItem) == "psi_sk_tshield_0") && !(GetResRef(oItem) == "prc_sk_mblade_ls")) { if ((IPGetIsMeleeWeapon(oItem) || GetWeaponRanged(oItem)) && (iMagic || !iWeaponAllowed)) diff --git a/nwn/nwnprc/trunk/spells/nw_s0_cloudkilla.nss b/nwn/nwnprc/trunk/spells/nw_s0_cloudkilla.nss index adb67249..a9584506 100644 --- a/nwn/nwnprc/trunk/spells/nw_s0_cloudkilla.nss +++ b/nwn/nwnprc/trunk/spells/nw_s0_cloudkilla.nss @@ -17,104 +17,117 @@ //:: modified by mr_bumpkin Dec 4, 2003 //:: modified by Ornedan Dec 22, 2004 to PnP rules -#include "prc_inc_spells" -#include "prcsp_archmaginc" -#include "prc_add_spell_dc" +//:: Fixed poison immunity bypass 2026-04-28 - -void main() -{ -DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); -SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); - - - //Declare major variables - object oTarget = GetEnteringObject(); - int nHD = GetHitDice(oTarget); - effect eDeath = EffectDeath(); - effect eVis = EffectVisualEffect(VFX_IMP_DEATH); - effect eNeg = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - effect eConceal = EffectConcealment(20); - effect eVis2 = EffectVisualEffect(VFX_DUR_GHOST_TRANSPARENT); - effect eLink = EffectLinkEffects(eConceal, eVis2); - - //effect eDam; - int nDam = d4(); - int nMetaMagic = PRCGetMetaMagicFeat(); - - object aoeCreator = GetAreaOfEffectCreator(); - int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level"); - - //int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl); - - //Enter Metamagic conditions - if(nMetaMagic & METAMAGIC_MAXIMIZE) - { - nDam = 4;//Damage is at max - } - if(nMetaMagic & METAMAGIC_EMPOWER) - { - nDam = nDam + (nDam/2); //Damage/Healing is +50% - } - - if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator)) - { - // Check for Mastery of Shaping protection - if(CheckMasteryOfShapes(aoeCreator, oTarget)) - { - return; // Target is protected, exit - } - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CLOUDKILL)); - - //Concealement by fog happens no matter what - SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, oTarget, 0.0f, FALSE); - - //Determine spell effect based on the targets HD - if (nHD <= 3) - { - if(!GetIsImmune(oTarget, IMMUNITY_TYPE_DEATH)) - { - SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget); - } - } - else if (nHD >= 4 && nHD <= 6) - { - //Make a save or die - if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget, aoeCreator), SAVING_THROW_TYPE_DEATH, OBJECT_SELF)) - { - SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget); - SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - else - { - if (GetHasMettle(oTarget, SAVING_THROW_FORT)) - // This script does nothing if it has Mettle, bail - return; - AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDam, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); - SPApplyEffectToObject(DURATION_TYPE_INSTANT, eNeg, oTarget); - } - } - else - { - if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget, aoeCreator), SAVING_THROW_TYPE_SPELL, OBJECT_SELF)) - { - AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDam, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); - SPApplyEffectToObject(DURATION_TYPE_INSTANT, eNeg, oTarget); - } - else - { - if (GetHasMettle(oTarget, SAVING_THROW_FORT)) - // This script does nothing if it has Mettle, bail - return; - // Halve the damage on succesfull save. - AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDam / 2, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); - SPApplyEffectToObject(DURATION_TYPE_INSTANT, eNeg, oTarget); - } - } - } - -DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); -// Getting rid of the local integer storing the spellschool name -} +#include "prc_inc_spells" +#include "prcsp_archmaginc" +#include "prc_add_spell_dc" + +void main() +{ +DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); +SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); + + + //Declare major variables + object oTarget = GetEnteringObject(); + int nHD = GetHitDice(oTarget); + effect eDeath = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eNeg = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eConceal = EffectConcealment(20); + effect eVis2 = EffectVisualEffect(VFX_DUR_GHOST_TRANSPARENT); + effect eLink = EffectLinkEffects(eConceal, eVis2); + + //effect eDam; + int nDam = d4(); + int nMetaMagic = PRCGetMetaMagicFeat(); + + object aoeCreator = GetAreaOfEffectCreator(); + int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level"); + + //int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl); + + //Enter Metamagic conditions + if(nMetaMagic & METAMAGIC_MAXIMIZE) + { + nDam = 4;//Damage is at max + } + if(nMetaMagic & METAMAGIC_EMPOWER) + { + nDam = nDam + (nDam/2); //Damage/Healing is +50% + } + + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator)) + { + // Check for Mastery of Shaping protection + if(CheckMasteryOfShapes(aoeCreator, oTarget)) + { + return; // Target is protected, exit + } + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CLOUDKILL)); + + //Concealement by fog happens no matter what + SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, oTarget, 0.0f, FALSE); + + //Determine spell effect based on the targets HD + if (nHD <= 3) + { + if(!GetIsImmune(oTarget, IMMUNITY_TYPE_DEATH)) + { + SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget); + } + } + else if (nHD >= 4 && nHD <= 6) + { + //Make a save or die + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget, aoeCreator), SAVING_THROW_TYPE_DEATH, OBJECT_SELF)) + { + SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget); + SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + else + { + if (GetHasMettle(oTarget, SAVING_THROW_FORT)) + // This script does nothing if it has Mettle, bail + return; + // Check for poison immunity before applying damage + if(!GetIsImmune(oTarget, IMMUNITY_TYPE_POISON)) + { + AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDam, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); + SPApplyEffectToObject(DURATION_TYPE_INSTANT, eNeg, oTarget); + } + } + } + else + { + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget, aoeCreator), SAVING_THROW_TYPE_SPELL, OBJECT_SELF)) + { + // Check for poison immunity before applying damage + if(!GetIsImmune(oTarget, IMMUNITY_TYPE_POISON)) + { + AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDam, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); + SPApplyEffectToObject(DURATION_TYPE_INSTANT, eNeg, oTarget); + } + } + else + { + if (GetHasMettle(oTarget, SAVING_THROW_FORT)) + // This script does nothing if it has Mettle, bail + return; + // Check for poison immunity before applying damage + if(!GetIsImmune(oTarget, IMMUNITY_TYPE_POISON)) + { + // Halve the damage on succesfull save. + AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDam / 2, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); + SPApplyEffectToObject(DURATION_TYPE_INSTANT, eNeg, oTarget); + } + } + } + } + +DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); +// Getting rid of the local integer storing the spellschool name +} \ No newline at end of file diff --git a/nwn/nwnprc/trunk/spells/nw_s0_cloudkillb.nss b/nwn/nwnprc/trunk/spells/nw_s0_cloudkillb.nss index 8f2ec606..77caa44a 100644 --- a/nwn/nwnprc/trunk/spells/nw_s0_cloudkillb.nss +++ b/nwn/nwnprc/trunk/spells/nw_s0_cloudkillb.nss @@ -19,8 +19,6 @@ //:: modified by Ornedan Dec 22, 2004 #include "prc_inc_spells" - - void main() { DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); diff --git a/nwn/nwnprc/trunk/spells/nw_s0_cloudkillc.nss b/nwn/nwnprc/trunk/spells/nw_s0_cloudkillc.nss index 3b1490f1..051a4b4c 100644 --- a/nwn/nwnprc/trunk/spells/nw_s0_cloudkillc.nss +++ b/nwn/nwnprc/trunk/spells/nw_s0_cloudkillc.nss @@ -17,101 +17,117 @@ //:: modified by mr_bumpkin Dec 4, 2003 //:: modified by Ornedan Dec 22, 2004 to PnP rules -#include "prc_inc_spells" -#include "prc_add_spell_dc" -#include "prcsp_archmaginc" - - - -void main() -{ -DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); -SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); - - - //Declare major variables - int nMetaMagic = PRCGetMetaMagicFeat(); - int nDamage = d4(); - //effect eDam; - effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - object oTarget; - int nHD; - float fDelay; - - //Enter Metamagic conditions - if(nMetaMagic & METAMAGIC_MAXIMIZE) - { - nDamage = 4;//Damage is at max - } - if(nMetaMagic & METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - - //-------------------------------------------------------------------------- - // GZ 2003-Oct-15 - // When the caster is no longer there, all functions calling - // GetAreaOfEffectCreator will fail. Its better to remove the barrier then - //-------------------------------------------------------------------------- - if (!GetIsObjectValid(GetAreaOfEffectCreator())) - { - DestroyObject(OBJECT_SELF); - return; - } - - object aoeCreator = GetAreaOfEffectCreator(); - int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level"); - int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl); - - - //Set damage effect - //Get the first object in the persistant AOE - oTarget = GetFirstInPersistentObject(); - while(GetIsObjectValid(oTarget)) - { - fDelay = PRCGetRandomDelay(); - if(spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE , aoeCreator) ) - { - if(CheckMasteryOfShapes(aoeCreator, oTarget)) - { - // Target is protected by Mastery of Shaping, skip damage - oTarget = GetNextInPersistentObject(); - continue; - } - - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CLOUDKILL)); - - nHD = GetHitDice(oTarget); - - //Apply VFX impact and damage - //Creatures with less than 6 HD take full damage automatically - //Any with more than 6 get to save (Fortitued) for half - if (nHD < 6) - { - AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDamage, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); - } - else - { - if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, (PRCGetSaveDC(oTarget,aoeCreator)), SAVING_THROW_TYPE_SPELL, OBJECT_SELF)) - { - AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDamage, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); - } - else - { - if (GetHasMettle(oTarget, SAVING_THROW_FORT)) - // This script does nothing if it has Mettle, bail - nDamage = 0; - // Halve the damage on succesfull save. - AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDamage / 2, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); - } - } - } - //Get the next target in the AOE - oTarget = GetNextInPersistentObject(); - } - - -DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); -// Getting rid of the local integer storing the spellschool name -} +//:: Fixed poison immunity bypass 2026-04-28 +#include "prc_inc_spells" +#include "prc_add_spell_dc" +#include "prcsp_archmaginc" + + + +void main() +{ +DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); +SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); + + + //Declare major variables + int nMetaMagic = PRCGetMetaMagicFeat(); + int nDamage = d4(); + //effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + object oTarget; + int nHD; + float fDelay; + + //Enter Metamagic conditions + if(nMetaMagic & METAMAGIC_MAXIMIZE) + { + nDamage = 4;//Damage is at max + } + if(nMetaMagic & METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + object aoeCreator = GetAreaOfEffectCreator(); + int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level"); + int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl); + + + //Set damage effect + //Get the first object in the persistant AOE + oTarget = GetFirstInPersistentObject(); + while(GetIsObjectValid(oTarget)) + { + fDelay = PRCGetRandomDelay(); + if(spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE , aoeCreator) ) + { + if(CheckMasteryOfShapes(aoeCreator, oTarget)) + { + // Target is protected by Mastery of Shaping, skip damage + oTarget = GetNextInPersistentObject(); + continue; + } + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CLOUDKILL)); + + nHD = GetHitDice(oTarget); + + //Apply VFX impact and damage + //Creatures with less than 6 HD take full damage automatically + //Any with more than 6 get to save (Fortitued) for half + if (nHD < 6) + { + // Check for poison immunity before applying damage + if(!GetIsImmune(oTarget, IMMUNITY_TYPE_POISON)) + { + AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDamage, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); + SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + else + { + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, (PRCGetSaveDC(oTarget,aoeCreator)), SAVING_THROW_TYPE_SPELL, OBJECT_SELF)) + { + // Check for poison immunity before applying damage + if(!GetIsImmune(oTarget, IMMUNITY_TYPE_POISON)) + { + AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDamage, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); + SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + else + { + if (GetHasMettle(oTarget, SAVING_THROW_FORT)) + // This script does nothing if it has Mettle, bail + nDamage = 0; + // Check for poison immunity before applying damage + if(!GetIsImmune(oTarget, IMMUNITY_TYPE_POISON)) + { + // Halve the damage on succesfull save. + AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDamage / 2, DURATION_TYPE_TEMPORARY, TRUE, -1.0f)); + SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } + } + //Get the next target in the AOE + oTarget = GetNextInPersistentObject(); + } + + +DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); +// Getting rid of the local integer storing the spellschool name +} \ No newline at end of file diff --git a/nwn/nwnprc/trunk/spells/sp_blsflm.nss b/nwn/nwnprc/trunk/spells/sp_blsflm.nss index 3ac07fdf..fe65f6b7 100644 --- a/nwn/nwnprc/trunk/spells/sp_blsflm.nss +++ b/nwn/nwnprc/trunk/spells/sp_blsflm.nss @@ -12,6 +12,6 @@ void main() // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell if (!X2PreSpellCastCode()) return; - DoCone (6, 0, 10, -1, VFX_IMP_FLAME_S, - DAMAGE_TYPE_FIRE, SAVING_THROW_TYPE_FIRE); + DoCone (6, 0, 10, -1, VFX_IMP_FLAME_S, + DAMAGE_TYPE_FIRE, SAVING_THROW_TYPE_FIRE, SPELL_SCHOOL_EVOCATION, -1, TRUE); } diff --git a/nwn/nwnprc/trunk/spells/sp_cnv_trures.nss b/nwn/nwnprc/trunk/spells/sp_cnv_trures.nss index 4b55a631..225ebccc 100644 --- a/nwn/nwnprc/trunk/spells/sp_cnv_trures.nss +++ b/nwn/nwnprc/trunk/spells/sp_cnv_trures.nss @@ -70,7 +70,7 @@ void main() // variable named nStage determines the current conversation node // Function SetHeader to set the text displayed to the PC // Function AddChoice to add a response option for the PC. The responses are show in order added - if(nStage == STAGE_CHOOSE_TARGET) + if(nStage == STAGE_CHOOSE_TARGET) { // Set the header string sAmount = "Which ally would you like to resurrect?"; @@ -79,20 +79,49 @@ void main() // This reads all of the legal choices object oChoice = GetFirstFactionMember(oPC); int nChoice = 1; - while (GetIsObjectValid(oChoice)) // People in party - { - // If the selection is a PC - if (GetIsPC(oChoice) && oChoice != oPC && GetIsDead(oChoice)) - { - AddChoice(GetName(oChoice), nChoice, oPC); - StorePCForRecovery(oPC, oChoice, nChoice); - } - nChoice += 1; - oChoice = GetNextFactionMember(oPC); - } - - MarkStageSetUp(STAGE_CHOOSE_TARGET, oPC); // This prevents the setup being run for this stage again until MarkStageNotSetUp is called for it - SetDefaultTokens(); // Set the next, previous, exit and wait tokens to default values + + /* while (GetIsObjectValid(oChoice)) // People in party + { + // If the selection is a PC + if (GetIsPC(oChoice) && oChoice != oPC && GetIsDead(oChoice)) + { + AddChoice(GetName(oChoice), nChoice, oPC); + StorePCForRecovery(oPC, oChoice, nChoice); + } + nChoice += 1; + oChoice = GetNextFactionMember(oPC); + } */ + + // First, add all dead PCs (except caster) + object oTargetPC = GetFirstPC(); + nChoice = 1; + while (GetIsObjectValid(oTargetPC)) + { + if (oTargetPC != oPC && GetIsDead(oTargetPC)) + { + AddChoice(GetName(oTargetPC), nChoice, oPC); + StorePCForRecovery(oPC, oTargetPC, nChoice); + } + nChoice++; + oTargetPC = GetNextPC(); + } + + // Then, add dead NPCs in caster's party (cohorts, henchmen, etc.) + oChoice = GetFirstFactionMember(oPC); + while (GetIsObjectValid(oChoice)) + { + // Skip PCs (already added) and caster, add dead NPCs only + if (!GetIsPC(oChoice) && oChoice != oPC && GetIsDead(oChoice)) + { + AddChoice(GetName(oChoice), nChoice, oPC); + StorePCForRecovery(oPC, oChoice, nChoice); + } + nChoice++; + oChoice = GetNextFactionMember(oPC); + } + + MarkStageSetUp(STAGE_CHOOSE_TARGET, oPC); // This prevents the setup being run for this stage again until MarkStageNotSetUp is called for it + SetDefaultTokens(); // Set the next, previous, exit and wait tokens to default values } else if(nStage == STAGE_CONFIRMATION)//confirmation { diff --git a/nwn/nwnprc/trunk/users/Jaysyn/build_nasher.cmd b/nwn/nwnprc/trunk/users/Jaysyn/build_nasher.cmd new file mode 100644 index 00000000..f840df30 --- /dev/null +++ b/nwn/nwnprc/trunk/users/Jaysyn/build_nasher.cmd @@ -0,0 +1,151 @@ +@echo off +setlocal enabledelayedexpansion + +set OUTPUT=nasher.cfg + +( +echo [package] +echo name = "Package Name" +echo description = "Package Description" +echo version = "1.01prc8" +echo url = "" +echo author = "Original Author" +echo author = "" +echo. +echo [package.sources] +echo include = "src/module/**/*.{nss.json}" +echo include = "src/include/**/*.{nss}" +echo. +echo [package.rules] +echo "*" = "src/module/$ext" +echo. +) > %OUTPUT% + +REM ========================= +REM HAK FILES +REM ========================= +for %%f in (*.hak) do ( + set NAME=%%~nf + ( + echo [target] + echo name = "!NAME!" + echo file = "%%~nxf" + echo group = "haks" + echo description = "Hak target: !NAME!" + echo [target.sources] + echo include = "src/hakpak/!NAME!/**/*" + echo. + echo [target.rules] + echo "*" = "src/hakpak/!NAME!/$ext" + echo. + ) >> %OUTPUT% +) + +REM ========================= +REM ERF FILES +REM ========================= +for %%f in (*.erf) do ( + set NAME=%%~nf + ( + echo [target] + echo name = "!NAME!" + echo file = "%%~nxf" + echo group = "erf" + echo description = "ERF target: !NAME!" + echo [target.sources] + echo include = "src/erf/!NAME!/**/*" + echo. + echo [target.rules] + echo "*" = "src/erf/!NAME!/$ext" + echo. + ) >> %OUTPUT% +) + +REM ========================= +REM MODULE FILES (.mod) +REM ========================= +for %%f in (*.mod) do ( + set NAME=%%~nf + ( + echo [target] + echo name = "!NAME!" + echo file = "%%~nxf" + echo group = "module" + echo description = "Module target: !NAME!" + echo [target.sources] + echo include = "src/module/**/*" + echo include = "src/include/**/*" + echo. + echo [target.rules] + echo "*" = "src/module/$ext" + echo. + ) >> %OUTPUT% +) + +REM ========================= +REM TLK FILES +REM ========================= +for %%f in (*.tlk) do ( + set NAME=%%~nf + ( + echo [target] + echo name = "!NAME!" + echo file = "%%~nxf" + echo group = "tlk" + echo description = "TLK target: !NAME!" + echo [target.sources] + echo include = "src/tlk/*.json" + echo. + echo [target.rules] + echo "*" = "src/tlk/$ext" + echo. + ) >> %OUTPUT% +) + +echo Done. nasher.cfg created. +pause + + +REM @echo off +REM setlocal enabledelayedexpansion + +REM set OUTPUT=nasher.cfg + +REM ( +REM echo [package] +REM echo name = "Package Name" +REM echo description = "Package Description" +REM echo version = "1.01prc8" +REM echo url = "" +REM echo author = "Original Author" +REM echo author = "" +REM echo. +REM echo [package.sources] +REM echo include = "src/module/**/*.{nss.json}" +REM echo include = "src/include/**/*.{nss}" +REM echo. +REM echo [package.rules] +REM echo "*" = "src/module/$ext" +REM echo. +REM ) > %OUTPUT% + +REM for %%f in (*.hak) do ( + REM set NAME=%%~nf + + REM ( + REM echo [target] + REM echo name = "!NAME!" + REM echo file = "%%~nxf" + REM echo group = "haks" + REM echo description = "Auto-generated target for !NAME!" + REM echo [target.sources] + REM echo include = "src/hakpak/!NAME!/**/*" + REM echo. + REM echo [target.rules] + REM echo "*" = "src/hakpak/!NAME!/$ext" + REM echo. + REM ) >> %OUTPUT% +REM ) + +REM echo Done. nasher.cfg created. +REM pause \ No newline at end of file