// chillgaze.c

#include <ansi.h>

inherit SSERVER;

int exert(object me, object target)
{
	object *ob;
	int i, skill, damage;

	if( !me->is_fighting() )
		return notify_fail("uNHEvNub԰ϥΡC\n");
	me->start_busy(4);

	if( (int)me->query("force") < 50 )
		return notify_fail("AOC\n");

	if( !target || target==me ) {
		target = offensive_target(me);
		if( !target) return notify_fail("An֬IiuNHEvNS\n");
	}

	skill = me->query_skill("force");

	me->add("force", -50);
	me->receive_damage("sen", 20);

	message_vision(
		HIB "$NMoXMSpQbn$nT\n" NOR, me, target);
	
	if( random(target->query("combat_exp")) > (int)me->query("combat_exp") / 2 ) {
		message_vision("$Nܧ֦aLYhM׶}F$nإC\n", target, me);
		return 1;
	}

	damage = (int)me->query("force_factor") * 2 - target->query("max_force") / 15;
	if( damage < 1 ) {
		message_vision("O$N$n`YL@....C\n", target, me);
		return 1;
	}

	target->receive_damage("gin", damage);
	if( random(skill) > (int)target->query("cps") * 2 )
		target->receive_wound("gin", damage/2);
	message_vision("$NQ$nإM۸TaFӴHC\n", target, me);

	return 1;
}

