1
0

now segfaults

This commit is contained in:
dtb 2023-11-25 11:17:06 -07:00
parent 19d343b2f5
commit ec97c69a03
2 changed files with 6 additions and 7 deletions

View File

@ -44,6 +44,8 @@
*
*/
#include <stdlib.h> /* rand(3) */
#include "random.h"
#include "rogue.h"
@ -442,9 +444,7 @@ drain_life(void)
if (n != 1) {
if ((rogue.str_current > 3) && (!sustain_strength)) {
rogue.str_current--;
if (coin_toss()) {
rogue.str_max--;
}
rogue.str_max -= rand() & 1;
}
}
print_stats((STAT_STRENGTH | STAT_HP));
@ -475,7 +475,7 @@ flame_broil(object *monster)
{
short row, col, dir;
if ((!mon_sees(monster, rogue.row, rogue.col)) || coin_toss()) {
if ((!mon_sees(monster, rogue.row, rogue.col)) || (rand() & 1)) {
return(0);
}
row = rogue.row - monster->row;

View File

@ -212,11 +212,10 @@ read_scroll(void)
name_of(rogue.weapon),
((rogue.weapon->quantity <= 1) ? "s" : ""),
get_ench_color());
if (coin_toss()) {
if(rand() & 1)
rogue.weapon->hit_enchant++;
} else {
else
rogue.weapon->d_enchant++;
}
}
rogue.weapon->is_cursed = 0;
} else {