| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 | local ReceiverBase = require("core:erm.ReceiverBase")local HE = ReceiverBase:new()function HE:new(ERM, p1, p2, p3)	assert(p1 ~= nil, "!!HE requires hero identifier")	if p2 and p3 then		--by coordinates		error("!!HEx/y/l: form is not implemented")	else		-- assume p1 is identifier		local hero = GAME:getHeroWithSubid(p1)		if not hero then			logError("Hero with id ".. tostring(p1) .. " not found")		end		return ReceiverBase.new(self,		{			id=p1,			ERM=ERM,			hero=hero		})	endendfunction HE:A(x, ...)	--artifacts	logError("!!HE:A is not implemented")endHE:p1Dispatcher("B")function HE:B0(x, ...)	--name	logError("!!HE:B is not implemented")endfunction HE:B1(x, ...)	--bio	logError("!!HE:B is not implemented")endfunction HE:B2(x, ...)	--class	logError("!!HE:B is not implemented")endfunction HE:B3(x, _)	--get default bio	logError("!!HE:B is not implemented")endfunction HE:C(x, ...)	local argc = select("#", ...)	if argc == 14 then		return self:C14(x, ...)	elseif argc == 4 then		local N = select(1, ...)		return nil, self["C"..tostring(N)](self, x, select(2, ...))	else		logError("!!HE:C extended form is not implemented")	endendfunction HE:C0(x, slot, typ, count)	--change creatures by slot	if typ~=nil or count ~=nil then		logError("!!HE:C0 set is not implemented")		return	end	local stack = self.hero:getStack(slot)	if not stack then		return nil, -1, 0	else		return nil, stack:getType():getIndex(), stack:getCount()	endendfunction HE:C1(x, ...)	--change creatures by typeendfunction HE:C05(x, ...)	--change creatures by slot advendfunction HE:C15(x, ...)	--change creatures by type advendfunction HE:C2(x, ...)	--add creaturesendfunction HE:C14(x, ...)	-- change creatures with Queryendfunction HE:D(x, ...)	logError("!!HE:D not implemented")endfunction HE:E(x, ...)	logError("!!HE:E is not implemented")endfunction HE:F(x, ...)	logError("!!HE:F is not implemented")endfunction HE:G(x, ...)	logError("!!HE:G is not implemented")endfunction HE:H(x, ...)	logError("!!HE:H is not implemented")endfunction HE:I(x, ...)	logError("!!HE:I is not implemented")endfunction HE:K(x, ...)	logError("!!HE:K is not implemented")endfunction HE:L(x, ...)	logError("!!HE:L is not implemented")endfunction HE:M(x, ...)	logError("!!HE:M is not implemented")endfunction HE:N(x, ...)	logError("!!HE:N is not implemented")endfunction HE:O(x, owner)	if owner~=nil then		logError("!!HE:O set is not implemented")		return	else		if not self.hero then			return 255		end		return self.hero:getOwner()	endendfunction HE:P(x, ...)	logError("!!HE:P is not implemented")endfunction HE:R(x, ...)	logError("!!HE:R is not implemented")endfunction HE:S(x, ...)	logError("!!HE:S is not implemented")endfunction HE:T(x, ...)	logError("!!HE:T is not implemented")endfunction HE:U(x, ...)	logError("!!HE:U is not implemented")endfunction HE:V(x, ...)	logError("!!HE:V is not implemented")endfunction HE:W(x, ...)	logError("!!HE:A is not implemented")endfunction HE:X(x, ...)	logError("!!HE:X is not implemented")endfunction HE:Y(x, ...)	logError("!!HE:Y is ot implemented")endreturn HE
 |