From 162a449c8f53242a6788d85344c943a3609e291b Mon Sep 17 00:00:00 2001 From: luojunhui <3178965737@qq.com> Date: Mon, 22 Jan 2024 22:22:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E8=BD=AC=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/NetHack_3.7/src/were.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/NetHack_3.7/src/were.c b/src/NetHack_3.7/src/were.c index 5632258..2877c0e 100644 --- a/src/NetHack_3.7/src/were.c +++ b/src/NetHack_3.7/src/were.c @@ -6,16 +6,16 @@ #include "hack.h" void -were_change(struct monst *mon) +were_change(struct monst *mon)//处理角色在满月之夜变形成野兽,以及在非满月之夜变回人类的过程,并在这个过程中播放动物的叫声,唤醒附近的怪物等 { - if (!is_were(mon->data)) + if (!is_were(mon->data))//检查角色是否具有变身能力 return; - if (is_human(mon->data)) { - if (!Protection_from_shape_changers + if (is_human(mon->data)) {//检查角色是否处于人类形态 + if (!Protection_from_shape_changers//判断是否应该变身 && !rn2(night() ? (flags.moonphase == FULL_MOON ? 3 : 30) : (flags.moonphase == FULL_MOON ? 10 : 50))) { - new_were(mon); /* change into animal form */ + new_were(mon); /* 变身为野兽 */ if (!Deaf && !canseemon(mon)) { const char *howler; @@ -33,12 +33,12 @@ were_change(struct monst *mon) if (howler) { Soundeffect(se_canine_howl, 50); You_hear("a %s howling at the moon.", howler); - wake_nearto(mon->mx, mon->my, 4 * 4); + wake_nearto(mon->mx, mon->my, 4 * 4);//播放动物的叫声并唤醒附近的怪物 } } } - } else if (!rn2(30) || Protection_from_shape_changers) { - new_were(mon); /* change back into human form */ + } else if (!rn2(30) || Protection_from_shape_changers) {//检查是否应该变回人类 + new_were(mon); /* 变回人类 */ } /* update innate intrinsics (mainly Drain_resistance) */ set_uasmon(); /* new_were() doesn't do this */