2025/05/25 Update
Updated all ToB maneuvers with saves to respect Blade Meditation. Added HasBladeMeditationForDiscipline() Expanded Witchborn Binder for epic progression. Fixed a few bugs around Vile Martial strike. Echo Spell shouldn't target self or items. Muckdweller should have a -6 STR. Added new Vile Martial feats to GetVileFeats(). Grappling something now removes invisibility. Started on Power Attack NUI. Starmantle shouldn't stack. Factotum & Shadow Thief of Amn require UMD checks for scroll casting.
This commit is contained in:
@@ -27,7 +27,10 @@ void SetPowerAttack();
|
||||
//
|
||||
void main()
|
||||
{
|
||||
int amount = GetLocalInt(OBJECT_SELF, "PRC_PowerAttack_Level");
|
||||
|
||||
ExecuteScript("prc_nui_pwrattk");
|
||||
|
||||
/* int amount = GetLocalInt(OBJECT_SELF, "PRC_PowerAttack_Level");
|
||||
int prevPowerAttack5 = GetLocalInt(OBJECT_SELF, "prevPowerAttack5");
|
||||
int prevPowerAttack1 = GetLocalInt(OBJECT_SELF, "prevPowerAttack1");
|
||||
int powerAttack5Amount = amount / 5;
|
||||
@@ -89,4 +92,5 @@ void main()
|
||||
}
|
||||
SetLocalInt(OBJECT_SELF, "prevPowerAttack1", powerAttack1Amount);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
99
nwn/nwnprc/trunk/users/jaysyn/hp_string_util.nss
Normal file
99
nwn/nwnprc/trunk/users/jaysyn/hp_string_util.nss
Normal file
@@ -0,0 +1,99 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: String Util
|
||||
//:: hp_string_util
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A util class for providing useful string functions.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Rakiov
|
||||
//:: Created On: 22.05.2005
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// StringSplit
|
||||
// Takes a string and splits it by " " into a json list of strings
|
||||
// i.e. "this is a test" returns
|
||||
// {
|
||||
// "this",
|
||||
// "is",
|
||||
// "a",
|
||||
// "test"
|
||||
// }
|
||||
//
|
||||
// Parameters:
|
||||
// string input the string input
|
||||
//
|
||||
// Returns:
|
||||
// json the json list of words
|
||||
//
|
||||
json StringSplit(string input);
|
||||
|
||||
//
|
||||
// TrimString
|
||||
// Takes a string and trims any leading whitespace characters
|
||||
// i.e. " this is a test" returns
|
||||
// "this is a test"
|
||||
//
|
||||
// Parameters:
|
||||
// input string the input string to trim
|
||||
//
|
||||
// Returns:
|
||||
// string the trimmed string
|
||||
//
|
||||
string TrimString(string input);
|
||||
|
||||
json StringSplit(string input)
|
||||
{
|
||||
json retValue = JsonArray();
|
||||
|
||||
string subString = "";
|
||||
//trim any whitespace characters first
|
||||
string currString = TrimString(input);
|
||||
|
||||
// loop until we process the whole string
|
||||
while(currString != "")
|
||||
{
|
||||
string currChar = GetStringLeft(currString, 1);
|
||||
if (currChar != "" && currChar != " ")
|
||||
{
|
||||
// if the current character isn't nothing or whitespace, then add it
|
||||
// to the current sub string.
|
||||
subString += currChar;
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise if the substring is not empty, then add it to the list
|
||||
// of words to return
|
||||
if(subString != "")
|
||||
{
|
||||
retValue = JsonArrayInsert(retValue, JsonString(subString));
|
||||
subString = "";
|
||||
}
|
||||
}
|
||||
|
||||
// pop and move to next character
|
||||
currString = GetStringRight(currString, GetStringLength(currString)-1);
|
||||
}
|
||||
|
||||
// if there is any sub string left at the end of the loop, add it to the list
|
||||
if(subString != "")
|
||||
{
|
||||
retValue = JsonArrayInsert(retValue, JsonString(subString));
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
string TrimString(string input)
|
||||
{
|
||||
string retValue = input;
|
||||
|
||||
// while the string is not empty and we are looking at a whitespace, pop it.
|
||||
while(retValue != "" && GetStringLeft(retValue, 1) == " ")
|
||||
{
|
||||
retValue = GetStringRight(retValue, GetStringLength(retValue)-1);
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
Reference in New Issue
Block a user