discovery of enchant weapon scrolls
Eliminate or at least reduce one of the idiosyncratic differences between enchant weapon and enchant armor: make reading enchant weapon discover that scroll if the effect is adequately discernible, instead of always asking the player to supply a name for it. If your weapon is identified and its +/- enchantment value goes up, or you're wielding a worm tooth and it transforms into a crysknife, you learn the scroll. However for the negative effect of a cursed one, that's only applicable when the scroll is already known to be cursed.
This commit is contained in:
@@ -82,6 +82,7 @@ undo xname FAKE_AMULET_OF_YENDOR AD_DRIN check, the_unique_obj checks this case
|
|||||||
axes should chop trees; picks shouldn't
|
axes should chop trees; picks shouldn't
|
||||||
chance to aim grappling hook when skilled or better
|
chance to aim grappling hook when skilled or better
|
||||||
level limit of monsters like naga hatchlings should be high enough to grow up
|
level limit of monsters like naga hatchlings should be high enough to grow up
|
||||||
|
scroll of enchant weapon will become discovered when read in some cases
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+12
-6
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)wield.c 3.4 2001/12/23 */
|
/* SCCS Id: @(#)wield.c 3.4 2002/04/16 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -613,8 +613,9 @@ chwepon(otmp, amount)
|
|||||||
register struct obj *otmp;
|
register struct obj *otmp;
|
||||||
register int amount;
|
register int amount;
|
||||||
{
|
{
|
||||||
register const char *color = hcolor((amount < 0) ? Black : blue);
|
const char *color = hcolor((amount < 0) ? Black : blue);
|
||||||
register const char *xtime;
|
const char *xtime;
|
||||||
|
int otyp = STRANGE_OBJECT;
|
||||||
|
|
||||||
if(!uwep || (uwep->oclass != WEAPON_CLASS && !is_weptool(uwep))) {
|
if(!uwep || (uwep->oclass != WEAPON_CLASS && !is_weptool(uwep))) {
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
@@ -626,11 +627,14 @@ register int amount;
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (otmp && otmp->oclass == SCROLL_CLASS) otyp = otmp->otyp;
|
||||||
|
|
||||||
if(uwep->otyp == WORM_TOOTH && amount >= 0) {
|
if(uwep->otyp == WORM_TOOTH && amount >= 0) {
|
||||||
uwep->otyp = CRYSKNIFE;
|
uwep->otyp = CRYSKNIFE;
|
||||||
uwep->oerodeproof = 0;
|
uwep->oerodeproof = 0;
|
||||||
Your("weapon seems sharper now.");
|
Your("weapon seems sharper now.");
|
||||||
uwep->cursed = 0;
|
uwep->cursed = 0;
|
||||||
|
if (otyp != STRANGE_OBJECT) makeknown(otyp);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -638,6 +642,7 @@ register int amount;
|
|||||||
uwep->otyp = WORM_TOOTH;
|
uwep->otyp = WORM_TOOTH;
|
||||||
uwep->oerodeproof = 0;
|
uwep->oerodeproof = 0;
|
||||||
Your("weapon seems duller now.");
|
Your("weapon seems duller now.");
|
||||||
|
if (otyp != STRANGE_OBJECT && otmp->bknown) makeknown(otyp);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -656,9 +661,7 @@ register int amount;
|
|||||||
else
|
else
|
||||||
Your("%s.", aobjnam(uwep, "evaporate"));
|
Your("%s.", aobjnam(uwep, "evaporate"));
|
||||||
|
|
||||||
while(uwep) /* let all of them disappear */
|
useupall(uwep); /* let all of them disappear */
|
||||||
/* note: uwep->quan = 1 is nogood if unpaid */
|
|
||||||
useup(uwep);
|
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
if (!Blind) {
|
if (!Blind) {
|
||||||
@@ -666,6 +669,9 @@ register int amount;
|
|||||||
Your("%s %s for a %s.",
|
Your("%s %s for a %s.",
|
||||||
aobjnam(uwep, amount == 0 ? "violently glow" : "glow"),
|
aobjnam(uwep, amount == 0 ? "violently glow" : "glow"),
|
||||||
color, xtime);
|
color, xtime);
|
||||||
|
if (otyp != STRANGE_OBJECT && uwep->known &&
|
||||||
|
(amount > 0 || (amount < 0 && otmp->bknown)))
|
||||||
|
makeknown(otyp);
|
||||||
}
|
}
|
||||||
uwep->spe += amount;
|
uwep->spe += amount;
|
||||||
if(amount > 0) uwep->cursed = 0;
|
if(amount > 0) uwep->cursed = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user