PRC8/trunk/psionics/psi_ac_conv_slv1.nss
Jaysyn904 1662218bb4 Initial upload.
Adding base PRC 4.19a files to repository.
2022-10-07 13:51:24 -04:00

24 lines
636 B
Plaintext

// Set the AC's level to 1
#include "psi_inc_ac_const"
const int nNewLevel = 1;
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);
}