analyzer "lint" for muse.c fix
Overzealous change yesterday. For use_defensive(), the unicorn horn case already has guards for Null item and the added one issues bogus panic() when a unicorn or ki-rin uses its own horn.
This commit is contained in:
+3
-3
@@ -816,8 +816,7 @@ use_defensive(struct monst *mtmp)
|
|||||||
|
|
||||||
switch (gm.m.has_defense) {
|
switch (gm.m.has_defense) {
|
||||||
case MUSE_UNICORN_HORN:
|
case MUSE_UNICORN_HORN:
|
||||||
if (!otmp)
|
/* unlike most defensive cases, unicorn horn object is optional */
|
||||||
panic(MissingDefensiveItem, "unicorn horn");
|
|
||||||
if (vismon) {
|
if (vismon) {
|
||||||
if (otmp)
|
if (otmp)
|
||||||
pline_mon(mtmp, "%s uses a unicorn horn!", Monnam(mtmp));
|
pline_mon(mtmp, "%s uses a unicorn horn!", Monnam(mtmp));
|
||||||
@@ -830,8 +829,9 @@ use_defensive(struct monst *mtmp)
|
|||||||
mtmp->mconf = mtmp->mstun = 0;
|
mtmp->mconf = mtmp->mstun = 0;
|
||||||
if (vismon)
|
if (vismon)
|
||||||
pline_mon(mtmp, "%s seems steadier now.", Monnam(mtmp));
|
pline_mon(mtmp, "%s seems steadier now.", Monnam(mtmp));
|
||||||
} else
|
} else {
|
||||||
impossible("No need for unicorn horn?");
|
impossible("No need for unicorn horn?");
|
||||||
|
}
|
||||||
return 2;
|
return 2;
|
||||||
case MUSE_BUGLE:
|
case MUSE_BUGLE:
|
||||||
if (!otmp)
|
if (!otmp)
|
||||||
|
|||||||
Reference in New Issue
Block a user