24 lines
635 B
Plaintext
24 lines
635 B
Plaintext
/*
|
|
Conversation: persuade check with difficulty class of 25
|
|
(Pretty Damn Tricky). However, if PC is very low on hit points,
|
|
the difficulty drops to 12 (Rather Simple).
|
|
|
|
By WWWWolf 2003-10-29
|
|
*/
|
|
|
|
int StartingConditional()
|
|
{
|
|
|
|
object pc = GetPCSpeaker();
|
|
float hpratio = ( IntToFloat(GetCurrentHitPoints(pc)) /
|
|
IntToFloat(GetMaxHitPoints(pc)) );
|
|
|
|
int dc = 25; // Normal difficulty class
|
|
if(hpratio < 0.15f)
|
|
dc = 12; // Low-HP difficulty class
|
|
|
|
if(GetIsSkillSuccessful(pc, SKILL_PERSUADE, dc))
|
|
return TRUE;
|
|
return FALSE;
|
|
}
|