[wizs]問題請教(十九)
看板mud_sanc (Sanctuary - 聖殿)作者amosdeus (幽素)時間18年前 (2007/09/22 16:44)推噓0(0推 0噓 0→)留言0則, 0人參與討論串1/2 (看更多)
請問要怎樣把自己本身跟設定不能打的mob排除在外呢?
如果刪掉
if(obs[i]=ppl) continue;
if(obs[i]->query("no_attack")) continue;
就會攻擊,但是加上這兩行就不會攻擊。
目錄:/u/p/plain/pic_trans/wp/claymore.c
int process_circle(string str)
{
略
ob=this_player()->query_current_attacker();
略
obs=all_inventory(environment(ob));
略
for(i=0;i<sizeof(obs);i++)
{
if(obs[i]=ppl) continue;
if(obs[i]->query("no_attack")) continue;
obs[i]->add("hp",-dam);
if(obs[i]->query("hp")<0) obs[i]->die();
}
remove();
return 1;
}
以上
謝謝
Plain@Sanc
--
咽咽學楚吟 病骨傷幽素 秋姿白髮生 木葉啼風雨
燈青蘭膏歇 落照飛蛾舞 古壁生凝塵 羇魂夢中語
【 傷心行 李賀 】
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.127.98.33
※ 編輯: amosdeus 來自: 122.127.98.33 (09/22 16:45)
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
mud_sanc 近期熱門文章
PTT遊戲區 即時熱門文章
12
19