1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
vcmi/scripts/lib/erm/BM.lua
AlexVinS ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00

105 lines
1.7 KiB
Lua

require("battle.Unit")
local battle = BATTLE
local ReceiverBase = require("core:erm.ReceiverBase")
local BM = ReceiverBase:new()
function BM:new(ERM, unitId)
assert(unitId ~= nil, "!!BM requires unit identifier")
return ReceiverBase.new(self,{ERM = ERM, unitId = unitId})
end
function BM:A(x, p1)
if type(p1) == "nil" then
local unit = battle:getUnitById(self.unitId)
return unit:getAttack(false)
else
error("!!BM:A set is not implemented")
end
end
function BM:B(x, ...)
error("!!BM:B is not implemented")
end
function BM:C(x, ...)
error("!!BM:C is not implemented")
end
function BM:D(x, ...)
error("!!BM:D is not implemented")
end
function BM:E(x, ...)
error("!!BM:E is not implemented")
end
function BM:F(x, ...)
error("!!BM:F is not implemented")
end
function BM:G(x, ...)
error("!!BM:G is not implemented")
end
function BM:H(x, ...)
error("!!BM:H is not implemented")
end
function BM:J(x, ...)
error("!!BM:J is not implemented")
end
function BM:K(x, ...)
error("!!BM:K is not implemented")
end
function BM:L(x, ...)
error("!!BM:L is not implemented")
end
function BM:M(x, ...)
error("!!BM:M is not implemented")
end
function BM:N(x, ...)
error("!!BM:N is not implemented")
end
function BM:O(x, ...)
error("!!BM:O is not implemented")
end
function BM:P(x, ...)
error("!!BM:P is not implemented")
end
function BM:Q(x, ...)
error("!!BM:Q is not implemented")
end
function BM:R(x, ...)
error("!!BM:R is not implemented")
end
function BM:S(x, ...)
error("!!BM:S is not implemented")
end
function BM:T(x, ...)
error("!!BM:T is not implemented")
end
function BM:U(x, ...)
error("!!BM:U is not implemented")
end
function BM:V(x, ...)
error("!!BM:V is not implemented")
end
return BM