Alangara_PRC8/_module/nss/potionofsharp.nss
Jaysyn904 86feb9ca6f Initial commit
Initial commit.
2024-06-05 21:21:06 -04:00

38 lines
940 B
Plaintext

#include "prc_x2_itemprop"
#include "mn_inc_weaptypes"
effect eEffect;
object oTarget;
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.0
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
void main()
{
object oPC;
oPC = GetItemActivator();
// Potion automatically enchants weapon in main-slot
oTarget = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
if ( !( oTarget == OBJECT_INVALID) && GetSlashingWeapon( oTarget ) )
{
itemproperty ipEffect=ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_SLASHING, IP_CONST_DAMAGEBONUS_10);
IPSafeAddItemProperty( oTarget, ipEffect, 300.0f);
/*
eEffect = EffectDamageIncrease(DAMAGE_BONUS_10, DAMAGE_TYPE_BLUDGEONING);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
*/
}
else
{
FloatingTextStringOnCreature( "The oil has no effect", oPC, FALSE );
}
}