You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6e244a3
Browse filesBrowse the repository at this point in the historyBrowse files
Object lookup now reports rarity, materials, and more.
Follow-up to the monster lookup expansion: the encyclopedia's
add_obj_info() omitted generation frequency, the randomized-materials
system, several weapon facts, and any class line for six object
classes. All additions are display-only:
* src/pager.c:
- Generation frequency: "Makes up N.N% of randomly generated
<class>." after the cost/weight line, or "Not randomly generated."
when oc_prob is 0. Percentages are computed the same way mkobj()
rolls them - oc_prob is a relative weight summed over the class
from bases[], not a fixed per-mille (rings all carry weight 1), so
the display normalizes by the real class total. Only printed for
classes in mkobj's random mixture; venom/rock/ball/chain/coin
would mislead (venom only comes from monster spit).
- Weapon facts: launchers state what they fire (bow -> arrows,
crossbow -> bolts, sling -> bullets/stones/gems); "Can be coated
with poison." and "Normally generated in stacks." mirror the
is_poisonable and is_multigen macros exactly.
- Material alternates: after "Normally made of X.", list the other
materials the type can randomly generate as, by probing
valid_obj_material() with a zeroobj-based dummy. The inline
wood/vegetable-matter noun fixups are factored into a new
material_noun() helper shared by both lines.
- Class lines for amulets, coins, boulders/statues, iron balls,
chains, and venom, matching the existing "Potion."/"Scroll."
pattern; removes the stale comment noting amulets had none.
0 commit comments