PRC8/nwn/nwnprc/trunk/scripts/prc_peerless.nss
Jaysyn904 6ec137a24e Updated AMS marker feats
Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
2024-02-11 14:01:05 -05:00

43 lines
1.4 KiB
Plaintext

#include "prc_alterations"
/// +3 on Craft Weapon /////////
void Expert_Bowyer(object oPC, object oSkin, int nBowyer)
{
if(GetLocalInt(oSkin, "PABowyer") == nBowyer) return;
SetCompositeBonus(oSkin, "PABowyer", nBowyer, ITEM_PROPERTY_SKILL_BONUS, SKILL_CRAFT_WEAPON);
}
// Removes Power Shot feats if they unequip their bow
void CheckPowerShot(object oPC)
{
int bHasSpellActive = FALSE;
// if the feat is active, remove the spell's effects.
if(GetHasSpellEffect(SPELL_PA_POWERSHOT, oPC) ||
GetHasSpellEffect(SPELL_PA_IMP_POWERSHOT, oPC) ||
GetHasSpellEffect(SPELL_PA_SUP_POWERSHOT, oPC))
{
FloatingTextStringOnCreature("*Power Shot Deactivated - No Bow Equipped*", OBJECT_SELF, FALSE);
PRCRemoveSpellEffects(SPELL_PA_POWERSHOT, OBJECT_SELF, OBJECT_SELF);
PRCRemoveSpellEffects(SPELL_PA_IMP_POWERSHOT, OBJECT_SELF, OBJECT_SELF);
PRCRemoveSpellEffects(SPELL_PA_SUP_POWERSHOT, OBJECT_SELF, OBJECT_SELF);
}
}
void main()
{
//Declare main variables.
object oPC = OBJECT_SELF;
object oSkin = GetPCSkin(oPC);
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, OBJECT_SELF);
int iBow = GetBaseItemType(oWeapon) == BASE_ITEM_LONGBOW || GetBaseItemType(oWeapon) == BASE_ITEM_SHORTBOW;
int nBowyer = GetHasFeat(FEAT_EXPERT_BOWYER, oPC) ? 3 : 0;
if (nBowyer>0) Expert_Bowyer(oPC, oSkin, nBowyer);
if (!iBow) CheckPowerShot(oPC);
}