generated from Jaysyn/ModuleTemplate
2025/12/24 Update
Hooked up new GUI module event. Updated PRC8 includes. Updated nasher.cfg.
This commit is contained in:
@@ -20,9 +20,6 @@
|
||||
//:: Last Update: 2003-10-07
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: Test void
|
||||
//:: void main (){}
|
||||
|
||||
//Changed by primogenitor to include CEP itemtypes
|
||||
|
||||
// * The tag of the ip work container, a placeable which has to be set into each
|
||||
@@ -697,6 +694,7 @@ if(nItem == BASE_ITEM_BASTARDSWORD
|
||||
|| nItem == BASE_ITEM_SICKLE
|
||||
|| nItem == BASE_ITEM_TWOBLADEDSWORD
|
||||
|| nItem == BASE_ITEM_CLUB
|
||||
|| nItem == BASE_ITEM_CRAFTED_SCEPTER
|
||||
|| nItem == BASE_ITEM_DAGGER
|
||||
|| nItem == BASE_ITEM_DIREMACE
|
||||
|| nItem == BASE_ITEM_HEAVYFLAIL
|
||||
@@ -729,6 +727,7 @@ if(nItem == BASE_ITEM_BASTARDSWORD
|
||||
|| nItem == BASE_ITEM_ELVEN_THINBLADE
|
||||
|| nItem == BASE_ITEM_ELVEN_COURTBLADE
|
||||
|| nItem == BASE_ITEM_CRAFTED_STAFF
|
||||
|| nItem == BASE_ITEM_CRAFTED_SCEPTER
|
||||
|| nItem == 300 //CEP Trident
|
||||
|| nItem == 303 //CEP Sai
|
||||
|| nItem == 304 //CEP nunchaku
|
||||
@@ -768,7 +767,6 @@ int IPGetIsBludgeoningWeapon(object oItem)
|
||||
// ----------------------------------------------------------------------------
|
||||
// Return the IP_CONST_CASTSPELL_* ID matching to the SPELL_* constant given
|
||||
// in nSPELL_ID.
|
||||
// This uses Get2DAstring, so it is slow. Avoid using in loops!
|
||||
// returns -1 if there is no matching property for a spell
|
||||
// ----------------------------------------------------------------------------
|
||||
int IPGetIPConstCastSpellFromSpellID(int nSpellID)
|
||||
@@ -1613,31 +1611,140 @@ int IPGetDamageBonusConstantFromNumber(int nNumber)
|
||||
// oOld - Item equipped before polymorphing (source for item props)
|
||||
// oNew - Item equipped after polymorphing (target for item props)
|
||||
// bWeapon - Must be set TRUE when oOld is a weapon.
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
void IPWildShapeCopyItemProperties(object oOld, object oNew, int bWeapon = FALSE)
|
||||
{
|
||||
if (GetIsObjectValid(oOld) && GetIsObjectValid(oNew))
|
||||
{
|
||||
itemproperty ip = GetFirstItemProperty(oOld);
|
||||
while (GetIsItemPropertyValid(ip))
|
||||
{
|
||||
if (bWeapon)
|
||||
{
|
||||
if (GetWeaponRanged(oOld) == GetWeaponRanged(oNew) )
|
||||
{
|
||||
AddItemProperty(DURATION_TYPE_PERMANENT,ip,oNew);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItemProperty(DURATION_TYPE_PERMANENT,ip,oNew);
|
||||
}
|
||||
ip = GetNextItemProperty(oOld);
|
||||
// Invalid source/target
|
||||
if (!GetIsObjectValid(oOld) || !GetIsObjectValid(oNew))
|
||||
return;
|
||||
|
||||
// Determine possessor
|
||||
object oPC = GetItemPossessor(oOld);
|
||||
if (!GetIsObjectValid(oPC))
|
||||
oPC = GetItemPossessor(oNew);
|
||||
|
||||
}
|
||||
}
|
||||
if (!GetIsObjectValid(oPC))
|
||||
{
|
||||
if (DEBUG) DoDebug("IPWS: Unable to determine item possessor");
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine glove state once
|
||||
int bMonkGloves = GetLocalInt(oPC, "WEARING_MONK_GLOVES");
|
||||
|
||||
// Weapon ranged mismatch = do nothing (intent is no partial copy)
|
||||
if (bWeapon && GetWeaponRanged(oOld) != GetWeaponRanged(oNew))
|
||||
{
|
||||
if (DEBUG) DoDebug("IPWS: Weapon ranged mismatch <20> skipping all IP copy");
|
||||
return;
|
||||
}
|
||||
|
||||
// Begin property copy
|
||||
itemproperty ip = GetFirstItemProperty(oOld);
|
||||
while (GetIsItemPropertyValid(ip))
|
||||
{
|
||||
int nType = GetItemPropertyType(ip);
|
||||
|
||||
// If copying from gloves and monk gloves are active
|
||||
if (bMonkGloves
|
||||
&& (nType == ITEM_PROPERTY_DAMAGE_BONUS
|
||||
|| nType == ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP
|
||||
|| nType == ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP))
|
||||
{
|
||||
// Always apply glove damage IPs
|
||||
AddItemProperty(DURATION_TYPE_PERMANENT, ip, oNew);
|
||||
ip = GetNextItemProperty(oOld);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Normal weapon pass
|
||||
if (bWeapon)
|
||||
{
|
||||
// If monk gloves active ? skip ALL weapon damage IPs
|
||||
if (bMonkGloves
|
||||
&& (nType == ITEM_PROPERTY_DAMAGE_BONUS
|
||||
|| nType == ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP
|
||||
|| nType == ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP))
|
||||
{
|
||||
ip = GetNextItemProperty(oOld);
|
||||
continue;
|
||||
}
|
||||
|
||||
AddItemProperty(DURATION_TYPE_PERMANENT, ip, oNew);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItemProperty(DURATION_TYPE_PERMANENT, ip, oNew);
|
||||
}
|
||||
|
||||
ip = GetNextItemProperty(oOld);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* // ----------------------------------------------------------------------------
|
||||
// GZ, Sept. 30 2003
|
||||
// Special Version of Copy Item Properties for use with greater wild shape
|
||||
// oOld - Item equipped before polymorphing (source for item props)
|
||||
// oNew - Item equipped after polymorphing (target for item props)
|
||||
// bWeapon - Must be set TRUE when oOld is a weapon.
|
||||
// ----------------------------------------------------------------------------
|
||||
void IPWildShapeCopyItemProperties(object oOld, object oNew, int bWeapon = FALSE)
|
||||
{
|
||||
if (!GetIsObjectValid(oOld) || !GetIsObjectValid(oNew))
|
||||
return;
|
||||
|
||||
object oPC = GetItemPossessor(oOld);
|
||||
if (!GetIsObjectValid(oPC))
|
||||
{
|
||||
oPC = GetItemPossessor(oNew);
|
||||
}
|
||||
if (!GetIsObjectValid(oPC))
|
||||
{
|
||||
if (DEBUG) DoDebug("IPWS: Unable to determine item possessor");
|
||||
return;
|
||||
}
|
||||
|
||||
int bMonkGloves = GetLocalInt(oPC, "WEARING_MONK_GLOVES");
|
||||
|
||||
itemproperty ip = GetFirstItemProperty(oOld);
|
||||
while (GetIsItemPropertyValid(ip))
|
||||
{
|
||||
if (bWeapon)
|
||||
{
|
||||
// Gloves override weapon damage <20> skip weapon damage properties
|
||||
if (bMonkGloves)
|
||||
{
|
||||
int nType = GetItemPropertyType(ip);
|
||||
|
||||
// skip damage props
|
||||
if (nType == ITEM_PROPERTY_DAMAGE_BONUS
|
||||
|| nType == ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP
|
||||
|| nType == ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP)
|
||||
{
|
||||
if (DEBUG) DoDebug("IPWS: SKIPPED weapon damage IP");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DEBUG) DoDebug("IPWS: Applied non-damage weapon IP");
|
||||
AddItemProperty(DURATION_TYPE_PERMANENT, ip, oNew);
|
||||
}
|
||||
|
||||
}
|
||||
else if (GetWeaponRanged(oOld) == GetWeaponRanged(oNew) )
|
||||
{
|
||||
AddItemProperty(DURATION_TYPE_PERMANENT,ip,oNew);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItemProperty(DURATION_TYPE_PERMANENT,ip,oNew);
|
||||
}
|
||||
|
||||
ip = GetNextItemProperty(oOld);
|
||||
}
|
||||
} */
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Returns the current enhancement bonus of a weapon (+1 to +20), 0 if there is
|
||||
// no enhancement bonus. You can test for a specific type of enhancement bonus
|
||||
@@ -1883,7 +1990,7 @@ int IPDamageConstant(int nDamBon)
|
||||
case 49: nIPBonus = IP_CONST_DAMAGEBONUS_49; break;
|
||||
case 50: nIPBonus = IP_CONST_DAMAGEBONUS_50; break;
|
||||
}
|
||||
if (nDamBon > 20) nIPBonus = IP_CONST_DAMAGEBONUS_50;
|
||||
if (nDamBon > 50) nIPBonus = IP_CONST_DAMAGEBONUS_50;
|
||||
|
||||
return nIPBonus;
|
||||
}
|
||||
@@ -2019,4 +2126,6 @@ int IPOnHitSaveDC(int nSaveDC)
|
||||
if (nSaveDC > 26) nIPBonus = IP_CONST_ONHIT_SAVEDC_26;
|
||||
|
||||
return nIPBonus;
|
||||
} */
|
||||
} */
|
||||
|
||||
//:: void main(){}
|
||||
Reference in New Issue
Block a user