diff --git a/game/engine/Actor.lua b/game/engine/Actor.lua index e2e5e23ec542ebde8a0f924509452bf4ba99457e..1b2f1e2da0ec6b34559868274cf4c0fcf996a8c6 100644 --- a/game/engine/Actor.lua +++ b/game/engine/Actor.lua @@ -21,6 +21,15 @@ function _M:init(t) self.compute_vals = {} end +--- Tells the actor it can act +function _M:act() + if self.changed then self:updateBonus() end +end + +--- Recompute the bonus when something changed +function _M:updateBonus() +end + --- Moves an actor on the map -- *WARNING*: changing x and y properties manualy is *WRONG* and will blow up in your face. Use this method. Always. -- @param map the map to move onto diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index add920a0ecf9c963eac5f8f5279150a0946d3de5..56f57804dbe19c616366b1af4c7cc343d5835215 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -48,6 +48,8 @@ function _M:act() self:regenResources() -- Compute timed effects self:timedEffects() + + engine.Actor.act(self) end function _M:move(x, y, force) @@ -102,6 +104,10 @@ function _M:levelup() end end +function _M:updateBonus() + engine.Actor.updateBonus(self) +end + --- Notifies a change of stat value function _M:onStatChange(stat, v) if stat == self.STAT_CON then diff --git a/ideas/spells.ods b/ideas/spells.ods index abcdfafa272ea2e60980960900b1f20aafe9c113..1d4224aafca37a0225dc344c20e9ec68644d1ecc 100644 Binary files a/ideas/spells.ods and b/ideas/spells.ods differ