-/* NetHack 3.6 muse.c $NHDT-Date: 1505181522 2017/09/12 01:58:42 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.80 $ */
+/* NetHack 3.6 muse.c $NHDT-Date: 1561053256 2019/06/20 17:54:16 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.97 $ */
/* Copyright (C) 1990 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
/* JNetHack Copyright */
/* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000 */
-/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2016 */
+/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2020 */
/* JNetHack may be freely redistributed. See license for details. */
/*
#include "hack.h"
-extern const int monstr[];
-
boolean m_using = FALSE;
/* Let monsters use magic items. Arbitrary assumptions: Monsters only use
STATIC_DCL struct permonst *FDECL(muse_newcham_mon, (struct monst *));
STATIC_DCL int FDECL(precheck, (struct monst *, struct obj *));
-STATIC_DCL void FDECL(mzapmsg, (struct monst *, struct obj *, BOOLEAN_P));
+STATIC_DCL void FDECL(mzapwand, (struct monst *, struct obj *, BOOLEAN_P));
+STATIC_DCL void FDECL(mplayhorn, (struct monst *, struct obj *, BOOLEAN_P));
STATIC_DCL void FDECL(mreadmsg, (struct monst *, struct obj *));
STATIC_DCL void FDECL(mquaffmsg, (struct monst *, struct obj *));
STATIC_DCL boolean FDECL(m_use_healing, (struct monst *));
pline1(empty);
} else {
if (vis) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline(
"As %s opens the bottle, an enormous %s emerges!",
mon_nam(mon),
an(xname(obj)));
#endif
} else {
- /* same near/far threshold as mzapmsg() */
+ /* same near/far threshold as mzapwand() */
int range = couldsee(mon->mx, mon->my) /* 9 or 5 */
? (BOLT_LIM + 1) : (BOLT_LIM - 3);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
You_hear("a zap and an explosion %s.",
(distu(mon->mx, mon->my) <= range * range)
? "nearby" : "in the distance");
}
m_useup(mon, obj);
mon->mhp -= dam;
- if (mon->mhp <= 0) {
+ if (DEADMONSTER(mon)) {
monkilled(mon, "", AD_RBRE);
return 1;
}
return 0;
}
+/* when a monster zaps a wand give a message, deduct a charge, and if it
+ isn't directly seen, remove hero's memory of the number of charges */
STATIC_OVL void
-mzapmsg(mtmp, otmp, self)
+mzapwand(mtmp, otmp, self)
struct monst *mtmp;
struct obj *otmp;
boolean self;
int range = couldsee(mtmp->mx, mtmp->my) /* 9 or 5 */
? (BOLT_LIM + 1) : (BOLT_LIM - 3);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
You_hear("a %s zap.", (distu(mtmp->mx, mtmp->my) <= range * range)
? "nearby" : "distant");
#else
(distu(mtmp->mx, mtmp->my) <= range * range)
? "\8bß" : "\89\93");
#endif
+ otmp->known = 0;
} else if (self) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s zaps %sself with %s!", Monnam(mtmp), mhim(mtmp),
doname(otmp));
#else
pline("%s\82Í%s\82ð\82Ó\82è\82©\82´\82µ\82½\81I", Monnam(mtmp), an(xname(otmp)));
stop_occupation();
}
+ otmp->spe -= 1;
+}
+
+/* similar to mzapwand() but for magical horns (only instrument mons play) */
+STATIC_OVL void
+mplayhorn(mtmp, otmp, self)
+struct monst *mtmp;
+struct obj *otmp;
+boolean self;
+{
+ if (!canseemon(mtmp)) {
+ int range = couldsee(mtmp->mx, mtmp->my) /* 9 or 5 */
+ ? (BOLT_LIM + 1) : (BOLT_LIM - 3);
+
+#if 0 /*JP:T*/
+ You_hear("a horn being played %s.",
+ (distu(mtmp->mx, mtmp->my) <= range * range)
+ ? "nearby" : "in the distance");
+#else
+ You_hear("%s\82\82Å\83z\83\8b\83\93\82Ì\89¹\82ð\95·\82¢\82½\81D",
+ (distu(mtmp->mx, mtmp->my) <= range * range)
+ ? "\8bß" : "\89\93");
+#endif
+ otmp->known = 0; /* hero doesn't know how many charges are left */
+ } else {
+ otmp->dknown = 1;
+#if 0 /*JP:T*/
+ pline("%s plays a %s directed at %s!", Monnam(mtmp), xname(otmp),
+ self ? mon_nam_too(mtmp, mtmp) : (char *) "you");
+#else
+ pline("%s\82Í%s\82É\8cü\82¯\82Ä%s\82ð\90\81\82¢\82½\81I", Monnam(mtmp),
+ self ? mon_nam_too(mtmp, mtmp) : (char *) "\82 \82È\82½",
+ xname(otmp));
+#endif
+ makeknown(otmp->otyp); /* (wands handle this slightly differently) */
+ if (!self)
+ stop_occupation();
+ }
+ otmp->spe -= 1; /* use a charge */
}
STATIC_OVL void
*/
pline("%s\82Í%s\82ð\93Ç\82ñ\82¾\81I", Monnam(mtmp), onambuf);
else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
You_hear("%s reading %s.",
x_monnam(mtmp, ARTICLE_A, (char *) 0,
(SUPPRESS_IT | SUPPRESS_INVISIBLE | SUPPRESS_SADDLE),
|| onscary(xx, yy, mtmp))
continue;
/* use trap if it's the correct type */
- if ((t->ttyp == TRAPDOOR || t->ttyp == HOLE)
+ if (is_hole(t->ttyp)
&& !is_floater(mtmp->data)
&& !mtmp->isshk && !mtmp->isgd && !mtmp->ispriest
&& Can_fall_thru(&u.uz)) {
}
}
}
- toot:
+ toot:
;
}
/* kludge to cut down on trap destruction (particularly portals) */
t = t_at(x, y);
- if (t && (t->ttyp == PIT || t->ttyp == SPIKED_PIT || t->ttyp == WEB
+ if (t && (is_pit(t->ttyp) || t->ttyp == WEB
|| t->ttyp == BEAR_TRAP))
t = 0; /* ok for monster to dig here */
m.has_defense = MUSE_SCR_CREATE_MONSTER;
}
}
-botm:
+ botm:
return (boolean) !!m.has_defense;
#undef nomore
}
if ((mtmp->isshk && inhishop(mtmp)) || mtmp->isgd || mtmp->ispriest)
return 2;
m_flee(mtmp);
- mzapmsg(mtmp, otmp, TRUE);
- otmp->spe--;
+ mzapwand(mtmp, otmp, TRUE);
how = WAN_TELEPORTATION;
- mon_tele:
+ mon_tele:
if (tele_restrict(mtmp)) { /* mysterious force... */
if (vismon && how) /* mentions 'teleport' */
makeknown(how);
return 2;
case MUSE_WAN_TELEPORTATION:
zap_oseen = oseen;
- mzapmsg(mtmp, otmp, FALSE);
- otmp->spe--;
+ mzapwand(mtmp, otmp, FALSE);
m_using = TRUE;
mbhit(mtmp, rn1(8, 6), mbhitm, bhito, otmp);
/* monster learns that teleportation isn't useful here */
struct trap *ttmp;
m_flee(mtmp);
- mzapmsg(mtmp, otmp, FALSE);
- otmp->spe--;
+ mzapwand(mtmp, otmp, FALSE);
if (oseen)
makeknown(WAN_DIGGING);
if (IS_FURNITURE(levl[mtmp->mx][mtmp->my].typ)
/*JP
pline_The("%s here is too hard to dig in.",
*/
- pline("\82±\82±\82Ì%s\82Í\8cÅ\82\82Ä\8c@\82ê\82È\82¢\81D",
+ pline("\82±\82±\82Ì%s\82Í\8cÅ\82\82Ä\8c@\82ê\82È\82¢\81D",
surface(mtmp->mx, mtmp->my));
return 2;
}
return 2;
seetrap(ttmp);
if (vis) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s has made a hole in the %s.", Monnam(mtmp),
surface(mtmp->mx, mtmp->my));
#else
pline("%s\82Í%s\82É\8c\8a\82ð\8aJ\82¯\82½\81D", Monnam(mtmp),
surface(mtmp->mx, mtmp->my));
#endif
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s %s through...", Monnam(mtmp),
is_flyer(mtmp->data) ? "dives" : "falls");
#else
is_flyer(mtmp->data) ? "\94ò\82Ñ\82±\82ñ\82¾" : "\97\8e\82¿\82½");
#endif
} else if (!Deaf)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
You_hear("%s crash through the %s.", something,
surface(mtmp->mx, mtmp->my));
#else
if (!enexto(&cc, mtmp->mx, mtmp->my, pm))
return 0;
- mzapmsg(mtmp, otmp, FALSE);
- otmp->spe--;
+ mzapwand(mtmp, otmp, FALSE);
mon = makemon((struct permonst *) 0, cc.x, cc.y, NO_MM_FLAGS);
if (mon && canspotmon(mon) && oseen)
makeknown(WAN_CREATE_MONSTER);
struct trap *t = t_at(trapx, trapy);
Mnam = Monnam(mtmp);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s %s into a %s!", Mnam,
- vtense(Mnam, locomotion(mtmp->data, "jump")),
+ vtense(fakename[0], locomotion(mtmp->data, "jump")),
(t->ttyp == TRAPDOOR) ? "trap door" : "hole");
#else
pline("%s\82Í%s\82É%s\93ü\82Á\82½\81I", Mnam,
if (Inhell && mon_has_amulet(mtmp) && !rn2(4)
&& (dunlev(&u.uz) < dunlevs_in_dungeon(&u.uz) - 3)) {
if (vismon)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline(
"As %s climbs the stairs, a mysterious force momentarily surrounds %s...",
mon_nam(mtmp), mhim(mtmp));
case MUSE_SSTAIRS:
m_flee(mtmp);
if (ledger_no(&u.uz) == 1) {
- escape:
+ escape:
/* Monsters without the Amulet escape the dungeon and
* are gone for good when they leave up the up stairs.
* A monster with the Amulet would leave it behind
return 2;
}
if (vismon)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s escapes %sstairs!", Monnam(mtmp),
sstairs.up ? "up" : "down");
#else
Mnam = Monnam(mtmp);
#if 0 /*JP:T*/
pline("%s %s onto a teleport trap!", Mnam,
- vtense(Mnam, locomotion(mtmp->data, "jump")));
-#else /* \93ú\96{\8cê\82Å\82Í\91S\82Ä\81u\94ò\82Ñ\8d\9e\82ñ\82¾\81v */
+ vtense(fakename[0], locomotion(mtmp->data, "jump")));
+#else
+ /* \93ú\96{\8cê\82Å\82Í\91S\82Ä\81u\94ò\82Ñ\8d\9e\82ñ\82¾\81v */
pline("%s\82Í\8fu\8aÔ\88Ú\93®\82Ìã©\82É\94ò\82Ñ\8d\9e\82ñ\82¾\81I", Mnam);
#endif
seetrap(t_at(trapx, trapy));
struct monst *mtmp;
{
struct permonst *pm = mtmp->data;
- int difficulty = monstr[(monsndx(pm))];
+ int difficulty = mons[(monsndx(pm))].difficulty;
int trycnt = 0;
if (is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data)
|| pm->mlet == S_GHOST || pm->mlet == S_KOP)
return 0;
-try_again:
+ try_again:
switch (rn2(8 + (difficulty > 3) + (difficulty > 6) + (difficulty > 8))) {
case 6:
case 9:
break;
}
if (reveal_invis) {
- if (mtmp->mhp > 0 && cansee(bhitpos.x, bhitpos.y)
+ if (!DEADMONSTER(mtmp) && cansee(bhitpos.x, bhitpos.y)
&& !canspotmon(mtmp))
map_invisible(bhitpos.x, bhitpos.y);
}
case MUSE_WAN_COLD:
case MUSE_WAN_LIGHTNING:
case MUSE_WAN_MAGIC_MISSILE:
- mzapmsg(mtmp, otmp, FALSE);
- otmp->spe--;
+ mzapwand(mtmp, otmp, FALSE);
if (oseen)
makeknown(otmp->otyp);
m_using = TRUE;
(otmp->otyp == WAN_MAGIC_MISSILE) ? 2 : 6, mtmp->mx, mtmp->my,
sgn(mtmp->mux - mtmp->mx), sgn(mtmp->muy - mtmp->my));
m_using = FALSE;
- return (mtmp->mhp <= 0) ? 1 : 2;
+ return (DEADMONSTER(mtmp)) ? 1 : 2;
case MUSE_FIRE_HORN:
case MUSE_FROST_HORN:
- if (oseen) {
- makeknown(otmp->otyp);
-/*JP
- pline("%s plays a %s!", Monnam(mtmp), xname(otmp));
-*/
- pline("%s\82Í%s\82ð\90\81\82¢\82½\81I", Monnam(mtmp), xname(otmp));
- } else
-/*JP
- You_hear("a horn being played.");
-*/
- You_hear("\83z\83\8b\83\93\82Ì\89¹\82ð\95·\82¢\82½\81D");
- otmp->spe--;
+ mplayhorn(mtmp, otmp, FALSE);
m_using = TRUE;
buzz(-30 - ((otmp->otyp == FROST_HORN) ? AD_COLD - 1 : AD_FIRE - 1),
rn1(6, 6), mtmp->mx, mtmp->my, sgn(mtmp->mux - mtmp->mx),
sgn(mtmp->muy - mtmp->my));
m_using = FALSE;
- return (mtmp->mhp <= 0) ? 1 : 2;
+ return (DEADMONSTER(mtmp)) ? 1 : 2;
case MUSE_WAN_TELEPORTATION:
case MUSE_WAN_STRIKING:
zap_oseen = oseen;
- mzapmsg(mtmp, otmp, FALSE);
- otmp->spe--;
+ mzapwand(mtmp, otmp, FALSE);
m_using = TRUE;
mbhit(mtmp, rn1(8, 6), mbhitm, bhito, otmp);
m_using = FALSE;
mreadmsg(mtmp, otmp);
/* Identify the scroll */
if (canspotmon(mtmp)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline_The("%s rumbles %s %s!", ceiling(mtmp->mx, mtmp->my),
otmp->blessed ? "around" : "above", mon_nam(mtmp));
#else
drop_boulder_on_player(confused, !is_cursed, FALSE, TRUE);
}
- return (mtmp->mhp <= 0) ? 1 : 2;
+ return (DEADMONSTER(mtmp)) ? 1 : 2;
}
#if 0
case MUSE_SCR_FIRE: {
mtmp2->mhp -= num;
if (resists_cold(mtmp2))
mtmp2->mhp -= 3 * num;
- if (mtmp2->mhp < 1) {
+ if (DEADMONSTER(mtmp2)) {
mondied(mtmp2);
break;
}
struct monst *mtmp;
{
struct permonst *pm = mtmp->data;
- int difficulty = monstr[(monsndx(pm))];
+ int difficulty = mons[(monsndx(pm))].difficulty;
if (is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data)
|| pm->mlet == S_GHOST || pm->mlet == S_KOP)
return FALSE;
if (!stuck && !immobile && (mtmp->cham == NON_PM)
- && monstr[(pmidx = monsndx(mdat))] < 6) {
+ && mons[(pmidx = monsndx(mdat))].difficulty < 6) {
boolean ignore_boulders = (verysmall(mdat) || throws_rocks(mdat)
|| passes_walls(mdat)),
diag_ok = !NODIAG(pmidx);
}
nomore(MUSE_WAN_POLYMORPH);
if (obj->otyp == WAN_POLYMORPH && obj->spe > 0
- && (mtmp->cham == NON_PM) && monstr[monsndx(mdat)] < 6) {
+ && (mtmp->cham == NON_PM) && mons[monsndx(mdat)].difficulty < 6) {
m.misc = obj;
m.has_misc = MUSE_WAN_POLYMORPH;
}
nomore(MUSE_POT_POLYMORPH);
if (obj->otyp == POT_POLYMORPH && (mtmp->cham == NON_PM)
- && monstr[monsndx(mdat)] < 6) {
+ && mons[monsndx(mdat)].difficulty < 6) {
m.misc = obj;
m.has_misc = MUSE_POT_POLYMORPH;
}
if (on_level(&tolevel, &u.uz))
goto skipmsg;
if (vismon) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s rises up, through the %s!", Monnam(mtmp),
ceiling(mtmp->mx, mtmp->my));
#else
(coord *) 0);
return 2;
} else {
- skipmsg:
+ skipmsg:
if (vismon) {
/*JP
pline("%s looks uneasy.", Monnam(mtmp));
case MUSE_WAN_MAKE_INVISIBLE:
case MUSE_POT_INVISIBILITY:
if (otmp->otyp == WAN_MAKE_INVISIBLE) {
- mzapmsg(mtmp, otmp, TRUE);
- otmp->spe--;
+ mzapwand(mtmp, otmp, TRUE);
} else
mquaffmsg(mtmp, otmp);
/* format monster's name before altering its visibility */
}
return 2;
case MUSE_WAN_SPEED_MONSTER:
- mzapmsg(mtmp, otmp, TRUE);
- otmp->spe--;
+ mzapwand(mtmp, otmp, TRUE);
mon_adjust_speed(mtmp, 1, otmp);
return 2;
case MUSE_POT_SPEED:
m_useup(mtmp, otmp);
return 2;
case MUSE_WAN_POLYMORPH:
- mzapmsg(mtmp, otmp, TRUE);
- otmp->spe--;
+ mzapwand(mtmp, otmp, TRUE);
(void) newcham(mtmp, muse_newcham_mon(mtmp), TRUE, FALSE);
if (oseen)
makeknown(WAN_POLYMORPH);
#if 0 /*JP:T*/
pline("%s deliberately %s onto a polymorph trap!", Mnam,
- vtense(Mnam, locomotion(mtmp->data, "jump")));
+ vtense(fakename[0], locomotion(mtmp->data, "jump")));
#else
pline("%s\82Í\82í\82´\82Æ\95Ï\89»\82Ìã©\82É\94ò\82Ñ\82±\82ñ\82¾\81I", Mnam);
#endif
hand = makeplural(hand);
if (vismon)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s flicks a bullwhip towards your %s!", Monnam(mtmp),
hand);
#else
pline("%s\82Í%s\82É\82Í\82©\82ç\82Ý\82Â\82©\82È\82©\82Á\82½\81D", The_whip, the_weapon);
return 1;
}
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s wraps around %s you're wielding!", The_whip,
the_weapon);
#else
the_weapon);
#endif
if (welded(obj)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s welded to your %s%c",
!is_plural(obj) ? "It is" : "They are", hand,
!obj->bknown ? '!' : '.');
where_to = 0;
}
if (!where_to) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline_The("whip slips free."); /* not `The_whip' */
#else
pline("\95Ú\82Í\82Ù\82Ç\82¯\82½\81D"); /* not `The_whip' */
freeinv(obj);
switch (where_to) {
case 1: /* onto floor beneath mon */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s yanks %s from your %s!", Monnam(mtmp), the_weapon,
hand);
#else
place_object(obj, mtmp->mx, mtmp->my);
break;
case 2: /* onto floor beneath you */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s yanks %s to the %s!", Monnam(mtmp), the_weapon,
surface(u.ux, u.uy));
#else
#ifdef CLIPPING
cliparound(mtmp->mx, mtmp->my);
#endif
- show_glyph(mtmp->mx, mtmp->my, mon_to_glyph(mtmp));
+ show_glyph(mtmp->mx, mtmp->my, mon_to_glyph(mtmp, rn2_on_display_rng));
display_self();
/*JP
You_feel("aggravated at %s.", noit_mon_nam(mtmp));
struct monst *mtmp;
{
struct permonst *pm = mtmp->data;
- int difficulty = monstr[(monsndx(pm))];
+ int difficulty = mons[(monsndx(pm))].difficulty;
if (is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data)
|| pm->mlet == S_GHOST || pm->mlet == S_KOP)
if (typ == WAN_DIGGING)
return (boolean) !is_floater(mon->data);
if (typ == WAN_POLYMORPH)
- return (boolean) (monstr[monsndx(mon->data)] < 6);
+ return (boolean) (mons[monsndx(mon->data)].difficulty < 6);
if (objects[typ].oc_dir == RAY || typ == WAN_STRIKING
|| typ == WAN_TELEPORTATION || typ == WAN_CREATE_MONSTER)
return TRUE;
long save_quan = obj->quan;
obj->quan = 1L;
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s %s %s.", Monnam(mon),
(obj->oclass == POTION_CLASS)
? "quaffs"
#endif
obj->quan = save_quan;
} else if (!Deaf)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
You_hear("%s.",
(obj->oclass == POTION_CLASS) ? "drinking" : "chewing");
#else
pline("%s has a very bad case of stomach acid.", Monnam(mon));
*/
pline("%s\82Í\88Ý\8e_\82Ì\92²\8eq\82ª\82Æ\82Ä\82à\88«\82¢\81D", Monnam(mon));
- if (mon->mhp <= 0) {
+ if (DEADMONSTER(mon)) {
/*JP
pline("%s dies!", Monnam(mon));
*/
if (obj->otyp != CORPSE && (obj->otyp != TIN || !tinok))
return FALSE;
/* corpse, or tin that mon can open */
+ if (obj->corpsenm == NON_PM) /* empty/special tin */
+ return FALSE;
return (boolean) (obj->corpsenm == PM_LIZARD
|| (acidic(&mons[obj->corpsenm])
&& (obj->corpsenm != PM_GREEN_SLIME
}
}
if (t && t->ttyp == FIRE_TRAP)
- return muse_unslime(mon, &zeroobj, t, by_you);
+ return muse_unslime(mon, (struct obj *) &zeroobj, t, by_you);
} /* MUSE */
boolean vis = canseemon(mon), res = TRUE;
if (vis)
+#if 0 /*JP:T*/
pline("%s starts turning %s.", Monnam(mon),
green_mon(mon) ? "into ooze" : hcolor(NH_GREEN));
+#else
+ pline("%s\82Í%s\82É\82È\82è\82Í\82¶\82ß\82½\81D", Monnam(mon),
+ green_mon(mon) ? "\83X\83\89\83C\83\80" : hcolor(NH_GREEN));
+#endif
/* -4 => sliming, causes quiet loss of enhanced speed */
mon_adjust_speed(mon, -4, (struct obj *) 0);
if (mon->mx == trap->tx && mon->my == trap->ty) {
if (vis)
+#if 0 /*JP:T*/
pline("%s triggers %s fire trap!", Mnam,
trap->tseen ? "the" : "a");
+#else
+ pline("%s\82Í\89\8a\82Ìã©\82ð\94\93®\82³\82¹\82½\81I", Mnam);
+#endif
} else {
remove_monster(mon->mx, mon->my);
newsym(mon->mx, mon->my);
worm_move(mon);
newsym(mon->mx, mon->my);
if (vis)
+#if 0 /*JP:T*/
pline("%s %s %s %s fire trap!", Mnam,
- vtense(Mnam, locomotion(mon->data, "move")),
+ vtense(fakename[0], locomotion(mon->data, "move")),
is_floater(mon->data) ? "over" : "onto",
trap->tseen ? "the" : "a");
+#else
+ pline("%s\82Í\89\8a\82Ìã©\82É\94ò\82Ñ\8d\9e\82ñ\82¾\81I", Mnam);
+#endif
}
/* hack to avoid mintrap()'s chance of avoiding known trap */
mon->mtrapseen &= ~(1 << (FIRE_TRAP - 1));
} else if (otyp == STRANGE_OBJECT) {
/* monster is using fire breath on self */
if (vis)
+/*JP
pline("%s breathes fire on %sself.", Monnam(mon), mhim(mon));
+*/
+ pline("%s\82Í\89Î\82ð\82Í\82¢\82½\81D", Monnam(mon));
if (!rn2(3))
mon->mspec_used = rn1(10, 5);
/* -21 => monster's fire breath; 1 => # of damage dice */
mreadmsg(mon, obj);
if (mon->mconf) {
if (cansee(mon->mx, mon->my))
+/*JP
pline("Oh, what a pretty fire!");
+*/
+ pline("\82 \82ç\81A\82È\82ñ\82Ä\82©\82í\82¢\82¢\89Î\82¾\81I");
if (vis && !objects[otyp].oc_name_known
&& !objects[otyp].oc_uname)
docall(obj);
vis = FALSE; /* skip makeknown() below */
res = FALSE; /* failed to cure sliming */
} else {
- m_useup(mon, obj); /* before explode() */
dmg = (2 * (rn1(3, 3) + 2 * bcsign(obj)) + 1) / 3;
+ m_useup(mon, obj); /* before explode() */
/* -11 => monster's fireball */
explode(mon->mx, mon->my, -11, dmg, SCROLL_CLASS,
/* by_you: override -11 for mon but not others */
dmg = 0; /* damage has been applied by explode() */
}
} else { /* wand/horn of fire w/ positive charge count */
- mzapmsg(mon, obj, TRUE);
- obj->spe--;
+ if (obj->otyp == FIRE_HORN)
+ mplayhorn(mon, obj, TRUE);
+ else
+ mzapwand(mon, obj, TRUE);
/* -1 => monster's wand of fire; 2 => # of damage dice */
dmg = zhitm(mon, by_you ? 1 : -1, 2, &odummyp);
}
for fire breath, dmg is going to be 0 (fire breathers are
immune to fire damage) but for wand of fire or fire horn,
'mon' could have taken damage so might die */
- if (mon->mhp <= 0) {
+ if (DEADMONSTER(mon)) {
if (by_you) {
/* mon killed self but hero gets credit and blame (except
for pacifist conduct); xkilled()'s message would say
"You killed/destroyed <mon>" so give our own message */
if (vis)
+#if 0 /*JP:T*/
pline("%s is %s by the fire!", Monnam(mon),
nonliving(mon->data) ? "destroyed" : "killed");
+#else
+ pline("%s\82Í\89Î\82Å%s\82³\82ê\82½\81I", Monnam(mon),
+ nonliving(mon->data) ? "\93|" : "\8eE");
+#endif
xkilled(mon, XKILL_NOMSG | XKILL_NOCONDUCT);
} else
+/*JP
monkilled(mon, "fire", AD_FIRE);
+*/
+ monkilled(mon, "\89Î", AD_FIRE);
} else {
/* non-fatal damage occurred */
if (vis)
+/*JP
pline("%s is burned%s", Monnam(mon), exclam(dmg));
+*/
+ pline("%s\82Í\94R\82¦\82½%s", Monnam(mon), exclam(dmg));
}
}
if (vis) {
- if (res && mon->mhp > 0)
+ if (res && !DEADMONSTER(mon))
/*JP
pline("%s slime is burned away!", s_suffix(Monnam(mon)));
*/
return (ptr->mcolor == CLR_GREEN || ptr->mcolor == CLR_BRIGHT_GREEN);
#endif
/* approximation */
+#if 0 /*JP*/
if (strstri(ptr->mname, "green"))
+#else
+ if (strstri(ptr->mname, "\97Î"))
+#endif
return TRUE;
switch (monsndx(ptr)) {
case PM_FOREST_CENTAUR: