[wizs] 鑲篏+頭銜
看板mud_sanc (Sanctuary - 聖殿)作者justinj (闇冥)時間15年前 (2010/04/27 11:03)推噓0(0推 0噓 0→)留言0則, 0人參與討論串1/2 (看更多)
基本上是打不下去了......(被那一堆變態小兵搞)
所以po出來給別人來幫忙想一下好了..avert
------------------------------------------------------------------------------
#include "../dark.h"
inherit ARMOR;
mixed title_head=({
({HIR"力量的"NOR,"stat-str",5}),
({HIY"體力的"NOR,"stat-con",5}),
({HIR"魔力的"NOR,"stat-mag",5}),
({HIC"敏捷的"NOR,"stat-dex",5}),
({HIG"理智的"NOR,"stat-int",5}),
({HIB"氣勁的"NOR,"stat-air",5}),
({HIM"感性的"NOR,"stat-fel",5}),
({HIR"炎熱的"NOR,"fire",5}),
({HIC"寒冷的"NOR,"ice",5}),
({HIR"暴風的"NOR,"wind",5}),
({HIR"聖潔的"NOR,"light",5}),
({HIP"闇黑的"NOR,"dark",5}),
});
int base_effect() //tile的顯示
{
int r;
if(!query("num")) set("num",random(sizeof(title_head)));
r=query("num");
set("short",title_head[r][0]+query("short"));
add("effect/"+title_head[r][1],title_head[r][2]);
return 1;
}
int hole_view(mixed hole) //孔的顯示模式
{
int i=sizeof(hole);
string str;
switch(i)
{
case 1:
str="\n "+hole[0]+"\n";
break;
case 2:
str="\n "+hole[0]+" "+hole[1]+"\n";
break;
case 3:
str="\n "+hole[0]+
"\n "+hole[1]+" "+hole[2]+"\n";
break;
case 4:
str="\n "+hole[0]+" "+hole[1]+
str="\n "+hole[2]+" "+hole[3]+"\n";
break;
default:return notify_fail("目前沒有那麼多孔\n");
}
set("long",query("long")+str);
return 1;
}
int insert_effect(string path,string hole) //卡片的影響{卡片路徑,第X孔}
{
object ob=find_object_or_load(path);
int j,value;
mixed key1,key2;
string name2;
name2=ob->query("name"); //卡片名字
set("hole/"+hole,path); //插入第X孔
set("holev/"+hole,name2); //暫時顯示名字的
hole_view(values(query("holev")));//放入顯示
key1=keys(query("effect"));
key2=keys(ob->query("effect"));
foreach(string key in key2)
{
value=ob->query("effect/"+key);
if(member_array(key,key1)!=-1)
{
j=query("effect/"+key);
j+=value;
set("effect/"+key,j);
}
else
{
set("effect/"+key,value);
}
}
ob->remove();
return 1;
}
int insert_card(string name,string hole) //插入卡片
{
object ob,ppl=this_player();
string path;
if(!hole||!name)
return notify_fail(HIC"insert 物品 in 第幾個孔\n"NOR);
if(query(hole)!="空的")
return notify_fail(HIR"這個孔已經插過了!\n"NOR);
if(!ob=present(name,ppl))
return notify_fail(HIB"你身上沒有這個物品!\n"NOR);
path=base_name(ob->query("name"));//卡片基本位置
set("hole/"+hole,path);
write(HIR"你將"+ob->query("name")+HIR"插入了"+query("name")+HIR"之中了\n"NOR);
insert_effect(path,hole);
}
--------------------------------------------------------------------------
還缺未鑑定的物品,顯示要怎樣才比較好,title_head還要可以加的不止單屬性
等.....(ps.內容總覺得有那些出問題...avert)
這個是想拿來給其它eq inherit用的.....
--
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.129.141.105
討論串 (同標題文章)
mud_sanc 近期熱門文章
PTT遊戲區 即時熱門文章
5
12