void start_berserk(object me, object obj)
{
int shen;
if( !me || !obj ) return; // Are we still exist( not becoming a corpse )?
me->set_temp("looking_for_trouble", 0);
if( me->is_fighting(obj) // Are we busy fighting?
|| !living(me) // Are we capable for a fight?
|| environment(me)!=environment(obj) // Are we still in the same room?
|| environment(me)->query("no_fight") // Are we in a peace room?
) return;
shen = 0 - (int)me->query("shen");
message_vision("$N用一种异样的眼神扫视著在场的每一个人。\n", me);
if( !userp(me) || (int)me->query("neili") > (random(shen) + shen)/10 ) return;
//如果是npc或者内力大于shen的一个随机变化范围除于10,也就是说shen相比较内力而言太底了
//不能压制住杀气!
if( shen > (int)me->query("score") //score又是一个什么东西呢?
&& !wizardp(obj) ) {
message_vision("$N对著$n喝道:" + RANK_D->query_self_rude(me)
+ "看你实在很不顺眼,去死吧。\n", me, obj);
me->kill_ob(obj);
} else {
message_vision("$N对著$n喝道:喂!" + RANK_D->query_rude(obj)
+ "," + RANK_D->query_self_rude(me) + "正想找人打架,陪我玩两手吧!\n",
me, obj);
me->fight_ob(obj);
}
} |