Actors always start with 100 HP displayed

Moderator: Moderator

Post Reply
Message
Author
Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Actors always start with 100 HP displayed

#1 Post by Grey »

Gets updated after a turn, but it still shouldn't ever be wrong. EtMarc says he made the following fix to engine.Actor for BOB:

Code: Select all

function _M:added()
engine.Actor.added(self)
self:calcStatEffects()
self:resetToFull()
end
-- Fill the Actor hp and mp
function _M:resetToFull()
self.hp = self.max_hp
self.mp = self.max_mp
self.changed = true
end
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

Post Reply