コード例 #1
0
ファイル: resist.c プロジェクト: MarvinPA/mpa-poschengband
int res_calc_dam(int which, int dam)
{
    int pct1 = res_pct(which);
    int pct2 = _randomize(pct1);
    int result = dam;

    result -= pct2 * dam / 100;
    if (result < 0)
        result = 0;

    return result;
}
コード例 #2
0
ファイル: engine.cpp プロジェクト: unpaleness/cellular_life
void Field::randomize(short percentage_fill) { _randomize(percentage_fill); }