Code: Select all
function _M:useEnergy(val)
mod.class.Actor.useEnergy(self, val)
if self.player and self.energy.value < game.energy_to_act then
game.paused = false
self:fireTalentCheck("callbackOnActEnd")
end
end
I am struggling a bit to come up with a good solution though. The bug itself is easily fixed by moving the fireTalentCheck outside the if block (and add a check that val > 0, I guess), that's not the problem. The problem is, I'm worried that just fixing the bug and doing nothing else... would make "take Through the Crowd and swap with summoned Wayists 200 times per game turn to kill things with Mindrot" into a viable strategy, and that is an unfun strategy that should remain unviable.