When listing objects after reading a remove curse scroll, it seems like it shouldn't include items whose only curses are unremovable... say, a ring of teleportation. Right now the code is
struct curse_data *c = obj->known->curses;
if (c) {
size_t i;
for (i = 1; i < z_info->curse_max; i++) {
if (c[i].power < 100) {
return true;
should it be
struct curse_data *c = obj->known->curses;
if (c) {
size_t i;
for (i = 1; i < z_info->curse_max; i++) {
if (c[i].power && c[i].power < 100) {
return true;
So that it isn't triggering on curses with zero power?
struct curse_data *c = obj->known->curses;
if (c) {
size_t i;
for (i = 1; i < z_info->curse_max; i++) {
if (c[i].power < 100) {
return true;
should it be
struct curse_data *c = obj->known->curses;
if (c) {
size_t i;
for (i = 1; i < z_info->curse_max; i++) {
if (c[i].power && c[i].power < 100) {
return true;
So that it isn't triggering on curses with zero power?
Comment