Skip to content

Commit

Permalink
Fix: Staff of the Archmagi, drow, and light-haters
Browse files Browse the repository at this point in the history
Light-haters were getting damaged even when SotA was radiating darkness.

Also, SotA would radiate darkness if you were drow even when someone else was wielding it.

Also also, the "foo's radiance..." message wasn't capitalized.
  • Loading branch information
saltwaterterrapin committed Aug 12, 2023
1 parent 7e27860 commit 7b592a9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/light.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ char **cs_rows;
&& Dragon_armor_to_scales(ls->id.a_obj) == SHADOW_DRAGON_SCALES)
lit_typ = TEMP_DARK;
if (ls->id.a_obj->oartifact == ART_STAFF_OF_THE_ARCHMAGI
&& !Upolyd && Race_if(PM_DROW))
&& (wielding_artifact(ART_STAFF_OF_THE_ARCHMAGI)
&& !Upolyd && Race_if(PM_DROW)))
lit_typ = TEMP_DARK;
} else if (ls->type == LS_MONSTER) {
if (get_mon_location(ls->id.a_monst, &ls->x, &ls->y, 0))
Expand Down
4 changes: 3 additions & 1 deletion src/mhitm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,8 +1341,10 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */
| (grow_up(magr, mdef) ? 0 : MM_AGR_DIED));
}

if (artifact_light(mwep) && mwep->lamplit)
if (artifact_light(mwep) && mwep->lamplit) {
Strcpy(saved_oname, bare_artifactname(mwep));
saved_oname[0] = highc(saved_oname[0]);
}

if (artifact_light(mwep) && mwep->lamplit
&& mon_hates_light(mdef))
Expand Down
4 changes: 3 additions & 1 deletion src/mhitu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1474,8 +1474,10 @@ register struct attack *mattk;

if (lightobj) {
if (canspotmon(mtmp)) {
char *artiname = s_suffix(bare_artifactname(otmp));
*artiname = highc(*artiname);
pline("%s radiance penetrates deep into your %s!",
s_suffix(bare_artifactname(otmp)),
artiname,
(!(noncorporeal(youmonst.data)
|| amorphous(youmonst.data))) ? "flesh" : "form");
} else if (!Blind) {
Expand Down
6 changes: 5 additions & 1 deletion src/uhitm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,8 +1176,10 @@ int dieroll;
isvenom = TRUE;
if (!(artifact_light(obj) && obj->lamplit))
Strcpy(saved_oname, cxname(obj));
else
else {
Strcpy(saved_oname, bare_artifactname(obj));
saved_oname[0] = highc(saved_oname[0]);
}
if (obj->oclass == WEAPON_CLASS || is_weptool(obj)
|| obj->oclass == GEM_CLASS || obj->otyp == HEAVY_IRON_BALL) {
/* is it not a melee weapon? */
Expand Down Expand Up @@ -1314,6 +1316,8 @@ int dieroll;
hated_obj = obj;
}
if (artifact_light(obj) && obj->lamplit
&& !((obj->oartifact == ART_STAFF_OF_THE_ARCHMAGI)
&& !Upolyd && Race_if(PM_DROW))
&& mon_hates_light(mon))
lightobj = TRUE;
if ((u.usteed || Race_if(PM_CENTAUR)) && !thrown && tmp > 0
Expand Down

0 comments on commit 7b592a9

Please sign in to comment.