PRC8/nwn/trunk/psionics/psi_ac_conv_slv6.nss
Jaysyn904 5914ed2ab5 Updated Release Archive
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.
2023-08-22 10:00:21 -04:00

24 lines
636 B
Plaintext

// Set the AC's level to 6
#include "psi_inc_ac_const"
const int nNewLevel = 6;
void main()
{
object oPC = GetPCSpeaker();
int nPrevLevel = GetLocalInt(oPC, ASTRAL_CONSTRUCT_LEVEL + EDIT);
// If the new level is less than the previous, wipe all selected options
if(nPrevLevel > nNewLevel)
{
SetLocalInt(oPC, ASTRAL_CONSTRUCT_OPTION_FLAGS + EDIT, 0);
SetLocalInt(oPC, ASTRAL_CONSTRUCT_RESISTANCE_FLAGS + EDIT, 0);
SetLocalInt(oPC, ASTRAL_CONSTRUCT_ENERGY_TOUCH_FLAGS + EDIT, 0);
SetLocalInt(oPC, ASTRAL_CONSTRUCT_ENERGY_BOLT_FLAGS + EDIT, 0);
}
SetLocalInt(oPC, ASTRAL_CONSTRUCT_LEVEL + EDIT, nNewLevel);
}