2025/08/22 Update
Reverted to 4.56 to track down a bug that started in 4.57. Bugfixed back to 4.61. It's amazing the damage that one skipped case statement can do.
This commit is contained in:
@@ -2,20 +2,72 @@
|
||||
//:: Name Inlindl School
|
||||
//:: FileName prc_ft_inlindl.nss
|
||||
//:://////////////////////////////////////////////
|
||||
/** You can choose to sacrifice your shield bonus
|
||||
to AC in exchange for a bonus on melee attack rolls
|
||||
equal to one-half that bonus. This bonus applies
|
||||
only on attacks made with light weapons.
|
||||
/**
|
||||
You can choose to sacrifice your shield bonus
|
||||
to AC in exchange for a bonus on melee attack rolls
|
||||
equal to one-half that bonus. This bonus applies
|
||||
only on attacks made with light weapons.
|
||||
|
||||
Author: Stratovarius
|
||||
Created: 12.11.2018
|
||||
Author: Stratovarius
|
||||
Created: 12.11.2018
|
||||
|
||||
Fixed by: Jaysyn
|
||||
Fixed on: 2025-07-24 16:18:03
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "prc_inc_spells"
|
||||
|
||||
#include "prc_inc_combat"
|
||||
#include "prc_inc_combmove"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oInitiator = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND);
|
||||
|
||||
int nWeaponType = GetBaseItemType(oWeapon);
|
||||
int nWeaponSize = GetWeaponSize(oWeapon);
|
||||
int nCreatureSize = GetCreatureSize(oInitiator);
|
||||
|
||||
|
||||
if(DEBUG) DoDebug("prc_ft_inlindl >> Base item type: " + IntToString(nWeaponType));
|
||||
|
||||
if(DEBUG) DoDebug("prc_ft_inlindl >> Base item size: " + IntToString(nWeaponSize));
|
||||
|
||||
if(DEBUG) DoDebug("prc_ft_inlindl >> Creature size: " + IntToString(nCreatureSize));
|
||||
|
||||
effect eBlank;
|
||||
|
||||
if (nWeaponType != BASE_ITEM_RAPIER && nWeaponType != BASE_ITEM_ELVEN_THINBLADE && nWeaponType != BASE_ITEM_ELVEN_COURTBLADE &&
|
||||
(nWeaponSize > 3 || nWeaponSize >= nCreatureSize))
|
||||
{
|
||||
SendMessageToPC(oInitiator, "Inlindl School strike requires a light weapon.");
|
||||
PerformAttack(oTarget, oInitiator, eBlank);
|
||||
return;
|
||||
}
|
||||
|
||||
PRCRemoveEffectsFromSpell(oInitiator, GetSpellId());
|
||||
|
||||
int nShieldAC = GetTotalShieldACBonus(oInitiator);
|
||||
|
||||
effect eShieldMalus = EffectACDecrease(nShieldAC, AC_SHIELD_ENCHANTMENT_BONUS);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_ARMOR_OF_DARKNESS);
|
||||
effect eLink = EffectLinkEffects(eShieldMalus, eVis);
|
||||
|
||||
//DelayCommand(0.0f, ClearAllActions());
|
||||
//DelayCommand(0.1f, AssignCommand(oInitiator,
|
||||
PerformAttackRound(oTarget, oInitiator, eBlank, 0.0, nShieldAC/2, 0, 0, TRUE, "Inlindl School Strike (+"+IntToString(nShieldAC/2)+") : Hit!", "Inlindl School Strike (+"+IntToString(nShieldAC/2)+") : Miss!");
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eLink), oInitiator, 5.9);
|
||||
|
||||
ActionAttack(oTarget);
|
||||
|
||||
}
|
||||
|
||||
// Almost every part of this is wrong. - Jaysyn
|
||||
/* void main()
|
||||
{
|
||||
object oInitiator = OBJECT_SELF;
|
||||
int nSwitch = GetLocalInt(oInitiator, "InlindlSchool");
|
||||
@@ -35,5 +87,5 @@ void main()
|
||||
eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_ARMOR_OF_DARKNESS));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eLink), oInitiator, 6.0);
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
|
Reference in New Issue
Block a user