// bleeding_config by Brian "spilth" Kelly
// For Neverwinter Nights - Bleeding Tutorial

// Included file, just make sure its named "bleeding_config"

// *** Configuration Variables - These are meant to be changed ***

int iStabilizationChance            = 10;

// GUI Options When Disabled (0 HP)
string sDisabledGUIMessage          = "You've been disabled.  You can either wait for another player to help or respawn if nobody else is around.";
int bAllowRespawnWhenDisabled       = TRUE;
int bAllowWaitForHelpWhenDisabled   = TRUE;

// GUI Options When Stable (-1 to -9 and not bleeding)
string sStableGUIMessage            = "You've stabilized!  You can either wait for another player to help or respawn if nobody else is around.";
int bAllowRespawnWhenStable         = TRUE;
int bAllowWaitForHelpWhenStable     = TRUE;

// GUI Options When Dead (-10 or lower)
string sDeathGUIMessage             = "You've died!  Here are your options...";
int bAllowRespawnWhenDead           = TRUE;
int bAllowWaitForHelpWhenDead       = TRUE;

// *** Constants - DO NOT CHANGE THESE! ***
int PC_HEALTH_ALIVE     = 0;    // HP > 0
int PC_HEALTH_DISABLED  = 1;    // HP = 0
int PC_HEALTH_DYING     = 2;    // -10 < HP < 0 & Bleeding
int PC_HEALTH_STABLE    = 3;    // -10 < HP < 0 & Stabilized
int PC_HEALTH_DEAD      = 4;    // HP <= -10

// A tool to help us test
void SetPCHitPoints(object oPC, int iTargetHitPoints) {
    if (GetIsPC(oPC)) {
        int iDamage =  GetCurrentHitPoints(oPC) - iTargetHitPoints;
        effect eDamage = EffectDamage(iDamage, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_FIVE);
        ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oPC);

    }

}