now segfaults
This commit is contained in:
parent
19d343b2f5
commit
ec97c69a03
|
@ -44,6 +44,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h> /* rand(3) */
|
||||||
|
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "rogue.h"
|
#include "rogue.h"
|
||||||
|
|
||||||
|
@ -442,9 +444,7 @@ drain_life(void)
|
||||||
if (n != 1) {
|
if (n != 1) {
|
||||||
if ((rogue.str_current > 3) && (!sustain_strength)) {
|
if ((rogue.str_current > 3) && (!sustain_strength)) {
|
||||||
rogue.str_current--;
|
rogue.str_current--;
|
||||||
if (coin_toss()) {
|
rogue.str_max -= rand() & 1;
|
||||||
rogue.str_max--;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print_stats((STAT_STRENGTH | STAT_HP));
|
print_stats((STAT_STRENGTH | STAT_HP));
|
||||||
|
@ -475,7 +475,7 @@ flame_broil(object *monster)
|
||||||
{
|
{
|
||||||
short row, col, dir;
|
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);
|
return(0);
|
||||||
}
|
}
|
||||||
row = rogue.row - monster->row;
|
row = rogue.row - monster->row;
|
||||||
|
|
|
@ -212,11 +212,10 @@ read_scroll(void)
|
||||||
name_of(rogue.weapon),
|
name_of(rogue.weapon),
|
||||||
((rogue.weapon->quantity <= 1) ? "s" : ""),
|
((rogue.weapon->quantity <= 1) ? "s" : ""),
|
||||||
get_ench_color());
|
get_ench_color());
|
||||||
if (coin_toss()) {
|
if(rand() & 1)
|
||||||
rogue.weapon->hit_enchant++;
|
rogue.weapon->hit_enchant++;
|
||||||
} else {
|
else
|
||||||
rogue.weapon->d_enchant++;
|
rogue.weapon->d_enchant++;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
rogue.weapon->is_cursed = 0;
|
rogue.weapon->is_cursed = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user