作者laechan (小太保)
看板mud_sanc
标题[闲聊] holybell 指令实作
时间Mon Jan 14 17:04:00 2008
实在 coding 不下去, 乾脆打在这.
// 这个指令支援 auto holybell
inherit DAEMON;
int cmd_holybell(string str,object me)
{
mixed obs;
object ob,env;
int check,t;
if(!env=environment(me)) return 1;
if(me->query_temp("casting")>0)
return notify_fail("holybell: 你现在没空使用这个指令喔.\n");
// 使用後一秒内, 无法使用特攻&en
me->add_temp("casting",1);
me->add("ready_attack",240);
obs=all_inventory(obs);
// 非发动的玩家, 在战斗中且有 setdata no_damage_msg 的话,
// 底下的发动叙述会自动被略过, 避免神官的这行讯息一直吵到玩家
tell_room(env,HIW+me->query("chi_name")+HIW"发动了圣洁的铃音!!"NOR,me);
check=me->query("skill/holybell");
t=1+time();
foreach(ob in obs)
{
if(!ob || (ob && !living(ob))) continue;
ob->set_temp("holybell_times",t);
if(ob->query_temp("holybell_check")<check)
{
ob->set_temp("holybell_times",t);
if(userp(ob) && ob->query_temp("shield2"))
tell_object(ob,"你的护盾受到圣洁铃音的强化, 变得更加坚固了!!\n");
}
}
// 原先没有 check 值, 或 check 值小於上面的值时
// 有护盾的玩家才会看到那一句, 也就是说只有在一开始会看到
// 而理论上同一个神官除非回练习室不然 holybell 不可能增加
// 之後自己按 a 就可以观看圣洁铃音的作用是否有持续
// 这部份用 times 去判断
return notify_fail("holybell: 你发动了圣洁的铃音!!\n");
}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.225.189.72