Hexblade doesn't get Shield proficency. Forsaker gets Craft (Alchemy) and Craft (Poison) as class skills. Forsaker can use default helms now. Forsaker can use arms & armor made from special materials. Fixed Dread Necromancer Spirit Worm TLK error. Disabled AI Talent for Awesome Blow. Fixed Warlock + Battlecaster ASF w/ Chain Shirt. Add Material and Quality itemprops to special material crafting. Fixed bug where breaking concentration can screw up next manifestation due to variables not being cleared. Tweaked Defensive Manifestation. Hexblades can't cast in heavy armor. +1 Attack Bonus from Masterwork is removed after enchantment to +1. Fixed issue where Forsaker's Ability Boost would stack with each login. Tweaked Celebrant of Sharess TLK entry. Tweaked Soulblade Warrior TLK entry. Tweaked Vow of Poverty's TLK entry.
132 lines
5.2 KiB
Plaintext
132 lines
5.2 KiB
Plaintext
//:://////////////////////////////////////////////
|
|
//:: Forsaker Ability Boost Conversation
|
|
//:: prc_forsake_abil
|
|
//:://////////////////////////////////////////////
|
|
/** @file
|
|
This allows you to choose ability to boost.
|
|
|
|
@author Stratovarius
|
|
@date Created - 27.12.2019
|
|
@edited by Stratovarius
|
|
@date 24.12.2024
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:://////////////////////////////////////////////
|
|
|
|
#include "inc_dynconv"
|
|
#include "prc_inc_function"
|
|
|
|
//////////////////////////////////////////////////
|
|
/* Constant defintions */
|
|
//////////////////////////////////////////////////
|
|
|
|
const int STAGE_SELECT_ABIL = 0;
|
|
|
|
//////////////////////////////////////////////////
|
|
/* Function defintions */
|
|
//////////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
object oPC = GetPCSpeaker();
|
|
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
|
|
int nStage = GetStage(oPC);
|
|
int nClass = GetPersistantLocalInt(oPC, "ForsakerBoostCheck");
|
|
|
|
// Check which of the conversation scripts called the scripts
|
|
if(nValue == 0) // All of them set the DynConv_Var to non-zero value, so something is wrong -> abort
|
|
{
|
|
if(DEBUG) DoDebug("prc_forsake_abil: Aborting due to error.");
|
|
return;
|
|
}
|
|
|
|
if(nValue == DYNCONV_SETUP_STAGE)
|
|
{
|
|
if(DEBUG) DoDebug("prc_forsake_abil: Running setup stage for stage " + IntToString(nStage));
|
|
// Check if this stage is marked as already set up
|
|
// This stops list duplication when scrolling
|
|
if(!GetIsStageSetUp(nStage, oPC))
|
|
{
|
|
if(DEBUG) DoDebug("prc_forsake_abil: Stage was not set up already. nStage: " + IntToString(nStage));
|
|
// Maneuver selection stage
|
|
if(nStage == STAGE_SELECT_ABIL)
|
|
{
|
|
if(DEBUG) DoDebug("prc_forsake_abil: Building maneuver selection");
|
|
SetHeader("Choose which ability to boost for Forsaker level " + IntToString(nClass) + ":");
|
|
AddChoice("Strength", ABILITY_STRENGTH, oPC);
|
|
AddChoice("Dexterity", ABILITY_DEXTERITY, oPC);
|
|
AddChoice("Constitution", ABILITY_CONSTITUTION, oPC);
|
|
AddChoice("Intelligence", ABILITY_INTELLIGENCE, oPC);
|
|
AddChoice("Wisdom", ABILITY_WISDOM, oPC);
|
|
AddChoice("Charisma", ABILITY_CHARISMA, oPC);
|
|
|
|
MarkStageSetUp(STAGE_SELECT_ABIL, oPC);
|
|
}
|
|
}
|
|
|
|
// Do token setup
|
|
SetupTokens();
|
|
}
|
|
else if(nValue == DYNCONV_EXITED)
|
|
{
|
|
if(DEBUG) DoDebug("prc_forsake_abil: Running exit handler");
|
|
}
|
|
else if(nValue == DYNCONV_ABORTED)
|
|
{
|
|
// This section should never be run, since aborting this conversation should
|
|
// always be forbidden and as such, any attempts to abort the conversation
|
|
// should be handled transparently by the system
|
|
if(DEBUG) DoDebug("prc_forsake_abil: ERROR: Conversation abort section run");
|
|
}
|
|
// Handle PC response
|
|
else
|
|
{
|
|
int nChoice = GetChoice(oPC);
|
|
if(DEBUG) DoDebug("prc_forsake_abil: Handling PC response, stage = " + IntToString(nStage) + "; nChoice = " +
|
|
IntToString(nChoice) + "; choice text = '" + GetChoiceText(oPC) + "'");
|
|
if(nStage == STAGE_SELECT_ABIL)
|
|
{
|
|
if(DEBUG) DoDebug("prc_forsake_abil: nChoice: " + IntToString(nChoice));
|
|
|
|
effect eAbility = EffectAbilityIncrease(nChoice, 1);
|
|
eAbility = UnyieldingEffect(eAbility);
|
|
eAbility = TagEffect(eAbility, "ForsakerAbilityBoost");
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eAbility, oPC); //Give the boost
|
|
|
|
SetPersistantLocalInt(oPC, "ForsakerBoost"+IntToString(nClass), nChoice+1); //Register the boost has been given
|
|
DeletePersistantLocalInt(oPC,"ForsakerBoostCheck");
|
|
|
|
// And we're all done
|
|
AllowExit(DYNCONV_EXIT_FORCE_EXIT);
|
|
}
|
|
|
|
if(DEBUG) DoDebug("prc_forsake_abil: New stage: " + IntToString(nStage));
|
|
|
|
// Store the stage value. If it has been changed, this clears out the choices
|
|
SetStage(nStage, oPC);
|
|
}
|
|
/* // Handle PC response
|
|
else
|
|
{
|
|
int nChoice = GetChoice(oPC);
|
|
if(DEBUG) DoDebug("prc_forsake_abil: Handling PC response, stage = " + IntToString(nStage) + "; nChoice = " +
|
|
IntToString(nChoice) + "; choice text = '" + GetChoiceText(oPC) + "'");
|
|
if(nStage == STAGE_SELECT_ABIL)
|
|
{
|
|
if(DEBUG) DoDebug("prc_forsake_abil: nChoice: " + IntToString(nChoice));
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT,UnyieldingEffect(EffectAbilityIncrease(nChoice,1)),oPC); //Give the boost
|
|
SetPersistantLocalInt(oPC, "ForsakerBoost"+IntToString(nClass), nChoice+1); //Register the boost has been given
|
|
DeletePersistantLocalInt(oPC,"ForsakerBoostCheck");
|
|
|
|
// And we're all done
|
|
AllowExit(DYNCONV_EXIT_FORCE_EXIT);
|
|
}
|
|
|
|
if(DEBUG) DoDebug("prc_forsake_abil: New stage: " + IntToString(nStage));
|
|
|
|
// Store the stage value. If it has been changed, this clears out the choices
|
|
SetStage(nStage, oPC);
|
|
} */
|
|
}
|