GetScaledDuration

From NWN Lexicon
Jump to navigationJump to search



GetScaledDuration(int, object)

Determines a scaled down duration based on the game difficulty setting.

int GetScaledDuration(
    int nActualDuration,
    object oTarget
);

Parameters

nActualDuration

The spell duration as it would be normally.

oTarget

The target of the spell.


Description

Returns an integer that represents the scaled down duration calculated based on difficulty.



Remarks

This function scales down a duration only if the taget is a PC and the game difficulty (GAME_DIFFICULT_*) is normal or easier. Note this does not check whether the spell is beneficial or not and thereby will scale down beneficial spells which is probably not the intention of the caller.

Can be found in nw_i0_spells.nss line 29.


Requirements

#include " nw_i0_spells "

Version

1.22

See Also



 author: Tom Cassiotis