The issue here is that rand() is called again in the if statement condition. This means rand() can produce a different value compared to the one stored in randomResult, making the condition false 99.999999% of the time. The odds that rand picks the same number twice in a row is insanely small.
To accomplish what you're actually trying to do, it should be like this:
Monsters don't ever say their voice lines, here is the problem:
monster.cpp line 1074:
int32_t randomResult = rand(); if (rand() == 50 * (randomResult / 50)) {
The issue here is that rand() is called again in the if statement condition. This means rand() can produce a different value compared to the one stored in randomResult, making the condition false 99.999999% of the time. The odds that rand picks the same number twice in a row is insanely small.
To accomplish what you're actually trying to do, it should be like this:
int32_t randomResult = rand(); if (randomResult % 50 == 0) {
Compiled, tested, working.