角色转变

ljh2_branch
luojunhui 2 years ago
parent ac18649fbf
commit 162a449c8f

@ -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 */

Loading…
Cancel
Save