Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4120,3 +4120,7 @@ When setting a property like MORE to the a spell or skill defname, trying to rea
- Fixed: Hit chance to paralyzed targets with sphere custom (0) formula is now 80-100% (was 0-10%).
- Added: Implemented Hit chance increase / decrease to sphere custom formula (0).
- Fixed: Equiping armor and weapon with spelleffect could crash the SphereServer (#1538)

24-03-2026, canerksk
- Added: Optional third parameter to SKILLCHECK to control bell curve usage (true/false).
- Changed: SKILLCHECK now allows disabling bell curve for linear skill success checks.
39 changes: 27 additions & 12 deletions src/game/chars/CChar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2658,18 +2658,33 @@ bool CChar::r_WriteVal( lpctstr ptcKey, CSString & sVal, CTextConsole * pSrc, bo
return true;
}
case CHC_SKILLCHECK: // odd way to get skills checking into the triggers.
ptcKey += 10;
SKIP_SEPARATORS(ptcKey);
{
tchar * ppArgs[2];
if ( !Str_ParseCmds(const_cast<tchar *>(ptcKey), ppArgs, ARRAY_COUNT(ppArgs)) )
return false;
SKILL_TYPE iSkill = g_Cfg.FindSkillKey( ppArgs[0] );
if ( iSkill == SKILL_NONE )
return false;
sVal.FormatVal( Skill_CheckSuccess( iSkill, Exp_GetVal( ppArgs[1] )));
}
return true;
{
ptcKey += 10;
SKIP_SEPARATORS(ptcKey);

tchar* ppArgs[3] = { nullptr };

if ( !Str_ParseCmds(const_cast<tchar*>(ptcKey), ppArgs, ARRAY_COUNT(ppArgs)) )
return false;

// skill
SKILL_TYPE iSkill = g_Cfg.FindSkillKey(ppArgs[0]);
if ( iSkill == SKILL_NONE )
return false;

// difficulty (safe)
int iDiff = 0;
if ( ppArgs[1] && *ppArgs[1] )
iDiff = Exp_GetVal(ppArgs[1]);

// bell curve (default = true)
bool fUseBellCurve = true;
if ( ppArgs[2] && *ppArgs[2] )
fUseBellCurve = (Exp_GetVal(ppArgs[2]) != 0);

sVal.FormatVal( Skill_CheckSuccess(iSkill, iDiff, fUseBellCurve) );
return true;
}
case CHC_SKILLADJUSTED:
ptcKey += 13;
SKIP_SEPARATORS(ptcKey);
Expand Down
Loading