Change end-of-game advantage calculator to use [unit_worth].

This commit is contained in:
Alexander van Gessel 2009-06-17 01:32:06 +01:00
parent 96e0daa4fe
commit 82cb13ef8e

View file

@ -78,7 +78,10 @@
-- Calc the total unit-score here
for i, unit in ipairs( wesnoth.get_units { side = side } ) do
if not unit.__cfg.canrecruit then
units = units + unit.__cfg.cost
wesnoth.fire("unit_worth",{
id = unit.__cfg.id,
})
units = units + wesnoth.get_variable("unit_worth")
end
end
-- Up to here