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

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

int iStabilizationChance            = 10;

// GUI Options When Disabled (0 HP)
string sDisabledGUIMessage          = "You have been knocked unconscious. You can wait for assistance or respawn.";
int bAllowRespawnWhenDisabled       = TRUE;
int bAllowWaitForHelpWhenDisabled   = TRUE;

// GUI Options When Stable (-1 to -9 and not bleeding)
string sStableGUIMessage            = "You have been knocked unconscious, but stopped bleeding. You can wait for assistance or respawn.";
int bAllowRespawnWhenStable         = TRUE;
int bAllowWaitForHelpWhenStable     = TRUE;

// GUI Options When Dead (-10 or lower)
string sDeathGUIMessage             = "You have breathed your last breath...";
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);

    }

}
