… | |
… | |
1891 | |
1891 | |
1892 | /* basically: maxdam /= area; we try to "simulate" a float |
1892 | /* basically: maxdam /= area; we try to "simulate" a float |
1893 | value-effect */ |
1893 | value-effect */ |
1894 | remainder = 100 * (maxdam % area) / area; |
1894 | remainder = 100 * (maxdam % area) / area; |
1895 | maxdam /= area; |
1895 | maxdam /= area; |
1896 | if (RANDOM () % 100 < remainder) |
1896 | if (rndm (100) < remainder) |
1897 | maxdam++; |
1897 | maxdam++; |
1898 | } |
1898 | } |
1899 | |
1899 | |
1900 | #ifdef ATTACK_DEBUG |
1900 | #ifdef ATTACK_DEBUG |
1901 | LOG (llevDebug, "Attacktype %d did %d damage\n", type, maxdam); |
1901 | LOG (llevDebug, "Attacktype %d did %d damage\n", type, maxdam); |