Fixed Sigmata radials

Fixed Sigmata radials.  Added spiritual weapon sanity checks.  Forsaker & Vow of Poverty fixes by @Fencas.  Updated Saint template.  Fixed minor TLK updates.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-12-28 22:43:13 -05:00
parent 99298bfadc
commit 7a4dc4dffc
12 changed files with 55 additions and 32 deletions

View File

@@ -45,7 +45,7 @@ void main()
object oShield;
object oSkin = GetPCSkin(oPC);
int nSlot;
int nEvent = GetRunningEvent();
int nEvent = GetCurrentlyRunningEvent();
int nLevel = GetCharacterLevel(oPC);
int nLevelCheck;
int nACArmor = 4+nLevel/3;
@@ -160,14 +160,18 @@ void main()
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature(GetName(oItem)+" would break your vow!", oPC, FALSE);
}
}
if(DEBUG) DoDebug("ft_vowofpoverty: Adding eventhooks");
AddEventScript(oPC, EVENT_ONPLAYEREQUIPITEM, "ft_vowofpoverty", TRUE, FALSE);
AddEventScript(oPC, EVENT_ONPLAYERUNEQUIPITEM, "ft_vowofpoverty", TRUE, FALSE);
}
oItem = GetPCItemLastUnequipped();
if((IPGetIsMeleeWeapon(oItem) || GetWeaponRanged(oItem)))
{
IPRemoveAllItemProperties(oItem, DURATION_TYPE_PERMANENT); //Remove bonus from unequiped weapons
}
AddEventScript(oPC, EVENT_SCRIPT_MODULE_ON_EQUIP_ITEM, "ft_vowofpoverty", TRUE, FALSE);
}
// We are called from the OnPlayerUnEquipItem eventhook. Remove OnHitCast: Unique Power from oPC's weapon
else if(nEvent == EVENT_ONPLAYEREQUIPITEM)
else if(nEvent == EVENT_SCRIPT_MODULE_ON_EQUIP_ITEM)
{
oItem = GetPCItemLastEquipped();
int iWeaponAllowed = GetBaseItemType(oItem) == BASE_ITEM_CLUB
@@ -186,18 +190,17 @@ void main()
|| GetBaseItemType(oItem) == BASE_ITEM_KATAR
|| GetBaseItemType(oItem) == BASE_ITEM_HEAVY_MACE
|| GetBaseItemType(oItem) == BASE_ITEM_BULLET;
if(GetIsItemPropertyValid(GetFirstItemProperty(oItem)) || !iWeaponAllowed) //Check if weapon is magical or not on allowed list
if((IPGetIsMeleeWeapon(oItem) || GetWeaponRanged(oItem)) &&
(GetIsItemPropertyValid(GetFirstItemProperty(oItem)) || !iWeaponAllowed)) //Check if weapon is magical or not on allowed list
{
AssignCommand(oPC, ClearAllActions(TRUE));
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature(GetName(oItem)+" would break your vow!", oPC, FALSE);
if(!(GetBaseItemType(oItem) == BASE_ITEM_SLING && GetItemPropertyType(GetFirstItemProperty(oItem)) == ITEM_PROPERTY_MIGHTY)) //Allow Mighty Bonus on Slings
{
AssignCommand(oPC, ClearAllActions(TRUE));
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature(GetName(oItem)+" would break your vow!", oPC, FALSE);
}
}
}
else if(nEvent == EVENT_ONPLAYERUNEQUIPITEM)
{
oItem = GetItemLastUnequipped();
if((IPGetIsMeleeWeapon(oItem) || GetWeaponRanged(oItem))) IPRemoveAllItemProperties(oItem, DURATION_TYPE_PERMANENT); //Remove bonus from unequiped weapons
}
}

View File

@@ -77,7 +77,6 @@ void main()
object oSummon = GetItemPossessor(oWeapon); // The wielder of the weapon
object oTarget = PRCGetSpellTargetObject(); // The creature being attacked
object oCaster = GetLocalObject(oSummon, "MY_CASTER"); // Retrieve the stored caster
object oPC = GetFirstPC(); // First player character for debug messages
int nRunEvent = GetRunningEvent();
@@ -85,7 +84,13 @@ void main()
{
oSummon = GetPCItemLastUnequippedBy();
oWeapon = GetPCItemLastUnequipped();
SendMessageToPC(GetFirstPC(), "prc_evnt_spirwep: Item OnUnEquip / OnUnAcquire Event running.");
if(GetIsPC(oSummon) == TRUE)
{
return;
}
if(DEBUG) DoDebug("prc_evnt_spirwep: Item OnUnEquip / OnUnAcquire Event running.");
HandleSpiritualWeaponUnequipEvent();
return;
}

View File

@@ -27,7 +27,6 @@ void main()
int nRegen = 1 + nClass/4;
int nSR = 10 + nClass;
int nEvent = GetCurrentlyRunningEvent();
//PostString(oPC, "prc_forsaker running, event: " + IntToString(nEvent), 0, 0, SCREEN_ANCHOR_TOP_LEFT, 20.0, 0xFF0000FF, 0x00000000);
// We aren't being called from any event, instead from EvalPRCFeats
if(nEvent == FALSE)
@@ -95,7 +94,9 @@ void main()
{
oItem = GetPCItemLastEquipped();
//Check if weapons are magical
if(GetIsItemPropertyValid(GetFirstItemProperty(oItem)) && (IPGetIsMeleeWeapon(oItem) || GetWeaponRanged(oItem))) //Check if weapon is magical or not on allowed list
if(GetIsItemPropertyValid(GetFirstItemProperty(oItem)) && (IPGetIsMeleeWeapon(oItem) || GetWeaponRanged(oItem)) &&
!(GetBaseItemType(oItem) == BASE_ITEM_SLING && GetItemPropertyType(GetFirstItemProperty(oItem)) == ITEM_PROPERTY_MIGHTY))
//Check if weapon is magical or not on allowed list
{
AssignCommand(oPC, ClearAllActions(TRUE));
AssignCommand(oPC, ActionUnequipItem(oItem));
@@ -120,4 +121,11 @@ void main()
}
}
}
//Add AC bonus for rage
//else if(nEvent == EVENT_ONHEARTBEAT)
//{
// PostString(oPC, "Tum tum", 0, 0, SCREEN_ANCHOR_TOP_LEFT, 20.0, 0xFF0000FF, 0x00000000);
// if (nClass >= 3) ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectACIncrease(GetAbilityModifier(ABILITY_CONSTITUTION, oPC), AC_NATURAL_BONUS), oPC);
//}
}

View File

@@ -227,7 +227,7 @@ void main()
//:: Setup Holy Touch extra damage vs evil
object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
effect eEffect1 = VersusAlignmentEffect(EffectDamageIncrease(7, DAMAGE_TYPE_DIVINE), 0, ALIGNMENT_EVIL);
effect eEffect1 = VersusAlignmentEffect(EffectDamageIncrease(DAMAGE_BONUS_1d6, DAMAGE_TYPE_DIVINE), 0, ALIGNMENT_EVIL);
effect eEffect2 = VersusAlignmentEffect(EffectDamageIncrease(DAMAGE_BONUS_2, DAMAGE_TYPE_DIVINE), 0, ALIGNMENT_EVIL);
eEffect2 = VersusRacialTypeEffect(eEffect2, RACIAL_TYPE_OUTSIDER);
effect eEffect3 = VersusAlignmentEffect(EffectDamageIncrease(DAMAGE_BONUS_2, DAMAGE_TYPE_DIVINE), 0, ALIGNMENT_EVIL);