boss24.c
来自「C实现的MUD,对大家基本入门网络游戏很有帮助!」· C语言 代码 · 共 134 行
C
134 行
#include <ansi.h>
inherit NPC;
string *order = ({""HIY"", ""HIG"", ""RED"", ""MAG"", ""HIB"", ""HIB"", ""HIB"", ""HIB"",""HIB"", ""CYN"",""WHT"",""HIM"",""BLU""});
void create()
{
mapping npc,mp,j;
int i,k,a,b,c,d,e,f,temp;
set_name(order[random(13)]+"阿拉斯特尔"NOR, ({ "zzz"}));
set("magicgift",1+random(6));
set("magicset",1);
set("title",HIB"愤怒天使"NOR);
set("zhuanbest",1);
set("long",
"一位可怕的坠天使。\n");
set("attitude", "aggressive");
set("vendetta/authority",1);
set("max_qi",500+random(500));
set("combat_exp",75000000+random(8000000));
set_skill("force",550+random(300));
set_skill("unarmed",550+random(300));
set_skill("sword",550+random(300));
set_skill("club",550+random(300));
set_skill("whip",550+random(300));
set_skill("throwing",550+random(300));
set_skill("parry",550+random(300));
set_skill("spells",600+random(300));
set_skill("magic-unarmed", 580+random(300));
set_skill("magic-sword", 580+random(200));
set_skill("magic-dark", 580+random(300));
set_skill("magic-light", 580+random(300));
set_skill("magic-earth", 580+random(300));
set_skill("magic-ice", 580+random(300));
set_skill("magic-water", 580+random(300));
set_skill("magic-fire", 580+random(300));
map_skill("sword", "magic-sword");
map_skill("unarmed", "magic-unarmed");
map_skill("parry", "magic-unarmed");
map_skill("spells", "magic-dark");
set("no_get",1);
b=138000+random(68000);
a=178000+random(68000);
d=68+random(60);
set("str",d);
set("dex",40+d);
set("int",d);
set("con",d);
set("per",d);
set("kar",d);
set("jing",b);
set("max_jing",b);
set("eff_jing",b);
set("qi",a);
set("max_qi",a);
set("eff_qi",a);
set("neili",a);
set("max_neili",a);
set("age", 15);
set("shen_type", -1);
set("intellgent",1);
set("pursuer",1);
set_temp("apply/attack",200);
set_temp("apply/defense",200);
set_temp("apply/armor",800);
set_temp("apply/damage",600);
map_skill("spells", "magic-water");
set("chat_chance_combat", 60);
set("chat_msg_combat", ({
(: perform_action, "spells.door" :),
(: perform_action, "spells.iceball" :),
(: perform_action, "spells.resistance" :),
(: perform_action, "spells.crystal" :),
(: perform_action, "spells.icebolt" :),
(: perform_action, "spells.storm" :),
(: perform_action, "spells.summon" :),
(: perform_action, "spells.zeroring" :),
}) );
setup();
carry_object(__DIR__"obj/sword")->wield();
carry_object(__DIR__"obj/cloth")->wear();
}
void init( )
{
object ob;
remove_call_out("hunting");
if( interactive(ob = this_player()) ) {
ob->start_busy(1);
call_out("hunting",0);
}
if(!environment()->query("no_fight"))
call_out("hunting",0);
}
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());
}
}
void die()
{
object ob, me, corpse;
ob = this_object();
me = query_temp("last_damage_from");
if (!me) return;
me->add("score",100);
me->set("title",ob->query("title"));
me->set("qi",me->query("max_qi"));
me->set("jing",me->query("max_jing"));
me->set("neili",me->query("max_neili"));
message_vision(HIB"$N,化为了无数的光芒,消失在空中。\n"NOR,ob,me);
message("vision", me->name() + HIG"在最终任务中!!打败了"+ob->query("title")+HIG":"+ob->query("name")+HIG"("+ob->query("id")+HIG")。\n"NOR, users());
destruct(ob);
return;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?