-/* NetHack 3.6 apply.c $NHDT-Date: 1446808436 2015/11/06 11:13:56 $ $NHDT-Branch: master $:$NHDT-Revision: 1.210 $ */
+/* NetHack 3.6 apply.c $NHDT-Date: 1553363415 2019/03/23 17:50:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.272 $ */
/* 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 */
+/* JNetHack may be freely redistributed. See license for details. */
+
#include "hack.h"
extern boolean notonhead; /* for long worms */
STATIC_DCL int FDECL(use_stethoscope, (struct obj *));
STATIC_DCL void FDECL(use_whistle, (struct obj *));
STATIC_DCL void FDECL(use_magic_whistle, (struct obj *));
-STATIC_DCL void FDECL(use_leash, (struct obj *));
+STATIC_DCL int FDECL(use_leash, (struct obj *));
STATIC_DCL int FDECL(use_mirror, (struct obj *));
STATIC_DCL void FDECL(use_bell, (struct obj **));
STATIC_DCL void FDECL(use_candelabrum, (struct obj *));
STATIC_DCL void FDECL(use_candle, (struct obj **));
STATIC_DCL void FDECL(use_lamp, (struct obj *));
-STATIC_DCL void FDECL(light_cocktail, (struct obj *));
+STATIC_DCL void FDECL(light_cocktail, (struct obj **));
STATIC_PTR void FDECL(display_jump_positions, (int));
STATIC_DCL void FDECL(use_tinning_kit, (struct obj *));
STATIC_DCL void FDECL(use_figurine, (struct obj **));
coord *, BOOLEAN_P));
STATIC_DCL void FDECL(add_class, (char *, CHAR_P));
STATIC_DCL void FDECL(setapplyclasses, (char *));
+STATIC_PTR boolean FDECL(check_jump, (genericptr_t, int, int));
STATIC_DCL boolean FDECL(is_valid_jump_pos, (int, int, int, BOOLEAN_P));
+STATIC_DCL boolean FDECL(get_valid_jump_position, (int, int));
+STATIC_DCL boolean FDECL(get_valid_polearm_position, (int, int));
STATIC_DCL boolean FDECL(find_poleable_mon, (coord *, int, int));
#ifdef AMIGA
#endif
static const char no_elbow_room[] =
+/*JP
"don't have enough elbow-room to maneuver.";
+*/
+ "\82»\82ê\82ð\82·\82é\82¾\82¯\82Ì\82ä\82Æ\82è\82ª\82È\82¢\81D";
STATIC_OVL int
use_camera(obj)
struct monst *mtmp;
if (Underwater) {
+/*JP
pline("Using your camera underwater would void the warranty.");
+*/
+ pline("\90\85\96Ê\89º\82Å\82Ì\83J\83\81\83\89\82Ì\8eg\97p\82Í\95Û\8fØ\82Ì\91Î\8fÛ\8aO\82Å\82·\81D");
return 0;
}
if (!getdir((char *) 0))
if (obj->cursed && !rn2(2)) {
(void) zapyourself(obj, TRUE);
} else if (u.uswallow) {
+#if 0 /*JP*/
You("take a picture of %s %s.", s_suffix(mon_nam(u.ustuck)),
mbodypart(u.ustuck, STOMACH));
+#else
+ You("%s\82Ì%s\82Ì\8eÊ\90^\82ð\8eB\82Á\82½\81D", mon_nam(u.ustuck),
+ mbodypart(u.ustuck, STOMACH));
+#endif
} else if (u.dz) {
+/*JP
You("take a picture of the %s.",
+*/
+ You("%s\82Ì\8eÊ\90^\82ð\8eB\82Á\82½\81D",
(u.dz > 0) ? surface(u.ux, u.uy) : ceiling(u.ux, u.uy));
} else if (!u.dx && !u.dy) {
(void) zapyourself(obj, TRUE);
boolean drying_feedback = (obj == uwep);
if (!freehand()) {
+/*JP
You("have no free %s!", body_part(HAND));
+*/
+ You("%s\82Ì\8e©\97R\82ª\8cø\82©\82È\82¢\81I", body_part(HAND));
return 0;
} else if (obj == ublindf) {
+/*JP
You("cannot use it while you're wearing it!");
+*/
+ You("\82»\82ê\82ð\90g\82É\82Â\82¯\82Ä\82¢\82é\82Ì\82Å\8eg\97p\82Å\82«\82È\82¢\81I");
return 0;
} else if (obj->cursed) {
long old;
case 2:
old = Glib;
incr_itimeout(&Glib, rn1(10, 3));
+#if 0 /*JP*/
Your("%s %s!", makeplural(body_part(HAND)),
(old ? "are filthier than ever" : "get slimy"));
+#else
+ Your("%s\82Í%s\81I", makeplural(body_part(HAND)),
+ (old ? "\82Ü\82·\82Ü\82·\89\98\82È\82\82È\82Á\82½" : "\82Ê\82é\82Ê\82é\82É\82È\82Á\82½"));
+#endif
if (is_wet_towel(obj))
dry_a_towel(obj, -1, drying_feedback);
return 1;
if (!ublindf) {
old = u.ucreamed;
u.ucreamed += rn1(10, 3);
- pline("Yecch! Your %s %s gunk on it!", body_part(FACE),
+#if 0 /*JP*/
+ pline("Yecch! Your %s %s gunk on it!", body_part(FACE),
(old ? "has more" : "now has"));
+#else
+ pline("\83Q\83F\81[\81I\82 \82È\82½\82Ì%s\82Í%s\82×\82Æ\82×\82Æ\82É\82È\82Á\82½\81I", body_part(FACE),
+ (old ? "\82à\82Á\82Æ" : ""));
+#endif
make_blinded(Blinded + (long) u.ucreamed - old, TRUE);
} else {
const char *what;
+#if 0 /*JP*/
what = (ublindf->otyp == LENSES)
? "lenses"
: (obj->otyp == ublindf->otyp) ? "other towel"
: "blindfold";
+#else
+ what = (ublindf->otyp == LENSES)
+ ? "\83\8c\83\93\83Y"
+ : (obj->otyp == ublindf->otyp) ? "\83^\83I\83\8b"
+ : "\96Ú\89B\82µ";
+#endif
if (ublindf->cursed) {
+#if 0 /*JP*/
You("push your %s %s.", what,
rn2(2) ? "cock-eyed" : "crooked");
+#else
+ pline("%s\82ª%s\81D", what,
+ rn2(2) ? "\82¸\82ê\82½" : "\82ä\82ª\82ñ\82¾");
+#endif
} else {
struct obj *saved_ublindf = ublindf;
+/*JP
You("push your %s off.", what);
+*/
+ pline("%s\82ª\82¸\82è\97\8e\82¿\82½\81D", what);
Blindf_off(ublindf);
dropx(saved_ublindf);
}
if (Glib) {
Glib = 0;
+/*JP
You("wipe off your %s.", makeplural(body_part(HAND)));
+*/
+ You("%s\82ð\90@\82¢\82½\81D", makeplural(body_part(HAND)));
if (is_wet_towel(obj))
dry_a_towel(obj, -1, drying_feedback);
return 1;
Blinded -= u.ucreamed;
u.ucreamed = 0;
if (!Blinded) {
+/*JP
pline("You've got the glop off.");
+*/
+ You("\82³\82Á\82Ï\82è\82µ\82½\81D");
if (!gulp_blnd_check()) {
Blinded = 1;
make_blinded(0L, TRUE);
}
} else {
+/*JP
Your("%s feels clean now.", body_part(FACE));
+*/
+ pline("%s\82Ì\89\98\82ê\82ð\90@\82«\82Æ\82Á\82½\81D", body_part(FACE));
}
if (is_wet_towel(obj))
dry_a_towel(obj, -1, drying_feedback);
return 1;
}
+#if 0 /*JP*/
Your("%s and %s are already clean.", body_part(FACE),
makeplural(body_part(HAND)));
+#else
+ Your("%s\82â%s\82Í\89\98\82ê\82Ä\82¢\82È\82¢\81D", body_part(FACE),
+ makeplural(body_part(HAND)));
+#endif
return 0;
}
int rx, ry, *resp;
{
char buf[BUFSZ];
+#if 0 /*JP*/
boolean more_corpses;
struct permonst *mptr;
+#endif
struct obj *corpse = sobj_at(CORPSE, rx, ry),
*statue = sobj_at(STATUE, rx, ry);
else
statue = 0; /* corpse precedes statue; ignore statue */
}
+#if 0 /*JP*/
more_corpses = (corpse && nxtobj(corpse, CORPSE, TRUE));
+#endif
/* additional stethoscope messages from jyoung@apanix.apana.org.au */
if (!corpse && !statue) {
} else if (Hallucination) {
if (!corpse) {
/* it's a statue */
+/*JP
Strcpy(buf, "You're both stoned");
+*/
+ Strcpy(buf, "\90Î\82¾");
+#if 0 /*JP*//*\91ã\96¼\8e\8c\8f\88\97\9d\82Í\95s\97v*/
} else if (corpse->quan == 1L && !more_corpses) {
int gndr = 2; /* neuter: "it" */
struct monst *mtmp = get_mtraits(corpse, FALSE);
/* (most corpses don't retain the monster's sex, so
we're usually forced to use generic pronoun here) */
if (mtmp) {
- mptr = &mons[mtmp->mnum];
- /* can't use mhe() here; it calls pronoun_gender() which
- expects monster to be on the map (visibility check) */
- if ((humanoid(mptr) || (mptr->geno & G_UNIQ)
- || type_is_pname(mptr)) && !is_neuter(mptr))
- gndr = (int) mtmp->female;
+ mptr = mtmp->data = &mons[mtmp->mnum];
+ /* TRUE: override visibility check--it's not on the map */
+ gndr = pronoun_gender(mtmp, TRUE);
} else {
mptr = &mons[corpse->corpsenm];
if (is_female(mptr))
}
Sprintf(buf, "%s's dead", genders[gndr].he); /* "he"/"she"/"it" */
buf[0] = highc(buf[0]);
+#endif
} else { /* plural */
+/*JP
Strcpy(buf, "They're dead");
+*/
+ Strcpy(buf, "\8e\80\82ñ\82Å\82é\82º");
}
/* variations on "He's dead, Jim." (Star Trek's Dr McCoy) */
+/*JP
You_hear("a voice say, \"%s, Jim.\"", buf);
+*/
+ You_hear("\81u\82»\82¢\82Â\82Í%s\81C\83W\83\80\81v\82Æ\82¢\82¤\90º\82ª\95·\82±\82¦\82½\81D", buf);
*resp = 1;
return TRUE;
} else if (corpse) {
+#if 0 /*JP*/
boolean here = (rx == u.ux && ry == u.uy),
one = (corpse->quan == 1L && !more_corpses), reviver = FALSE;
+#else
+ boolean here = (rx == u.ux && ry == u.uy), reviver = FALSE;
+#endif
+ int visglyph, corpseglyph;
+
+ visglyph = glyph_at(rx, ry);
+ corpseglyph = obj_to_glyph(corpse, rn2);
+
+ if (Blind && (visglyph != corpseglyph))
+ map_object(corpse, TRUE);
if (Role_if(PM_HEALER)) {
/* ok to reset `corpse' here; we're done with it */
corpse = nxtobj(corpse, CORPSE, TRUE);
} while (corpse && !reviver);
}
+#if 0 /*JP*/
You("determine that %s unfortunate being%s %s%s dead.",
one ? (here ? "this" : "that") : (here ? "these" : "those"),
one ? "" : "s", one ? "is" : "are", reviver ? " mostly" : "");
+#else
+ You("%s\95s\8dK\82È\90¶\82«\95¨\82Í%s\8e\80\82ñ\82Å\82¢\82é\82Æ\8c\8b\98_\82µ\82½\81D",
+ here ? "\82±\82Ì" : "\82»\82Ì",
+ reviver ? "\82Ù\82Ú" : "");
+#endif
return TRUE;
} else { /* statue */
const char *what, *how;
+#if 0 /*JP*/
mptr = &mons[statue->corpsenm];
if (Blind) { /* ignore statue->dknown; it'll always be set */
Sprintf(buf, "%s %s",
if (!type_is_pname(mptr))
what = The(what);
}
+#else /*JP:\93ú\96{\8cê\82Å\82Í\83V\83\93\83v\83\8b\82É*/
+ if (Blind) { /* ignore statue->dknown; it'll always be set */
+ what = (rx == u.ux && ry == u.uy) ? "\82±\82ê" : "\82 \82ê";
+ } else {
+ what = mons[statue->corpsenm].mname;
+ }
+#endif
+/*JP
how = "fine";
+*/
+ how = "\82æ\82¢";
if (Role_if(PM_HEALER)) {
struct trap *ttmp = t_at(rx, ry);
if (ttmp && ttmp->ttyp == STATUE_TRAP)
+/*JP
how = "extraordinary";
+*/
+ how = "\95À\8aO\82ê\82½";
else if (Has_contents(statue))
+/*JP
how = "remarkable";
+*/
+ how = "\92\8d\96Ú\82·\82×\82«";
}
+/*JP
pline("%s is in %s health for a statue.", what, how);
+*/
+ pline("\92¤\91\9c\82Æ\82µ\82Ä\82Ì%s\82Í%s\8dì\95i\82¾\81D", what, how);
return TRUE;
}
return FALSE; /* no corpse or statue */
}
+/*JP
static const char hollow_str[] = "a hollow sound. This must be a secret %s!";
+*/
+static const char hollow_str[] = "\82¤\82Â\82ë\82È\89¹\82ð\95·\82¢\82½\81D\94é\96§\82Ì%s\82É\88á\82¢\82È\82¢\81I";
/* Strictly speaking it makes no sense for usage of a stethoscope to
not take any time; however, unless it did, the stethoscope would be
&& !rn2(Role_if(PM_HEALER) ? 10 : 3));
if (nohands(youmonst.data)) {
+#if 0 /*JP*/
You("have no hands!"); /* not `body_part(HAND)' */
+#else
+ pline("\82 \82È\82½\82É\82Í\8eè\82ª\82È\82¢\81I");
+#endif
return 0;
} else if (Deaf) {
+/*JP
You_cant("hear anything!");
+*/
+ You("\89½\82à\95·\82±\82¦\82È\82¢\81I");
return 0;
} else if (!freehand()) {
+/*JP
You("have no free %s.", body_part(HAND));
+*/
+ You("%s\82Ì\8e©\97R\82ª\8cø\82©\82È\82¢\81D", body_part(HAND));
return 0;
}
if (!getdir((char *) 0))
context.stethoscope_move = moves;
context.stethoscope_movement = youmonst.movement;
+ bhitpos.x = u.ux, bhitpos.y = u.uy; /* tentative, reset below */
+ notonhead = u.uswallow;
if (u.usteed && u.dz > 0) {
if (interference) {
+/*JP
pline("%s interferes.", Monnam(u.ustuck));
+*/
+ pline("%s\82ª\82¶\82á\82Ü\82ð\82µ\82½\81D", Monnam(u.ustuck));
mstatusline(u.ustuck);
} else
mstatusline(u.usteed);
mstatusline(u.ustuck);
return res;
} else if (u.uswallow && interference) {
+/*JP
pline("%s interferes.", Monnam(u.ustuck));
+*/
+ pline("%s\82ª\82¶\82á\82Ü\82ð\82µ\82½\81D", Monnam(u.ustuck));
mstatusline(u.ustuck);
return res;
} else if (u.dz) {
if (Underwater)
+/*JP
You_hear("faint splashing.");
+*/
+ You_hear("\82©\82·\82©\82É\83o\83V\83\83\83o\83V\83\83\82Æ\82¢\82¤\89¹\82ð\95·\82¢\82½\81D");
else if (u.dz < 0 || !can_reach_floor(TRUE))
cant_reach_floor(u.ux, u.uy, (u.dz < 0), TRUE);
else if (its_dead(u.ux, u.uy, &res))
; /* message already given */
else if (Is_stronghold(&u.uz))
+/*JP
You_hear("the crackling of hellfire.");
+*/
+ You_hear("\92n\8d\96\82Ì\89\8a\82ª\83p\83`\83p\83`\94R\82¦\82Ä\82¢\82é\89¹\82ð\95·\82¢\82½\81D");
else
+/*JP
pline_The("%s seems healthy enough.", surface(u.ux, u.uy));
+*/
+ pline("%s\82Í\8f[\95ª\8c\92\8dN\82Ì\82æ\82¤\82¾\81D", surface(u.ux,u.uy));
return res;
} else if (obj->cursed && !rn2(2)) {
+/*JP
You_hear("your heart beat.");
+*/
+ You_hear("\8e©\95ª\82Ì\90S\91\9f\82Ì\8cÛ\93®\82ð\95·\82¢\82½\81D");
return res;
}
if (Stunned || (Confusion && !rn2(5)))
rx = u.ux + u.dx;
ry = u.uy + u.dy;
if (!isok(rx, ry)) {
+/*JP
You_hear("a faint typing noise.");
+*/
+ You_hear("\82©\82·\82©\82É\82¾\82ê\82©\82ª\83^\83C\83s\83\93\83O\82µ\82Ä\82¢\82é\89¹\82ð\95·\82¢\82½\81D");
return 0;
}
if ((mtmp = m_at(rx, ry)) != 0) {
const char *mnm = x_monnam(mtmp, ARTICLE_A, (const char *) 0,
SUPPRESS_IT | SUPPRESS_INVISIBLE, FALSE);
+ /* bhitpos needed by mstatusline() iff mtmp is a long worm */
+ bhitpos.x = rx, bhitpos.y = ry;
+ notonhead = (mtmp->mx != rx || mtmp->my != ry);
+
if (mtmp->mundetected) {
if (!canspotmon(mtmp))
+/*JP
There("is %s hidden there.", mnm);
+*/
+ pline("\82±\82±\82É%s\82ª\89B\82ê\82Ä\82¢\82é\81D", mnm);
mtmp->mundetected = 0;
newsym(mtmp->mx, mtmp->my);
} else if (mtmp->mappearance) {
+/*JP
const char *what = "thing";
+*/
+ const char *what = "\95¨\91Ì";
- switch (mtmp->m_ap_type) {
+ switch (M_AP_TYPE(mtmp)) {
case M_AP_OBJECT:
what = simple_typename(mtmp->mappearance);
break;
break;
}
seemimic(mtmp);
- pline("That %s is really %s", what, mnm);
+/*JP
+ pline("That %s is really %s.", what, mnm);
+*/
+ pline("\82±\82Ì%s\82Í\8eÀ\8dÛ\82É\82Í%s\81D", what, mnm);
} else if (flags.verbose && !canspotmon(mtmp)) {
+/*JP
There("is %s there.", mnm);
+*/
+ pline("\82±\82±\82É\82Í%s\82ª\82¢\82é\81D", mnm);
}
+
mstatusline(mtmp);
if (!canspotmon(mtmp))
map_invisible(rx, ry);
return res;
}
- if (glyph_is_invisible(levl[rx][ry].glyph)) {
- unmap_object(rx, ry);
- newsym(rx, ry);
+ if (unmap_invisible(rx,ry))
+/*JP
pline_The("invisible monster must have moved.");
- }
+*/
+ pline_The("\8c©\82¦\82È\82¢\89ö\95¨\82Í\88Ú\93®\82µ\82Ä\82µ\82Ü\82Á\82½\82æ\82¤\82¾\81D");
+
lev = &levl[rx][ry];
switch (lev->typ) {
case SDOOR:
+/*JP
You_hear(hollow_str, "door");
+*/
+ You_hear(hollow_str, "\94à");
cvt_sdoor_to_door(lev); /* ->typ = DOOR */
feel_newsym(rx, ry);
return res;
case SCORR:
+/*JP
You_hear(hollow_str, "passage");
- lev->typ = CORR;
+*/
+ You_hear(hollow_str, "\92Ê\98H");
+ lev->typ = CORR, lev->flags = 0;
unblock_point(rx, ry);
feel_newsym(rx, ry);
return res;
}
if (!its_dead(rx, ry, &res))
+#if 0 /*JP*/
You("hear nothing special."); /* not You_hear() */
+#else
+ pline("\93Á\82É\89½\82à\95·\82±\82¦\82È\82¢\81D");
+#endif
return res;
}
+/*JP
static const char whistle_str[] = "produce a %s whistling sound.";
+*/
+static const char whistle_str[] = "\93J\82ð\90\81\82¢\82Ä%s\89¹\82ð\82½\82Ä\82½\81D";
STATIC_OVL void
use_whistle(obj)
struct obj *obj;
{
if (!can_blow(&youmonst)) {
+/*JP
You("are incapable of using the whistle.");
+*/
+ You("\93J\82ð\8eg\82¤\94\\97Í\82ª\82È\82¢\81D");
} else if (Underwater) {
+/*JP
You("blow bubbles through %s.", yname(obj));
+*/
+ You("%s\82ð\92Ê\82µ\82Ä\96A\82ð\8fo\82µ\82½\81D", xname(obj));
} else {
- You(whistle_str, obj->cursed ? "shrill" : "high");
+ if (Deaf)
+#if 0 /*JP*/
+ You_feel("rushing air tickle your %s.",
+ body_part(NOSE));
+#else
+ You_feel("\8bó\8bC\82Ì\97¬\82ê\82ª%s\82ð\82\82·\82®\82Á\82½\81D",
+ body_part(NOSE));
+#endif
+ else
+/*JP
+ You(whistle_str, obj->cursed ? "shrill" : "high");
+*/
+ You(whistle_str, obj->cursed ? "\95s\8bC\96¡\82È" : "\82©\82ñ\8d\82\82¢");
wake_nearby();
+ if (obj->cursed)
+ vault_summon_gd();
}
}
register struct monst *mtmp, *nextmon;
if (!can_blow(&youmonst)) {
+/*JP
You("are incapable of using the whistle.");
+*/
+ You("\93J\82ð\8eg\82¤\94\\97Í\82ª\82È\82¢\81D");
} else if (obj->cursed && !rn2(2)) {
+#if 0 /*JP*/
You("produce a %shigh-pitched humming noise.",
Underwater ? "very " : "");
+#else
+ You("%s\8d\82\82¢\92²\8eq\82Ì\82¤\82È\82é\82æ\82¤\82È\89¹\82ð\82½\82Ä\82½\81D",
+ Underwater ? "\82Æ\82Ä\82à" : "");
+#endif
wake_nearby();
} else {
int pet_cnt = 0, omx, omy;
/* it's magic! it works underwater too (at a higher pitch) */
+#if 0 /*JP*/
You(whistle_str,
Hallucination ? "normal" : Underwater ? "strange, high-pitched"
: "strange");
+#else
+ You(whistle_str,
+ Hallucination ? "\93J\82Ì\82æ\82¤\82È" : Underwater ? "\95s\8ev\8bc\82È\8d\82\82¢\92²\8eq\82Ì"
+ : "\95s\8ev\8bc\82È");
+#endif
for (mtmp = fmon; mtmp; mtmp = nextmon) {
nextmon = mtmp->nmon; /* trap might kill mon */
if (DEADMONSTER(mtmp))
}
/* mimic must be revealed before we know whether it
actually moves because line-of-sight may change */
- if (mtmp->m_ap_type)
+ if (M_AP_TYPE(mtmp))
seemimic(mtmp);
omx = mtmp->mx, omy = mtmp->my;
mnexto(mtmp);
if (feedback) {
if (canseemon(mtmp))
+/*JP
pline("%s pulls free of %s leash!", Monnam(mtmp), mhis(mtmp));
+*/
+ pline("%s\82Í\95R\82ð\88ø\82Á\82Ï\82Á\82Ä\93¦\82ê\82½\81I", Monnam(mtmp));
else
+/*JP
Your("leash falls slack.");
+*/
+ Your("\95R\82ª\82½\82é\82ñ\82Å\97\8e\82¿\82½\81D");
}
for (otmp = invent; otmp; otmp = otmp->nobj)
if (otmp->otyp == LEASH && otmp->leashmon == (int) mtmp->m_id)
#define MAXLEASHED 2
+/* TODO:
+ * This ought to exclude various other things, such as lights and gas
+ * spore, is_whirly() critters, ethereal creatures, possibly others.
+ */
static boolean
leashable(mtmp)
struct monst *mtmp;
}
/* ARGSUSED */
-STATIC_OVL void
+STATIC_OVL int
use_leash(obj)
struct obj *obj;
{
coord cc;
- register struct monst *mtmp;
+ struct monst *mtmp;
int spotmon;
+ if (u.uswallow) {
+ /* if the leash isn't in use, assume we're trying to leash
+ the engulfer; if it is use, distinguish between removing
+ it from the engulfer versus from some other creature
+ (note: the two in-use cases can't actually occur; all
+ leashes are released when the hero gets engulfed) */
+#if 0 /*JP*/
+ You_cant((!obj->leashmon
+ ? "leash %s from inside."
+ : (obj->leashmon == (int) u.ustuck->m_id)
+ ? "unleash %s from inside."
+ : "unleash anything from inside %s."),
+ noit_mon_nam(u.ustuck));
+#else
+ You_cant((!obj->leashmon
+ ? "\93à\91¤\82©\82ç%s\82É\8c\8b\82Ñ\82Â\82¯\82é\82±\82Æ\82Í\82Å\82«\82È\82¢\81D"
+ : (obj->leashmon == (int) u.ustuck->m_id)
+ ? "\93à\91¤\82©\82ç%s\82ð\8aO\82·\82±\82Æ\82Í\82Å\82«\82È\82¢\81D"
+ : "%s\82Ì\93à\91¤\82©\82ç\8aO\82·\82±\82Æ\82Í\82Å\82«\82È\82¢\81D"),
+ noit_mon_nam(u.ustuck));
+#endif
+ return 0;
+ }
if (!obj->leashmon && number_leashed() >= MAXLEASHED) {
+/*JP
You("cannot leash any more pets.");
- return;
+*/
+ You("\82±\82ê\88È\8fã\83y\83b\83g\82É\95R\82ð\82©\82¯\82ç\82ê\82È\82¢\81D");
+ return 0;
}
if (!get_adjacent_loc((char *) 0, (char *) 0, u.ux, u.uy, &cc))
- return;
+ return 0;
- if ((cc.x == u.ux) && (cc.y == u.uy)) {
+ if (cc.x == u.ux && cc.y == u.uy) {
if (u.usteed && u.dz > 0) {
mtmp = u.usteed;
spotmon = 1;
goto got_target;
}
+/*JP
pline("Leash yourself? Very funny...");
- return;
+*/
+ pline("\8e©\95ª\82ð\94\9b\82é\81H\95Ï\82È\82Ì\81D\81D\81D");
+ return 0;
}
+ /*
+ * From here on out, return value is 1 == a move is used.
+ */
+
if (!(mtmp = m_at(cc.x, cc.y))) {
+/*JP
There("is no creature there.");
- return;
+*/
+ pline("\82»\82±\82É\82Í\90¶\82«\95¨\82Í\82¢\82È\82¢\81D");
+ (void) unmap_invisible(cc.x, cc.y);
+ return 1;
}
spotmon = canspotmon(mtmp);
-got_target:
-
- if (!mtmp->mtame) {
- if (!spotmon)
- There("is no creature there.");
- else
- pline("%s %s leashed!", Monnam(mtmp),
- (!obj->leashmon) ? "cannot be" : "is not");
- return;
- }
- if (!obj->leashmon) {
+ got_target:
+
+ if (!spotmon && !glyph_is_invisible(levl[cc.x][cc.y].glyph)) {
+ /* for the unleash case, we don't verify whether this unseen
+ monster is the creature attached to the current leash */
+/*JP
+ You("fail to %sleash something.", obj->leashmon ? "un" : "");
+*/
+ You("%s\82Ì\82É\8e¸\94s\82µ\82½\81D", obj->leashmon ? "\8aO\82·" : "\8c\8b\82Ñ\82Â\82¯\82é");
+ /* trying again will work provided the monster is tame
+ (and also that it doesn't change location by retry time) */
+ map_invisible(cc.x, cc.y);
+ } else if (!mtmp->mtame) {
+#if 0 /*JP*/
+ pline("%s %s leashed!", Monnam(mtmp),
+ (!obj->leashmon) ? "cannot be" : "is not");
+#else
+ pline("%s\82Í\95R\82Å%s\81I", Monnam(mtmp),
+ (!obj->leashmon) ? "\8c\8b\82×\82È\82¢" : "\8c\8b\82Î\82ê\82Ä\82¢\82È\82¢");
+#endif
+ } else if (!obj->leashmon) {
+ /* applying a leash which isn't currently in use */
if (mtmp->mleashed) {
+#if 0 /*JP*/
pline("This %s is already leashed.",
- spotmon ? l_monnam(mtmp) : "monster");
- return;
- }
- if (!leashable(mtmp)) {
+ spotmon ? l_monnam(mtmp) : "creature");
+#else
+ pline("%s\82Í\82·\82Å\82É\8c\8b\82Ñ\82Â\82¯\82ç\82ê\82Ä\82¢\82é\81D",
+ spotmon ? l_monnam(mtmp) : "\89ö\95¨");
+#endif
+ } else if (!leashable(mtmp)) {
+#if 0 /*JP*/
pline("The leash won't fit onto %s%s.", spotmon ? "your " : "",
l_monnam(mtmp));
- return;
+#else
+ pline("\95R\82Í%s\82É\8d\87\82í\82È\82¢\81D",
+ l_monnam(mtmp));
+#endif
+ } else {
+#if 0 /*JP*/
+ You("slip the leash around %s%s.", spotmon ? "your " : "",
+ l_monnam(mtmp));
+#else
+ You("%s\82ð\95R\82Å\8c\8b\82Ñ\82Â\82¯\82½\81D",
+ l_monnam(mtmp));
+#endif
+ mtmp->mleashed = 1;
+ obj->leashmon = (int) mtmp->m_id;
+ mtmp->msleeping = 0;
}
-
- You("slip the leash around %s%s.", spotmon ? "your " : "",
- l_monnam(mtmp));
- mtmp->mleashed = 1;
- obj->leashmon = (int) mtmp->m_id;
- mtmp->msleeping = 0;
- return;
- }
- if (obj->leashmon != (int) mtmp->m_id) {
- pline("This leash is not attached to that creature.");
- return;
} else {
- if (obj->cursed) {
+ /* applying a leash which is currently in use */
+ if (obj->leashmon != (int) mtmp->m_id) {
+/*JP
+ pline("This leash is not attached to that creature.");
+*/
+ pline("\82±\82Ì\95R\82Í\82»\82ê\82É\82Í\8c\8b\82Î\82ê\82Ä\82¢\82È\82¢\81D");
+ } else if (obj->cursed) {
+/*JP
pline_The("leash would not come off!");
- obj->bknown = TRUE;
- return;
+*/
+ pline("\95R\82ª\82Í\82¸\82ê\82È\82¢\81I");
+ obj->bknown = 1;
+ } else {
+ mtmp->mleashed = 0;
+ obj->leashmon = 0;
+#if 0 /*JP*/
+ You("remove the leash from %s%s.",
+ spotmon ? "your " : "", l_monnam(mtmp));
+#else
+ You("%s\82©\82ç\95R\82ð\82Í\82¸\82µ\82½\81D",
+ l_monnam(mtmp));
+#endif
}
- mtmp->mleashed = 0;
- obj->leashmon = 0;
- You("remove the leash from %s%s.", spotmon ? "your " : "",
- l_monnam(mtmp));
}
- return;
+ return 1;
}
/* assuming mtmp->mleashed has been checked */
&& otmp->leashmon == (int) mtmp->m_id) {
if (otmp->cursed)
return FALSE;
+#if 0 /*JP*/
You_feel("%s leash go slack.",
(number_leashed() > 1) ? "a" : "the");
+#else
+ You("\95R\82ª\82½\82é\82ñ\82¾\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
+#endif
mtmp->mleashed = 0;
otmp->leashmon = 0;
}
|| (mtmp->mhp -= rnd(2)) <= 0) {
long save_pacifism = u.uconduct.killer;
+/*JP
Your("leash chokes %s to death!", mon_nam(mtmp));
+*/
+ pline("%s\82Í\8di\82ß\8eE\82³\82ê\82½\81I",mon_nam(mtmp));
/* hero might not have intended to kill pet, but
that's the result of his actions; gain experience,
lose pacifism, take alignment and luck hit, make
corpse less likely to remain tame after revival */
- xkilled(mtmp, 0); /* no "you kill it" message */
+ xkilled(mtmp, XKILL_NOMSG);
/* life-saving doesn't ordinarily reset this */
- if (mtmp->mhp > 0)
+ if (!DEADMONSTER(mtmp))
u.uconduct.killer = save_pacifism;
} else {
+/*JP
pline("%s is choked by the leash!", Monnam(mtmp));
+*/
+ pline("%s\82Í\95R\82Å\8eñ\82ð\8di\82ß\82ç\82ê\82½\81I", Monnam(mtmp));
/* tameness eventually drops to 1 here (never 0) */
if (mtmp->mtame && rn2(mtmp->mtame))
mtmp->mtame--;
}
} else {
if (um_dist(mtmp->mx, mtmp->my, 5)) {
+/*JP
pline("%s leash snaps loose!", s_suffix(Monnam(mtmp)));
+*/
+ pline("%s\82Ì\95R\82Í\83p\83`\83\93\82Æ\8aO\82ê\82½\81I", Monnam(mtmp));
m_unleash(mtmp, FALSE);
} else {
+/*JP
You("pull on the leash.");
+*/
+ You("\95R\82ð\88ø\82Á\82Ï\82Á\82½\81D");
if (mtmp->data->msound != MS_SILENT)
switch (rn2(3)) {
case 0:
{
return ((ACURR(A_CHA) > 14)
? ((poly_gender() == 1)
+#if 0 /*JP*/
? "beautiful"
: "handsome")
: "ugly");
+#else
+/*JP \8cê\8a²\82Å\8eg\82¤ */
+ ? "\94ü\82µ"
+ : "\82è\82è\82µ")
+ : "\8fX");
+#endif
}
-#define WEAK 3 /* from eat.c */
-
+/*JP
static const char look_str[] = "look %s.";
+*/
+static const char look_str[] = "%s\8c©\82¦\82é\81D";
STATIC_OVL int
use_mirror(obj)
mirror = simpleonames(obj); /* "mirror" or "looking glass" */
if (obj->cursed && !rn2(2)) {
if (!Blind)
+/*JP
pline_The("%s fogs up and doesn't reflect!", mirror);
+*/
+ pline("%s\82Í\93Ü\82è\81C\89f\82ç\82È\82\82È\82Á\82½\81I", mirror);
return 1;
}
if (!u.dx && !u.dy && !u.dz) {
if (!useeit) {
+/*JP
You_cant("see your %s %s.", uvisage, body_part(FACE));
+*/
+ You_cant("\8e©\95ª\82Ì%s\82¢%s\82ð\8c©\82é\82±\82Æ\82ª\82Å\82«\82È\82¢\81D", uvisage, body_part(FACE));
} else {
if (u.umonnum == PM_FLOATING_EYE) {
if (Free_action) {
+/*JP
You("stiffen momentarily under your gaze.");
+*/
+ pline("\88ê\8fu\82 \82È\82½\82Ì\82É\82ç\82Ý\82Å\8dd\92¼\82µ\82½\81D");
} else {
if (Hallucination)
+/*JP
pline("Yow! The %s stares back!", mirror);
+*/
+ pline("\82¨\82ì\81I%s\82ª\82 \82È\82½\82ð\82É\82ç\82Ý\95Ô\82µ\82½\81I", mirror);
else
+/*JP
pline("Yikes! You've frozen yourself!");
+*/
+ pline("\82¨\82ì\81I\82 \82È\82½\82Í\93®\82¯\82È\82\82È\82Á\82½\81I");
if (!Hallucination || !rn2(4)) {
nomul(-rnd(MAXULEV + 6 - u.ulevel));
+/*JP
multi_reason = "gazing into a mirror";
+*/
+ multi_reason = "\8b¾\82É\94½\8eË\82µ\82½\8e\8b\90ü\82Å\8dd\92¼\82µ\82Ä\82¢\82é\8aÔ\82É";
}
nomovemsg = 0; /* default, "you can move again" */
}
} else if (youmonst.data->mlet == S_VAMPIRE)
+/*JP
You("don't have a reflection.");
+*/
+ You("\8b¾\82É\89f\82ç\82È\82©\82Á\82½\81D");
else if (u.umonnum == PM_UMBER_HULK) {
+/*JP
pline("Huh? That doesn't look like you!");
+*/
+ pline("\82Ù\82¦\81H\8eÊ\82Á\82Ä\82é\82Ì\82Í\82 \82È\82½\82¶\82á\82È\82¢\82Ý\82½\82¢\82¾\81I");
make_confused(HConfusion + d(3, 4), FALSE);
} else if (Hallucination)
You(look_str, hcolor((char *) 0));
else if (Sick)
+/*JP
You(look_str, "peaked");
+*/
+ You(look_str, "\8aç\90F\82ª\88«\82");
else if (u.uhs >= WEAK)
+/*JP
You(look_str, "undernourished");
+*/
+ You(look_str, "\89h\97{\8e¸\92²\82Ì\82æ\82¤\82É");
else
+/*JP
You("look as %s as ever.", uvisage);
+*/
+ You("\82 \82¢\82©\82í\82ç\82¸%s\82\8c©\82¦\82é\81D", uvisage);
}
return 1;
}
if (u.uswallow) {
if (useeit)
+#if 0 /*JP*/
You("reflect %s %s.", s_suffix(mon_nam(u.ustuck)),
mbodypart(u.ustuck, STOMACH));
+#else
+ You("%s\82Ì%s\82ð\89f\82µ\82½\81D", mon_nam(u.ustuck),
+ mbodypart(u.ustuck, STOMACH));
+#endif
return 1;
}
if (Underwater) {
if (useeit)
+#if 0 /*JP*/
You(Hallucination ? "give the fish a chance to fix their makeup."
: "reflect the murky water.");
+#else
+ You(Hallucination ? "\8b\9b\82É\89»\8fÏ\92¼\82µ\82Ì\8b@\89ï\82ð\97^\82¦\82½\81D"
+ : "\82 \82È\82½\82Í\97\84\82ñ\82¾\90\85\82ð\89f\82µ\82½\81D");
+#endif
return 1;
}
if (u.dz) {
if (useeit)
+/*JP
You("reflect the %s.",
+*/
+ You("%s\82ð\89f\82µ\82½\81D",
(u.dz > 0) ? surface(u.ux, u.uy) : ceiling(u.ux, u.uy));
return 1;
}
mlet = mtmp->data->mlet;
if (mtmp->msleeping) {
if (vis)
+/*JP
pline("%s is too tired to look at your %s.", Monnam(mtmp),
+*/
+ pline("%s\82Í\82Æ\82Ä\82à\94æ\82ê\82Ä\82¢\82Ä%s\82ð\8c©\82é\82Ç\82±\82ë\82¶\82á\82È\82¢\81D", Monnam(mtmp),
mirror);
} else if (!mtmp->mcansee) {
if (vis)
+/*JP
pline("%s can't see anything right now.", Monnam(mtmp));
+*/
+ pline("%s\82Í\8d¡\82Ì\82Æ\82±\82ë\89½\82à\8c©\82é\82±\82Æ\82ª\82Å\82«\82È\82¢\81D", Monnam(mtmp));
} else if (invis_mirror && !perceives(mtmp->data)) {
if (vis)
+/*JP
pline("%s fails to notice your %s.", Monnam(mtmp), mirror);
+*/
+ pline("%s\82Í\82 \82È\82½\82Ì%s\82É\8bC\95t\82©\82È\82©\82Á\82½\81D", Monnam(mtmp), mirror);
/* infravision doesn't produce an image in the mirror */
} else if ((how_seen & SEENMON) == MONSEEN_INFRAVIS) {
if (vis) /* (redundant) */
+#if 0 /*JP*/
pline("%s is too far away to see %sself in the dark.",
Monnam(mtmp), mhim(mtmp));
+#else
+ pline("%s\82Í\88Ã\88Å\82Å\8e©\95ª\8e©\90g\82ð\8c©\82é\82É\82Í\89\93\82·\82¬\82é\81D", Monnam(mtmp));
+#endif
/* some monsters do special things */
} else if (mlet == S_VAMPIRE || mlet == S_GHOST || is_vampshifter(mtmp)) {
if (vis)
+/*JP
pline("%s doesn't have a reflection.", Monnam(mtmp));
+*/
+ pline("%s\82Í%s\82É\89f\82ç\82È\82¢\81D", Monnam(mtmp), mirror);
} else if (monable && mtmp->data == &mons[PM_MEDUSA]) {
+/*JP
if (mon_reflects(mtmp, "The gaze is reflected away by %s %s!"))
+*/
+ if (mon_reflects(mtmp, "\82É\82ç\82Ý\82Í%s\82Ì%s\82Å\94½\8eË\82µ\82½\81I"))
return 1;
if (vis)
+/*JP
pline("%s is turned to stone!", Monnam(mtmp));
+*/
+ pline("%s\82Í\90Î\82É\82È\82Á\82½\81I", Monnam(mtmp));
stoned = TRUE;
killed(mtmp);
} else if (monable && mtmp->data == &mons[PM_FLOATING_EYE]) {
if (!rn2(4))
tmp = 120;
if (vis)
+/*JP
pline("%s is frozen by its reflection.", Monnam(mtmp));
+*/
+ pline("%s\82Í\8e©\95ª\82Ì\8ep\82ð\8c©\82Ä\93®\82¯\82È\82\82È\82Á\82½\81D", Monnam(mtmp));
else
+/*JP
You_hear("%s stop moving.", something);
+*/
+ You_hear("\89½\82©\82ª\93®\82«\82ð\82Æ\82ß\82½\89¹\82ð\95·\82¢\82½\81D");
paralyze_monst(mtmp, (int) mtmp->mfrozen + tmp);
} else if (monable && mtmp->data == &mons[PM_UMBER_HULK]) {
if (vis)
+/*JP
pline("%s confuses itself!", Monnam(mtmp));
+*/
+ pline("%s\82Í\8d¬\97\90\82µ\82½\81I", Monnam(mtmp));
mtmp->mconf = 1;
} else if (monable && (mlet == S_NYMPH || mtmp->data == &mons[PM_SUCCUBUS]
|| mtmp->data == &mons[PM_INCUBUS])) {
if (vis) {
char buf[BUFSZ]; /* "She" or "He" */
+#if 0 /*JP*/
pline("%s admires %sself in your %s.", Monnam(mtmp), mhim(mtmp),
mirror);
+#else
+ pline("%s\82Í\8e©\95ª\82Ì\8ep\82É\82¤\82Á\82Æ\82è\82µ\82½\81D", Monnam(mtmp));
+#endif
+/*JP
pline("%s takes it!", upstart(strcpy(buf, mhe(mtmp))));
+*/
+ pline("%s\82Í\82»\82ê\82ð\92D\82Á\82½\81I", upstart(strcpy(buf, mhe(mtmp))));
} else
+/*JP
pline("It steals your %s!", mirror);
+*/
+ pline("\89½\8eÒ\82©\82ª\82 \82È\82½\82Ì%s\82ð\93\90\82ñ\82¾\81I", mirror);
setnotworn(obj); /* in case mirror was wielded */
freeinv(obj);
(void) mpickobj(mtmp, obj);
(void) rloc(mtmp, TRUE);
} else if (!is_unicorn(mtmp->data) && !humanoid(mtmp->data)
&& (!mtmp->minvis || perceives(mtmp->data)) && rn2(5)) {
- if (vis)
- pline("%s is frightened by its reflection.", Monnam(mtmp));
- monflee(mtmp, d(2, 4), FALSE, FALSE);
+ boolean do_react = TRUE;
+
+ if (mtmp->mfrozen) {
+ if (vis)
+/*JP
+ You("discern no obvious reaction from %s.", mon_nam(mtmp));
+*/
+ You("%s\82©\82ç\82Ì\96¾\82ç\82©\82È\94½\89\9e\82Í\8e¯\95Ê\82Å\82«\82È\82©\82Á\82½\81D", mon_nam(mtmp));
+ else
+/*JP
+ You_feel("a bit silly gesturing the mirror in that direction.");
+*/
+ You_feel("\8b¾\82ð\82»\82Ì\95û\8cü\82É\8cü\82¯\82é\82Ì\82Í\82¿\82å\82Á\82Æ\82¨\82©\82µ\82È\8ds\93®\82¾\82Æ\8a´\82¶\82½\81D");
+ do_react = FALSE;
+ }
+ if (do_react) {
+ if (vis)
+/*JP
+ pline("%s is frightened by its reflection.", Monnam(mtmp));
+*/
+ pline("%s\82Í\8e©\95ª\82Ì\8ep\82ð\8c©\82Ä\95|\82ª\82Á\82½\81D", Monnam(mtmp));
+ monflee(mtmp, d(2, 4), FALSE, FALSE);
+ }
} else if (!Blind) {
if (mtmp->minvis && !See_invisible)
;
else if ((mtmp->minvis && !perceives(mtmp->data))
/* redundant: can't get here if these are true */
|| !haseyes(mtmp->data) || notonhead || !mtmp->mcansee)
+#if 0 /*JP*/
pline("%s doesn't seem to notice %s reflection.", Monnam(mtmp),
mhis(mtmp));
+#else
+ pline("%s\82Í\8e©\95ª\82Ì\8ep\82É\8bC\82ª\82Â\82¢\82Ä\82È\82¢\82æ\82¤\82¾\81D", Monnam(mtmp));
+#endif
else
+/*JP
pline("%s ignores %s reflection.", Monnam(mtmp), mhis(mtmp));
+*/
+ pline("%s\82Í\8e©\95ª\82Ì\8ep\82ð\96³\8e\8b\82µ\82½\81D", Monnam(mtmp));
}
return 1;
}
(obj->otyp == BELL_OF_OPENING && invocation_pos(u.ux, u.uy)
&& !On_stairs(u.ux, u.uy));
+/*JP
You("ring %s.", the(xname(obj)));
+*/
+ You("%s\82ð\96Â\82ç\82µ\82½\81D", the(xname(obj)));
if (Underwater || (u.uswallow && ordinary)) {
#ifdef AMIGA
amii_speaker(obj, "AhDhGqEqDhEhAqDqFhGw", AMII_MUFFLED_VOLUME);
#endif
+/*JP
pline("But the sound is muffled.");
+*/
+ pline("\82µ\82©\82µ\89¹\82Í\82©\82«\8fÁ\82³\82ê\82½\81D");
} else if (invoking && ordinary) {
/* needs to be recharged... */
+/*JP
pline("But it makes no sound.");
+*/
+ pline("\82µ\82©\82µ\81C\89¹\82Í\96Â\82ç\82È\82©\82Á\82½\81D");
learno = TRUE; /* help player figure out why */
} else if (ordinary) {
&& !(mvitals[PM_MOUNTAIN_NYMPH].mvflags & G_GONE)
&& (mtmp = makemon(mkclass(S_NYMPH, 0), u.ux, u.uy, NO_MINVENT))
!= 0) {
+/*JP
You("summon %s!", a_monnam(mtmp));
+*/
+ You("%s\82ð\8f¢\8a«\82µ\82½\81I", a_monnam(mtmp));
if (!obj_resists(obj, 93, 100)) {
+/*JP
pline("%s shattered!", Tobjnam(obj, "have"));
+*/
+ pline("%s\82Í\95²\81X\82É\82È\82Á\82½\81I", xname(obj));
useup(obj);
*optr = 0;
} else
wakem = TRUE;
} else if (invoking) {
+/*JP
pline("%s an unsettling shrill sound...", Tobjnam(obj, "issue"));
+*/
+ pline("%s\82Í\95s\8bC\96¡\82È\89s\82¢\89¹\82ð\8fo\82µ\82½\81D\81D\81D", xname(obj));
#ifdef AMIGA
amii_speaker(obj, "aefeaefeaefeaefeaefe", AMII_LOUDER_VOLUME);
#endif
pline1(nothing_happens);
break;
case 1:
+/*JP
pline("%s opens...", Something);
+*/
+ pline("\89½\82©\82ª\8aJ\82¢\82½\81D\81D\81D");
learno = TRUE;
break;
default:
+/*JP
pline("Things open around you...");
+*/
+ pline("\82Ü\82í\82è\82Ì\95¨\82ª\8aJ\82¢\82½\81D\81D\81D");
learno = TRUE;
break;
}
use_candelabrum(obj)
register struct obj *obj;
{
+#if 0 /*JP*//* not used */
const char *s = (obj->spe != 1) ? "candles" : "candle";
+#endif
if (obj->lamplit) {
+/*JP
You("snuff the %s.", s);
+*/
+ You("\82ë\82¤\82»\82\82ð\90\81\82«\8fÁ\82µ\82½\81D");
end_burn(obj, TRUE);
return;
}
if (obj->spe <= 0) {
+/*JP
pline("This %s has no %s.", xname(obj), s);
+*/
+ pline("\82±\82Ì%s\82É\82Í\82ë\82¤\82»\82\82ª\82È\82¢\81D", xname(obj));
return;
}
if (Underwater) {
+/*JP
You("cannot make fire under water.");
+*/
+ You("\90\85\92\86\82Å\89Î\82ð\82¨\82±\82¹\82È\82¢\81D");
return;
}
if (u.uswallow || obj->cursed) {
if (!Blind)
+#if 0 /*JP*/
pline_The("%s %s for a moment, then %s.", s, vtense(s, "flicker"),
vtense(s, "die"));
+#else
+ pline("\82ë\82¤\82»\82\82Ì\89\8a\82Í\82µ\82Î\82ç\82\93_\96Å\82µ\81C\8fÁ\82¦\82½\81D");
+#endif
return;
}
if (obj->spe < 7) {
+#if 0 /*JP*/
There("%s only %d %s in %s.", vtense(s, "are"), obj->spe, s,
the(xname(obj)));
+#else
+ pline("%s\82É\82Í\82½\82Á\82½%d\96{\82Ì\82ë\82¤\82»\82\82µ\82©\82È\82¢\81D",
+ xname(obj), obj->spe);
+#endif
if (!Blind)
+#if 0 /*JP*/
pline("%s lit. %s dimly.", obj->spe == 1 ? "It is" : "They are",
Tobjnam(obj, "shine"));
+#else
+ pline("%s\82É\89Î\82ð\82Â\82¯\82½\81D%s\82Í\82Ù\82Ì\82©\82É\8bP\82¢\82½\81D",
+ xname(obj), xname(obj));
+#endif
} else {
+#if 0 /*JP*/
pline("%s's %s burn%s", The(xname(obj)), s,
(Blind ? "." : " brightly!"));
+#else
+ pline("%s\82Ì\82ë\82¤\82»\82\82Í%s\94R\82¦\82 \82ª\82Á\82½\81I", The(xname(obj)),
+ (Blind ? "" : "\96¾\82é\82"));
+#endif
}
if (!invocation_pos(u.ux, u.uy) || On_stairs(u.ux, u.uy)) {
+/*JP
pline_The("%s %s being rapidly consumed!", s, vtense(s, "are"));
+*/
+ pline("\82ë\82¤\82»\82\82Í\82·\82²\82¢\91¬\82³\82Å\94R\82¦\8en\82ß\82½\81I");
/* this used to be obj->age /= 2, rounding down; an age of
1 would yield 0, confusing begin_burn() and producing an
unlightable, unrefillable candelabrum; round up instead */
} else {
if (obj->spe == 7) {
if (Blind)
+/*JP
pline("%s a strange warmth!", Tobjnam(obj, "radiate"));
+*/
+ pline("\8aï\96\82È\92g\82©\82³\82ð%s\82É\8a´\82¶\82½\81I", xname(obj));
else
+/*JP
pline("%s with a strange light!", Tobjnam(obj, "glow"));
+*/
+ pline("%s\82Í\8aï\96\82È\8cõ\82ð\94\82µ\82Ä\82¢\82é\81I", xname(obj));
}
obj->known = 1;
}
{
register struct obj *obj = *optr;
register struct obj *otmp;
+/*JP
const char *s = (obj->quan != 1) ? "candles" : "candle";
+*/
+ const char *s = "\82ë\82¤\82»\82";
char qbuf[QBUFSZ], qsfx[QBUFSZ], *q;
if (u.uswallow) {
return;
}
+ /*JP:\8dÅ\8fI\93I\82É\82Í\81u\82ë\82¤\82»\82\82ð\90C\91ä\82É\8eæ\82è\82Â\82¯\82Ü\82·\82©\81H\81v*/
/* first, minimal candelabrum suffix for formatting candles */
+/*JP
Sprintf(qsfx, " to\033%s?", thesimpleoname(otmp));
+*/
+ Sprintf(qsfx, "\82ð\033%s\82É\8eæ\82è\82Â\82¯\82Ü\82·\82©\81H", thesimpleoname(otmp));
/* next, format the candles as a prefix for the candelabrum */
+/*JP
(void) safe_qbuf(qbuf, "Attach ", qsfx, obj, yname, thesimpleoname, s);
+*/
+ (void) safe_qbuf(qbuf, "", qsfx, obj, xname, thesimpleoname, s);
+ /*JP:\81u(\82ë\82¤\82»\82)\82ð\033\90C\91ä\82É\8eæ\82è\82Â\82¯\82Ü\82·\82©\81H\81v*/
/* strip temporary candelabrum suffix */
+#if 0 /*JP*/
if ((q = strstri(qbuf, " to\033")) != 0)
Strcpy(q, " to ");
+#else
+ if ((q = strchr(qbuf, '\033')) != 0)
+ *q = '\0';
+ /*JP:\81u(\82ë\82¤\82»\82)\82ð\81v*/
+#endif
/* last, format final "attach candles to candelabrum?" query */
+/*JP
if (yn(safe_qbuf(qbuf, qbuf, "?", otmp, yname, thesimpleoname, "it"))
+*/
+ if (yn(safe_qbuf(qbuf, qbuf, "\82É\8eæ\82è\82Â\82¯\82Ü\82·\82©\81H", otmp, xname, thesimpleoname, "\82»\82ê"))
== 'n') {
use_lamp(obj);
return;
} else {
if ((long) otmp->spe + obj->quan > 7L) {
obj = splitobj(obj, 7L - (long) otmp->spe);
+#if 0 /*JP:\93ú\96{\8cê\82Å\82Í\95s\97v*/
/* avoid a grammatical error if obj->quan gets
reduced to 1 candle from more than one */
s = (obj->quan != 1) ? "candles" : "candle";
+#endif
} else
*optr = 0;
+#if 0 /*JP*/
You("attach %ld%s %s to %s.", obj->quan, !otmp->spe ? "" : " more", s,
the(xname(otmp)));
+#else
+ You("%ld\96{\82Ì\82ë\82¤\82»\82\82ð%s%s\82Ö\8eæ\82è\82Â\82¯\82½\81D",
+ obj->quan, !otmp->spe ? "" : "\82³\82ç\82É",
+ xname(otmp));
+#endif
if (!otmp->spe || otmp->age > obj->age)
otmp->age = obj->age;
otmp->spe += (int) obj->quan;
if (otmp->lamplit && !obj->lamplit)
+/*JP
pline_The("new %s magically %s!", s, vtense(s, "ignite"));
+*/
+ pline("\90V\82µ\82¢\82ë\82¤\82»\82\82Í\95s\8ev\8bc\82È\89\8a\82ð\82 \82°\82½\81I");
else if (!otmp->lamplit && obj->lamplit)
+/*JP
pline("%s out.", (obj->quan > 1L) ? "They go" : "It goes");
+*/
+ pline("\89\8a\82Í\8fÁ\82¦\82½\81D");
if (obj->unpaid)
+#if 0 /*JP*/
verbalize("You %s %s, you bought %s!",
otmp->lamplit ? "burn" : "use",
(obj->quan > 1L) ? "them" : "it",
(obj->quan > 1L) ? "them" : "it");
+#else
+ verbalize("\89Î\82ð\82Â\82¯\82½\82È\82ç\81C\94\83\82Á\82Ä\82à\82ç\82¨\82¤\81I");
+#endif
if (obj->quan < 7L && otmp->spe == 7)
+#if 0 /*JP*/
pline("%s now has seven%s candles attached.", The(xname(otmp)),
otmp->lamplit ? " lit" : "");
+#else
+ pline("%s\82É\82Í\82·\82Å\82É7\96{\82Ì%s\82ë\82¤\82»\82\82ª\8eæ\82è\82Â\82¯\82ç\82ê\82Ä\82¢\82é\81D",
+ The(xname(otmp)), otmp->lamplit ? "\89Î\82Ì\82Â\82¢\82½" : "");
+#endif
/* candelabrum's light range might increase */
if (otmp->lamplit)
obj_merge_light_sources(otmp, otmp);
end_burn(obj, TRUE);
/* candles are now gone */
useupall(obj);
+ /* candelabrum's weight is changing */
+ otmp->owt = weight(otmp);
+ update_inventory();
}
}
&& otmp->lamplit) {
char buf[BUFSZ];
xchar x, y;
+#if 0 /*JP*//* not used */
boolean many = candle ? (otmp->quan > 1L) : (otmp->spe > 1);
+#endif
(void) get_obj_location(otmp, &x, &y, 0);
if (otmp->where == OBJ_MINVENT ? cansee(x, y) : !Blind)
+#if 0 /*JP*/
pline("%s%scandle%s flame%s extinguished.", Shk_Your(buf, otmp),
(candle ? "" : "candelabrum's "), (many ? "s'" : "'s"),
(many ? "s are" : " is"));
+#else
+ pline("%s%s\82ë\82¤\82»\82\82Ì\89\8a\82Í\8fÁ\82¦\82½\81D", Shk_Your(buf, otmp),
+ candle ? "" : "\90C\91ä\82Ì");
+#endif
end_burn(otmp, TRUE);
return TRUE;
}
|| obj->otyp == BRASS_LANTERN || obj->otyp == POT_OIL) {
(void) get_obj_location(obj, &x, &y, 0);
if (obj->where == OBJ_MINVENT ? cansee(x, y) : !Blind)
+/*JP
pline("%s %s out!", Yname2(obj), otense(obj, "go"));
+*/
+ pline("%s\82Í\8fÁ\82¦\82½\81I", Yname2(obj));
end_burn(obj, TRUE);
return TRUE;
}
|| obj->otyp == BRASS_LANTERN) && obj->cursed && !rn2(2))
return FALSE;
if (obj->where == OBJ_MINVENT ? cansee(x, y) : !Blind)
+/*JP
pline("%s %s light!", Yname2(obj), otense(obj, "catch"));
+*/
+ pline("%s\82Ì\96¾\82©\82è\82ª\82Â\82¢\82½\81I", Yname2(obj));
if (obj->otyp == POT_OIL)
makeknown(obj->otyp);
if (carried(obj) && obj->unpaid && costly_spot(u.ux, u.uy)) {
/* if it catches while you have it, then it's your tough luck */
check_unpaid(obj);
+#if 0 /*JP:T*/
verbalize("That's in addition to the cost of %s %s, of course.",
yname(obj), obj->quan == 1L ? "itself" : "themselves");
+#else
+ verbalize("\82±\82ê\82Í\82à\82¿\82ë\82ñ%s\82Ì\92l\92i\82Æ\82Í\95Ê\82¾\82æ\81D", xname(obj));
+#endif
bill_dummy_object(obj);
}
begin_burn(obj, FALSE);
if (obj->lamplit) {
if (obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP
|| obj->otyp == BRASS_LANTERN)
+/*JP
pline("%slamp is now off.", Shk_Your(buf, obj));
+*/
+ pline("%s\83\89\83\93\83v\82Ì\93\94\82Í\8fÁ\82¦\82½\81D", Shk_Your(buf, obj));
else
+/*JP
You("snuff out %s.", yname(obj));
+*/
+ You("%s\82ð\90\81\82«\8fÁ\82µ\82½\81D", xname(obj));
end_burn(obj, TRUE);
return;
}
if (Underwater) {
+#if 0 /*JP*/
pline(!Is_candle(obj) ? "This is not a diving lamp"
: "Sorry, fire and water don't mix.");
+#else
+ pline(!Is_candle(obj) ? "\82±\82ê\82Í\90ö\90\85\97p\82Ì\83\89\83\93\83v\82¶\82á\82È\82¢\81D"
+ : "\8ec\94O\82È\82ª\82ç\81C\89Î\82Æ\90\85\82Í\82Ü\82´\82ç\82È\82¢\81D");
+#endif
return;
}
/* magic lamps with an spe == 0 (wished for) cannot be lit */
if ((!Is_candle(obj) && obj->age == 0)
|| (obj->otyp == MAGIC_LAMP && obj->spe == 0)) {
if (obj->otyp == BRASS_LANTERN)
+/*JP
Your("lamp has run out of power.");
+*/
+ Your("\83\89\83\93\83v\82Ì\93d\97Í\82ð\8eg\82¢\90Ø\82Á\82Ä\82µ\82Ü\82Á\82½\81D");
else
+/*JP
pline("This %s has no oil.", xname(obj));
+*/
+ pline("\82±\82Ì%s\82É\82Í\82à\82¤\83I\83C\83\8b\82ª\82È\82¢\81D", xname(obj));
return;
}
if (obj->cursed && !rn2(2)) {
if (!Blind)
+#if 0 /*JP*/
pline("%s for a moment, then %s.", Tobjnam(obj, "flicker"),
otense(obj, "die"));
+#else
+ pline("%s\82Í\82µ\82Î\82ç\82\82Ì\8aÔ\93_\96Å\82µ\81C\8fÁ\82¦\82½\81D",
+ xname(obj));
+#endif
} else {
if (obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP
|| obj->otyp == BRASS_LANTERN) {
check_unpaid(obj);
+/*JP
pline("%slamp is now on.", Shk_Your(buf, obj));
+*/
+ pline("%s\83\89\83\93\83v\82É\93\94\82ª\93\94\82Á\82½\81D", Shk_Your(buf, obj));
} else { /* candle(s) */
+#if 0 /*JP*/
pline("%s flame%s %s%s", s_suffix(Yname2(obj)), plur(obj->quan),
otense(obj, "burn"), Blind ? "." : " brightly!");
+#else
+ pline("%s\82Í%s\94R\82¦\82 \82ª\82Á\82½\81I",
+ xname(obj), Blind ? "" : "\96¾\82é\82");
+#endif
if (obj->unpaid && costly_spot(u.ux, u.uy)
&& obj->age == 20L * (long) objects[obj->otyp].oc_cost) {
+#if 0 /*JP*/
const char *ithem = (obj->quan > 1L) ? "them" : "it";
verbalize("You burn %s, you bought %s!", ithem, ithem);
+#else
+ verbalize("\93\94\82ð\82Â\82¯\82½\82È\82ç\81C\94\83\82Á\82Ä\82à\82ç\82¨\82¤\81I");
+#endif
bill_dummy_object(obj);
}
}
}
STATIC_OVL void
-light_cocktail(obj)
-struct obj *obj; /* obj is a potion of oil */
+light_cocktail(optr)
+struct obj **optr;
{
+ struct obj *obj = *optr; /* obj is a potion of oil */
char buf[BUFSZ];
boolean split1off;
}
if (obj->lamplit) {
+/*JP
You("snuff the lit potion.");
+*/
+ You("\96û\95r\82Ì\89Î\82ð\90\81\82«\8fÁ\82µ\82½\81D");
end_burn(obj, TRUE);
/*
* Free & add to re-merge potion. This will average the
* but its easy.
*/
freeinv(obj);
- (void) addinv(obj);
+ *optr = addinv(obj);
return;
} else if (Underwater) {
+/*JP
There("is not enough oxygen to sustain a fire.");
+*/
+ pline("\89Î\82ð\82Â\82¯\82é\82Ì\82É\8f\\95ª\82È\8e_\91f\82ª\82È\82¢\81D");
return;
}
if (split1off)
obj = splitobj(obj, 1L);
+#if 0 /*JP*/
You("light %spotion.%s", shk_your(buf, obj),
Blind ? "" : " It gives off a dim light.");
+#else
+ You("%s\96û\95r\82É\89Î\82ð\82Â\82¯\82½\81D%s", shk_your(buf, obj),
+ Blind ? "" : "\96û\95r\82Í\88Ã\82¢\8cõ\82ð\82Í\82È\82Á\82½\81D");
+#endif
if (obj->unpaid && costly_spot(u.ux, u.uy)) {
/* Normally, we shouldn't both partially and fully charge
* for an item, but (Yendorian Fuel) Taxes are inevitable...
*/
check_unpaid(obj);
+/*JP
verbalize("That's in addition to the cost of the potion, of course.");
+*/
+ verbalize("\82±\82ê\82Í\82à\82¿\82ë\82ñ\96û\95r\82Ì\92l\92i\82Æ\82Í\95Ê\82¾\82æ\81D");
bill_dummy_object(obj);
}
makeknown(obj->otyp);
if (split1off) {
obj_extract_self(obj); /* free from inv */
obj->nomerge = 1;
+/*JP
obj = hold_another_object(obj, "You drop %s!", doname(obj),
+*/
+ obj = hold_another_object(obj, "\82 \82È\82½\82Í%s\82ð\97\8e\82µ\82½\81I", doname(obj),
(const char *) 0);
if (obj)
obj->nomerge = 0;
}
+ *optr = obj;
}
static NEARDATA const char cuddly[] = { TOOL_CLASS, GEM_CLASS, 0 };
use_stone(obj);
return 1;
} else {
+/*JP
pline("Sorry, I don't know how to use that.");
+*/
+ pline("\8ec\94O\81D\8eg\82¢\95û\82ª\82í\82©\82ç\82È\82¢\81D");
return 0;
}
}
makeknown(MAGIC_LAMP);
update_inventory();
} else if (rn2(2)) {
+/*JP
You("%s smoke.", !Blind ? "see a puff of" : "smell");
+*/
+ pline("\82¯\82Þ\82è%s\81D", !Blind ? "\82ª\95\91\82¢\82 \82ª\82Á\82½" : "\82Ì\93õ\82¢\82ª\82µ\82½");
} else
pline1(nothing_happens);
} else if (obj->otyp == BRASS_LANTERN) {
/* message from Adventure */
+/*JP
pline("Rubbing the electric lamp is not particularly rewarding.");
+*/
+ pline("\93d\8bC\83\89\83\93\83v\82ð\82±\82·\82Á\82Ä\82à\88Ó\96¡\82Í\82È\82¢\82Æ\8ev\82¤\82ª\81D\81D\81D");
+/*JP
pline("Anyway, nothing exciting happens.");
+*/
+ pline("\82â\82Á\82Ï\82è\81C\89½\82à\8bN\82«\82È\82©\82Á\82½\81D");
} else
pline1(nothing_happens);
return 1;
return jump(0);
}
-boolean
+enum jump_trajectory {
+ jAny = 0, /* any direction => magical jump */
+ jHorz = 1,
+ jVert = 2,
+ jDiag = 3 /* jHorz|jVert */
+};
+
+/* callback routine for walk_path() */
+STATIC_PTR boolean
+check_jump(arg, x, y)
+genericptr arg;
+int x, y;
+{
+ int traj = *(int *) arg;
+ struct rm *lev = &levl[x][y];
+
+ if (Passes_walls)
+ return TRUE;
+ if (IS_STWALL(lev->typ))
+ return FALSE;
+ if (IS_DOOR(lev->typ)) {
+ if (closed_door(x, y))
+ return FALSE;
+ if ((lev->doormask & D_ISOPEN) != 0 && traj != jAny
+ /* reject diagonal jump into or out-of or through open door */
+ && (traj == jDiag
+ /* reject horizontal jump through horizontal open door
+ and non-horizontal (ie, vertical) jump through
+ non-horizontal (vertical) open door */
+ || ((traj & jHorz) != 0) == (lev->horizontal != 0)))
+ return FALSE;
+ /* empty doorways aren't restricted */
+ }
+ /* let giants jump over boulders (what about Flying?
+ and is there really enough head room for giants to jump
+ at all, let alone over something tall?) */
+ if (sobj_at(BOULDER, x, y) && !throws_rocks(youmonst.data))
+ return FALSE;
+ return TRUE;
+}
+
+STATIC_OVL boolean
is_valid_jump_pos(x, y, magic, showmsg)
int x, y, magic;
boolean showmsg;
* horse. After all, what shape is the knight piece in chess?
*/
if (showmsg)
+/*JP
pline("Illegal move!");
+*/
+ pline("\82»\82Ì\88Ú\93®\82Í\8cj\94n\92µ\82Ñ\82¶\82á\82È\82¢\81I");
return FALSE;
} else if (distu(x, y) > (magic ? 6 + magic * 3 : 9)) {
if (showmsg)
+/*JP
pline("Too far!");
- return FALSE;
- } else if (!cansee(x, y)) {
- if (showmsg)
- You("cannot see where to land!");
+*/
+ pline("\89\93\82·\82¬\82é\81I");
return FALSE;
} else if (!isok(x, y)) {
if (showmsg)
+/*JP
You("cannot jump there!");
+*/
+ You("\82»\82±\82É\82Í\94ò\82×\82È\82¢\81I");
+ return FALSE;
+ } else if (!cansee(x, y)) {
+ if (showmsg)
+/*JP
+ You("cannot see where to land!");
+*/
+ You("\92\85\92n\93_\82ª\8c©\82¦\82È\82¢\81I");
return FALSE;
+ } else {
+ coord uc, tc;
+ struct rm *lev = &levl[u.ux][u.uy];
+ /* we want to categorize trajectory for use in determining
+ passage through doorways: horizonal, vertical, or diagonal;
+ since knight's jump and other irregular directions are
+ possible, we flatten those out to simplify door checks */
+ int diag, traj,
+ dx = x - u.ux, dy = y - u.uy,
+ ax = abs(dx), ay = abs(dy);
+
+ /* diag: any non-orthogonal destination classifed as diagonal */
+ diag = (magic || Passes_walls || (!dx && !dy)) ? jAny
+ : !dy ? jHorz : !dx ? jVert : jDiag;
+ /* traj: flatten out the trajectory => some diagonals re-classified */
+ if (ax >= 2 * ay)
+ ay = 0;
+ else if (ay >= 2 * ax)
+ ax = 0;
+ traj = (magic || Passes_walls || (!ax && !ay)) ? jAny
+ : !ay ? jHorz : !ax ? jVert : jDiag;
+ /* walk_path doesn't process the starting spot;
+ this is iffy: if you're starting on a closed door spot,
+ you _can_ jump diagonally from doorway (without needing
+ Passes_walls); that's intentional but is it correct? */
+ if (diag == jDiag && IS_DOOR(lev->typ)
+ && (lev->doormask & D_ISOPEN) != 0
+ && (traj == jDiag
+ || ((traj & jHorz) != 0) == (lev->horizontal != 0))) {
+ if (showmsg)
+/*JP
+ You_cant("jump diagonally out of a doorway.");
+*/
+ You_cant("\8fo\93ü\82è\8cû\82©\82ç\8eÎ\82ß\82É\94ò\82Ñ\8fo\82·\82±\82Æ\82Í\82Å\82«\82È\82¢\81D");
+ return FALSE;
+ }
+ uc.x = u.ux, uc.y = u.uy;
+ tc.x = x, tc.y = y; /* target */
+ if (!walk_path(&uc, &tc, check_jump, (genericptr_t) &traj)) {
+ if (showmsg)
+/*JP
+ There("is an obstacle preventing that jump.");
+*/
+ pline("\94ò\82Ô\82Ì\82ð\8e×\96\82\82·\82é\89½\82©\82ª\82 \82é\81D");
+ return FALSE;
+ }
}
return TRUE;
}
static int jumping_is_magic;
+STATIC_OVL boolean
+get_valid_jump_position(x,y)
+int x,y;
+{
+ return (isok(x, y)
+ && (ACCESSIBLE(levl[x][y].typ) || Passes_walls)
+ && is_valid_jump_pos(x, y, jumping_is_magic, FALSE));
+}
+
void
display_jump_positions(state)
int state;
for (dy = -4; dy <= 4; dy++) {
x = dx + (int) u.ux;
y = dy + (int) u.uy;
- if (isok(x, y) && ACCESSIBLE(levl[x][y].typ)
- && is_valid_jump_pos(x, y, jumping_is_magic, FALSE))
+ if (get_valid_jump_position(x, y))
tmp_at(x, y);
}
} else {
{
coord cc;
+ /* attempt "jumping" spell if hero has no innate jumping ability */
+ if (!magic && !Jumping) {
+ int sp_no;
+
+ for (sp_no = 0; sp_no < MAXSPELL; ++sp_no)
+ if (spl_book[sp_no].sp_id == NO_SPELL)
+ break;
+ else if (spl_book[sp_no].sp_id == SPE_JUMPING)
+ return spelleffects(sp_no, FALSE);
+ }
+
if (!magic && (nolimbs(youmonst.data) || slithy(youmonst.data))) {
/* normally (nolimbs || slithy) implies !Jumping,
but that isn't necessarily the case for knights */
+/*JP
You_cant("jump; you have no legs!");
+*/
+ pline("\91«\82ª\96³\82\82Ä\82Í\92µ\82×\82È\82¢\81I");
return 0;
} else if (!magic && !Jumping) {
+/*JP
You_cant("jump very far.");
+*/
+ You_cant("\82»\82ñ\82È\89\93\82\82Ü\82Å\92µ\82×\82È\82¢\81D");
return 0;
/* if steed is immobile, can't do physical jump but can do spell one */
} else if (!magic && u.usteed && stucksteed(FALSE)) {
return 0;
} else if (u.uswallow) {
if (magic) {
+/*JP
You("bounce around a little.");
+*/
+ pline("\94½\93®\82ð\82Â\82¯\82½\81D");
return 1;
}
+/*JP
pline("You've got to be kidding!");
+*/
+ pline("\8fç\92k\82Í\82æ\82µ\82±\82³\82ñ\81I");
return 0;
} else if (u.uinwater) {
if (magic) {
+/*JP
You("swish around a little.");
+*/
+ pline("\83X\83C\83X\83C\82Æ\89j\82¢\82¾\81D");
return 1;
}
+/*JP
pline("This calls for swimming, not jumping!");
+*/
+ pline("\82»\82ê\82Í\81w\89j\82®\81x\82Å\82 \82Á\82Ä\81C\81w\92µ\82Ô\81x\82¶\82á\82È\82¢\81I");
return 0;
} else if (u.ustuck) {
if (u.ustuck->mtame && !Conflict && !u.ustuck->mconf) {
+/*JP
You("pull free from %s.", mon_nam(u.ustuck));
+*/
+ You("%s\82©\82ç\97£\82ê\82½\81D", mon_nam(u.ustuck));
u.ustuck = 0;
return 1;
}
if (magic) {
+/*JP
You("writhe a little in the grasp of %s!", mon_nam(u.ustuck));
+*/
+ You("%s\82©\82ç\93¦\82ê\82æ\82¤\82Æ\83W\83^\83o\83^\82µ\82½\81I", mon_nam(u.ustuck));
return 1;
}
+/*JP
You("cannot escape from %s!", mon_nam(u.ustuck));
+*/
+ You("%s\82©\82ç\93¦\82ê\82ç\82ê\82È\82¢\81I", mon_nam(u.ustuck));
return 0;
} else if (Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)) {
if (magic) {
+/*JP
You("flail around a little.");
+*/
+ You("\83o\83^\83o\83^\92µ\82ñ\82¾\81D");
return 1;
}
+/*JP
You("don't have enough traction to jump.");
+*/
+ You("\92µ\82Ô\82½\82ß\82Ì\94½\93®\82ª\82Â\82¯\82ç\82ê\82È\82¢\81D");
return 0;
} else if (!magic && near_capacity() > UNENCUMBERED) {
+/*JP
You("are carrying too much to jump!");
+*/
+ You("\82½\82\82³\82ñ\95¨\82ð\8e\9d\82¿\82·\82¬\82Ä\92µ\82×\82È\82¢\81I");
return 0;
} else if (!magic && (u.uhunger <= 100 || ACURR(A_STR) < 6)) {
+/*JP
You("lack the strength to jump!");
+*/
+ You("\92µ\82Ô\82¾\82¯\82Ì\97Í\82ª\82È\82¢\81I");
return 0;
} else if (!magic && Wounded_legs) {
long wl = (Wounded_legs & BOTH_SIDES);
if (wl == BOTH_SIDES)
bp = makeplural(bp);
if (u.usteed)
+/*JP
pline("%s is in no shape for jumping.", Monnam(u.usteed));
+*/
+ pline("%s\82Í\92µ\82×\82é\8fó\91Ô\82Å\82Í\82È\82¢\81D", Monnam(u.usteed));
else
+#if 0 /*JP*/
Your("%s%s %s in no shape for jumping.",
(wl == LEFT_SIDE) ? "left " : (wl == RIGHT_SIDE) ? "right "
: "",
bp, (wl == BOTH_SIDES) ? "are" : "is");
+#else
+ Your("%s%s\82Í\92µ\82×\82é\8fó\91Ô\82Å\82Í\82È\82¢\81D",
+ (wl == LEFT_SIDE) ? "\8d¶" :
+ (wl == RIGHT_SIDE) ? "\89E" : "", bp);
+#endif
return 0;
} else if (u.usteed && u.utrap) {
+/*JP
pline("%s is stuck in a trap.", Monnam(u.usteed));
+*/
+ pline("%s\82Íã©\82É\82Ð\82Á\82©\82©\82Á\82Ä\82¢\82é\81D", Monnam(u.usteed));
return 0;
}
+/*JP
pline("Where do you want to jump?");
+*/
+ pline("\82Ç\82±\82É\92µ\82Ñ\82Ü\82·\82©\81H");
cc.x = u.ux;
cc.y = u.uy;
jumping_is_magic = magic;
- getpos_sethilite(display_jump_positions);
+ getpos_sethilite(display_jump_positions, get_valid_jump_position);
+/*JP
if (getpos(&cc, TRUE, "the desired position") < 0)
+*/
+ if (getpos(&cc, TRUE, "\92µ\82Ñ\82½\82¢\8fê\8f\8a") < 0)
return 0; /* user pressed ESC */
if (!is_valid_jump_pos(cc.x, cc.y, magic, TRUE)) {
return 0;
case TT_BEARTRAP: {
long side = rn2(3) ? LEFT_SIDE : RIGHT_SIDE;
+/*JP
You("rip yourself free of the bear trap! Ouch!");
+*/
+ You("\8e©\95ª\82ð\8cF\82Ìã©\82©\82ç\82Ð\82«\82Í\82ª\82µ\82½\81C\82¢\82Ä\82Á\81I");
+/*JP
losehp(Maybe_Half_Phys(rnd(10)), "jumping out of a bear trap",
+*/
+ losehp(Maybe_Half_Phys(rnd(10)), "\8cF\82Ìã©\82©\82ç\94ò\82Ñ\8fo\82æ\82¤\82Æ\82µ\82Ä",
KILLED_BY);
set_wounded_legs(side, rn1(1000, 500));
break;
}
case TT_PIT:
+/*JP
You("leap from the pit!");
+*/
+ You("\97\8e\82µ\8c\8a\82©\82ç\94ò\82Ñ\8fo\82½\81I");
break;
case TT_WEB:
+/*JP
You("tear the web apart as you pull yourself free!");
+*/
+ You("\82\82à\82Ì\91\83\82ð\88ø\82«\97ô\82«\81C\8e©\97R\82É\82È\82Á\82½\81I");
deltrap(t_at(u.ux, u.uy));
break;
case TT_LAVA:
- You("pull yourself above the lava!");
- u.utrap = 0;
+/*JP
+ You("pull yourself above the %s!", hliquid("lava"));
+*/
+ You("%s\82©\82ç\94ò\82Ñ\8fo\82½\81I", hliquid("\97n\8aâ"));
+ reset_utrap(TRUE);
return 1;
case TT_BURIEDBALL:
case TT_INFLOOR:
+#if 0 /*JP*/
You("strain your %s, but you're still %s.",
makeplural(body_part(LEG)),
(u.utraptype == TT_INFLOOR)
? "stuck in the floor"
: "attached to the buried ball");
+#else
+ You("%s\82ð\88ø\82Á\82Ï\82Á\82½\82ª\81C\82 \82È\82½\82Í\82Ü\82¾%s\81D",
+ makeplural(body_part(LEG)),
+ (u.utraptype == TT_INFLOOR)
+ ? "\8f°\82É\82¤\82Ü\82Á\82Ä\82¢\82é"
+ : "\82¤\82Ü\82Á\82½\8b\85\82Æ\82Â\82È\82ª\82Á\82Ä\82¢\82é");
+#endif
set_wounded_legs(LEFT_SIDE, rn1(10, 11));
set_wounded_legs(RIGHT_SIDE, rn1(10, 11));
return 1;
temp = -temp;
if (range < temp)
range = temp;
- (void) walk_path(&uc, &cc, hurtle_step, (genericptr_t) &range);
- teleds(cc.x, cc.y, TRUE);
+ (void) walk_path(&uc, &cc, hurtle_jump, (genericptr_t) &range);
+ /* hurtle_jump -> hurtle_step results in <u.ux,u.uy> == <cc.x,cc.y>
+ * and usually moves the ball if punished, but does not handle all
+ * the effects of landing on the final position.
+ */
+ teleds(cc.x, cc.y, FALSE);
sokoban_guilt();
nomul(-1);
+/*JP
multi_reason = "jumping around";
+*/
+ multi_reason = "\92µ\82Ë\89ñ\82Á\82Ä\82¢\82é\8e\9e\82É";
nomovemsg = "";
morehungry(rnd(25));
return 1;
* moves, we've got to deal with decaying corpses...
*/
if (obj->spe <= 0) {
+/*JP
You("seem to be out of tins.");
+*/
+ pline("\8aÊ\8bl\82ð\8dì\82é\82½\82ß\82Ì\8aÊ\82ª\90Ø\82ê\82½\82æ\82¤\82¾\81D");
return;
}
if (!(corpse = floorfood("tin", 2)))
return;
if (corpse->oeaten) {
+/*JP
You("cannot tin %s which is partly eaten.", something);
+*/
+ You("\90H\82×\82©\82¯\82Ì\82à\82Ì\82ð\8aÊ\8bl\82É\82·\82é\82±\82Æ\82Í\82Å\82«\82È\82¢\81D");
return;
}
if (touch_petrifies(&mons[corpse->corpsenm]) && !Stone_resistance
char kbuf[BUFSZ];
if (poly_when_stoned(youmonst.data))
+#if 0 /*JP*/
You("tin %s without wearing gloves.",
an(mons[corpse->corpsenm].mname));
+#else
+ You("\8f¬\8eè\82È\82µ\82Å%s\82ð\8aÊ\8bl\82É\82µ\82æ\82¤\82Æ\82µ\82½\81D",
+ mons[corpse->corpsenm].mname);
+#endif
else {
+#if 0 /*JP*/
pline("Tinning %s without wearing gloves is a fatal mistake...",
an(mons[corpse->corpsenm].mname));
+#else
+ pline("%s\82ð\8f¬\8eè\82È\82µ\82Å\8aÊ\8bl\82É\82·\82é\82Ì\82Í\92v\96½\93I\82È\8aÔ\88á\82¢\82¾\81D\81D\81D",
+ mons[corpse->corpsenm].mname);
+#endif
+#if 0 /*JP*/
Sprintf(kbuf, "trying to tin %s without gloves",
an(mons[corpse->corpsenm].mname));
+#else
+ Sprintf(kbuf, "\8f¬\8eè\82ð\82Â\82¯\82¸\82É%s\82ð\8aÊ\8bl\82É\82µ\82æ\82¤\82Æ\82µ\82Ä",
+ mons[corpse->corpsenm].mname);
+#endif
}
instapetrify(kbuf);
}
if (is_rider(&mons[corpse->corpsenm])) {
if (revive_corpse(corpse))
+/*JP
verbalize("Yes... But War does not preserve its enemies...");
+*/
+ verbalize("\82»\82¤\82¾\81D\81D\81D\82µ\82©\82µ\81u\90í\91\88\81v\82Í\93G\82É\88À\82ç\82¬\82ð\97^\82¦\82Ê\81D\81D\81D");
else
+/*JP
pline_The("corpse evades your grasp.");
+*/
+ pline("\8e\80\91Ì\82Í\82 \82È\82½\82Ì\8eè\82ð\93¦\82ê\82½\81D");
return;
}
if (mons[corpse->corpsenm].cnutrit == 0) {
+/*JP
pline("That's too insubstantial to tin.");
+*/
+ pline("\8eÀ\91Ì\82ª\82È\82¢\82Ì\82Å\8aÊ\8bl\82É\82Å\82«\82È\82¢\81D");
return;
}
consume_obj_charge(obj, TRUE);
if ((can = mksobj(TIN, FALSE, FALSE)) != 0) {
+/*JP
static const char you_buy_it[] = "You tin it, you bought it!";
+*/
+ static const char you_buy_it[] = "\8aÊ\8bl\82É\82µ\82½\82Ì\82È\82ç\94\83\82Á\82Ä\82à\82ç\82¤\82æ\81I";
can->corpsenm = corpse->corpsenm;
can->cursed = obj->cursed;
verbalize(you_buy_it);
useupf(corpse, 1L);
}
- can = hold_another_object(can, "You make, but cannot pick up, %s.",
- doname(can), (const char *) 0);
+#if 0 /*JP*/
+ (void) hold_another_object(can, "You make, but cannot pick up, %s.",
+ doname(can), (const char *) 0);
+#else
+ (void) hold_another_object(can, "\8aÊ\8bl\82É\82Å\82«\82½\82ª\81C%s\82ð\8e\9d\82Â\82±\82Æ\82ª\82Å\82«\82È\82¢\81D",
+ doname(can), (const char *) 0);
+#endif
} else
impossible("Tinning failed.");
}
break;
case 2:
if (!Confusion)
+#if 0 /*JP*/
You("suddenly feel %s.",
Hallucination ? "trippy" : "confused");
+#else
+ You("\93Ë\91R%s\81D",
+ Hallucination ? "\82Ö\82ë\82Ö\82ë\82É\82È\82Á\82½" : "\8d¬\97\90\82µ\82½");
+#endif
make_confused((HConfusion & TIMEOUT) + lcount, TRUE);
break;
case 3:
break;
case 6:
if (Deaf) /* make_deaf() won't give feedback when already deaf */
+/*JP
pline("Nothing seems to happen.");
+*/
+ pline("\89½\82à\8bN\82«\82È\82©\82Á\82½\82æ\82¤\82¾\81D");
make_deaf((HDeaf & TIMEOUT) + lcount, TRUE);
break;
}
if (ABASE(idx) >= AMAX(idx))
continue;
val_limit = AMAX(idx);
- /* don't recover strength lost from hunger */
- if (idx == A_STR && u.uhs >= WEAK)
- val_limit--;
+ /* this used to adjust 'val_limit' for A_STR when u.uhs was
+ WEAK or worse, but that's handled via ATEMP(A_STR) now */
if (Fixed_abil) {
/* potion/spell of restore ability override sustain ability
intrinsic but unicorn horn usage doesn't */
}
}
+ if (did_attr || did_prop)
+ context.botl = TRUE;
if (did_attr)
+#if 0 /*JP*/
pline("This makes you feel %s!",
(did_prop + did_attr) == (trouble_count + unfixable_trbl)
? "great"
: "better");
+#else
+ pline("\8bC\95ª\82ª%s\82æ\82\82È\82Á\82½\81I",
+ (did_prop + did_attr) == (trouble_count + unfixable_trbl)
+ ? "\82Æ\82Ä\82à"
+ : "\82æ\82è");
+#endif
else if (!did_prop)
+/*JP
pline("Nothing seems to happen.");
+*/
+ pline("\89½\82à\8bN\82«\82È\82©\82Á\82½\82æ\82¤\82¾\81D");
- context.botl = (did_attr || did_prop);
#undef PROP_COUNT
#undef ATTR_COUNT
#undef prop2trbl
if (mtmp) {
char and_vanish[BUFSZ];
struct obj *mshelter = level.objects[mtmp->mx][mtmp->my];
- Sprintf(monnambuf, "%s", an(m_monnam(mtmp)));
+ /* [m_monnam() yields accurate mon type, overriding hallucination] */
+ Sprintf(monnambuf, "%s", an(m_monnam(mtmp)));
+ /*JP:TODO:and_vanish\82Í\96¢\8f\88\97\9d*/
and_vanish[0] = '\0';
if ((mtmp->minvis && !See_invisible)
|| (mtmp->data->mlet == S_MIMIC
- && mtmp->m_ap_type != M_AP_NOTHING))
+ && M_AP_TYPE(mtmp) != M_AP_NOTHING))
suppress_see = TRUE;
if (mtmp->mundetected) {
switch (figurine->where) {
case OBJ_INVENT:
if (Blind || suppress_see)
+#if 0 /*JP*/
You_feel("%s %s from your pack!", something,
locomotion(mtmp->data, "drop"));
+#else
+ You_feel("%s\82ª\82 \82È\82½\82Ì\8a\93\82©\82ç%s\82æ\82¤\82¾\81I", something,
+ jpast(locomotion(mtmp->data, "\97\8e\82¿\82é")));
+#endif
else
+#if 0 /*JP*/
You_see("%s %s out of your pack%s!", monnambuf,
locomotion(mtmp->data, "drop"), and_vanish);
+#else
+ You("%s\82ª\82 \82È\82½\82Ì\8a\93\82©\82ç%s\82Ì\82ð\8c©\82½\81I", monnambuf,
+ jpast(locomotion(mtmp->data,"\97\8e\82¿\82é")));
+#endif
break;
case OBJ_FLOOR:
if (cansee_spot && !silent) {
if (suppress_see)
+/*JP
pline("%s suddenly vanishes!", an(xname(figurine)));
+*/
+ pline("%s\82Í\93Ë\91R\8fÁ\82¦\82½\81I", xname(figurine));
else
+#if 0 /*JP*/
You_see("a figurine transform into %s%s!", monnambuf,
and_vanish);
+#else
+ You("\90l\8c`\82ª\93Ë\91R%s\82É\82È\82Á\82½\82Ì\82ð\8c©\82½\81I",
+ monnambuf);
+#endif
redraw = TRUE; /* update figurine's map location */
}
break;
case OBJ_MINVENT:
if (cansee_spot && !silent && !suppress_see) {
struct monst *mon;
+
mon = figurine->ocarry;
/* figurine carrying monster might be invisible */
- if (canseemon(figurine->ocarry)) {
+ if (canseemon(figurine->ocarry)
+ && (!mon->wormno || cansee(mon->mx, mon->my)))
+/*JP
Sprintf(carriedby, "%s pack", s_suffix(a_monnam(mon)));
- } else if (is_pool(mon->mx, mon->my))
+*/
+ Sprintf(carriedby, "%s\82Ì\8a\93", a_monnam(mon));
+ else if (is_pool(mon->mx, mon->my))
+/*JP
Strcpy(carriedby, "empty water");
+*/
+ Strcpy(carriedby, "\89½\82à\82È\82¢\90\85\92\86");
else
+/*JP
Strcpy(carriedby, "thin air");
+*/
+ Strcpy(carriedby, "\89½\82à\82È\82¢\8bó\92\86");
+#if 0 /*JP*/
You_see("%s %s out of %s%s!", monnambuf,
locomotion(mtmp->data, "drop"), carriedby,
and_vanish);
+#else
+ You("%s\82ª%s\82©\82ç%s\82Ì\82ð\8c©\82½\81I", monnambuf,
+ carriedby, locomotion(mtmp->data, "\97\8e\82¿\82é"));
+#endif
}
break;
#if 0
if (carried(obj) && u.uswallow) {
if (!quietly)
+/*JP
You("don't have enough room in here.");
+*/
+ pline("\82±\82±\82É\82Í\8f\\95ª\82È\8fê\8f\8a\82ª\82È\82¢\81D");
return FALSE;
}
x = cc ? cc->x : u.ux;
y = cc ? cc->y : u.uy;
if (!isok(x, y)) {
if (!quietly)
+/*JP
You("cannot put the figurine there.");
+*/
+ You("\82±\82±\82É\82Í\90l\8c`\82ð\92u\82¯\82È\82¢\81D");
return FALSE;
}
if (IS_ROCK(levl[x][y].typ)
&& !(passes_walls(&mons[obj->corpsenm]) && may_passwall(x, y))) {
if (!quietly)
+#if 0 /*JP*/
You("cannot place a figurine in %s!",
IS_TREE(levl[x][y].typ) ? "a tree" : "solid rock");
+#else
+ You("%s\82Ì\92\86\82É\82Í\90l\8c`\82ð\92u\82¯\82È\82¢\81I",
+ IS_TREE(levl[x][y].typ) ? "\96Ø" : "\8cÅ\82¢\90Î");
+#endif
return FALSE;
}
if (sobj_at(BOULDER, x, y) && !passes_walls(&mons[obj->corpsenm])
&& !throws_rocks(&mons[obj->corpsenm])) {
if (!quietly)
+/*JP
You("cannot fit the figurine on the boulder.");
+*/
+ You("\8aâ\82É\90l\8c`\82ð\89\9f\82µ\8d\9e\82Þ\82±\82Æ\82Í\82Å\82«\82È\82¢\81D");
return FALSE;
}
return TRUE;
/* Passing FALSE arg here will result in messages displayed */
if (!figurine_location_checks(obj, &cc, FALSE))
return;
- You("%s and it transforms.",
+#if 0 /*JP*/
+ You("%s and it %stransforms.",
(u.dx || u.dy) ? "set the figurine beside you"
: (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)
|| is_pool(cc.x, cc.y))
? "release the figurine"
: (u.dz < 0 ? "toss the figurine into the air"
- : "set the figurine on the ground"));
+ : "set the figurine on the ground"),
+ Blind ? "supposedly " : "");
+#else
+ You("%s\81D\82·\82é\82Æ\82»\82ê\82Í\95Ï\8c`\82µ\82½\81D",
+ (u.dx || u.dy) ? "\82»\82Î\82É\90l\8c`\82ð\92u\82¢\82½"
+ : (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)
+ || is_pool(cc.x, cc.y))
+ ? "\90l\8c`\82ð\95ú\82Á\82½"
+ : (u.dz < 0 ? "\90l\8c`\82ð\8bó\92\86\82É\93\8a\82°\82½"
+ : "\90l\8c`\82ð\92n\96Ê\82É\92u\82¢\82½"));
+#endif
(void) make_familiar(obj, cc.x, cc.y, FALSE);
(void) stop_timer(FIG_TRANSFORM, obj_to_any(obj));
useup(obj);
+ if (Blind)
+ map_invisible(cc.x, cc.y);
*optr = 0;
}
struct obj *otmp;
if (Glib) {
+#if 0 /*JP*/
pline("%s from your %s.", Tobjnam(obj, "slip"),
makeplural(body_part(FINGER)));
+#else
+ pline("%s\82Í\82 \82È\82½\82Ì%s\82©\82ç\8a\8a\82è\97\8e\82¿\82½\81D", xname(obj),
+ body_part(FINGER));
+#endif
dropx(obj);
return;
}
if ((obj->cursed || Fumbling) && !rn2(2)) {
consume_obj_charge(obj, TRUE);
+#if 0 /*JP*/
pline("%s from your %s.", Tobjnam(obj, "slip"),
makeplural(body_part(FINGER)));
+#else
+ pline("%s\82Í\82 \82È\82½\82Ì%s\82©\82ç\8a\8a\82è\97\8e\82¿\82½\81D", xname(obj),
+ body_part(FINGER));
+#endif
dropx(obj);
return;
}
otmp = getobj(lubricables, "grease");
if (!otmp)
return;
+/*JP
if (inaccessible_equipment(otmp, "grease", FALSE))
+*/
+ if (inaccessible_equipment(otmp, "\82É\8e\89\82ð\93h\82é", FALSE))
return;
consume_obj_charge(obj, TRUE);
if (otmp != &zeroobj) {
+/*JP
You("cover %s with a thick layer of grease.", yname(otmp));
+*/
+ You("%s\82É\8e\89\82ð\92O\94O\82É\93h\82Á\82½\81D", xname(otmp));
otmp->greased = 1;
if (obj->cursed && !nohands(youmonst.data)) {
incr_itimeout(&Glib, rnd(15));
+/*JP
pline("Some of the grease gets all over your %s.",
+*/
+ pline("\8e\89\82ª\8f\82µ%s\82É\82Â\82¢\82½\81D",
makeplural(body_part(HAND)));
}
} else {
incr_itimeout(&Glib, rnd(15));
+/*JP
You("coat your %s with grease.", makeplural(body_part(FINGER)));
+*/
+ You("%s\82É\8e\89\82ð\93h\82Á\82½\81D", makeplural(body_part(FINGER)));
}
} else {
if (obj->known)
+/*JP
pline("%s empty.", Tobjnam(obj, "are"));
+*/
+ pline("%s\82Í\8bó\82Á\82Û\82¾\81D", xname(obj));
else
+/*JP
pline("%s to be empty.", Tobjnam(obj, "seem"));
+*/
+ pline("%s\82Í\8bó\82Á\82Û\82Ì\82æ\82¤\82¾\81D", xname(obj));
}
update_inventory();
}
-static struct trapinfo {
- struct obj *tobj;
- xchar tx, ty;
- int time_needed;
- boolean force_bungle;
-} trapinfo;
-
-void
-reset_trapset()
-{
- trapinfo.tobj = 0;
- trapinfo.force_bungle = 0;
-}
-
/* touchstones - by Ken Arnold */
STATIC_OVL void
use_stone(tstone)
boolean do_scratch;
const char *streak_color, *choices;
char stonebuf[QBUFSZ];
+/*JP
static const char scritch[] = "\"scritch, scritch\"";
+*/
+ static const char scritch[] = "\81u\83S\83V\81C\83S\83V\81v";
static const char allowall[3] = { COIN_CLASS, ALL_CLASSES, 0 };
static const char coins_gems[3] = { COIN_CLASS, GEM_CLASS, 0 };
&& objects[TOUCHSTONE].oc_name_known)
? coins_gems
: allowall;
+/*JP
Sprintf(stonebuf, "rub on the stone%s", plur(tstone->quan));
+*/
+ Sprintf(stonebuf, "rub on the stone");
if ((obj = getobj(choices, stonebuf)) == 0)
return;
if (obj == tstone && obj->quan == 1L) {
+/*JP
You_cant("rub %s on itself.", the(xname(obj)));
+*/
+ You("%s\82ð\82»\82ê\8e©\91Ì\82Å\82±\82·\82é\82±\82Æ\82Í\82Å\82«\82È\82¢\81D", the(xname(obj)));
return;
}
&& obj->oclass == GEM_CLASS && !is_graystone(obj)
&& !obj_resists(obj, 80, 100)) {
if (Blind)
+/*JP
pline("You feel something shatter.");
+*/
+ You("\89½\82©\82ª\95²\81X\82É\82È\82é\82Ì\82ð\8a´\82¶\82½\81D");
else if (Hallucination)
+/*JP
pline("Oh, wow, look at the pretty shards.");
+*/
+ pline("\83\8f\81[\83H\81I\82È\82ñ\82Ä\82«\82ê\82¢\82È\94j\95Ð\82È\82ñ\82¾\81D");
else
+#if 0 /*JP*/
pline("A sharp crack shatters %s%s.",
(obj->quan > 1L) ? "one of " : "", the(xname(obj)));
+#else
+ pline("\8b\82\82±\82·\82è\82·\82¬\82Ä%s%s\82Í\95²\81X\82É\82È\82Á\82Ä\82µ\82Ü\82Á\82½\81D",
+ the(xname(obj)), (obj->quan > 1) ? "\82Ì\82Ð\82Æ\82Â" : "");
+#endif
useup(obj);
return;
}
pline(scritch);
return;
} else if (Hallucination) {
+#if 0 /*JP*/
pline("Oh wow, man: Fractals!");
+#else
+ pline("\83\8f\81[\83H\81I\83t\83\89\83N\83^\83\8b\96Í\97l\82¾\81I");
+#endif
return;
}
default:
switch (objects[obj->otyp].oc_material) {
case CLOTH:
+#if 0 /*JP*/
pline("%s a little more polished now.", Tobjnam(tstone, "look"));
+#else
+ pline("%s\82Í\82³\82ç\82É\82Â\82â\82ª\8fo\82½\82æ\82¤\82É\8c©\82¦\82é\81D", xname(tstone));
+#endif
return;
case LIQUID:
if (!obj->known) /* note: not "whetstone" */
+#if 0 /*JP*/
You("must think this is a wetstone, do you?");
+#else
+ You("\82±\82ê\82Í\93u\90Î\82¾\82Æ\8ev\82Á\82½\81H");
+#endif
else
+#if 0 /*JP*/
pline("%s a little wetter now.", Tobjnam(tstone, "are"));
+#else
+ pline("%s\82Í\8f\82µ\82Ê\82ê\82½\81D", xname(tstone));
+#endif
return;
case WAX:
+#if 0 /*JP*/
streak_color = "waxy";
+#else
+ streak_color = "\8e\89\82Á\82Û\82¢";
+#endif
break; /* okay even if not touchstone */
case WOOD:
+#if 0 /*JP*/
streak_color = "wooden";
+#else
+ streak_color = "\82¨\82ª\82\82¸\82Ì\82æ\82¤\82È";
+#endif
break; /* okay even if not touchstone */
case GOLD:
do_scratch = TRUE; /* scratching and streaks */
+#if 0 /*JP*/
streak_color = "golden";
+#else
+ streak_color = "\8bà\90F\82Ì";
+#endif
break;
case SILVER:
do_scratch = TRUE; /* scratching and streaks */
+#if 0 /*JP*/
streak_color = "silvery";
+#else
+ streak_color = "\8bâ\90F\82Ì";
+#endif
break;
default:
/* Objects passing the is_flimsy() test will not
break; /* default oclass */
}
+#if 0 /*JP*//* not used */
Sprintf(stonebuf, "stone%s", plur(tstone->quan));
+#endif
if (do_scratch)
+#if 0 /*JP*/
You("make %s%sscratch marks on the %s.",
streak_color ? streak_color : (const char *) "",
streak_color ? " " : "", stonebuf);
+#else
+ You("%s\82±\82·\82è\90Õ\82ð\90Î\82É\82Â\82¯\82½\81D",
+ streak_color ? streak_color : (const char *)"");
+#endif
else if (streak_color)
+/*JP
You_see("%s streaks on the %s.", streak_color, stonebuf);
+*/
+ pline("\90Î\82É%s\8bØ\82ª\82Â\82¢\82½\81D", streak_color);
else
pline(scritch);
return;
}
+static struct trapinfo {
+ struct obj *tobj;
+ xchar tx, ty;
+ int time_needed;
+ boolean force_bungle;
+} trapinfo;
+
+void
+reset_trapset()
+{
+ trapinfo.tobj = 0;
+ trapinfo.force_bungle = 0;
+}
+
/* Place a landmine/bear trap. Helge Hafting */
STATIC_OVL void
use_trap(otmp)
const char *what = (char *) 0;
char buf[BUFSZ];
int levtyp = levl[u.ux][u.uy].typ;
+#if 0 /*JP*/
const char *occutext = "setting the trap";
+#else
+ const char *occutext = "ã©\82ð\8ed\8a|\82¯\82Ä\82¢\82é";
+#endif
if (nohands(youmonst.data))
+/*JP
what = "without hands";
+*/
+ what = "\8eè\82ª\82È\82¢\82Ì\82Å";
else if (Stunned)
+/*JP
what = "while stunned";
+*/
+ what = "\82\82ç\82\82ç\82µ\82Ä\82¢\82é\82Ì\82Å";
else if (u.uswallow)
what =
+/*JP
is_animal(u.ustuck->data) ? "while swallowed" : "while engulfed";
+*/
+ is_animal(u.ustuck->data) ? "\88ù\82Ý\8d\9e\82Ü\82ê\82Ä\82¢\82é\8aÔ\82Í" : "\8aª\82«\8d\9e\82Ü\82ê\82Ä\82¢\82é\8aÔ\82Í";
else if (Underwater)
+/*JP
what = "underwater";
+*/
+ what = "\90\85\96Ê\89º\82Å\82Í";
else if (Levitation)
+/*JP
what = "while levitating";
+*/
+ what = "\95\82\82¢\82Ä\82¢\82é\8aÔ\82Í";
else if (is_pool(u.ux, u.uy))
+/*JP
what = "in water";
+*/
+ what = "\90\85\92\86\82Å\82Í";
else if (is_lava(u.ux, u.uy))
+/*JP
what = "in lava";
+*/
+ what = "\97n\8aâ\82Ì\92\86\82Å\82Í";
else if (On_stairs(u.ux, u.uy))
+#if 0 /*JP*/
what = (u.ux == xdnladder || u.ux == xupladder) ? "on the ladder"
: "on the stairs";
+#else
+ what = (u.ux == xdnladder || u.ux == xupladder) ? "\82Í\82µ\82²\82Ì\8fã\82Å\82Í"
+ : "\8aK\92i\82Ì\8fã\82Å\82Í";
+#endif
else if (IS_FURNITURE(levtyp) || IS_ROCK(levtyp)
|| closed_door(u.ux, u.uy) || t_at(u.ux, u.uy))
+/*JP
what = "here";
+*/
+ what = "\82±\82±\82Å\82Í";
else if (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz))
+#if 0 /*JP*/
what = (levtyp == AIR)
? "in midair"
: (levtyp == CLOUD)
? "in a cloud"
: "in this place"; /* Air/Water Plane catch-all */
+#else
+ what = (levtyp == AIR)
+ ? "\8bó\92\86\82Å\82Í"
+ : (levtyp == CLOUD)
+ ? "\89_\82Ì\92\86\82Å\82Í"
+ : "\82±\82±\82Å\82Í"; /* Air/Water Plane catch-all */
+#endif
if (what) {
+/*JP
You_cant("set a trap %s!", what);
+*/
+ pline("%sã©\82ð\8ed\8a|\82¯\82ç\82ê\82È\82¢\81I",what);
reset_trapset();
return;
}
ttyp = (otmp->otyp == LAND_MINE) ? LANDMINE : BEAR_TRAP;
if (otmp == trapinfo.tobj && u.ux == trapinfo.tx && u.uy == trapinfo.ty) {
+/*JP
You("resume setting %s%s.", shk_your(buf, otmp),
- defsyms[trap_to_defsym(what_trap(ttyp))].explanation);
+*/
+ You("%s\82ð\8ed\8a|\82¯\82é\82Ì\82ð\8dÄ\8aJ\82µ\82½\81D",
+ defsyms[trap_to_defsym(what_trap(ttyp, rn2))].explanation);
set_occupation(set_trap, occutext, 0);
return;
}
chance = (rnl(10) > 3);
else
chance = (rnl(10) > 5);
+/*JP
You("aren't very skilled at reaching from %s.", mon_nam(u.usteed));
+*/
+ pline("%s\82Ì\8fã\82©\82ç\82Å\82Í\82¤\82Ü\82\8ed\8a|\82¯\82ç\82ê\82È\82¢\82©\82à\82µ\82ê\82È\82¢\81D", mon_nam(u.usteed));
+/*JP
Sprintf(buf, "Continue your attempt to set %s?",
- the(defsyms[trap_to_defsym(what_trap(ttyp))].explanation));
+*/
+ Sprintf(buf, "%s\82Ì\8ed\8a|\82¯\82ð\91±\82¯\82é\81H",
+ the(defsyms[trap_to_defsym(what_trap(ttyp, rn2))]
+ .explanation));
if (yn(buf) == 'y') {
if (chance) {
switch (ttyp) {
break;
case BEAR_TRAP: /* drop it without arming it */
reset_trapset();
+/*JP
You("drop %s!",
- the(defsyms[trap_to_defsym(what_trap(ttyp))]
+*/
+ You("%s\82ð\97\8e\82Æ\82µ\82½\81I",
+ the(defsyms[trap_to_defsym(what_trap(ttyp, rn2))]
.explanation));
dropx(otmp);
return;
return;
}
}
+/*JP
You("begin setting %s%s.", shk_your(buf, otmp),
- defsyms[trap_to_defsym(what_trap(ttyp))].explanation);
+*/
+ You("%s%s\82ð\8ed\8a|\82¯\82Í\82¶\82ß\82½\81D", shk_your(buf, otmp),
+ defsyms[trap_to_defsym(what_trap(ttyp, rn2))].explanation);
set_occupation(set_trap, occutext, 0);
return;
}
add_damage(u.ux, u.uy, 0L); /* schedule removal */
}
if (!trapinfo.force_bungle)
+/*JP
You("finish arming %s.",
- the(defsyms[trap_to_defsym(what_trap(ttyp))].explanation));
+*/
+ You("%s\82ð\8ed\8a|\82¯\8fI\82¦\82½\81D",
+ the(defsyms[trap_to_defsym(what_trap(ttyp, rn2))].explanation));
if (((otmp->cursed || Fumbling) && (rnl(10) > 5))
|| trapinfo.force_bungle)
dotrap(ttmp,
(unsigned) (trapinfo.force_bungle ? FORCEBUNGLE : 0));
} else {
/* this shouldn't happen */
+/*JP
Your("trap setting attempt fails.");
+*/
+ You("ã©\82ð\8ed\8a|\82¯\82é\82Ì\82É\8e¸\94s\82µ\82½\81D");
}
useup(otmp);
reset_trapset();
struct monst *mtmp;
struct obj *otmp;
int rx, ry, proficient, res = 0;
+/*JP
const char *msg_slipsfree = "The bullwhip slips free.";
+*/
+ const char *msg_slipsfree = "\95Ú\82Í\82Ù\82Ç\82¯\82½\81D";
+/*JP
const char *msg_snap = "Snap!";
+*/
+ const char *msg_snap = "\83s\83V\83b\81I";
if (obj != uwep) {
if (!wield_tool(obj, "lash"))
rx = u.ux + u.dx;
ry = u.uy + u.dy;
if (!isok(rx, ry)) {
+/*JP
You("miss.");
+*/
+ You("\82Í\82¸\82µ\82½\81D");
return res;
}
mtmp = m_at(rx, ry);
proficient = 0;
if (u.uswallow && attack(u.ustuck)) {
+/*JP
There("is not enough room to flick your bullwhip.");
+*/
+ pline("\95Ú\82ð\91Å\82Â\82Ù\82Ç\8dL\82\82È\82¢\81D");
} else if (Underwater) {
+/*JP
There("is too much resistance to flick your bullwhip.");
+*/
+ pline("\90\85\82Ì\92ï\8dR\82ª\82 \82è\82·\82¬\82Ä\95Ú\82ð\91Å\82Â\82±\82Æ\82ª\82Å\82«\82È\82¢\81D");
} else if (u.dz < 0) {
+/*JP
You("flick a bug off of the %s.", ceiling(u.ux, u.uy));
+*/
+ You("%s\82Ì\92\8e\82ð\91Å\82¿\97\8e\82µ\82½\81D",ceiling(u.ux,u.uy));
} else if ((!u.dx && !u.dy) || (u.dz > 0)) {
int dam;
/* Sometimes you hit your steed by mistake */
if (u.usteed && !rn2(proficient + 2)) {
+/*JP
You("whip %s!", mon_nam(u.usteed));
+*/
+ You("%s\82ð\95Ú\91Å\82Á\82½\81I", mon_nam(u.usteed));
kick_steed();
return 1;
}
/* Have a shot at snaring something on the floor */
otmp = level.objects[u.ux][u.uy];
if (otmp && otmp->otyp == CORPSE && otmp->corpsenm == PM_HORSE) {
+/*JP
pline("Why beat a dead horse?");
+*/
+ pline("\82Ç\82¤\82µ\82Ä\8e\80\82ñ\82¾\94n\82ð\95Ú\91Å\82Â\82æ\82¤\82È\82±\82Æ\82ð\82·\82é\82Ì\81H");
return 1;
}
if (otmp && proficient) {
+#if 0 /*JP*/
You("wrap your bullwhip around %s on the %s.",
an(singular(otmp, xname)), surface(u.ux, u.uy));
+#else
+ You("\95Ú\82ð%s\82Ì\8fã\82Ì%s\82É\82©\82ç\82Ü\82¹\82½\81D",
+ surface(u.ux, u.uy), an(singular(otmp, xname)));
+#endif
if (rnl(6) || pickup_object(otmp, 1L, TRUE) < 1)
pline1(msg_slipsfree);
return 1;
dam = rnd(2) + dbon() + obj->spe;
if (dam <= 0)
dam = 1;
+/*JP
You("hit your %s with your bullwhip.", body_part(FOOT));
+*/
+ You("\8e©\95ª\82Ì%s\82ð\8e©\95ª\82Å\91Å\82¿\82Â\82¯\82½\81D", body_part(FOOT));
+#if 0 /*JP*/
Sprintf(buf, "killed %sself with %s bullwhip", uhim(), uhis());
losehp(Maybe_Half_Phys(dam), buf, NO_KILLER_PREFIX);
- context.botl = 1;
+#else
+ Strcpy(buf, "\8e©\95ª\8e©\90g\82ð\95Ú\91Å\82Á\82Ä");
+ losehp(Maybe_Half_Phys(dam), buf, KILLED_BY);
+#endif
return 1;
} else if ((Fumbling || Glib) && !rn2(5)) {
+/*JP
pline_The("bullwhip slips out of your %s.", body_part(HAND));
+*/
+ pline("\95Ú\82ª%s\82©\82ç\82·\82×\82è\97\8e\82¿\82½\81D", body_part(HAND));
dropx(obj);
} else if (u.utrap && u.utraptype == TT_PIT) {
if (IS_FURNITURE(levl[rx][ry].typ))
wrapped_what = something;
else if (sobj_at(BOULDER, rx, ry))
+/*JP
wrapped_what = "a boulder";
+*/
+ wrapped_what = "\8aâ";
}
if (wrapped_what) {
coord cc;
cc.x = rx;
cc.y = ry;
+/*JP
You("wrap your bullwhip around %s.", wrapped_what);
+*/
+ You("\95Ú\82ð%s\82É\82©\82ç\82Ü\82¹\82½\81D", wrapped_what);
if (proficient && rn2(proficient + 2)) {
if (!mtmp || enexto(&cc, rx, ry, youmonst.data)) {
+/*JP
You("yank yourself out of the pit!");
+*/
+ You("\82®\82¢\82Æ\88ø\82Á\82Ï\82Á\82Ä\8c\8a\82©\82ç\94²\82¯\8fo\82µ\82½\81I");
teleds(cc.x, cc.y, TRUE);
- u.utrap = 0;
+ reset_utrap(TRUE);
vision_full_recalc = 1;
}
} else {
pline1(msg_slipsfree);
}
if (mtmp)
- wakeup(mtmp);
+ wakeup(mtmp, TRUE);
} else
pline1(msg_snap);
} else if (mtmp) {
if (!canspotmon(mtmp) && !glyph_is_invisible(levl[rx][ry].glyph)) {
+/*JP
pline("A monster is there that you couldn't see.");
+*/
+ pline("\8c©\82¦\82È\82¢\89ö\95¨\82ª\82¢\82é\81D");
map_invisible(rx, ry);
}
otmp = MON_WEP(mtmp); /* can be null */
} else
mon_hand = 0; /* lint suppression */
+/*JP
You("wrap your bullwhip around %s.", yname(otmp));
+*/
+ You("\95Ú\82ð%s\82É\82©\82ç\82Ü\82¹\82½\81D", xname(otmp));
if (gotit && mwelded(otmp)) {
+#if 0 /*JP*/
pline("%s welded to %s %s%c",
(otmp->quan == 1L) ? "It is" : "They are", mhis(mtmp),
mon_hand, !otmp->bknown ? '!' : '.');
+#else
+ pline("%s\82Í%s\82Ì%s\82É\82\82Á\82Â\82¢\82Ä\82µ\82Ü\82Á\82Ä\82¢\82é%s",
+ onambuf,
+ mon_nam(mtmp), mon_hand,
+ !otmp->bknown ? "\81I" : "\81D");
+#endif
otmp->bknown = 1;
gotit = FALSE; /* can't pull it free */
}
switch (rn2(proficient + 1)) {
case 2:
/* to floor near you */
+/*JP
You("yank %s to the %s!", yname(otmp),
+*/
+ You("%s\82ð%s\82É\88ø\82«\97\8e\82µ\82½\81I", xname(otmp),
surface(u.ux, u.uy));
place_object(otmp, u.ux, u.uy);
stackobj(otmp);
int hitu, hitvalu;
hitvalu = 8 + otmp->spe;
- hitu = thitu(hitvalu,
- dmgval(otmp, &youmonst),
- otmp, (char *)0);
+ hitu = thitu(hitvalu, dmgval(otmp, &youmonst),
+ &otmp, (char *)0);
if (hitu) {
+/*JP
pline_The("%s hits you as you try to snatch it!",
+*/
+ pline_The("%s\82ð\92D\82¨\82¤\82Æ\82µ\82½\82ç\82 \82È\82½\82É\93\96\82½\82Á\82½\81I",
the(onambuf));
}
place_object(otmp, u.ux, u.uy);
}
#endif /* 0 */
/* right into your inventory */
+/*JP
You("snatch %s!", yname(otmp));
+*/
+ You("%s\82ð\92D\82Á\82½\81I", xname(otmp));
if (otmp->otyp == CORPSE
&& touch_petrifies(&mons[otmp->corpsenm]) && !uarmg
&& !Stone_resistance
&& polymon(PM_STONE_GOLEM))) {
char kbuf[BUFSZ];
+#if 0 /*JP*/
Sprintf(kbuf, "%s corpse",
an(mons[otmp->corpsenm].mname));
pline("Snatching %s is a fatal mistake.", kbuf);
+#else
+ pline("%s\82Ì\8e\80\91Ì\82ð\92D\82Á\82½\82Ì\82Í\92v\96½\93I\82È\8aÔ\88á\82¢\82¾\81D",
+ mons[otmp->corpsenm].mname);
+ Sprintf(kbuf, "%s\82Ì\8e\80\91Ì\82É\90G\82ê\82Ä",
+ mons[otmp->corpsenm].mname);
+#endif
instapetrify(kbuf);
}
- otmp = hold_another_object(
- otmp, "You drop %s!", doname(otmp), (const char *) 0);
+#if 0 /*JP:T*/
+ (void) hold_another_object(otmp, "You drop %s!",
+ doname(otmp), (const char *) 0);
+#else
+ (void) hold_another_object(otmp, "%s\82ð\97\8e\82µ\82½\81I",
+ doname(otmp), (const char *) 0);
+#endif
break;
default:
/* to floor beneath mon */
+#if 0 /*JP*/
You("yank %s from %s %s!", the(onambuf),
s_suffix(mon_nam(mtmp)), mon_hand);
+#else
+ You("%s\82ð%s\82Ì%s\82©\82ç\82Ð\82Á\82Ï\82Á\82½\81I", the(xname(otmp)),
+ mon_nam(mtmp), mon_hand);
+#endif
obj_no_longer_held(otmp);
place_object(otmp, mtmp->mx, mtmp->my);
stackobj(otmp);
} else {
pline1(msg_slipsfree);
}
- wakeup(mtmp);
+ wakeup(mtmp, TRUE);
} else {
- if (mtmp->m_ap_type && !Protection_from_shape_changers
+ if (M_AP_TYPE(mtmp) && !Protection_from_shape_changers
&& !sensemon(mtmp))
stumble_onto_mimic(mtmp);
else
+/*JP
You("flick your bullwhip towards %s.", mon_nam(mtmp));
+*/
+ You("%s\82É\8cü\82Á\82Ä\95Ú\82ð\91Å\82Á\82½\81D", mon_nam(mtmp));
if (proficient) {
if (attack(mtmp))
return 1;
} else if (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)) {
/* it must be air -- water checked above */
+/*JP
You("snap your whip through thin air.");
+*/
+ You("\89½\82à\82È\82¢\82Æ\82±\82ë\82Å\95Ú\82ð\91Å\82Á\82½\81D");
} else {
pline1(msg_snap);
}
static const char
+/*JP
not_enough_room[] = "There's not enough room here to use that.",
+*/
+ not_enough_room[] = "\82»\82ê\82ð\8eg\82¤\82¾\82¯\82Ì\8dL\82³\82ª\82È\82¢\81D",
+/*JP
where_to_hit[] = "Where do you want to hit?",
+*/
+ where_to_hit[] = "\82Ç\82ê\82ð\91_\82¤\81H",
+/*JP
cant_see_spot[] = "won't hit anything if you can't see that spot.",
+*/
+ cant_see_spot[] = "\8fê\8f\8a\82ª\8c©\82¦\82È\82¯\82ê\82Î\91_\82¦\82È\82¢\81D",
+/*JP
cant_reach[] = "can't reach that spot from here.";
+*/
+ cant_reach[] = "\82±\82±\82©\82ç\82»\82±\82Ö\82Í\93Í\82©\82È\82¢\81D";
/* find pos of monster in range, if only one monster */
boolean
int min_range, max_range;
{
struct monst *mtmp;
- struct monst *selmon = (struct monst *) 0;
+ coord mpos;
+ boolean impaired;
+ int x, y, lo_x, hi_x, lo_y, hi_y, rt, glyph;
- for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
- if (mtmp && !DEADMONSTER(mtmp) && !mtmp->mtame
- && cansee(mtmp->mx, mtmp->my)
- && distu(mtmp->mx, mtmp->my) <= max_range
- && distu(mtmp->mx, mtmp->my) >= min_range) {
- if (selmon)
- return FALSE;
- selmon = mtmp;
+ if (Blind)
+ return FALSE; /* must be able to see target location */
+ impaired = (Confusion || Stunned || Hallucination);
+ mpos.x = mpos.y = 0; /* no candidate location yet */
+ rt = isqrt(max_range);
+ lo_x = max(u.ux - rt, 1), hi_x = min(u.ux + rt, COLNO - 1);
+ lo_y = max(u.uy - rt, 0), hi_y = min(u.uy + rt, ROWNO - 1);
+ for (x = lo_x; x <= hi_x; ++x) {
+ for (y = lo_y; y <= hi_y; ++y) {
+ if (distu(x, y) < min_range || distu(x, y) > max_range
+ || !isok(x, y) || !cansee(x, y))
+ continue;
+ glyph = glyph_at(x, y);
+ if (!impaired
+ && glyph_is_monster(glyph)
+ && (mtmp = m_at(x, y)) != 0
+ && (mtmp->mtame || (mtmp->mpeaceful && flags.confirm)))
+ continue;
+ if (glyph_is_monster(glyph)
+ || glyph_is_warning(glyph)
+ || glyph_is_invisible(glyph)
+ || (glyph_is_statue(glyph) && impaired)) {
+ if (mpos.x)
+ return FALSE; /* more than one candidate location */
+ mpos.x = x, mpos.y = y;
+ }
}
- if (!selmon)
- return FALSE;
- pos->x = selmon->mx;
- pos->y = selmon->my;
+ }
+ if (!mpos.x)
+ return FALSE; /* no candidate location */
+ *pos = mpos;
return TRUE;
}
static int polearm_range_min = -1;
static int polearm_range_max = -1;
+STATIC_OVL boolean
+get_valid_polearm_position(x, y)
+int x, y;
+{
+ return (isok(x, y) && ACCESSIBLE(levl[x][y].typ)
+ && distu(x, y) >= polearm_range_min
+ && distu(x, y) <= polearm_range_max);
+}
+
void
display_polearm_positions(state)
int state;
for (dy = -4; dy <= 4; dy++) {
x = dx + (int) u.ux;
y = dy + (int) u.uy;
- if (isok(x, y) && ACCESSIBLE(levl[x][y].typ)
- && distu(x, y) >= polearm_range_min
- && distu(x, y) <= polearm_range_max) {
+ if (get_valid_polearm_position(x, y)) {
tmp_at(x, y);
}
}
cc.x = hitm->mx;
cc.y = hitm->my;
}
- getpos_sethilite(display_polearm_positions);
+ getpos_sethilite(display_polearm_positions, get_valid_polearm_position);
+/*JP
if (getpos(&cc, TRUE, "the spot to hit") < 0)
+*/
+ if (getpos(&cc, TRUE, "\91_\82¤\8fê\8f\8a") < 0)
return res; /* ESC; uses turn iff polearm became wielded */
glyph = glyph_at(cc.x, cc.y);
if (distu(cc.x, cc.y) > max_range) {
+/*JP
pline("Too far!");
+*/
+ pline("\89\93\82·\82¬\82é\81I");
return res;
} else if (distu(cc.x, cc.y) < min_range) {
+/*JP
pline("Too close!");
+*/
+ pline("\8bß\82·\82¬\82é\81I");
return res;
} else if (!cansee(cc.x, cc.y) && !glyph_is_monster(glyph)
&& !glyph_is_invisible(glyph) && !glyph_is_statue(glyph)) {
return res;
}
- context.polearm.hitmon = NULL;
+ context.polearm.hitmon = (struct monst *) 0;
/* Attack the monster there */
bhitpos = cc;
if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != (struct monst *) 0) {
Note: we only do this when a statue is displayed here,
because the player is probably attempting to attack it;
other statues obscured by anything are just ignored. */
+/*JP
pline("Thump! Your blow bounces harmlessly off the statue.");
+*/
+ pline("\83S\83c\83\93\81I\92¤\91\9c\82Í\8f\9d\82Â\82©\82È\82©\82Á\82½\81D");
wake_nearto(bhitpos.x, bhitpos.y, 25);
}
} else {
/* no monster here and no statue seen or remembered here */
- if (glyph_is_invisible(glyph)) {
- /* now you know that nothing is there... */
- unmap_object(bhitpos.x, bhitpos.y);
- newsym(bhitpos.x, bhitpos.y);
- }
+ (void) unmap_invisible(bhitpos.x, bhitpos.y);
+/*JP
You("miss; there is no one there to hit.");
+*/
+ You("\8aO\82ê\82½\81D\82»\82±\82É\82Í\89½\82à\82È\82¢\81D");
}
u_wipe_engr(2); /* same as for melee or throwing */
return 1;
obj = splitobj(obj, 1L);
}
if (Hallucination)
+/*JP
You("give yourself a facial.");
+*/
+ You("\83N\83\8a\81[\83\80\83p\83b\83N\82ð\82µ\82½\81D");
else
+#if 0 /*JP*/
pline("You immerse your %s in %s%s.", body_part(FACE),
several ? "one of " : "",
several ? makeplural(the(xname(obj))) : the(xname(obj)));
+#else
+ pline("%s%s\82É%s\82ð\92¾\82ß\82½\81D",
+ xname(obj),
+ several ? "\82Ì\82Ð\82Æ\82Â" : "", body_part(FACE));
+#endif
if (can_blnd((struct monst *) 0, &youmonst, AT_WEAP, obj)) {
int blindinc = rnd(25);
u.ucreamed += blindinc;
make_blinded(Blinded + (long) blindinc, FALSE);
if (!Blind || (Blind && wasblind))
+#if 0 /*JP*/
pline("There's %ssticky goop all over your %s.",
wascreamed ? "more " : "", body_part(FACE));
+#else
+ pline("\82â\82Á\82©\82¢\82È\82Ë\82Î\82Ë\82Î\82ª%s\91S\91Ì\82É%s\82Â\82¢\82½\81D",
+ body_part(FACE), wascreamed ? "\82³\82ç\82É" : "");
+#endif
else /* Blind && !wasblind */
+/*JP
You_cant("see through all the sticky goop on your %s.",
+*/
+ pline("\82â\82Á\82©\82¢\82È\82Ë\82Î\82Ë\82Î\82ª%s\91S\91Ì\82É\82Â\82¢\82Ä\89½\82à\8c©\82¦\82È\82\82È\82Á\82½\81D",
body_part(FACE));
}
pline(where_to_hit);
cc.x = u.ux;
cc.y = u.uy;
+/*JP
if (getpos(&cc, TRUE, "the spot to hit") < 0)
+*/
+ if (getpos(&cc, TRUE, "\91_\82¤\8fê\8f\8a") < 0)
return res; /* ESC; uses turn iff grapnel became wielded */
/* Calculate range; unlike use_pole(), there's no minimum for range */
else
max_range = 8;
if (distu(cc.x, cc.y) > max_range) {
+/*JP
pline("Too far!");
+*/
+ pline("\89\93\82·\82¬\82é\81I");
return res;
} else if (!cansee(cc.x, cc.y)) {
You(cant_see_spot);
any.a_int = 1; /* use index+1 (cant use 0) as identifier */
start_menu(tmpwin);
any.a_int++;
+/*JP
Sprintf(buf, "an object on the %s", surface(cc.x, cc.y));
+*/
+ Sprintf(buf, "%s\82É\82 \82é\95¨\91Ì", surface(cc.x, cc.y));
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf,
MENU_UNSELECTED);
any.a_int++;
+#if 0 /*JP*/
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, "a monster",
MENU_UNSELECTED);
+#else
+ add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, "\89ö\95¨",
+ MENU_UNSELECTED);
+#endif
any.a_int++;
+/*JP
Sprintf(buf, "the %s", surface(cc.x, cc.y));
+*/
+ Sprintf(buf, "%s", surface(cc.x, cc.y));
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf,
MENU_UNSELECTED);
+/*JP
end_menu(tmpwin, "Aim for what?");
+*/
+ end_menu(tmpwin, "\89½\82ð\91_\82¤\81H");
tohit = rn2(4);
if (select_menu(tmpwin, PICK_ONE, &selected) > 0
&& rn2(P_SKILL(typ) > P_SKILLED ? 20 : 2))
break;
case 1: /* Object */
if ((otmp = level.objects[cc.x][cc.y]) != 0) {
+/*JP
You("snag an object from the %s!", surface(cc.x, cc.y));
+*/
+ You("%s\82Ì\82à\82Ì\82ð\88ø\82Á\8a|\82¯\82½\81I", surface(cc.x, cc.y));
(void) pickup_object(otmp, 1L, FALSE);
/* If pickup fails, leave it alone */
newsym(cc.x, cc.y);
(void) attack_checks(mtmp, uwep);
flags.confirm = save_confirm;
check_caitiff(mtmp); /* despite fact there's no damage */
+/*JP
You("pull in %s!", mon_nam(mtmp));
+*/
+ You("%s\82ð\88ø\82Á\92£\82Á\82½\81I", mon_nam(mtmp));
mtmp->mundetected = 0;
rloc_to(mtmp, cc.x, cc.y);
return 1;
(void) thitmonst(mtmp, uwep);
return 1;
}
- /* FALL THROUGH */
+ /*FALLTHRU*/
case 3: /* Surface */
if (IS_AIR(levl[cc.x][cc.y].typ) || is_pool(cc.x, cc.y))
+/*JP
pline_The("hook slices through the %s.", surface(cc.x, cc.y));
+*/
+ pline("\83t\83b\83N\82Í%s\82ð\82³\82Á\82Æ\90Ø\82Á\82½\81D", surface(cc.x, cc.y));
else {
+/*JP
You("are yanked toward the %s!", surface(cc.x, cc.y));
+*/
+ You("%s\82Ö\88ø\82Á\82Ï\82ç\82ê\82½\81I", surface(cc.x, cc.y));
hurtle(sgn(cc.x - u.ux), sgn(cc.y - u.uy), 1, FALSE);
spoteffects(TRUE);
}
return 1;
default: /* Yourself (oops!) */
if (P_SKILL(typ) <= P_BASIC) {
+/*JP
You("hook yourself!");
+*/
+ You("\8e©\95ª\8e©\90g\82ð\88ø\82Á\8a|\82¯\82½\81I");
+/*JP
losehp(Maybe_Half_Phys(rn1(10, 10)), "a grappling hook",
+*/
+ losehp(Maybe_Half_Phys(rn1(10, 10)), "\8e©\95ª\8e©\90g\82ð\88ø\82Á\8a|\82¯\82Ä",
KILLED_BY);
return 1;
}
do_break_wand(obj)
struct obj *obj;
{
+/*JP
static const char nothing_else_happens[] = "But nothing else happens...";
+*/
+ static const char nothing_else_happens[] = "\82µ\82©\82µ\81C\89½\82à\8bN\82«\82È\82©\82Á\82½\81D\81D\81D";
register int i, x, y;
register struct monst *mon;
int dmg, damage;
boolean fillmsg = FALSE;
int expltype = EXPL_MAGICAL;
char confirm[QBUFSZ], buf[BUFSZ];
+/*JP
boolean is_fragile = (!strcmp(OBJ_DESCR(objects[obj->otyp]), "balsa"));
+*/
+ boolean is_fragile = (!strcmp(OBJ_DESCR(objects[obj->otyp]), "\83o\83\8b\83T\82Ì\8fñ"));
+#if 0 /*JP*/
if (!paranoid_query(ParanoidBreakwand,
safe_qbuf(confirm,
"Are you really sure you want to break ",
"?", obj, yname, ysimple_name, "the wand")))
+#else
+ if (!paranoid_query(ParanoidBreakwand,
+ safe_qbuf(confirm,
+ "\96{\93\96\82É", "\82ð\89ó\82·\82Ì\81H",
+ obj, xname, ysimple_name, "\8fñ")))
+#endif
return 0;
if (nohands(youmonst.data)) {
+/*JP
You_cant("break %s without hands!", yname(obj));
+*/
+ You("\8eè\82ª\96³\82¢\82Ì\82Å%s\82ð\89ó\82¹\82È\82¢\81I", xname(obj));
return 0;
} else if (ACURR(A_STR) < (is_fragile ? 5 : 10)) {
+/*JP
You("don't have the strength to break %s!", yname(obj));
+*/
+ You("%s\82ð\89ó\82·\82¾\82¯\82Ì\97Í\82ª\82È\82¢\81I", xname(obj));
return 0;
}
- pline("Raising %s high above your %s, you break it in two!", yname(obj),
+#if 0 /*JP:T*/
+ pline("Raising %s high above your %s, you %s it in two!", yname(obj),
+ body_part(HEAD), is_fragile ? "snap" : "break");
+#else
+ pline("%s\82ð%s\82Ì\8fã\82É\8d\82\82\8cf\82°\81C\93ñ\82Â\82É\82Ö\82µ\90Ü\82Á\82½\81I", yname(obj),
body_part(HEAD));
+#endif
/* [ALI] Do this first so that wand is removed from bill. Otherwise,
* the freeinv() below also hides it from setpaid() which causes problems.
goto wanexpl;
case WAN_FIRE:
expltype = EXPL_FIERY;
+ /*FALLTHRU*/
case WAN_COLD:
if (expltype == EXPL_MAGICAL)
expltype = EXPL_FROSTY;
dmg *= 2;
+ /*FALLTHRU*/
case WAN_MAGIC_MISSILE:
wanexpl:
explode(u.ux, u.uy, -(obj->otyp), dmg, WAND_CLASS, expltype);
goto discard_broken_wand;
case WAN_STRIKING:
/* we want this before the explosion instead of at the very end */
+/*JP
pline("A wall of force smashes down around you!");
+*/
+ pline("\82 \82È\82½\82Í\96\82\97Í\82Ì\95Ç\82É\82Â\82Â\82Ü\82ê\82½\81I");
dmg = d(1 + obj->spe, 6); /* normally 2d12 */
/*FALLTHRU*/
case WAN_CANCELLATION:
*/
typ = fillholetyp(x, y, FALSE);
if (typ != ROOM) {
- levl[x][y].typ = typ;
+ levl[x][y].typ = typ, levl[x][y].flags = 0;
liquid_flow(x, y, typ, t_at(x, y),
fillmsg
? (char *) 0
+/*JP
: "Some holes are quickly filled with %s!");
+*/
+ : "\8c\8a\82Í\82·\82®\82É%s\82Å\96\84\82Ü\82Á\82½\81I");
fillmsg = TRUE;
} else
digactualhole(x, y, BY_OBJECT, (rn2(obj->spe) < 3
}
damage = zapyourself(obj, FALSE);
if (damage) {
+#if 0 /*JP:T*/
Sprintf(buf, "killed %sself by breaking a wand", uhim());
losehp(Maybe_Half_Phys(damage), buf, NO_KILLER_PREFIX);
+#else
+ Strcpy(buf, "\8e©\95ª\8e©\90g\82Å\8fñ\82ð\89ó\82µ\82Ä\83_\83\81\81[\83W\82ð\8eó\82¯");
+ losehp(Maybe_Half_Phys(damage), buf, KILLED_BY);
+#endif
}
if (context.botl)
bot(); /* blindness */
/* Note: if player fell thru, this call is a no-op.
Damage is handled in digactualhole in that case */
if (shop_damage)
+/*JP
pay_for_damage("dig into", FALSE);
+*/
+ pay_for_damage("\8c\8a\82ð\82 \82¯\82é", FALSE);
if (obj->otyp == WAN_LIGHT)
litroom(TRUE, obj); /* only needs to be done once */
} else if (!ublindf) {
Blindf_on(obj);
} else {
+#if 0 /*JP*/
You("are already %s.", ublindf->otyp == TOWEL
? "covered by a towel"
: ublindf->otyp == BLINDFOLD
? "wearing a blindfold"
: "wearing lenses");
+#else
+ You("\82à\82¤%s\82Ä\82¢\82é\81D", ublindf->otyp == TOWEL
+ ? "\83^\83I\83\8b\82ð\8aª\82¢"
+ : ublindf->otyp == BLINDFOLD
+ ? "\96Ú\89B\82µ\82ð\82Â\82¯"
+ : "\83\8c\83\93\83Y\82ð\82Â\82¯");
+#endif
}
break;
case CREAM_PIE:
case SACK:
case BAG_OF_HOLDING:
case OILSKIN_SACK:
- res = use_container(&obj, 1);
+ res = use_container(&obj, 1, FALSE);
break;
case BAG_OF_TRICKS:
(void) bagotricks(obj, FALSE, (int *) 0);
use_tinning_kit(obj);
break;
case LEASH:
- use_leash(obj);
+ res = use_leash(obj);
break;
case SADDLE:
res = use_saddle(obj);
/* sometimes the blessing will be worn off */
if (!rn2(49)) {
if (!Blind) {
+/*JP
pline("%s %s.", Yobjnam2(obj, "glow"), hcolor("brown"));
+*/
+ pline("%s\82Í%s\8bP\82¢\82½\81D", xname(obj), jconj_adj(hcolor("\92\83\90F\82Ì")));
obj->bknown = 1;
}
unbless(obj);
use_lamp(obj);
break;
case POT_OIL:
- light_cocktail(obj);
+ light_cocktail(&obj);
break;
case EXPENSIVE_CAMERA:
res = use_camera(obj);
res = dowrite(obj);
break;
case TIN_OPENER:
- if (!carrying(TIN)) {
- You("have no tin to open.");
- goto xit;
- }
- You("cannot open a tin without eating or discarding its contents.");
- if (flags.verbose)
- pline("In order to eat, use the 'e' command.");
- if (obj != uwep)
- pline(
- "Opening the tin will be much easier if you wield the tin opener.");
- goto xit;
-
+ res = use_tin_opener(obj);
+ break;
case FIGURINE:
use_figurine(&obj);
break;
res = use_pick_axe(obj);
break;
}
+/*JP
pline("Sorry, I don't know how to use that.");
- xit:
+*/
+ pline("\82»\82ê\82ð\82Ç\82¤\82â\82Á\82Ä\8eg\82¤\82ñ\82¾\82¢\81H");
nomul(0);
return 0;
}