2026/04/29 Early update
Fixed targeting for Claws of the Savage. Updated VFX for Landshark Boots. Made GetTotalUsableEssentia respect Incandescent Overload. Added the rest of the old CEP2 weapons to prc_x2_itemprop. Fixed DoCone() to allow skipping SR checks. Fixed Blast of Flame to not have an SR check. Fixed Lightining Guantlet's Hand bind to add electrical damage to melee weapon, once per round. Vow of Poverty now allows Shield of Thought. Cloudkill now obeys poison immunity True Resurrection should work on any PC as well as any NPC in your party.
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -19,8 +19,6 @@
|
||||
//:: modified by Ornedan Dec 22, 2004
|
||||
#include "prc_inc_spells"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user