?? shichang1.c
字號:
// shichang 1
inherit ROOM;
#include <ansi.h>;
int potential_lv(int exp);
void create()
{
set("short", "采石場");
set("long",
"這里是個很大的采石場,可以清楚的看見許許多多的已經(jīng)采下的大大
小小的巖石壘在山旁,幾個采石工人站在巨石上用鐵錘敲打著石頭,還有
很多的人將石塊扛在肩膀上往里面運送。據(jù)說這些石頭都是用來在建造防
外敵的"+HIR+"“城墻”"+NOR+"所需的。\n ");
set("no_clean_up", 0);
set("valid_startroom", 1);
set("no_fight",1);
set("exits", ([
// "eastup" : __DIR__"shanlu1",
"south" : "/d/xiangyang/caodi5",
// "west" : __DIR__"shanlu",
]));
set("objects", ([
__DIR__"cao" : 1,
__DIR__"jushi" : 2,
]));
setup();
}
void init()
{
add_action("do_za","砸");
}
int do_za(string arg)
{
object me;
int i, bonus;
me=this_player();
if( !arg && arg !="石頭" && arg !="ju shi" && arg !="shi" ) return notify_fail("你要砸什么?\n");
if (me->is_busy())
return notify_fail("你現(xiàn)在正忙不過來呢。\n");
if (me->query("combat_exp") >= 50000)
return notify_fail("你已經(jīng)不能通過砸石來增加經(jīng)驗了。\n");
if( !present("hammer", this_player()) ) {
tell_object(me,"\n只見你掄起巴掌狠狠的向巨石上擊去,只聽“喀嚓”一聲,竟是骨碎的聲音,這時你發(fā)現(xiàn)周圍的人好象都在偷偷的樂!\n");
me -> receive_damage ("qi",10) ;
me->start_busy(2);
return notify_fail("還是趕緊找個工具來吧!\n");
}
if(me->query_temp("stonework")<6) {
message_vision(HIY"$N舉起鐵錘,掄圓了胳膊對準(zhǔn)石頭狠狠地砸了起來。\n"NOR,me);
i = (int)this_player()->query("str", 1) + random(1000);
if(i<250) {
tell_object(me,"鐵錘一下子被反震起來,在空中劃了一道美麗的弧線,然后結(jié)實的砸在了你的屁股上!\n");
me -> receive_damage ("qi",10 + random(5));
return 1;
}
me->start_busy(1);
tell_object(me,"啪嗒一聲,一塊小碎石從巨石上掉了下來,看來你的工夫還是沒有白費嘛!\n");
me -> receive_damage ("qi",15 + random(10)) ;
/*
bonus = (int)me->query("potential");
bonus = bonus - (int)me->query("learned_points");
bonus = bonus + random(4) +3;
if ( bonus > potential_lv((int)me->query("combat_exp")) )
bonus = potential_lv((int)me->query("combat_exp"));
*/
// bonus += (int)me->query("learned_points");
me->add("potential", 3+random(4));
/*
if( !me->query("potential") || me->query("potential") <1000 ){
me->add("potential",random(4)+3);}
*/
if( !me->query("combat_exp") || me->query("combat_exp") <50000 ){
me->add("combat_exp",random(6)+6);}
me->add_temp("stonework",1);
return 1;
}
return notify_fail(HIW"你一定很累了吧,該歇歇了,快去找監(jiān)工交工了吧。\n"NOR);
}
int valid_leave(object me, string dir)
{
if ( me->query_temp("stonework") && (dir == "east" || dir == "eastup"|| dir == "west") && present("cao liu", environment(me)) && living(present("cao liu", environment(me))) ) { message_vision(HIM"曹六大叫一聲:“你給我站住,要想走就把你的工作先交了,當(dāng)我不存
在呀!”\n"NOR,this_player());
return notify_fail("");
}
return ::valid_leave(me, dir);
}
int potential_lv(int exp)
{
int grade;
grade = 100 + exp / 500;
return grade;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -