-/* NetHack 3.6 mhitu.c $NHDT-Date: 1556649298 2019/04/30 18:34:58 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.164 $ */
+/* NetHack 3.6 mhitu.c $NHDT-Date: 1575245065 2019/12/02 00:04:25 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.168 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* 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-2019 */
+/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2020 */
/* JNetHack may be freely redistributed. See license for details. */
#include "hack.h"
*/
pline("%s\82Í\97F\8dD\93I\82È\82Ó\82è\82ð\82µ\82Ä\82¢\82é\81D",Monnam(mtmp));
else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s %smisses!", Monnam(mtmp),
(nearmiss && flags.verbose) ? "just " : "");
#else
*/
return (!mwep || !mwep->opoisoned) ? "\8dU\8c\82" : "\95\90\8aí";
} else {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
return (mattk->aatyp == AT_TUCH) ? "contact"
: (mattk->aatyp == AT_GAZE) ? "gaze"
: (mattk->aatyp == AT_BITE) ? "bite" : "sting";
pline("%s\82Ì\8dU\8c\82\82Í\82 \82È\82½\82Ì\98e\95 \82ð\82©\82·\82ß\82½\81D", Monst_name);
break;
case 2:
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s strikes at %s!", Monst_name,
(levl[mtmp->mux][mtmp->muy].typ == WATER)
? "empty water"
} else if (Displaced) {
/* give 'displaced' message even if hero is Blind */
if (compat)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s smiles %s at your %sdisplaced image...", Monst_name,
(compat == 2) ? "engagingly" : "seductively",
Invis ? "invisible " : "");
(compat == 2) ? "\96£\97Í\93I\82É" : "\97U\98f\93I\82É");
#endif
else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s strikes at your %sdisplaced image and misses you!",
/* Note: if you're both invisible and displaced, only
* monsters which see invisible will attack your displaced
obj = which_armor(mtmp, WORN_HELMET);
if (obj && is_metallic(obj)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Your("blow glances off %s %s.", s_suffix(mon_nam(mtmp)),
helm_simple_name(obj));
#else
if (youmonst.data->mlet == S_EEL
|| u.umonnum == PM_TRAPPER)
pline(
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"Wait, %s! There's a hidden %s named %s there!",
m_monnam(mtmp), youmonst.data->mname, plname);
#else
#endif
else
pline(
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"Wait, %s! There's a %s named %s hiding under %s!",
m_monnam(mtmp), youmonst.data->mname, plname,
doname(level.objects[u.ux][u.uy]));
*/
pline("\89½\8eÒ\82©\82ª\82 \82È\82½\82Ì\8fã\82É\82Ì\82µ\82©\82©\82Á\82½\81D");
else /* see note about m_monnam() above */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("Wait, %s! That's a %s named %s!", m_monnam(mtmp),
youmonst.data->mname, plname);
#else
if (!canspotmon(mtmp))
map_invisible(mtmp->mx, mtmp->my);
if (!youseeit)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s %s!", Something, (likes_gold(mtmp->data)
&& youmonst.mappearance == GOLD_PIECE)
? "tries to pick you up"
: "\96³\8e\8b\82µ\82½");
#endif
else /* see note about m_monnam() above */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("Wait, %s! That %s is really %s named %s!", m_monnam(mtmp),
mimic_obj_name(&youmonst), an(mons[u.umonnum].mname),
plname);
if (multi < 0) { /* this should always be the case */
char buf[BUFSZ];
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "You appear to be %s again.",
Upolyd ? (const char *) an(youmonst.data->mname)
: (const char *) "yourself");
*/
pline("%s\82Í\93Ë\90i\82µ\81C\96ß\82Á\82½\81I", Monnam(mtmp));
else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
You_hear("a %s nearby.",
is_whirly(mtmp->data) ? "rushing noise"
: "splat");
protection might fail (33% chance) when the armor is cursed */
if (obj && (obj->greased || obj->otyp == OILSKIN_CLOAK)
&& (!obj->cursed || rn2(3))) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s %s your %s %s!", Monnam(mtmp),
(mattk->adtyp == AD_WRAP) ? "slips off of"
: "grabs you, but cannot hold onto",
}
} else if (u.ustuck == mtmp) {
exercise(A_STR, FALSE);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
You("are being %s.", (mtmp->data == &mons[PM_ROPE_GOLEM])
? "choked"
: "crushed");
if (otmp->otyp == CORPSE
&& touch_petrifies(&mons[otmp->corpsenm])) {
dmg = 1;
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s hits you with the %s corpse.", Monnam(mtmp),
mons[otmp->corpsenm].mname);
#else
dopois:
hitmsg(mtmp, mattk);
if (uncancelled && !rn2(8)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "%s %s", s_suffix(Monnam(mtmp)),
mpoisons_subj(mtmp, mattk));
#else
/* This case is too obvious to ignore, but Nethack is not in
* general very good at considering height--most short monsters
* still _can_ attack you when you're flying or mounted.
- * [FIXME: why can't a flying attacker overcome this?]
*/
- if (u.usteed || Levitation || Flying) {
+ if ((u.usteed || Levitation || Flying) && !is_flyer(mtmp->data)) {
/*JP
pline("%s tries to reach your %s %s!", Monst_name, sidestr, leg);
*/
Monst_name, sidestr, leg);
#endif
} else if (!rn2(5)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s pricks through your %s boot!", Monst_name,
sidestr);
#else
sidestr);
#endif
} else {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s scratches your %s boot!", Monst_name,
sidestr);
#else
} else {
dmg = 0;
if (flags.verbose)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s brushes against your %s.", Monnam(mtmp),
body_part(LEG));
#else
(void) rloc(mtmp, TRUE);
if (is_animal(mtmp->data) && *buf) {
if (canseemon(mtmp))
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s tries to %s away with %s.", Monnam(mtmp),
locomotion(mtmp->data, "run"), buf);
#else
: "\82Æ\82Ä\82à");
#endif
tele();
- /* 3.6.2: make sure damage isn't fatal; previously, it
+ /* As of 3.6.2: make sure damage isn't fatal; previously, it
was possible to be teleported and then drop dead at
the destination when QM's 1d4 damage gets applied below;
even though that wasn't "wrong", it seemed strange,
if (!engulf_target(mtmp, &youmonst))
return 0;
- if ((t && is_pit(t->ttyp))
- && sobj_at(BOULDER, u.ux, u.uy))
+ if ((t && is_pit(t->ttyp)) && sobj_at(BOULDER, u.ux, u.uy))
return 0;
if (Punished)
* like horses for now :-)
*/
Strcpy(buf, mon_nam(u.usteed));
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s lunges forward and plucks you off %s!", Monnam(mtmp),
buf);
#else
i = number_leashed();
if (i > 0) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
const char *s = (i > 1) ? "leashes" : "leash";
pline_The("%s %s loose.", s, vtense(s, "snap"));
if (mtmp != u.ustuck)
return 0;
+ if (Punished) {
+ /* ball&chain are in limbo while swallowed; update their internal
+ location to be at swallower's spot */
+ if (uchain->where == OBJ_FREE)
+ uchain->ox = mtmp->mx, uchain->oy = mtmp->my;
+ if (uball->where == OBJ_FREE)
+ uball->ox = mtmp->mx, uball->oy = mtmp->my;
+ }
if (u.uswldtim > 0)
u.uswldtim -= 1;
if (Half_physical_damage)
tmp *= 2; /* sorry */
} else {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s%s digests you!", Monnam(mtmp),
(u.uswldtim == 2) ? " thoroughly"
: (u.uswldtim == 1) ? " utterly" : "");
case AD_PHYS:
physical_damage = TRUE;
if (mtmp->data == &mons[PM_FOG_CLOUD]) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
You("are laden with moisture and %s",
flaming(youmonst.data)
? "are smoldering out!"
#endif
expels(mtmp, mtmp->data, FALSE);
} else if (!u.uswldtim || youmonst.data->msize >= MZ_HUGE) {
- /* 3.6.2: u.uswldtim used to be set to 0 by life-saving but it
+ /* As of 3.6.2: u.uswldtim used to be set to 0 by life-saving but it
expels now so the !u.uswldtim case is no longer possible;
however, polymorphing into a huge form while already
swallowed is still possible */
struct attack *mattk;
{
static const char *const reactions[] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"confused", /* [0] */
"stunned", /* [1] */
"puzzled", "dazzled", /* [2,3] */
if (cancelled || !mtmp->mcansee) {
if (!canseemon(mtmp))
break; /* silently */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s %s.", Monnam(mtmp),
(mtmp->data == &mons[PM_MEDUSA] && mtmp->mcan)
? "doesn't look all that ugly"
break;
if (!m_canseeu(mtmp)) { /* probably you're invisible */
if (useeit)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline(
"%s doesn't seem to notice that %s gaze was reflected.",
Monnam(mtmp), mhis(mtmp));
react = rn2(SIZE(reactions));
/* cancelled/hallucinatory feedback; monster might look "confused",
"stunned",&c but we don't actually set corresponding attribute */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s looks %s%s.", Monnam(mtmp),
!rn2(3) ? "" : already ? "quite "
: (!rn2(2) ? "a bit " : "somewhat "),
if (agrinvis && !defperc && adtyp == AD_SEDU)
return 0;
+ /* nymphs have two attacks, one for steal-item damage and the other
+ for seduction, both pass the could_seduce() test;
+ incubi/succubi have three attacks, their claw attacks for damage
+ don't pass the test */
if ((pagr->mlet != S_NYMPH
&& pagr != &mons[PM_INCUBUS] && pagr != &mons[PM_SUCCUBUS])
- || (adtyp != AD_SEDU && adtyp != AD_SSEX))
+ || (adtyp != AD_SEDU && adtyp != AD_SSEX && adtyp != AD_SITM))
return 0;
return (genagr == 1 - gendef) ? 1 : (pagr->mlet == S_NYMPH) ? 2 : 0;
char qbuf[QBUFSZ], Who[QBUFSZ];
if (mon->mcan || mon->mspec_used) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s acts as though %s has got a %sheadache.", Monnam(mon),
mhe(mon), mon->mcan ? "severe " : "");
#else
flags.female ? "\83`\83\83\81[\83~\83\93\83O" : "\82·\82Ä\82«");
#endif
else if (seewho)
+/*JP
pline("%s appears to sigh.", Monnam(mon));
+*/
+ pline("%s\82Í\82½\82ß\91§\82ð\82Â\82¢\82½\82æ\82¤\82¾\81D", Monnam(mon));
/* else no regret message if can't see or hear seducer */
if (!tele_restrict(mon))
*/
verbalize("\82±\82ê\82Í\82¨\82²\82è%s\81I", fem ? "\82æ" : "\82³");
} else {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s takes %ld %s for services rendered!", noit_Monnam(mon),
cost, currency(cost));
#else
/* being deaf overrides confirmation prompt for high charisma */
if (Deaf) {
+/*JP
pline("%s takes off your %s.", seducer, str);
+*/
+ pline("%s\82Í\82 \82È\82½\82Ì%s\82ð\92E\82ª\82¹\82½\81D", seducer, str);
} else if (rn2(20) < ACURR(A_CHA)) {
#if 0 /*JP:T*/
Sprintf(qbuf, "\"Shall I remove your %s, %s?\"", str,
flags.female ? "\82È\82ñ\82ÄãY\97í\82È%s\82È\82ñ\82¾" : "\8a\95\82ð\8eæ\82Á\82½\82ç\82È\82©\82È\82©\83C\83J\83X\82¶\82á\82È\82¢",
body_part(HAIR));
#endif
-#if 0 /*JP*/
+#if 0 /*JP:T*/
verbalize("Take off your %s; %s.", str,
(obj == uarm)
? "let's get a little closer"
switch (oldu_mattk->adtyp) {
case AD_ACID:
if (!rn2(2)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s is splashed by %s%s!", Monnam(mtmp),
/* temporary? hack for sequencing issue: "your acid"
looks strange coming immediately after player has
case AD_STUN: /* Yellow mold */
if (!mtmp->mstun) {
mtmp->mstun = 1;
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s %s.", Monnam(mtmp),
makeplural(stagger(mtmp->data, "stagger")));
#else
case AD_FIRE: /* Red mold */
if (resists_fire(mtmp)) {
shieldeff(mtmp->mx, mtmp->my);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s is mildly warm.", Monnam(mtmp));
#else
pline("%s\82Í\92g\82©\82\82È\82Á\82½\81D", Monnam(mtmp));
tmp = 0;
break;
}
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s is suddenly very hot!", Monnam(mtmp));
#else
pline("%s\82Í\93Ë\91R\94M\82\82È\82Á\82½\81I", Monnam(mtmp));
case AD_ELEC:
if (resists_elec(mtmp)) {
shieldeff(mtmp->mx, mtmp->my);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s is slightly tingled.", Monnam(mtmp));
#else
pline("%s\82Í\82¿\82å\82Á\82Æ\83s\83\8a\83s\83\8a\82µ\82½\81D", Monnam(mtmp));
tmp = 0;
break;
}
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s is jolted with your electricity!", Monnam(mtmp));
#else
pline("%s\82Í\93d\8bC\83V\83\87\83b\83N\82ð\82¤\82¯\82½\81I", Monnam(mtmp));