1 /* NetHack 3.6 dokick.c $NHDT-Date: 1575245057 2019/12/02 00:04:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.136 $ */
2 /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
3 /* NetHack may be freely redistributed. See license for details. */
5 /* JNetHack Copyright */
6 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000 */
7 /* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2020 */
8 /* JNetHack may be freely redistributed. See license for details. */
12 #define is_bigfoot(x) ((x) == &mons[PM_SASQUATCH])
14 (martial_bonus() || is_bigfoot(youmonst.data) \
15 || (uarmf && uarmf->otyp == KICKING_BOOTS))
17 static NEARDATA struct rm *maploc, nowhere;
18 static NEARDATA const char *gate_str;
20 /* kickedobj (decl.c) tracks a kicked object until placed or destroyed */
22 extern boolean notonhead; /* for long worms */
24 STATIC_DCL void FDECL(kickdmg, (struct monst *, BOOLEAN_P));
25 STATIC_DCL boolean FDECL(maybe_kick_monster, (struct monst *,
27 STATIC_DCL void FDECL(kick_monster, (struct monst *, XCHAR_P, XCHAR_P));
28 STATIC_DCL int FDECL(kick_object, (XCHAR_P, XCHAR_P, char *));
29 STATIC_DCL int FDECL(really_kick_object, (XCHAR_P, XCHAR_P));
30 STATIC_DCL char *FDECL(kickstr, (char *, const char *));
31 STATIC_DCL void FDECL(otransit_msg, (struct obj *, BOOLEAN_P, long));
32 STATIC_DCL void FDECL(drop_to, (coord *, SCHAR_P));
35 static const char kick_passes_thru[] = "kick passes harmlessly through";
37 static const char kick_passes_thru[] = "
\8fR
\82è
\82Í
\83_
\83\81\81[
\83W
\82ð
\97^
\82¦
\82¸
\82É
\82·
\82è
\94²
\82¯
\82½";
39 /* kicking damage when not poly'd into a form with a kick attack */
46 int dmg = (ACURRSTR + ACURR(A_DEX) + ACURR(A_CON)) / 15;
47 int specialdmg, kick_skill = P_NONE;
48 boolean trapkilled = FALSE;
50 if (uarmf && uarmf->otyp == KICKING_BOOTS)
53 /* excessive wt affects dex, so it affects dmg */
57 /* kicking a dragon or an elephant will not harm it */
58 if (thick_skinned(mon->data))
61 /* attacking a shade is normally useless */
62 if (mon->data == &mons[PM_SHADE])
65 specialdmg = special_dmgval(&youmonst, mon, W_ARMF, (long *) 0);
67 if (mon->data == &mons[PM_SHADE] && !specialdmg) {
69 pline_The("%s.", kick_passes_thru);
71 pline_The("%s
\81D", kick_passes_thru);
72 /* doesn't exercise skill or abuse alignment or frighten pet,
73 and shades have no passive counterattack */
82 /* squeeze some guilt feelings... */
86 monflee(mon, (dmg ? rnd(dmg) : 1), FALSE, FALSE);
92 /* convert potential damage to actual damage */
96 kick_skill = P_MARTIAL_ARTS;
97 dmg += rn2(ACURR(A_DEX) / 2 + 1);
99 /* a good kick exercises your dex */
100 exercise(A_DEX, TRUE);
102 dmg += specialdmg; /* for blessed (or hypothetically, silver) boots */
105 dmg += u.udaminc; /* add ring(s) of increase damage */
108 if (!DEADMONSTER(mon) && martial() && !bigmonst(mon->data) && !rn2(3)
109 && mon->mcanmove && mon != u.ustuck && !mon->mtrapped) {
110 /* see if the monster has a place to move into */
111 mdx = mon->mx + u.dx;
112 mdy = mon->my + u.dy;
113 if (goodpos(mdx, mdy, mon, 0)) {
115 pline("%s reels from the blow.", Monnam(mon));
117 pline("%s
\82Í
\8b
\91Å
\82³
\82ê
\82æ
\82ë
\82ß
\82¢
\82½
\81D", Monnam(mon));
118 if (m_in_out_region(mon, mdx, mdy)) {
119 remove_monster(mon->mx, mon->my);
120 newsym(mon->mx, mon->my);
121 place_monster(mon, mdx, mdy);
122 newsym(mon->mx, mon->my);
124 if (mintrap(mon) == 2)
130 (void) passive(mon, uarmf, TRUE, !DEADMONSTER(mon), AT_KICK, FALSE);
131 if (DEADMONSTER(mon) && !trapkilled)
134 /* may bring up a dialog, so put this after all messages */
135 if (kick_skill != P_NONE) /* exercise proficiency */
136 use_skill(kick_skill, 1);
140 maybe_kick_monster(mon, x, y)
145 boolean save_forcefight = context.forcefight;
149 if (!mon->mpeaceful || !canspotmon(mon))
150 context.forcefight = TRUE; /* attack even if invisible */
151 /* kicking might be halted by discovery of hidden monster,
152 by player declining to attack peaceful monster,
153 or by passing out due to encumbrance */
154 if (attack_checks(mon, (struct obj *) 0) || overexertion())
155 mon = 0; /* don't kick after all */
156 context.forcefight = save_forcefight;
158 return (boolean) (mon != 0);
162 kick_monster(mon, x, y)
166 boolean clumsy = FALSE;
169 /* anger target even if wild miss will occur */
170 setmangry(mon, TRUE);
172 if (Levitation && !rn2(3) && verysmall(mon->data)
173 && !is_flyer(mon->data)) {
175 pline("Floating in the air, you miss wildly!");
177 pline("
\8bó
\92\86\82É
\95\82\82¢
\82Ä
\82¢
\82é
\82Ì
\82Å
\81C
\91å
\82«
\82
\8aO
\82µ
\82½
\81I");
178 exercise(A_DEX, FALSE);
179 (void) passive(mon, uarmf, FALSE, 1, AT_KICK, FALSE);
183 /* reveal hidden target even if kick ends up missing (note: being
184 hidden doesn't affect chance to hit so neither does this reveal) */
186 || (M_AP_TYPE(mon) && M_AP_TYPE(mon) != M_AP_MONSTER)) {
189 mon->mundetected = 0;
190 if (!canspotmon(mon))
196 canspotmon(mon) ? a_monnam(mon) : "something hidden");
198 There("%s
\82ª
\82¢
\82é
\81D",
199 canspotmon(mon) ? a_monnam(mon) : "
\89½
\82©
\89B
\82ê
\82Ä
\82¢
\82é
\82à
\82Ì");
203 /* Kick attacks by kicking monsters are normal attacks, not special.
204 * This is almost always worthless, since you can either take one turn
205 * and do all your kicks, or else take one turn and attack the monster
206 * normally, getting all your attacks _including_ all your kicks.
207 * If you have >1 kick attack, you get all of them.
209 if (Upolyd && attacktype(youmonst.data, AT_KICK)) {
210 struct attack *uattk;
211 int sum, kickdieroll, armorpenalty, specialdmg,
213 tmp = find_roll_to_hit(mon, AT_KICK, (struct obj *) 0, &attknum,
216 for (i = 0; i < NATTK; i++) {
217 /* first of two kicks might have provoked counterattack
218 that has incapacitated the hero (ie, floating eye) */
222 uattk = &youmonst.data->mattk[i];
223 /* we only care about kicking attacks here */
224 if (uattk->aatyp != AT_KICK)
227 kickdieroll = rnd(20);
228 specialdmg = special_dmgval(&youmonst, mon, W_ARMF, (long *) 0);
229 if (mon->data == &mons[PM_SHADE] && !specialdmg) {
230 /* doesn't matter whether it would have hit or missed,
231 and shades have no passive counterattack */
233 Your("%s %s.", kick_passes_thru, mon_nam(mon));
235 You("%s
\82ð
\8fR
\82Á
\82½
\82ª
\81C%s
\81D", mon_nam(mon), kick_passes_thru);
236 break; /* skip any additional kicks */
237 } else if (tmp > kickdieroll) {
239 You("kick %s.", mon_nam(mon));
241 You("%s
\82ð
\8fR
\82Á
\82½
\81D", mon_nam(mon));
242 sum = damageum(mon, uattk, specialdmg);
243 (void) passive(mon, uarmf, (boolean) (sum > 0),
244 (sum != 2), AT_KICK, FALSE);
246 break; /* Defender died */
248 missum(mon, uattk, (tmp + armorpenalty > kickdieroll));
249 (void) passive(mon, uarmf, FALSE, 1, AT_KICK, FALSE);
258 if (i < (j * 3) / 10) {
259 if (!rn2((i < j / 10) ? 2 : (i < j / 5) ? 3 : 4)) {
260 if (martial() && !rn2(2))
263 Your("clumsy kick does no damage.");
265 Your("
\95s
\8aí
\97p
\82È
\8fR
\82è
\82Å
\83_
\83\81\81[
\83W
\82ð
\97^
\82¦
\82ç
\82ê
\82È
\82©
\82Á
\82½
\81D");
266 (void) passive(mon, uarmf, FALSE, 1, AT_KICK, FALSE);
271 else if (!rn2((i < j / 5) ? 2 : 3))
278 else if (uarm && objects[uarm->otyp].oc_bulky && ACURR(A_DEX) < rnd(25))
282 You("kick %s.", mon_nam(mon));
284 You("%s
\82ð
\8fR
\82Á
\82½
\81D", mon_nam(mon));
285 if (!rn2(clumsy ? 3 : 4) && (clumsy || !bigmonst(mon->data))
286 && mon->mcansee && !mon->mtrapped && !thick_skinned(mon->data)
287 && mon->data->mlet != S_EEL && haseyes(mon->data) && mon->mcanmove
288 && !mon->mstun && !mon->mconf && !mon->msleeping
289 && mon->data->mmove >= 12) {
290 if (!nohands(mon->data) && !rn2(martial() ? 5 : 3)) {
292 pline("%s blocks your %skick.", Monnam(mon),
293 clumsy ? "clumsy " : "");
295 pline("%s
\82Í
\82 \82È
\82½
\82Ì%s
\8fR
\82è
\82ð
\96h
\82¢
\82¾
\81D", Monnam(mon),
296 clumsy ? "
\95s
\8aí
\97p
\82È" : "");
298 (void) passive(mon, uarmf, FALSE, 1, AT_KICK, FALSE);
302 if (mon->mx != x || mon->my != y) {
303 (void) unmap_invisible(x, y);
305 pline("%s %s, %s evading your %skick.", Monnam(mon),
306 (!level.flags.noteleport && can_teleport(mon->data))
308 : is_floater(mon->data)
310 : is_flyer(mon->data) ? "swoops"
311 : (nolimbs(mon->data)
312 || slithy(mon->data))
315 clumsy ? "easily" : "nimbly", clumsy ? "clumsy " : "");
317 pline("%s
\82Í%s
\81C%s
\82 \82È
\82½
\82Ì%s
\8fR
\82è
\82ð
\82½
\82
\82Ý
\82É
\94ð
\82¯
\82½
\81D", Monnam(mon),
318 (!level.flags.noteleport && can_teleport(mon->data))
319 ? "
\8fu
\8aÔ
\88Ú
\93®
\82µ"
320 : is_floater(mon->data)
322 : is_flyer(mon->data) ? "
\82Í
\82Î
\82½
\82«"
323 : (nolimbs(mon->data)
324 || slithy(mon->data))
325 ? "
\89¡
\82É
\8a\8a\82è"
327 clumsy ? "
\8ay
\81X
\82Æ" : "
\91f
\91\81\82", clumsy ? "
\95s
\8aí
\97p
\82È" : "");
329 (void) passive(mon, uarmf, FALSE, 1, AT_KICK, FALSE);
334 kickdmg(mon, clumsy);
338 * Return TRUE if caught (the gold taken care of), FALSE otherwise.
339 * The gold object is *not* attached to the fobj chain!
343 register struct monst *mtmp;
344 register struct obj *gold;
346 boolean msg_given = FALSE;
348 if (!likes_gold(mtmp->data) && !mtmp->isshk && !mtmp->ispriest
349 && !mtmp->isgd && !is_mercenary(mtmp->data)) {
351 } else if (!mtmp->mcanmove) {
352 /* too light to do real damage */
353 if (canseemon(mtmp)) {
355 pline_The("%s harmlessly %s %s.", xname(gold),
356 otense(gold, "hit"), mon_nam(mtmp));
358 pline("%s
\82Í%s
\82É
\96½
\92\86\82µ
\82½
\81D", xname(gold),
364 long umoney, value = gold->quan * objects[gold->otyp].oc_cost;
367 finish_meating(mtmp);
368 if (!mtmp->isgd && !rn2(4)) /* not always pleasing */
369 setmangry(mtmp, TRUE);
370 /* greedy monsters catch gold */
371 if (cansee(mtmp->mx, mtmp->my))
373 pline("%s catches the gold.", Monnam(mtmp));
375 pline("%s
\82Í
\8bà
\89Ý
\82ð
\83L
\83\83\83b
\83`
\82µ
\82½
\81D", Monnam(mtmp));
376 (void) mpickobj(mtmp, gold);
377 gold = (struct obj *) 0; /* obj has been freed */
379 long robbed = ESHK(mtmp)->robbed;
386 pline_The("amount %scovers %s recent losses.",
387 !robbed ? "" : "partially ", mhis(mtmp));
389 pline("%s%s
\91¹
\8e¸
\82ð
\95â
\93U
\82·
\82é
\82Ì
\82É
\8eg
\82í
\82ê
\82½
\81D",
390 !robbed ? "" : "
\8bà
\82Ì
\88ê
\95\94\82Í", mhis(mtmp));
392 ESHK(mtmp)->robbed = robbed;
394 make_happy_shk(mtmp, FALSE);
396 if (mtmp->mpeaceful) {
397 ESHK(mtmp)->credit += value;
399 You("have %ld %s in credit.", ESHK(mtmp)->credit,
400 currency(ESHK(mtmp)->credit));
402 You("%ld%s
\82ð
\91Ý
\82µ
\82É
\82µ
\82½
\81D", ESHK(mtmp)->credit,
403 currency(ESHK(mtmp)->credit));
407 verbalize("Thanks, scum!");
409 verbalize("
\82 \82è
\82ª
\82Æ
\82æ
\81I
\82
\82»
\82Á
\82½
\82ê
\81I");
411 } else if (mtmp->ispriest) {
414 verbalize("Thank you for your contribution.");
416 verbalize("
\8añ
\95t
\82É
\8a´
\8eÓ
\82µ
\82Ü
\82·
\81D");
419 verbalize("Thanks, scum!");
421 verbalize("
\82 \82è
\82ª
\82Æ
\82æ
\81I
\82
\82»
\82Á
\82½
\82ê
\81I");
422 } else if (mtmp->isgd) {
423 umoney = money_cnt(invent);
424 /* Some of these are iffy, because a hostile guard
425 won't become peaceful and resume leading hero
426 out of the vault. If he did do that, player
427 could try fighting, then weasle out of being
428 killed by throwing his/her gold when losing. */
432 ? "Drop the rest and follow me."
434 ? "You still have hidden gold. Drop it now."
436 ? "I'll take care of that; please move along."
437 : "I'll take that; now get moving.");
441 ? "
\8ec
\82è
\82ð
\92u
\82¢
\82Ä
\82Â
\82¢
\82Ä
\82«
\82È
\82³
\82¢
\81D"
443 ? "
\82Ü
\82¾
\8bà
\82ð
\89B
\82µ
\82Ä
\82¢
\82é
\82È
\81D
\92u
\82«
\82È
\82³
\82¢
\81D"
445 ? "
\82»
\82ê
\82Í
\8e\84\82ª
\8fE
\82Á
\82Ä
\82¨
\82«
\82Ü
\82·
\82©
\82ç
\82Â
\82¢
\82Ä
\82«
\82Ä
\82
\82¾
\82³
\82¢
\81D"
446 : "
\82»
\82ê
\82Í
\8fE
\82Á
\82Ä
\82¨
\82
\81D
\97\88\82È
\82³
\82¢
\81D");
448 } else if (is_mercenary(mtmp->data)) {
452 if (mtmp->data == &mons[PM_SOLDIER])
454 else if (mtmp->data == &mons[PM_SERGEANT])
456 else if (mtmp->data == &mons[PM_LIEUTENANT])
458 else if (mtmp->data == &mons[PM_CAPTAIN])
462 umoney = money_cnt(invent);
465 + (umoney + u.ulevel * rn2(5)) / ACURR(A_CHA))
466 mtmp->mpeaceful = TRUE;
471 verbalize("That should do. Now beat it!");
473 verbalize("
\82È
\82ñ
\82¾
\82¢
\81H
\82±
\82ê
\82Í
\81H");
476 verbalize("That's not enough, coward!");
478 verbalize("
\82»
\82ñ
\82È
\82à
\82Ì
\82Å
\8dÏ
\82Þ
\82©
\81C
\94Ú
\8b¯
\8eÒ
\81I");
484 miss(xname(gold), mtmp);
488 /* container is kicked, dropped, thrown or otherwise impacted by player.
489 * Assumes container is on floor. Checks contents for possible damage. */
491 container_impact_dmg(obj, x, y)
493 xchar x, y; /* coordinates where object was before the impact, not after */
496 struct obj *otmp, *otmp2;
498 boolean costly, insider, frominv;
500 /* only consider normal containers */
501 if (!Is_container(obj) || !Has_contents(obj) || Is_mbag(obj))
504 costly = ((shkp = shop_keeper(*in_rooms(x, y, SHOPBASE)))
505 && costly_spot(x, y));
506 insider = (*u.ushops && inside_shop(u.ux, u.uy)
507 && *in_rooms(x, y, SHOPBASE) == *u.ushops);
508 /* if dropped or thrown, shop ownership flags are set on this obj */
509 frominv = (obj != kickedobj);
511 for (otmp = obj->cobj; otmp; otmp = otmp2) {
512 const char *result = (char *) 0;
515 if (objects[otmp->otyp].oc_material == GLASS
516 && otmp->oclass != GEM_CLASS && !obj_resists(otmp, 33, 100)) {
520 result = "
\83K
\83`
\83\83\83\93";
521 } else if (otmp->otyp == EGG && !rn2(3)) {
525 result = "
\83O
\83V
\83\83\83b";
528 if (otmp->otyp == MIRROR)
531 /* eggs laid by you. penalty is -1 per egg, max 5,
532 * but it's always exactly 1 that breaks */
533 if (otmp->otyp == EGG && otmp->spe && otmp->corpsenm >= LOW_PM)
536 You_hear("a muffled %s.", result);
538 You_hear("
\82±
\82à
\82Á
\82½%s
\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81D", result);
540 if (frominv && !otmp->unpaid)
543 stolen_value(otmp, x, y, (boolean) shkp->mpeaceful, TRUE);
545 if (otmp->quan > 1L) {
548 obj_extract_self(otmp);
549 obfree(otmp, (struct obj *) 0);
551 /* contents of this container are no longer known */
555 if (costly && loss) {
558 You("caused %ld %s worth of damage!", loss, currency(loss));
560 You("%ld%s
\95ª
\82Ì
\91¹
\8aQ
\82ð
\82Ð
\82«
\82¨
\82±
\82µ
\82½
\81I", loss, currency(loss));
561 make_angry_shk(shkp, x, y);
564 You("owe %s %ld %s for objects destroyed.", mon_nam(shkp), loss,
567 You("
\8aí
\95¨
\94j
\91¹
\82Å%s
\82É%ld%s
\82Ì
\8eØ
\82è
\82ð
\82Â
\82
\82Á
\82½
\81D", mon_nam(shkp), loss,
574 /* jacket around really_kick_object */
576 kick_object(x, y, kickobjnam)
583 /* if a pile, the "top" object gets kicked */
584 kickedobj = level.objects[x][y];
586 /* kick object; if doing is fatal, done() will clean up kickedobj */
587 Strcpy(kickobjnam, killer_xname(kickedobj)); /* matters iff res==0 */
588 res = really_kick_object(x, y);
589 kickedobj = (struct obj *) 0;
594 /* guts of kick_object */
596 really_kick_object(x, y)
600 struct monst *mon, *shkp = 0;
603 boolean costly, isgold, slide = FALSE;
605 /* kickedobj should always be set due to conditions of call */
606 if (!kickedobj || kickedobj->otyp == BOULDER || kickedobj == uball
607 || kickedobj == uchain)
610 if ((trap = t_at(x, y)) != 0) {
611 if ((is_pit(trap->ttyp) && !Passes_walls) || trap->ttyp == WEB) {
615 You_cant("kick %s that's in a %s!", something,
616 Hallucination ? "tizzy"
617 : (trap->ttyp == WEB) ? "web"
620 You("%s
\82Å
\82Í%s
\82ð
\8fR
\82é
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81I",
621 Hallucination ? "
\8d¬
\97\90\82µ
\82½
\8fó
\91Ô" :
622 (trap->ttyp == WEB) ? "
\82
\82à
\82Ì
\91\83\82Ì
\92\86" : "
\97\8e\82µ
\8c\8a\82Ì
\92\86",
627 if (trap->ttyp == STATUE_TRAP) {
628 activate_statue_trap(trap, x,y, FALSE);
633 if (Fumbling && !rn2(3)) {
635 Your("clumsy kick missed.");
637 Your("
\95s
\8aí
\97p
\82È
\8fR
\82è
\82Í
\8aO
\82ê
\82½
\81D");
641 if (!uarmf && kickedobj->otyp == CORPSE
642 && touch_petrifies(&mons[kickedobj->corpsenm]) && !Stone_resistance) {
644 You("kick %s with your bare %s.",
645 corpse_xname(kickedobj, (const char *) 0, CXN_PFX_THE),
646 makeplural(body_part(FOOT)));
648 You("
\91f%s
\82Å%s
\82ð
\8fR
\82Á
\82½
\81D",
650 corpse_xname(kickedobj, (const char *) 0, CXN_PFX_THE));
652 if (poly_when_stoned(youmonst.data) && polymon(PM_STONE_GOLEM)) {
653 ; /* hero has been transformed but kick continues */
655 /* normalize body shape here; foot, not body_part(FOOT) */
657 Sprintf(killer.name, "kicking %s barefoot",
659 Sprintf(killer.name, "
\8cC
\96³
\82µ
\82Å%s
\82ð
\8fR
\82Á
\82Ä",
660 killer_xname(kickedobj));
661 instapetrify(killer.name);
665 isgold = (kickedobj->oclass == COIN_CLASS);
667 int k_owt = (int) kickedobj->owt;
669 /* for non-gold stack, 1 item will be split off below (unless an
670 early return occurs, so we aren't moving the split to here);
671 calculate the range for that 1 rather than for the whole stack */
672 if (kickedobj->quan > 1L && !isgold) {
673 long save_quan = kickedobj->quan;
675 kickedobj->quan = 1L;
676 k_owt = weight(kickedobj);
677 kickedobj->quan = save_quan;
680 /* range < 2 means the object will not move
681 (maybe dexterity should also figure here) */
682 range = ((int) ACURRSTR) / 2 - k_owt / 40;
689 /* you're in the water too; significantly reduce range */
690 range = range / 3 + 1; /* {1,2}=>1, {3,4,5}=>2, {6,7,8}=>3 */
691 } else if (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)) {
692 /* you're in air, since is_pool did not match */
696 range += rnd(3), slide = TRUE;
697 if (kickedobj->greased)
698 range += rnd(3), slide = TRUE;
701 /* Mjollnir is magically too heavy to kick */
702 if (kickedobj->oartifact == ART_MJOLLNIR)
705 /* see if the object has a place to move into */
706 if (!ZAP_POS(levl[x + u.dx][y + u.dy].typ)
707 || closed_door(x + u.dx, y + u.dy))
710 costly = (!(kickedobj->no_charge && !Has_contents(kickedobj))
711 && (shkp = shop_keeper(*in_rooms(x, y, SHOPBASE))) != 0
712 && costly_spot(x, y));
714 if (IS_ROCK(levl[x][y].typ) || closed_door(x, y)) {
715 if ((!martial() && rn2(20) > ACURR(A_DEX))
716 || IS_ROCK(levl[u.ux][u.uy].typ) || closed_door(u.ux, u.uy)) {
719 pline("It doesn't come loose.");
721 pline("
\82Ñ
\82
\82Æ
\82à
\82µ
\82È
\82¢
\81D");
724 pline("%s %sn't come loose.",
725 The(distant_name(kickedobj, xname)),
726 otense(kickedobj, "do"));
728 pline("%s
\82Í
\82Ñ
\82
\82Æ
\82à
\82µ
\82È
\82¢
\81D",
729 distant_name(kickedobj, xname));
731 return (!rn2(3) || martial());
735 pline("It comes loose.");
737 pline("
\89½
\82©
\82ª
\8aÉ
\82ñ
\82Å
\82Æ
\82ê
\82½
\81D");
740 pline("%s %s loose.", The(distant_name(kickedobj, xname)),
741 otense(kickedobj, "come"));
743 pline("%s
\82Í
\8aÉ
\82ñ
\82Å
\82Æ
\82ê
\82½
\81D", distant_name(kickedobj, xname));
745 obj_extract_self(kickedobj);
747 if (costly && (!costly_spot(u.ux, u.uy)
748 || !index(u.urooms, *in_rooms(x, y, SHOPBASE))))
749 addtobill(kickedobj, FALSE, FALSE, FALSE);
751 if (!flooreffects(kickedobj, u.ux, u.uy, "fall")) {
753 if (!flooreffects(kickedobj, u.ux, u.uy, "
\97\8e\82¿
\82é")) {
754 place_object(kickedobj, u.ux, u.uy);
761 /* a box gets a chance of breaking open here */
762 if (Is_box(kickedobj)) {
763 boolean otrp = kickedobj->otrapped;
769 pline("
\83K
\83\93\81I");
770 container_impact_dmg(kickedobj, x, y);
771 if (kickedobj->olocked) {
772 if (!rn2(5) || (martial() && !rn2(2))) {
774 You("break open the lock!");
776 You("
\8c®
\82ð
\89ó
\82µ
\8aJ
\82¯
\82½
\81I");
777 breakchestlock(kickedobj, FALSE);
779 (void) chest_trap(kickedobj, LEG, FALSE);
783 if (!rn2(3) || (martial() && !rn2(2))) {
785 pline_The("lid slams open, then falls shut.");
787 pline("
\8aW
\82ª
\82Î
\82½
\82ñ
\82Æ
\8aJ
\82«
\81C
\95Â
\82¶
\82½
\81D");
788 kickedobj->lknown = 1;
790 (void) chest_trap(kickedobj, LEG, FALSE);
796 /* else let it fall through to the next cases... */
799 /* fragile objects should not be kicked */
800 if (hero_breaks(kickedobj, kickedobj->ox, kickedobj->oy, FALSE))
803 /* too heavy to move. range is calculated as potential distance from
804 * player, so range == 2 means the object may move up to one square
805 * from its current position
808 if (!Is_box(kickedobj))
812 pline("
\83S
\83c
\83\93\81I");
813 return (!rn2(3) || martial());
816 if (kickedobj->quan > 1L) {
818 kickedobj = splitobj(kickedobj, 1L);
822 static NEARDATA const char *const flyingcoinmsg[] = {
823 "scatter the coins", "knock coins all over the place",
824 "send coins flying in all directions",
827 static NEARDATA const char *const flyingcoinmsg[] = {
828 "
\8bà
\89Ý
\82ð
\82Ü
\82«
\8eU
\82ç
\82µ
\82½", "
\8bà
\89Ý
\82ð
\82Î
\82ç
\82Ü
\82¢
\82½",
829 "
\8bà
\89Ý
\82ð
\82 \82¿
\82±
\82¿
\82É
\94ò
\82Î
\82µ
\82½",
836 pline("
\83K
\83V
\83\83\81[
\83\93\81I");
838 You("%s!", flyingcoinmsg[rn2(SIZE(flyingcoinmsg))]);
840 You("%s
\81I", flyingcoinmsg[rn2(SIZE(flyingcoinmsg))]);
841 (void) scatter(x, y, rn2(3) + 1, VIS_EFFECTS | MAY_HIT,
846 if (kickedobj->quan > 300L) {
850 pline("
\83S
\83c
\83\93\81I");
851 return (!rn2(3) || martial());
858 pline("Whee! %s %s across the %s.", Doname2(kickedobj),
859 otense(kickedobj, "slide"), surface(x, y));
861 pline("
\83Y
\83\8b\83b
\81I%s
\82Í%s
\82Ì
\8fã
\82ð
\8a\8a\82Á
\82½
\81D", Doname2(kickedobj),
865 if (costly && !isgold)
866 addtobill(kickedobj, FALSE, FALSE, TRUE);
867 obj_extract_self(kickedobj);
868 (void) snuff_candle(kickedobj);
870 mon = bhit(u.dx, u.dy, range, KICKED_WEAPON,
871 (int FDECL((*), (MONST_P, OBJ_P))) 0,
872 (int FDECL((*), (OBJ_P, OBJ_P))) 0, &kickedobj);
874 return 1; /* object broken */
877 if (mon->isshk && kickedobj->where == OBJ_MINVENT
878 && kickedobj->ocarry == mon)
879 return 1; /* alert shk caught it */
880 notonhead = (mon->mx != bhitpos.x || mon->my != bhitpos.y);
881 if (isgold ? ghitm(mon, kickedobj) /* caught? */
882 : thitmonst(mon, kickedobj)) /* hit && used up? */
886 /* the object might have fallen down a hole;
887 ship_object() will have taken care of shop billing */
888 if (kickedobj->where == OBJ_MIGRATING)
891 bhitroom = *in_rooms(bhitpos.x, bhitpos.y, SHOPBASE);
892 if (costly && (!costly_spot(bhitpos.x, bhitpos.y)
893 || *in_rooms(x, y, SHOPBASE) != bhitroom)) {
895 costly_gold(x, y, kickedobj->quan);
897 (void) stolen_value(kickedobj, x, y, (boolean) shkp->mpeaceful,
902 if (flooreffects(kickedobj, bhitpos.x, bhitpos.y, "fall"))
904 if(flooreffects(kickedobj, bhitpos.x, bhitpos.y, "
\97\8e\82¿
\82é"))
906 if (kickedobj->unpaid)
907 subfrombill(kickedobj, shkp);
908 place_object(kickedobj, bhitpos.x, bhitpos.y);
910 newsym(kickedobj->ox, kickedobj->oy);
914 /* cause of death if kicking kills kicker */
916 kickstr(buf, kickobjnam)
918 const char *kickobjnam;
924 else if (maploc == &nowhere)
928 what = "
\89½
\82à
\82È
\82¢
\82Æ
\82±
\82ë";
929 else if (IS_DOOR(maploc->typ))
934 else if (IS_TREE(maploc->typ))
939 else if (IS_STWALL(maploc->typ))
944 else if (IS_ROCK(maploc->typ))
949 else if (IS_THRONE(maploc->typ))
954 else if (IS_FOUNTAIN(maploc->typ))
959 else if (IS_GRAVE(maploc->typ))
961 what = "a headstone";
964 else if (IS_SINK(maploc->typ))
968 what = "
\97¬
\82µ
\91ä";
969 else if (IS_ALTAR(maploc->typ))
974 else if (IS_DRAWBRIDGE(maploc->typ))
976 what = "a drawbridge";
978 what = "
\92µ
\82Ë
\8b´";
979 else if (maploc->typ == STAIRS)
984 else if (maploc->typ == LADDER)
988 what = "
\82Í
\82µ
\82²";
989 else if (maploc->typ == IRONBARS)
991 what = "an iron bar";
996 what = "something weird";
998 what = "
\89½
\82©
\96
\82È
\82à
\82Ì";
1000 return strcat(strcpy(buf, "kicking "), what);
1002 Sprintf(buf, "%s
\82ð
\8fR
\82Á
\82Ä", what);
1012 int dmg = 0, glyph, oldglyph = -1;
1013 register struct monst *mtmp;
1014 boolean no_kick = FALSE;
1015 char buf[BUFSZ], kickobjnam[BUFSZ];
1017 kickobjnam[0] = '\0';
1018 if (nolimbs(youmonst.data) || slithy(youmonst.data)) {
1020 You("have no legs to kick with.");
1022 You("
\89½
\82©
\82ð
\8fR
\82ë
\82¤
\82É
\82à
\91«
\82ª
\82È
\82¢
\81D");
1024 } else if (verysmall(youmonst.data)) {
1026 You("are too small to do any kicking.");
1028 You("
\89½
\82©
\82ð
\8fR
\82é
\82É
\82Í
\8f¬
\82³
\82·
\82¬
\82é
\81D");
1030 } else if (u.usteed) {
1032 if (yn_function("Kick your steed?", ynchars, 'y') == 'y') {
1034 if (yn_function("
\94n
\82ð
\8fR
\82é
\81H", ynchars, 'y') == 'y') {
1036 You("kick %s.", mon_nam(u.usteed));
1038 You("%s
\82ð
\8fR
\82Á
\82½
\81D", mon_nam(u.usteed));
1044 } else if (Wounded_legs) {
1045 /* note: jump() has similar code */
1046 long wl = (EWounded_legs & BOTH_SIDES);
1047 const char *bp = body_part(LEG);
1049 if (wl == BOTH_SIDES)
1050 bp = makeplural(bp);
1052 Your("%s%s %s in no shape for kicking.",
1053 (wl == LEFT_SIDE) ? "left " : (wl == RIGHT_SIDE) ? "right " : "",
1054 bp, (wl == BOTH_SIDES) ? "are" : "is");
1056 Your("%s%s
\82Í
\8fR
\82è
\82ª
\82Å
\82«
\82é
\8fó
\91Ô
\82¶
\82á
\82È
\82¢
\81D",
1057 (wl == LEFT_SIDE) ? "
\8d¶" : (wl == RIGHT_SIDE) ? "
\89E" : "",
1061 } else if (near_capacity() > SLT_ENCUMBER) {
1063 Your("load is too heavy to balance yourself for a kick.");
1065 You("
\82½
\82
\82³
\82ñ
\82à
\82Ì
\82ð
\8e\9d\82¿
\82·
\82¬
\82Ä
\8fR
\82è
\82Ì
\82½
\82ß
\82Ì
\83o
\83\89\83\93\83X
\82ª
\82Æ
\82ê
\82È
\82¢
\81D");
1067 } else if (youmonst.data->mlet == S_LIZARD) {
1069 Your("legs cannot kick effectively.");
1071 Your("
\91«
\82Å
\82Í
\82¤
\82Ü
\82
\8fR
\82ê
\82È
\82¢
\81D");
1073 } else if (u.uinwater && !rn2(2)) {
1075 Your("slow motion kick doesn't hit anything.");
1077 Your("
\92x
\82¢
\93®
\82«
\82Ì
\8fR
\82è
\82Å
\82Í
\96½
\92\86\82µ
\82æ
\82¤
\82ª
\82È
\82¢
\81D");
1079 } else if (u.utrap) {
1081 switch (u.utraptype) {
1085 pline("There's not enough room to kick down here.");
1087 pline("
\97\8e\82µ
\8c\8a\82É
\82Í
\82Ü
\82Á
\82Ä
\82¢
\82é
\82Ì
\82Å
\81C
\8fR
\82ê
\82È
\82¢
\81D");
1094 You_cant("move your %s!", body_part(LEG));
1096 You("%s
\82ð
\93®
\82©
\82·
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81I", body_part(LEG));
1104 /* ignore direction typed before player notices kick failed */
1105 display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
1109 if (!getdir((char *) 0))
1117 /* KMH -- Kicking boots always succeed */
1118 if (uarmf && uarmf->otyp == KICKING_BOOTS)
1121 avrg_attrib = (ACURRSTR + ACURR(A_DEX) + ACURR(A_CON)) / 3;
1127 You_cant("move your %s!", body_part(LEG));
1129 You("%s
\82ð
\93®
\82©
\82·
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81I", body_part(LEG));
1132 if (is_animal(u.ustuck->data)) {
1134 pline("%s burps loudly.", Monnam(u.ustuck));
1136 pline("%s
\82Í
\91å
\82«
\82È
\83Q
\83b
\83v
\82ð
\82µ
\82½
\81D", Monnam(u.ustuck));
1142 Your("feeble kick has no effect.");
1144 Your("
\8eã
\81X
\82µ
\82¢
\8fR
\82è
\82Í
\8cø
\89Ê
\82ª
\82È
\82¢
\81D"); break;
1148 } else if (u.utrap && u.utraptype == TT_PIT) {
1149 /* must be Passes_walls */
1151 You("kick at the side of the pit.");
1153 You("
\97\8e\82µ
\8c\8a\82Ì
\95Ç
\82ð
\8fR
\82Á
\82½
\81D");
1161 /* doors can be opened while levitating, so they must be
1162 * reachable for bracing purposes
1163 * Possible extension: allow bracing against stuff on the side?
1165 if (isok(xx, yy) && !IS_ROCK(levl[xx][yy].typ)
1166 && !IS_DOOR(levl[xx][yy].typ)
1167 && (!Is_airlevel(&u.uz) || !OBJ_AT(xx, yy))) {
1169 You("have nothing to brace yourself against.");
1171 pline("
\8ex
\82¦
\82É
\82Å
\82«
\82é
\82æ
\82¤
\82È
\82à
\82Ì
\82ª
\96³
\82¢
\81D");
1176 mtmp = isok(x, y) ? m_at(x, y) : 0;
1177 /* might not kick monster if it is hidden and becomes revealed,
1178 if it is peaceful and player declines to attack, or if the
1179 hero passes out due to encumbrance with low hp; context.move
1180 will be 1 unless player declines to kick peaceful monster */
1182 oldglyph = glyph_at(x, y);
1183 if (!maybe_kick_monster(mtmp, x, y))
1184 return context.move;
1194 maploc = &levl[x][y];
1197 * The next five tests should stay in their present order:
1198 * monsters, pools, objects, non-doors, doors.
1200 * [FIXME: Monsters who are hidden underneath objects or
1201 * in pools should lead to hero kicking the concealment
1202 * rather than the monster, probably exposing the hidden
1203 * monster in the process. And monsters who are hidden on
1204 * ceiling shouldn't be kickable (unless hero is flying?);
1205 * kicking toward them should just target whatever is on
1206 * the floor at that spot.]
1210 /* save mtmp->data (for recoil) in case mtmp gets killed */
1211 struct permonst *mdat = mtmp->data;
1213 kick_monster(mtmp, x, y);
1214 glyph = glyph_at(x, y);
1215 /* see comment in attack_checks() */
1216 if (DEADMONSTER(mtmp)) { /* DEADMONSTER() */
1217 /* if we mapped an invisible monster and immediately
1218 killed it, we don't want to forget what we thought
1219 was there before the kick */
1220 if (glyph != oldglyph && glyph_is_invisible(glyph))
1221 show_glyph(x, y, oldglyph);
1222 } else if (!canspotmon(mtmp)
1223 /* check <x,y>; monster that evades kick by jumping
1224 to an unseen square doesn't leave an I behind */
1225 && mtmp->mx == x && mtmp->my == y
1226 && !glyph_is_invisible(glyph)
1227 && !(u.uswallow && mtmp == u.ustuck)) {
1228 map_invisible(x, y);
1230 /* recoil if floating */
1231 if ((Is_airlevel(&u.uz) || Levitation) && context.move) {
1235 ((int) youmonst.data->cwt + (weight_cap() + inv_weight()));
1237 range = 1; /* divide by zero avoidance */
1238 range = (3 * (int) mdat->cwt) / range;
1242 hurtle(-u.dx, -u.dy, range, TRUE);
1246 (void) unmap_invisible(x, y);
1247 if (is_pool(x, y) ^ !!u.uinwater) {
1248 /* objects normally can't be removed from water by kicking */
1250 You("splash some %s around.", hliquid("water"));
1252 You("%s
\82ð
\89ñ
\82è
\82É
\82Ü
\82«
\82¿
\82ç
\82µ
\82½
\81D", hliquid("
\90\85"));
1256 if (OBJ_AT(x, y) && (!Levitation || Is_airlevel(&u.uz)
1257 || Is_waterlevel(&u.uz) || sobj_at(BOULDER, x, y))) {
1258 if (kick_object(x, y, kickobjnam)) {
1259 if (Is_airlevel(&u.uz))
1260 hurtle(-u.dx, -u.dy, 1, TRUE); /* assume it's light */
1266 if (!IS_DOOR(maploc->typ)) {
1267 if (maploc->typ == SDOOR) {
1268 if (!Levitation && rn2(30) < avrg_attrib) {
1269 cvt_sdoor_to_door(maploc); /* ->typ = DOOR */
1271 pline("Crash! %s a secret door!",
1272 /* don't "kick open" when it's locked
1273 unless it also happens to be trapped */
1274 (maploc->doormask & (D_LOCKED | D_TRAPPED)) == D_LOCKED
1275 ? "Your kick uncovers"
1278 pline("
\83K
\83V
\83\83\83\93\81I
\82 \82È
\82½
\82Í
\94é
\96§
\82Ì
\94à
\82ð%s
\82½
\81I",
1279 (maploc->doormask & (D_LOCKED|D_TRAPPED)) == D_LOCKED
1281 : "
\8fR
\82è
\8aJ
\82¯");
1283 exercise(A_DEX, TRUE);
1284 if (maploc->doormask & D_TRAPPED) {
1285 maploc->doormask = D_NODOOR;
1287 b_trapped("door", FOOT);
1289 b_trapped("
\94à", FOOT);
1290 } else if (maploc->doormask != D_NODOOR
1291 && !(maploc->doormask & D_LOCKED))
1292 maploc->doormask = D_ISOPEN;
1293 feel_newsym(x, y); /* we know it's gone */
1294 if (maploc->doormask == D_ISOPEN
1295 || maploc->doormask == D_NODOOR)
1296 unblock_point(x, y); /* vision */
1301 if (maploc->typ == SCORR) {
1302 if (!Levitation && rn2(30) < avrg_attrib) {
1304 pline("Crash! You kick open a secret passage!");
1306 pline("
\83K
\83V
\83\83\83\93\81I
\82 \82È
\82½
\82Í
\94é
\96§
\82Ì
\92Ê
\98H
\82ð
\8fR
\82è
\82â
\82Ô
\82Á
\82½
\81I");
1307 exercise(A_DEX, TRUE);
1309 feel_newsym(x, y); /* we know it's gone */
1310 unblock_point(x, y); /* vision */
1315 if (IS_THRONE(maploc->typ)) {
1319 if ((Luck < 0 || maploc->doormask) && !rn2(3)) {
1321 maploc->doormask = 0; /* don't leave loose ends.. */
1322 (void) mkgold((long) rnd(200), x, y);
1325 pline("CRASH! You destroy it.");
1327 pline("
\83K
\83V
\83\83\83\93\81I
\82 \82È
\82½
\82Í
\89½
\82©
\82ð
\94j
\89ó
\82µ
\82½
\81D");
1330 pline("CRASH! You destroy the throne.");
1332 pline("
\83K
\83V
\83\83\83\93\81I
\82 \82È
\82½
\82Í
\8bÊ
\8dÀ
\82ð
\94j
\89ó
\82µ
\82½
\81D");
1335 exercise(A_DEX, TRUE);
1337 } else if (Luck > 0 && !rn2(3) && !maploc->looted) {
1338 (void) mkgold((long) rn1(201, 300), x, y);
1344 rnd_class(DILITHIUM_CRYSTAL, LUCKSTONE - 1), x, y,
1348 You("kick %s loose!", something);
1350 You("
\82È
\82É
\82©
\82ð
\8fR
\82è
\8eU
\82ç
\82µ
\82½
\81I");
1353 You("kick loose some ornamental coins and gems!");
1355 You("
\91\95\8fü
\97p
\82Ì
\8bà
\89Ý
\82â
\95ó
\90Î
\82ð
\8fR
\82è
\8eU
\82ç
\82µ
\82½
\81I");
1358 /* prevent endless milking */
1359 maploc->looted = T_LOOTED;
1361 } else if (!rn2(4)) {
1362 if (dunlev(&u.uz) < dunlevs_in_dungeon(&u.uz)) {
1363 fall_through(FALSE, 0);
1370 if (IS_ALTAR(maploc->typ)) {
1374 You("kick %s.", (Blind ? something : "the altar"));
1376 You("%s
\82ð
\8fR
\82Á
\82½
\81D", (Blind ? "
\89½
\82©" : "
\8dÕ
\92d"));
1380 exercise(A_DEX, TRUE);
1383 if (IS_FOUNTAIN(maploc->typ)) {
1387 You("kick %s.", (Blind ? something : "the fountain"));
1389 You("%s
\82ð
\8fR
\82Á
\82½
\81D",(Blind ? "
\89½
\82©" : "
\90ò"));
1392 /* make metal boots rust */
1393 if (uarmf && rn2(3))
1395 if (water_damage(uarmf, "metal boots", TRUE) == ER_NOTHING) {
1397 if (water_damage(uarmf, "
\8bà
\91®
\82Ì
\8cC", TRUE) == ER_NOTHING) {
1399 Your("boots get wet.");
1401 Your("
\8cC
\82Í
\94G
\82ê
\82½
\81D");
1402 /* could cause short-lived fumbling here */
1404 exercise(A_DEX, TRUE);
1407 if (IS_GRAVE(maploc->typ)) {
1412 exercise(A_WIS, FALSE);
1413 if (Role_if(PM_ARCHEOLOGIST) || Role_if(PM_SAMURAI)
1414 || ((u.ualign.type == A_LAWFUL) && (u.ualign.record > -10))) {
1415 adjalign(-sgn(u.ualign.type));
1418 maploc->doormask = 0;
1419 (void) mksobj_at(ROCK, x, y, TRUE, FALSE);
1423 pline("Crack! %s broke!", Something);
1425 pline("
\83S
\83c
\83\93\81I
\89½
\82©
\82ª
\89ó
\82ê
\82½
\81I");
1429 pline_The("headstone topples over and breaks!");
1431 pline("
\95æ
\90Î
\82Í
\93|
\82ê
\82Ä
\89ó
\82ê
\82½
\81I");
1436 if (maploc->typ == IRONBARS)
1438 if (IS_TREE(maploc->typ)) {
1439 struct obj *treefruit;
1441 /* nothing, fruit or trouble? 75:23.5:1.5% */
1443 if (!rn2(6) && !(mvitals[PM_KILLER_BEE].mvflags & G_GONE))
1445 You_hear("a low buzzing."); /* a warning */
1447 You_hear("
\82Ô
\81[
\82ñ
\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81D"); /* a warning */
1451 if (rn2(15) && !(maploc->looted & TREE_LOOTED)
1452 && (treefruit = rnd_treefruit_at(x, y))) {
1453 long nfruit = 8L - rnl(7), nfall;
1454 short frtype = treefruit->otyp;
1456 treefruit->quan = nfruit;
1457 treefruit->owt = weight(treefruit);
1458 if (is_plural(treefruit))
1460 pline("Some %s fall from the tree!", xname(treefruit));
1462 pline("%s
\82ª
\89½
\8cÂ
\82©
\96Ø
\82©
\82ç
\97\8e\82¿
\82Ä
\82«
\82½
\81I", xname(treefruit));
1465 pline("%s falls from the tree!", An(xname(treefruit)));
1467 pline("%s
\82ª
\96Ø
\82©
\82ç
\97\8e\82¿
\82Ä
\82«
\82½
\81I", xname(treefruit));
1468 nfall = scatter(x, y, 2, MAY_HIT, treefruit);
1469 if (nfall != nfruit) {
1470 /* scatter left some in the tree, but treefruit
1471 * may not refer to the correct object */
1472 treefruit = mksobj(frtype, TRUE, FALSE);
1473 treefruit->quan = nfruit - nfall;
1475 pline("%ld %s got caught in the branches.",
1476 nfruit - nfall, xname(treefruit));
1478 pline("%ld
\8cÂ
\82Ì%s
\82ª
\8e}
\82É
\82Ð
\82Á
\82©
\82©
\82Á
\82½
\81D",
1479 nfruit - nfall, xname(treefruit));
1481 dealloc_obj(treefruit);
1483 exercise(A_DEX, TRUE);
1484 exercise(A_WIS, TRUE); /* discovered a new food source! */
1486 maploc->looted |= TREE_LOOTED;
1488 } else if (!(maploc->looted & TREE_SWARM)) {
1489 int cnt = rnl(4) + 2;
1496 if (enexto(&mm, mm.x, mm.y, &mons[PM_KILLER_BEE])
1497 && makemon(&mons[PM_KILLER_BEE], mm.x, mm.y,
1503 pline("You've attracted the tree's former occupants!");
1505 pline("
\96Ø
\82Ì
\90æ
\8fZ
\96¯
\82ð
\8bN
\82±
\82µ
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I");
1508 You("smell stale honey.");
1510 pline("
\8cÃ
\82¢
\82Í
\82¿
\82Ý
\82Â
\82Ì
\82É
\82¨
\82¢
\82ª
\82µ
\82½
\81D");
1511 maploc->looted |= TREE_SWARM;
1516 if (IS_SINK(maploc->typ)) {
1517 int gend = poly_gender();
1518 short washerndx = (gend == 1 || (gend == 2 && rn2(2)))
1527 pline("Klunk! The pipes vibrate noisily.");
1529 pline("
\83K
\83\89\83\93\81I
\83p
\83C
\83v
\82Í
\82¤
\82é
\82³
\82
\90U
\93®
\82µ
\82½
\81D");
1534 pline("
\83K
\83\89\83\93\81I");
1535 exercise(A_DEX, TRUE);
1537 } else if (!(maploc->looted & S_LPUDDING) && !rn2(3)
1538 && !(mvitals[PM_BLACK_PUDDING].mvflags & G_GONE)) {
1541 You_hear("a gushing sound.");
1543 You_hear("
\82È
\82É
\82©
\82ª
\95¬
\8fo
\82·
\82é
\89¹
\82ð
\95·
\82¢
\82½
\81D");
1546 pline("A %s ooze gushes up from the drain!",
1548 pline("%s
\89t
\91Ì
\82ª
\94r
\90\85\8cû
\82©
\82ç
\82É
\82¶
\82Ý
\8fo
\82½
\81I",
1550 (void) makemon(&mons[PM_BLACK_PUDDING], x, y, NO_MM_FLAGS);
1551 exercise(A_DEX, TRUE);
1553 maploc->looted |= S_LPUDDING;
1555 } else if (!(maploc->looted & S_LDWASHER) && !rn2(3)
1556 && !(mvitals[washerndx].mvflags & G_GONE)) {
1557 /* can't resist... */
1559 pline("%s returns!", (Blind ? Something : "The dish washer"));
1561 pline("%s
\82ª
\96ß
\82Á
\82Ä
\82«
\82½
\81I", (Blind ? "
\89½
\82©" : "
\8eM
\90ô
\82¢"));
1562 if (makemon(&mons[washerndx], x, y, NO_MM_FLAGS))
1564 maploc->looted |= S_LDWASHER;
1565 exercise(A_DEX, TRUE);
1567 } else if (!rn2(3)) {
1569 Sprintf(buf, " %s", body_part(FACE));
1573 pline("%s%s%s.", !Deaf ? "Flupp! " : "",
1575 ? "Muddy waste pops up from the drain"
1577 ? "You hear a sloshing sound" /* Deaf-aware */
1578 : "Something splashes you in the", buf);
1580 /*JP:TODO:
\81u
\8aç
\82É
\82©
\82©
\82Á
\82½
\81v
\82Ì
\8cê
\8f\87\92²
\90® */
1581 pline("%s%s
\81D", !Deaf ? "
\82¤
\82í
\81I" : "",
1583 ? "
\94r
\90\85\8cû
\82©
\82ç
\82Ç
\82ë
\82Ç
\82ë
\82Ì
\94p
\8aü
\95¨
\82ª
\8fo
\82Ä
\82
\82é"
1585 ? "
\82 \82È
\82½
\82Í
\81C
\83o
\83`
\83\83\83o
\83`
\83\83\82·
\82é
\89¹
\82ð
\95·
\82¢
\82½" /* Deaf-aware */
1586 : "
\89½
\82©
\82ª
\82 \82È
\82½
\82É
\82©
\82©
\82Á
\82½");
1588 if (!(maploc->looted & S_LRING)) { /* once per sink */
1591 You_see("a ring shining in its midst.");
1593 You("
\82»
\82Ì
\92\86\82É
\8cõ
\82é
\8ew
\97Ö
\82ð
\8c©
\82Â
\82¯
\82½
\81D");
1594 (void) mkobj_at(RING_CLASS, x, y, TRUE);
1596 exercise(A_DEX, TRUE);
1597 exercise(A_WIS, TRUE); /* a discovery! */
1598 maploc->looted |= S_LRING;
1604 if (maploc->typ == STAIRS || maploc->typ == LADDER
1605 || IS_STWALL(maploc->typ)) {
1606 if (!IS_STWALL(maploc->typ) && maploc->ladder == LA_DOWN)
1610 pline("Ouch! That hurts!");
1612 pline("
\82¢
\82Ä
\82Á
\81I
\89ö
\89ä
\82µ
\82½
\81I");
1613 exercise(A_DEX, FALSE);
1614 exercise(A_STR, FALSE);
1617 feel_location(x, y); /* we know we hit it */
1618 if (is_drawbridge_wall(x, y) >= 0) {
1620 pline_The("drawbridge is unaffected.");
1622 pline("
\92µ
\82Ë
\8b´
\82Í
\82Ñ
\82
\82Æ
\82à
\82µ
\82È
\82¢
\81D");
1623 /* update maploc to refer to the drawbridge */
1624 (void) find_drawbridge(&x, &y);
1625 maploc = &levl[x][y];
1629 set_wounded_legs(RIGHT_SIDE, 5 + rnd(5));
1630 dmg = rnd(ACURR(A_CON) > 15 ? 3 : 5);
1631 losehp(Maybe_Half_Phys(dmg), kickstr(buf, kickobjnam), KILLED_BY);
1632 if (Is_airlevel(&u.uz) || Levitation)
1633 hurtle(-u.dx, -u.dy, rn1(2, 4), TRUE); /* assume it's heavy */
1639 if (maploc->doormask == D_ISOPEN || maploc->doormask == D_BROKEN
1640 || maploc->doormask == D_NODOOR) {
1642 exercise(A_DEX, FALSE);
1643 if (martial() || ACURR(A_DEX) >= 16 || rn2(3)) {
1645 You("kick at empty space.");
1647 You("
\89½
\82à
\82È
\82¢
\8bó
\8aÔ
\82ð
\8fR
\82Á
\82½
\81D");
1649 feel_location(x, y);
1652 pline("Dumb move! You strain a muscle.");
1654 pline("
\82Î
\82©
\82°
\82½
\93®
\82«
\82¾
\81I
\8bØ
\93÷
\82ð
\92É
\82ß
\82½
\81D");
1655 exercise(A_STR, FALSE);
1656 set_wounded_legs(RIGHT_SIDE, 5 + rnd(5));
1658 if ((Is_airlevel(&u.uz) || Levitation) && rn2(2))
1659 hurtle(-u.dx, -u.dy, 1, TRUE);
1660 return 1; /* uses a turn */
1663 /* not enough leverage to kick open doors while levitating */
1667 exercise(A_DEX, TRUE);
1668 /* door is known to be CLOSED or LOCKED */
1669 if (rnl(35) < avrg_attrib + (!martial() ? 0 : ACURR(A_DEX))) {
1670 boolean shopdoor = *in_rooms(x, y, SHOPBASE) ? TRUE : FALSE;
1671 /* break the door */
1672 if (maploc->doormask & D_TRAPPED) {
1675 You("kick the door.");
1677 You("
\94à
\82ð
\8fR
\82Á
\82½
\81D");
1678 exercise(A_STR, FALSE);
1679 maploc->doormask = D_NODOOR;
1681 b_trapped("door", FOOT);
1683 b_trapped("
\94à", FOOT);
1684 } else if (ACURR(A_STR) > 18 && !rn2(5) && !shopdoor) {
1686 pline("As you kick the door, it shatters to pieces!");
1688 pline("
\94à
\82ð
\8fR
\82é
\82Æ
\81C
\82±
\82È
\82²
\82È
\82É
\82
\82¾
\82¯
\82½
\81I");
1689 exercise(A_STR, TRUE);
1690 maploc->doormask = D_NODOOR;
1693 pline("As you kick the door, it crashes open!");
1695 pline("
\94à
\82ð
\8fR
\82é
\82Æ
\81C
\89ó
\82ê
\82Ä
\8aJ
\82¢
\82½
\81I");
1696 exercise(A_STR, TRUE);
1697 maploc->doormask = D_BROKEN;
1699 feel_newsym(x, y); /* we know we broke it */
1700 unblock_point(x, y); /* vision */
1702 add_damage(x, y, SHOP_DOOR_COST);
1704 pay_for_damage("break", FALSE);
1706 pay_for_damage("
\94j
\89ó
\82·
\82é", FALSE);
1709 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
1710 if (DEADMONSTER(mtmp))
1712 if (is_watch(mtmp->data) && couldsee(mtmp->mx, mtmp->my)
1713 && mtmp->mpeaceful) {
1715 mon_yells(mtmp, "Halt, thief! You're under arrest!");
1717 mon_yells(mtmp, "
\8e~
\82Ü
\82ê
\93D
\96_
\81I
\82¨
\82Ü
\82¦
\82ð
\91ß
\95ß
\82·
\82é
\81I");
1718 (void) angry_guards(FALSE);
1724 feel_location(x, y); /* we know we hit it */
1725 exercise(A_STR, TRUE);
1729 pline("
\82®
\82\9f\82\9f\82\9f\82ñ
\81I");
1731 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
1732 if (DEADMONSTER(mtmp))
1734 if (is_watch(mtmp->data) && mtmp->mpeaceful
1735 && couldsee(mtmp->mx, mtmp->my)) {
1736 if (levl[x][y].looted & D_WARNED) {
1739 "Halt, vandal! You're under arrest!");
1741 "
\8e~
\82Ü
\82ê
\96ì
\94Ø
\90l
\81I
\82¨
\82Ü
\82¦
\82ð
\91ß
\95ß
\82·
\82é
\81I");
1742 (void) angry_guards(FALSE);
1745 mon_yells(mtmp, "Hey, stop damaging that door!");
1747 mon_yells(mtmp, "
\82¨
\82¢
\81C
\94à
\82ð
\94j
\89ó
\82·
\82é
\82Ì
\82ð
\82â
\82ß
\82ë
\81I");
1748 levl[x][y].looted |= D_WARNED;
1762 /* cover all the MIGR_xxx choices generated by down_gate() */
1764 case MIGR_RANDOM: /* trap door or hole */
1765 if (Is_stronghold(&u.uz)) {
1766 cc->x = valley_level.dnum;
1767 cc->y = valley_level.dlevel;
1769 } else if (In_endgame(&u.uz) || Is_botlevel(&u.uz)) {
1774 case MIGR_STAIRS_UP:
1775 case MIGR_LADDER_UP:
1777 cc->y = u.uz.dlevel + 1;
1780 cc->x = sstairs.tolev.dnum;
1781 cc->y = sstairs.tolev.dlevel;
1785 /* y==0 means "nowhere", in which case x doesn't matter */
1791 /* player or missile impacts location, causing objects to fall down */
1793 impact_drop(missile, x, y, dlev)
1794 struct obj *missile; /* caused impact, won't drop itself */
1795 xchar x, y; /* location affected */
1796 xchar dlev; /* if !0 send to dlev near player */
1799 register struct obj *obj, *obj2;
1800 register struct monst *shkp;
1801 long oct, dct, price, debit, robbed;
1802 boolean angry, costly, isrock;
1808 toloc = down_gate(x, y);
1809 drop_to(&cc, toloc);
1814 /* send objects next to player falling through trap door.
1815 * checked in obj_delivery().
1817 toloc = MIGR_WITH_HERO;
1821 costly = costly_spot(x, y);
1822 price = debit = robbed = 0L;
1824 shkp = (struct monst *) 0;
1825 /* if 'costly', we must keep a record of ESHK(shkp) before
1826 * it undergoes changes through the calls to stolen_value.
1827 * the angry bit must be reset, if needed, in this fn, since
1828 * stolen_value is called under the 'silent' flag to avoid
1829 * unsavory pline repetitions.
1832 if ((shkp = shop_keeper(*in_rooms(x, y, SHOPBASE))) != 0) {
1833 debit = ESHK(shkp)->debit;
1834 robbed = ESHK(shkp)->robbed;
1835 angry = !shkp->mpeaceful;
1839 isrock = (missile && missile->otyp == ROCK);
1841 for (obj = level.objects[x][y]; obj; obj = obj2) {
1842 obj2 = obj->nexthere;
1845 /* number of objects in the pile */
1847 if (obj == uball || obj == uchain)
1849 /* boulders can fall too, but rarely & never due to rocks */
1850 if ((isrock && obj->otyp == BOULDER)
1851 || rn2(obj->otyp == BOULDER ? 30 : 3))
1853 obj_extract_self(obj);
1856 price += stolen_value(obj, x, y,
1857 (costly_spot(u.ux, u.uy)
1859 *in_rooms(x, y, SHOPBASE))),
1861 /* set obj->no_charge to 0 */
1862 if (Has_contents(obj))
1863 picked_container(obj); /* does the right thing */
1864 if (obj->oclass != COIN_CLASS)
1868 add_to_migration(obj);
1871 obj->owornmask = (long) toloc;
1873 /* number of fallen objects */
1877 if (dct && cansee(x, y)) { /* at least one object fell */
1879 const char *what = (dct == 1L ? "object falls" : "objects fall");
1881 const char *what = "
\95¨";
1885 pline("From the impact, %sother %s.",
1886 dct == oct ? "the " : dct == 1L ? "an" : "", what);
1888 pline("
\8fÕ
\8c\82\82Å
\81C
\91¼
\82Ì%s
\82ª
\97\8e\82¿
\82½
\81D",what);
1890 else if (oct == dct)
1892 pline("%s adjacent %s %s.", dct == 1L ? "The" : "All the", what,
1895 pline("
\8bß
\82
\82É
\82 \82Á
\82½%s
\82ª%s
\97\8e\82¿
\82½
\81D", what, gate_str);
1899 pline("%s adjacent %s %s.",
1900 dct == 1L ? "One of the" : "Some of the",
1901 dct == 1L ? "objects falls" : what, gate_str);
1903 pline("
\8bß
\82
\82É
\82 \82Á
\82½%s%s%s
\97\8e\82¿
\82½
\81D",
1905 dct == 1L ? "
\82ª" : "
\82Ì
\82¢
\82
\82Â
\82©
\82ª",
1910 if (costly && shkp && price) {
1911 if (ESHK(shkp)->robbed > robbed) {
1913 You("removed %ld %s worth of goods!", price, currency(price));
1915 You("%ld%s
\95ª
\82Ì
\95i
\95¨
\82ð
\8eæ
\82è
\82³
\82Á
\82½
\81I", price, currency(price));
1916 if (cansee(shkp->mx, shkp->my)) {
1917 if (ESHK(shkp)->customer[0] == 0)
1918 (void) strncpy(ESHK(shkp)->customer, plname, PL_NSIZ);
1921 pline("%s is infuriated!", Monnam(shkp));
1923 pline("%s
\82Í
\8c\83\93{
\82µ
\82½
\81I", Monnam(shkp));
1926 pline("\"%s, you are a thief!\"", plname);
1928 pline("
\81u%s
\82ß
\81C
\82¨
\82Ü
\82¦
\82Í
\93D
\96_
\82¾
\82È
\81I
\81v", plname);
1931 You_hear("a scream, \"Thief!\"");
1933 You_hear("
\8bà
\90Ø
\82è
\90º
\82ð
\95·
\82¢
\82½
\81u
\93D
\96_
\81I
\81v");
1935 (void) angry_guards(FALSE);
1938 if (ESHK(shkp)->debit > debit) {
1939 long amt = (ESHK(shkp)->debit - debit);
1941 You("owe %s %ld %s for goods lost.", Monnam(shkp), amt,
1944 You("
\95i
\95¨
\8fÁ
\8e¸
\82Ì
\82½
\82ß%s
\82É%ld%s
\82Ì
\8eØ
\82è
\82ð
\82Â
\82
\82Á
\82½
\81D", Monnam(shkp), amt,
1951 /* NOTE: ship_object assumes otmp was FREED from fobj or invent.
1952 * <x,y> is the point of drop. otmp is _not_ an <x,y> resident:
1953 * otmp is either a kicked, dropped, or thrown object.
1956 ship_object(otmp, x, y, shop_floor_obj)
1959 boolean shop_floor_obj;
1966 boolean nodrop, unpaid, container, impact = FALSE;
1971 if ((toloc = down_gate(x, y)) == MIGR_NOWHERE)
1973 drop_to(&cc, toloc);
1977 /* objects other than attached iron ball always fall down ladder,
1978 but have a chance of staying otherwise */
1979 nodrop = (otmp == uball) || (otmp == uchain)
1980 || (toloc != MIGR_LADDER_UP && rn2(3));
1982 container = Has_contents(otmp);
1983 unpaid = is_unpaid(otmp);
1986 for (obj = level.objects[x][y]; obj; obj = obj->nexthere)
1992 /* boulders never fall through trap doors, but they might knock
1993 other things down before plugging the hole */
1994 if (otmp->otyp == BOULDER && ((t = t_at(x, y)) != 0)
1995 && is_hole(t->ttyp)) {
1997 impact_drop(otmp, x, y, 0);
1998 return FALSE; /* let caller finish the drop */
2002 otransit_msg(otmp, nodrop, n);
2006 impact_drop(otmp, x, y, 0);
2010 if (unpaid || shop_floor_obj) {
2012 (void) stolen_value(otmp, u.ux, u.uy, TRUE, FALSE);
2016 (void) stolen_value(
2018 (costly_spot(u.ux, u.uy)
2019 && index(u.urooms, *in_rooms(ox, oy, SHOPBASE))),
2022 /* set otmp->no_charge to 0 */
2024 picked_container(otmp); /* happens to do the right thing */
2025 if (otmp->oclass != COIN_CLASS)
2026 otmp->no_charge = 0;
2029 if (otmp->owornmask)
2030 remove_worn_item(otmp, TRUE);
2032 /* some things break rather than ship */
2033 if (breaktest(otmp)) {
2036 if (objects[otmp->otyp].oc_material == GLASS
2037 || otmp->otyp == EXPENSIVE_CAMERA) {
2038 if (otmp->otyp == MIRROR)
2043 result = "
\83O
\83V
\83\83\83b";
2045 /* penalty for breaking eggs laid by you */
2046 if (otmp->otyp == EGG && otmp->spe && otmp->corpsenm >= LOW_PM)
2047 change_luck((schar) -min(otmp->quan, 5L));
2051 result = "
\83x
\83`
\83\83\83b";
2054 You_hear("a muffled %s.", result);
2056 You_hear("
\82±
\82à
\82Á
\82½%s
\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81D", result);
2057 obj_extract_self(otmp);
2058 obfree(otmp, (struct obj *) 0);
2062 add_to_migration(otmp);
2065 otmp->owornmask = (long) toloc;
2066 /* boulder from rolling boulder trap, no longer part of the trap */
2067 if (otmp->otyp == BOULDER)
2071 /* the objs impacted may be in a shop other than
2072 * the one in which the hero is located. another
2073 * check for a shk is made in impact_drop. it is, e.g.,
2074 * possible to kick/throw an object belonging to one
2075 * shop into another shop through a gap in the wall,
2076 * and cause objects belonging to the other shop to
2077 * fall down a trap door--thereby getting two shopkeepers
2078 * angry at the hero in one shot.
2080 impact_drop(otmp, x, y, 0);
2087 obj_delivery(near_hero)
2090 register struct obj *otmp, *otmp2;
2091 register int nx, ny;
2093 boolean nobreak, noscatter;
2095 for (otmp = migrating_objs; otmp; otmp = otmp2) {
2097 if (otmp->ox != u.uz.dnum || otmp->oy != u.uz.dlevel)
2100 where = (int) (otmp->owornmask & 0x7fffL); /* destination code */
2101 if ((where & MIGR_TO_SPECIES) != 0)
2104 nobreak = (where & MIGR_NOBREAK) != 0;
2105 noscatter = (where & MIGR_WITH_HERO) != 0;
2106 where &= ~(MIGR_NOBREAK | MIGR_NOSCATTER);
2108 if (!near_hero ^ (where == MIGR_WITH_HERO))
2111 obj_extract_self(otmp);
2112 otmp->owornmask = 0L;
2115 case MIGR_STAIRS_UP:
2116 nx = xupstair, ny = yupstair;
2118 case MIGR_LADDER_UP:
2119 nx = xupladder, ny = yupladder;
2122 nx = sstairs.sx, ny = sstairs.sy;
2124 case MIGR_WITH_HERO:
2125 nx = u.ux, ny = u.uy;
2133 place_object(otmp, nx, ny);
2134 if (!nobreak && !IS_SOFT(levl[nx][ny].typ)) {
2135 if (where == MIGR_WITH_HERO) {
2136 if (breaks(otmp, nx, ny))
2138 } else if (breaktest(otmp)) {
2139 /* assume it broke before player arrived, no messages */
2146 (void) scatter(nx, ny, rnd(2), 0, otmp);
2149 } else { /* random location */
2150 /* set dummy coordinates because there's no
2151 current position for rloco() to update */
2152 otmp->ox = otmp->oy = 0;
2153 if (rloco(otmp) && !nobreak && breaktest(otmp)) {
2154 /* assume it broke before player arrived, no messages */
2162 deliver_obj_to_mon(mtmp, cnt, deliverflags)
2165 unsigned long deliverflags;
2167 struct obj *otmp, *otmp2;
2168 int where, maxobj = 1;
2169 boolean at_crime_scene = In_mines(&u.uz);
2171 if ((deliverflags & DF_RANDOM) && cnt > 1)
2173 else if (deliverflags & DF_ALL)
2179 for (otmp = migrating_objs; otmp; otmp = otmp2) {
2181 where = (int) (otmp->owornmask & 0x7fffL); /* destination code */
2182 if ((where & MIGR_TO_SPECIES) == 0)
2185 if ((mtmp->data->mflags2 & otmp->corpsenm) != 0) {
2186 obj_extract_self(otmp);
2187 otmp->owornmask = 0L;
2188 otmp->ox = otmp->oy = 0;
2190 /* special treatment for orcs and their kind */
2191 if ((otmp->corpsenm & M2_ORC) != 0 && has_oname(otmp)) {
2192 if (!has_mname(mtmp)) {
2193 if (at_crime_scene || !rn2(2))
2194 mtmp = christen_orc(mtmp,
2195 at_crime_scene ? ONAME(otmp)
2197 /* bought the stolen goods */
2203 (void) add_to_minv(mtmp, otmp);
2205 if (maxobj && cnt >= maxobj)
2207 /* getting here implies DF_ALL */
2213 otransit_msg(otmp, nodrop, num)
2214 register struct obj *otmp;
2215 register boolean nodrop;
2219 char *optr = 0, obuf[BUFSZ], xbuf[BUFSZ];
2221 char obuf[BUFSZ], xbuf[BUFSZ];
2225 if (otmp->otyp == CORPSE) {
2226 /* Tobjnam() calls xname() and would yield "The corpse";
2227 we want more specific "The newt corpse" or "Medusa's corpse" */
2228 optr = upstart(corpse_xname(otmp, (char *) 0, CXN_PFX_THE));
2230 optr = Tobjnam(otmp, (char *) 0);
2234 Sprintf(obuf, "%s
\82Í", xname(otmp));
2237 if (num) { /* means: other objects are impacted */
2238 /* As of 3.6.2: use a separate buffer for the suffix to avoid risk of
2239 overrunning obuf[] (let pline() handle truncation if necessary) */
2241 Sprintf(xbuf, " %s %s object%s", otense(otmp, "hit"),
2242 (num == 1L) ? "another" : "other", (num > 1L) ? "s" : "");
2244 Sprintf(eos(xbuf), ".");
2246 Sprintf(eos(xbuf), " and %s %s.", otense(otmp, "fall"), gate_str);
2248 Sprintf(xbuf, "
\91¼
\82Ì
\95¨
\91Ì
\82É
\96½
\92\86\82µ
\82Ä");
2250 Sprintf(eos(xbuf), "
\8e~
\82Ü
\82Á
\82½
\81D");
2252 Sprintf(eos(xbuf), "%s
\97\8e\82¿
\82½
\81D", gate_str);
2254 pline("%s%s", obuf, xbuf);
2257 pline("%s %s %s.", obuf, otense(otmp, "fall"), gate_str);
2259 pline("%s%s
\97\8e\82¿
\82½
\81D", obuf, gate_str);
2262 /* migration destination for objects which fall down to next level */
2270 /* this matches the player restriction in goto_level() */
2271 if (on_level(&u.uz, &qstart_level) && !ok_to_quest())
2272 return MIGR_NOWHERE;
2274 if ((xdnstair == x && ydnstair == y)
2275 || (sstairs.sx == x && sstairs.sy == y && !sstairs.up)) {
2277 gate_str = "down the stairs";
2279 gate_str = "
\8aK
\92i
\82©
\82ç";
2280 return (xdnstair == x && ydnstair == y) ? MIGR_STAIRS_UP
2283 if (xdnladder == x && ydnladder == y) {
2285 gate_str = "down the ladder";
2287 gate_str = "
\82Í
\82µ
\82²
\82©
\82ç";
2288 return MIGR_LADDER_UP;
2291 if (((ttmp = t_at(x, y)) != 0 && ttmp->tseen)
2292 && is_hole(ttmp->ttyp)) {
2294 gate_str = (ttmp->ttyp == TRAPDOOR) ? "through the trap door"
2295 : "through the hole";
2297 gate_str = (ttmp->ttyp == TRAPDOOR) ? "
\97\8e\82µ
\94à
\82É"
2302 return MIGR_NOWHERE;