G
Guest
Guest
Archived from groups: rec.games.roguelike.nethack (More info?)
I've been diving through the source and I
encountered some unexpected spots were an item
could be created as an artifact.
Armor could be created as an artifact if
any existed in vanilla. The code is in mkobj.c
so spontaneous creations like in shops or on
the floor could trigger it as soon as any
non-Quest artifact armor was added to the
tables>
case ARMOR_CLASS:
....
if (artif && !rn2(40))
otmp = mk_artifact(otmp, (aligntyp)A_NONE);
All of the ones below would need extra code in
mkobj.c, but non-Quest artifact rings, gems, corpses,
spellbooks, balls or chains are already set up to
be added.
Kick or sipping from a sink could make an artifact
ring if any existed:
You("find a ring in the sink!");
(void) mkobj_at(RING_CLASS, u.ux, u.uy, TRUE);
Kicking a throne could make an artifact gem
if any existed other than a Quest item:
(void) mksobj_at(rnd_class(DILITHIUM_CRYSTAL,
LUCKSTONE-1), x, y, FALSE, TRUE);
If there were any artifact corpses, one could
be inside of an icebox. Sounds like a horror
movie:
if (box->otyp == ICE_BOX) {
if (!(otmp = mksobj(CORPSE, TRUE, TRUE))) continue;
/* Note: setting age to 0 is correct. Age has a different
* from usual meaning for objects stored in ice boxes. -KAA
*/
otmp->age = 0L;
if (otmp->timed) {
(void) stop_timer(ROT_CORPSE, (genericptr_t)otmp);
(void) stop_timer(REVIVE_MON, (genericptr_t)otmp);
}
If there were any artifact spellbooks one could
appear as a prayer gift:
at_your_feet("An object");
/* not yet known spells given preference over already known ones */
/* Also, try to grant a spell for which there is a skill slot */
otmp = mkobj(SPBOOK_CLASS, TRUE);
Artifact ball or chain, anyone:
setworn(mkobj(CHAIN_CLASS, TRUE), W_CHAIN);
setworn(mkobj(BALL_CLASS, TRUE), W_BALL);
I've been diving through the source and I
encountered some unexpected spots were an item
could be created as an artifact.
Armor could be created as an artifact if
any existed in vanilla. The code is in mkobj.c
so spontaneous creations like in shops or on
the floor could trigger it as soon as any
non-Quest artifact armor was added to the
tables>
case ARMOR_CLASS:
....
if (artif && !rn2(40))
otmp = mk_artifact(otmp, (aligntyp)A_NONE);
All of the ones below would need extra code in
mkobj.c, but non-Quest artifact rings, gems, corpses,
spellbooks, balls or chains are already set up to
be added.
Kick or sipping from a sink could make an artifact
ring if any existed:
You("find a ring in the sink!");
(void) mkobj_at(RING_CLASS, u.ux, u.uy, TRUE);
Kicking a throne could make an artifact gem
if any existed other than a Quest item:
(void) mksobj_at(rnd_class(DILITHIUM_CRYSTAL,
LUCKSTONE-1), x, y, FALSE, TRUE);
If there were any artifact corpses, one could
be inside of an icebox. Sounds like a horror
movie:
if (box->otyp == ICE_BOX) {
if (!(otmp = mksobj(CORPSE, TRUE, TRUE))) continue;
/* Note: setting age to 0 is correct. Age has a different
* from usual meaning for objects stored in ice boxes. -KAA
*/
otmp->age = 0L;
if (otmp->timed) {
(void) stop_timer(ROT_CORPSE, (genericptr_t)otmp);
(void) stop_timer(REVIVE_MON, (genericptr_t)otmp);
}
If there were any artifact spellbooks one could
appear as a prayer gift:
at_your_feet("An object");
/* not yet known spells given preference over already known ones */
/* Also, try to grant a spell for which there is a skill slot */
otmp = mkobj(SPBOOK_CLASS, TRUE);
Artifact ball or chain, anyone:
setworn(mkobj(CHAIN_CLASS, TRUE), W_CHAIN);
setworn(mkobj(BALL_CLASS, TRUE), W_BALL);