• R/O
  • SSH
  • HTTPS

junnethack: Commit


Commit MetaInfo

Revisión359 (tree)
Tiempo2011-01-15 12:33:30
Autorso-miya

Log Message

UnNetHack SVN版rev.704を適用した。
Put paranoid_trap warning code in correct place.
So the program doesn't ask if player wants to step into trap when
attacking a monster in a trap.
paranoid_trap警告コードを正しい位置にした。
これにより、罠にかかったモンスターを攻撃したときにに罠に踏み込むか
の確認を行わなくなる。

Cambiar Resumen

Diferencia

--- junnethack/trunk/src/hack.c (revision 358)
+++ junnethack/trunk/src/hack.c (revision 359)
@@ -1547,26 +1547,6 @@
15471547 return;
15481548 }
15491549
1550- /* warn player before walking into known traps */
1551- if (iflags.paranoid_trap &&
1552- ((trap = t_at(x, y)) && trap->tseen)) {
1553- char qbuf[BUFSZ];
1554-#if 0 /*JP*/
1555- Sprintf(qbuf,"Do you really want to %s into that %s?",
1556- locomotion(youmonst.data, "step"),
1557- defsyms[trap_to_defsym(trap->ttyp)].explanation);
1558-#else
1559- Sprintf(qbuf,"本当に%sの方に%s?",
1560- jtrns_obj('^', defsyms[trap_to_defsym(trap->ttyp)].explanation),
1561- locomotion(youmonst.data, "進む"));
1562-#endif
1563- if (yn(qbuf) != 'y') {
1564- nomul(0, 0);
1565- flags.move = 0;
1566- return;
1567- }
1568- }
1569-
15701550 if (((trap = t_at(x, y)) && trap->tseen) ||
15711551 (Blind && !Levitation && !Flying &&
15721552 !is_clinger(youmonst.data) &&
@@ -1770,6 +1750,26 @@
17701750 nomul(0, 0);
17711751 return;
17721752 }
1753+
1754+ /* warn player before walking into known traps */
1755+ if (iflags.paranoid_trap &&
1756+ ((trap = t_at(x, y)) && trap->tseen)) {
1757+ char qbuf[BUFSZ];
1758+#if 0 /*JP*/
1759+ Sprintf(qbuf,"Do you really want to %s into that %s?",
1760+ locomotion(youmonst.data, "step"),
1761+ defsyms[trap_to_defsym(trap->ttyp)].explanation);
1762+#else
1763+ Sprintf(qbuf,"本当に%sの方に%s?",
1764+ jtrns_obj('^', defsyms[trap_to_defsym(trap->ttyp)].explanation),
1765+ locomotion(youmonst.data, "進む"));
1766+#endif
1767+ if (yn(qbuf) != 'y') {
1768+ nomul(0, 0);
1769+ flags.move = 0;
1770+ return;
1771+ }
1772+ }
17731773 if(u.utrap) {
17741774 if(u.utraptype == TT_PIT) {
17751775 if (!rn2(2) && sobj_at(BOULDER, u.ux, u.uy)) {
Show on old repository browser