[闲聊] 飞天蜈蚣

楼主: laechan (挥泪斩马云)   2023-09-28 09:35:53
200.飞天蜈蚣(FlyingCentipede)[50群飞天蜈蚣] /d/ppl/justinj/sky/mob/centipede5
190.飞天蜈蚣(FlyingCentipede)[20群飞天蜈蚣] /d/ppl/justinj/sky/mob/centipede4
170.飞天蜈蚣(FlyingCentipede)[5群飞天蜈蚣] /d/ppl/justinj/sky/mob/centipede3
140.飞天蜈蚣(FlyingCentipede) /d/ppl/justinj/sky/mob/centipede2
70.飞天蜈蚣(FlyingCentipede) /d/ppl/justinj/sky/mob/centipede
有五种飞天蜈蚣
我不太赞成有复数档名的情况下怪物名称都一样,希望至少能做
两三种区别,尤其是特别的那一两只。
int special_fun(object frog,object ppl)
{
object env;
int i;
tell_object(ppl,query("short")+HIM"对你使出异界传送!\n"NOR);
if(ppl->query("anti_effect/space") > random(50))
{
tell_object(ppl,HIG"但被你反抗挣脱了!\n"NOR);
return 1;
}
异界传送如果失败,玩家会看到讯息。
env = environment(frog);
i = strlen(ROOT)+4;
i = atoi(base_name(env)[i..i]);
if(i==2)
ppl->move_to(sprintf(ROOT"room/%03d",random(200)));
else
ppl->move_to(sprintf(ROOT"room%d/%03d",i-1,random(200)));
这里则请 justin 帮忙看一下是否有隐藏的错误,有玩家反映没看到
失败的讯息,但无法传送成功。
(%03d我没用过,我一般都用 %3d)
通常我会加两行
if(!frog) return 1;
else if(!env=environment(frog)) return 1;
以此来确保一定有 env (后面仅管 frog 可能被瞬杀了也没差)

Links booklink

Contact Us: admin [ a t ] ucptt.com