Repository navigation
Commit 7a6acfc
committed
Artifact lookup: fix missing aasimar, add prices and special details.
The encyclopedia's add_arti_info() built its "Damage bonus vs:" and
"warns vs" lists from two duplicated hardcoded MH-flag chains that
both omitted MH_AASIMAR (Angelslayer silently displayed only "angels")
and would silently drop any future dwarf/gnome/hobbit/centaur/
illithid/tortle/gnoll-hating artifact. Beyond the fix, the lookup now
reports several artifact attributes it previously ignored:
* src/pager.c:
- Replace both MH if-chains with one shared mh_names[] table and
add_mhflag_names() helper covering every MH_ race flag; legacy
display order is preserved so existing renders are unchanged
except Angelslayer, which now shows "angels, aasimar" in both
lines.
- "Base price: N zm." after the material line, computed like
arti_cost(): explicit artilist cost or 100x the base item's cost.
- The "warns vs" entry now names the warning glow, e.g. "warns vs
orcs, spiders (glows bright blue)", from the artifact's acolor
via clr2colorname(); only for SPFX_WARN|SPFX_DFLAGH artifacts,
matching has_glow_warning().
- "May blast you when touched (wrong alignment, role, or race)."
after the Restrictions line, mirroring the touch_artifact() hero
predicate: SPFX_RESTR with a real alignment, or SPFX_INTEL with
an associated role/race.
- New "Other properties:" section: a data-driven arti_specials[]
table of ~120 one-line notes for 44 artifacts whose behaviors are
hardcoded in the game logic rather than artilist data (Magicbane
riders, instakill chances, stat maxima, Mjollnir throw-return,
Wand of Orcus self-curse and regen block, Hand of Vecna, and so
on), each verified against the implementing code. Artifacts with
no entries print no section.
- All descriptor lines (Base item, Material, Alignment, Special
attack, While wielded/worn, While carried, When invoked, etc.)
now consistently end with a period.1 parent 6e244a3 commit 7a6acfc
2 files changed
Lines changed: 263 additions & 74 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5557 | 5557 | | |
5558 | 5558 | | |
5559 | 5559 | | |
| 5560 | + | |
5560 | 5561 | | |
0 commit comments