znmud-0.0.1/benchmark/
znmud-0.0.1/cmd/
znmud-0.0.1/cmd/emotes/
znmud-0.0.1/cmd/objects/
znmud-0.0.1/cmd/tiny/
znmud-0.0.1/doc/
znmud-0.0.1/farts/
znmud-0.0.1/lib/
znmud-0.0.1/lib/combat/
znmud-0.0.1/lib/core/bodytypes/
znmud-0.0.1/lib/engine/
znmud-0.0.1/lib/farts/
znmud-0.0.1/logs/
#
# file::    cmd_moan.rb

# This source code copyright (C) 2009 Craig Smith
# All rights reserved.
#
# Released under the terms of the TeensyMUD Public License
# See LICENSE file for additional information.
#

module Cmd

  bindtextdomain("cmd")

  # The moan skill
  def cmd_moan(args)
	sendto _("You let out an angry guttural moan!")
	msg = Msg.new _("^p1 lets out a loud moan, 'Graaagh!'")
	msg.p1 = name
	sendroom(msg)
	room = get_object(location)
	room.exits.each do |exid|
		ex = get_object(exid)
		destroom = get_object(ex.to_room)
		destroom.contents.each do |oid|
			o = get_object(oid)
			if o.is_a? Character
				if o.is_a? Zombie or o.has_attribute? :zombie
					oexit = get_object(ex.linked_exit)
					if oexit
						o.dirhint = oexit.id
						msg =  _("You here, a Graaah coming from the %{dir}." % {:dir => oexit.name})
					else
						msg = _("You hear, Graaagh!")
					end
					add_event(id, o.id, :show, msg)
				else
					add_event(id, o.id, :show, _("You hear, Graaagh!"))
				end
			end
		end
	end
  end

end