#!/usr/bin/perl
# This verb can be set up as the command_interceptor, and then the parser
# will call it for _every_ command. It is used to make an avatar be
# unconscious.
#use Mooix::Verb;
run sub {
	my $this=shift;
	%_=@_;

	# Check for hitpoint recovery.
	$this->hp_regen;
	if ($this->hitpoints > 0) {
		# Run real verb.
		exit Mooix::Verb::SKIP;
	}
	
	# Even in unconciousness, they can log out, and view help. Nothing
	# else though.
	if ($_{verb} =~ /^(exit|quit|help)$/) {
		exit Mooix::Verb::SKIP;
	}
	else {
		fail "You are unconscious.";
	}
}
