158
159
160
161
162
163
164
165
166
167
168
169
170
171
...
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
|
uiColor = function(self) return lib.color {hue=238,sat=.5,lum=.5} end;
-----------
-- stats --
-----------
statDelta = function(self, stat, d, cause, abs)
local dt = self.persona.statDeltas
local min, max, base = self:statRange(stat)
if abs then
if d == true then d = max
elseif d == false then d = min end
end
if stat == 'health' then
................................................................................
dropInv 'main'
dropInv 'starlit_suit'
self:updateSuit()
end;
onRespawn = function(self)
local meta = self.entity:get_meta()
self.entity:set_pos(vector.from_string(meta:get_string'starlit_spawn'))
self:statDelta('psi', 0, 'death', true)
self:statDelta('nutrition', 1500, 'death', true)
self:statDelta('hydration', 2, 'death', true)
self:statDelta('fatigue', 0, 'death', true)
self:statDelta('stamina', 0, 'death', true)
self:updateSuit()
return true
end;
|
|
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
...
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
|
uiColor = function(self) return lib.color {hue=238,sat=.5,lum=.5} end;
-----------
-- stats --
-----------
statDelta = function(self, stat, d, cause, abs)
if self.entity:get_hp() == 0 then return end
local dt = self.persona.statDeltas
local min, max, base = self:statRange(stat)
if abs then
if d == true then d = max
elseif d == false then d = min end
end
if stat == 'health' then
................................................................................
dropInv 'main'
dropInv 'starlit_suit'
self:updateSuit()
end;
onRespawn = function(self)
local meta = self.entity:get_meta()
self.entity:set_pos(vector.from_string(meta:get_string'starlit_spawn'))
self:statDelta('numina', 0, 'death', true)
self:statDelta('nutrition', 1500, 'death', true)
self:statDelta('hydration', 2, 'death', true)
self:statDelta('fatigue', 0, 'death', true)
self:statDelta('stamina', 0, 'death', true)
self:updateSuit()
return true
end;
|