Files
PRC8/nwn/nwnprc/trunk/newspellbook/tob_etbl_island.nss
Jaysyn904 e0e5473314 2025/11/30 Update
Moved PRC8 notes into DevNotes.
Updated Eternal Blade TLK to explain abilities better.
Updated Werewolf to use "monk" gloves when they exist.
Added PRC switch to allow Wildshapes to always merge the arms slot.
Clicking on a spell effect now opens the spell effect NUI. (@Rakiov))
Added prc_onplayergui event script for spell effect handling. (@Rakiov)
Added prc_nui_sd_event and prc_nui_dur_view to handle displaying spell durations. (@Rakiov)
Corrected typo in switch name for PRC_CRAFT_POISON_USE_INGREDIENTS
Allowed mindblade to work with Vow of Poverty.
Eternal Blade - Island in TIme now has a VFX, looks slightly better.
Eternal Blade - Guided Strike now functions.
Time Stands Still now has an impact VFX.
Added optional PRC_ALLOWED_TO_REMOVE_FRIENDLY_SPELLS and PRC_ALLOWED_TO_SEE_HOSTILE_SPELLS switches for the spell effect view window.
2025-11-30 21:53:24 -05:00

79 lines
2.2 KiB
Plaintext

/*
----------------
Island in Time
tob_etbl_island.nss
----------------
10 MAR 09 by GC
*/ /** @file
Island in Time
You throw yourself into a fight under your blade guide's careful direction.
You meld with it, allowing it to control your actions while you draw
upon it's vast combat experience.
Once per encounter, you can take a turn as an immediate action.
*/
#include "tob_inc_move"
#include "tob_movehook"
////#include "prc_alterations"
void main()
{
if (!PreManeuverCastCode())
{
// If code within the PreManeuverCastCode (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
object oInitiator = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
if(!TakeSwiftAction(oInitiator)) return;
// Blade guide check
if(GetLocalInt(oInitiator, "ETBL_BladeGuideDead"))
{
FloatingTextStringOnCreature("*Cannot use ability without blade guide*", oInitiator, FALSE);
return;
}
// Expended already?
if(GetLocalInt(oInitiator, "ETBL_Island_In_Time_Expended"))
{
FloatingTextStringOnCreature("*Island in Time expended already*", oInitiator, FALSE);
return;
}
struct maneuver move = EvaluateManeuver(oInitiator, oTarget, TRUE);
effect eHit = EffectVisualEffect(VFX_COM_HIT_SONIC );
if(move.bCanManeuver)
{
// Get total attacks per round
int nMainAttacks = GetMainHandAttacks(oInitiator);
int nOffAttacks = GetOffHandAttacks(oInitiator, nMainAttacks);
int nTotalAttacks = nMainAttacks + nOffAttacks;
effect eVFX = EffectVisualEffect(VFX_IMP_HOLY_AID_DN_BLUE );
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVFX, GetLocation(oInitiator));
// Apply VFX for each attack
int i;
for (i = 0; i < nTotalAttacks; i++)
{
DelayCommand(i * 0.2, ApplyEffectAtLocation(
DURATION_TYPE_INSTANT,
EffectVisualEffect(VFX_COM_HIT_SONIC),
GetLocation(oTarget)
));
}
DelayCommand(0.0, PerformAttackRound(oTarget, oInitiator, eHit, 0.0, 0, 0, 0, FALSE, "Island in Time Hit!", "Island in Time Miss", FALSE, FALSE, FALSE));
// Expend ability
SetLocalInt(oInitiator, "ETBL_Island_In_Time_Expended", TRUE);
}
}