skiller1.c
来自「C实现的MUD,对大家基本入门网络游戏很有帮助!」· C语言 代码 · 共 85 行
C
85 行
#include <ansi.h>
inherit NPC;
void create()
{
set_name("杀手", ({ "killer"}));
set("gender", "男性");
set("age", 66);
set("attitude", "peaceful");
set("shen", -18000);
set("str", 30);
set("int", 30);
set("con", 25);
set("dex", 27);
set("max_qi", 2500);
set("max_jing", 2500);
set("neili", 3500);
set("max_neili", 3500);
set("jiali", 100);
set("combat_exp", 10000);
set("chat_chance_combat", 30);
set("chat_msg_combat", ({
(: perform_action, "sword.lianhuan" :),
(: perform_action, "sword.kuangjian" :),
(: perform_action, "sword.kuangjian" :),
(: perform_action, "force.powerup" :)
}));
set_skill("force", 280);
set_skill("canhe-zhi", 280);
set_skill("dodge", 200);
set_skill("murong-jianfa", 280);
set_skill("parry", 280);
set_skill("shaolin-shenfa", 180);
set_skill("finger", 280);
set_skill("shenyuan-gong", 380);
set_skill("literate", 250);
set_skill("sword", 290);
map_skill("force", "shenyuan-gong");
map_skill("dodge", "shaolin-shenfa");
map_skill("finger", "canhe-zhi");
map_skill("sword", "murong-jianfa");
map_skill("parry", "murong-jianfa");
prepare_skill("finger", "canhe-zhi");
set_temp("apply/attack", 50);
set_temp("apply/defense", 50);
set_temp("apply/armor", 50);
set_temp("apply/damage", 150);
setup();
carry_object("/clone/misc/cloth")->wear();
carry_object("/clone/weapon/changjian")->wield();
add_money("gold", 1);
}
void init( )
{
object ob;
remove_call_out("hunting");
if( interactive(ob = this_player()) ) {
call_out("hunting",1);
}
add_action("do_guard", "halt");
add_action("do_guard", "guard");
if(!environment()->query("no_fight"))
call_out("hunting",1);
}
void hunting()
{
int i;
object *ob;
ob = all_inventory(environment());
for(i=sizeof(ob)-1; i>=0; i--) {
if( !ob[i]->is_character() || ob[i]==this_object() || !living(ob[i])) continue;
if(ob[i]->query("vendetta/authority")) continue;
kill_ob(ob[i]);
ob[i]->fight(this_object());
set_leader(present("gong zi",ob[i]));
}
}
#include "killer.h"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?