Since no_selling has proven itself to be a viable option, I think it could be made even more useful if certain items that have no value to a character (now that they can't be sold) would be marked to squelch automatically on character creation, if this option is set. Right now, the only definitely useless items that I have come up with are spellbooks that don't apply to the character's class. We can probably come up with others, but they should be items that are objectively unusable, not just based on opinion like "I don't think a mage would ever use a Ring of Reckless Attacks" because as soon as you do that, you will find someone who says he does exactly that. I don't want to inconvenience people who do weird things, just make things more useful for everyone.
Here is a rewritten squelch_birth_init that does the spellbook auto-squelching:
Here is a rewritten squelch_birth_init that does the spellbook auto-squelching:
Code:
void squelch_birth_init(void) { int i; /* Reset squelch bits */ for (i = 0; i < z_info->k_max; i++) { /* By default, don't squelch */ k_info[i].squelch = FALSE; /* Squelch useless items when no_selling is on */ if (OPT(birth_no_selling)) { /* Squelch priest books for non-priest classes */ if (k_info[i].tval == TV_PRAYER_BOOK && p_ptr->class->spell_book != TV_PRAYER_BOOK) k_info[i].squelch = TRUE; /* Squelch mage books for non-mage classes */ else if (k_info[i].tval == TV_MAGIC_BOOK && p_ptr->class->spell_book != TV_MAGIC_BOOK) k_info[i].squelch = TRUE; /* Insert any other useful auto-squelch tests here */ } } /* Clear the squelch bytes */ for (i = 0; i < TYPE_MAX; i++) squelch_level[i] = 0; }
Comment