forked from Jaysyn/PRC8
Updated Release Archive. Fixed Mage-killer prereqs. Removed old LETO & ConvoCC related files. Added organized spell scroll store. Fixed Gloura spellbook. Various TLK fixes. Reorganized Repo. Removed invalid user folders. Added DocGen back in.
43 lines
1.4 KiB
Plaintext
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);
|
|
}
|