Bug fixes
parent
316cb14e3b
commit
15058fa7f8
|
@ -392,9 +392,10 @@ function Seeker:hit(damage, projectile)
|
|||
if self.push_invulnerable then return end
|
||||
self:show_hp()
|
||||
|
||||
local actual_damage = self:calculate_damage(damage)*(self.stun_dmg_m or 1)*(self.bane_dmg_m or 1)
|
||||
local actual_damage = math.max(self:calculate_damage(damage)*(self.stun_dmg_m or 1)*(self.bane_dmg_m or 1), 0)
|
||||
if self.vulnerable then actual_damage = actual_damage*1.2 end
|
||||
self.hp = self.hp - actual_damage
|
||||
if self.hp > self.max_hp then self.hp = self.max_hp end
|
||||
main.current.damage_dealt = main.current.damage_dealt + actual_damage
|
||||
|
||||
if projectile and projectile.spawn_critters_on_hit then
|
||||
|
|
|
@ -48,6 +48,7 @@ function engine_run(config)
|
|||
love.filesystem.setIdentity(config.game_name)
|
||||
steam.init()
|
||||
system.load_state()
|
||||
if type(state) ~= 'table' then state = {} end
|
||||
|
||||
local _, _, flags = love.window.getMode()
|
||||
local window_width, window_height = love.window.getDesktopDimensions(flags.display)
|
||||
|
|
|
@ -120,7 +120,11 @@ end
|
|||
|
||||
function system.save_state()
|
||||
if not system.does_file_exist(love.filesystem.getSaveDirectory()) then love.filesystem.createDirectory("") end
|
||||
binser.w(state_path, state or {})
|
||||
local file = io.open(state_path, "r")
|
||||
if file then
|
||||
file:close()
|
||||
binser.w(state_path, state or {})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -1438,7 +1438,7 @@ function Projectile:on_collision_enter(other, contact)
|
|||
self:die(x, y, r, 0)
|
||||
knife_hit_wall1:play{pitch = random:float(0.9, 1.1), volume = 0.2}
|
||||
local r = Unit.bounce(self, nx, ny)
|
||||
trigger:after(0.01, function()
|
||||
self.parent.t:after(0.01, function()
|
||||
WallKnife{group = main.current.main, x = x, y = y, r = r, v = self.v*0.1, color = self.color}
|
||||
end)
|
||||
if self.character == 'spellblade' then
|
||||
|
|
Loading…
Reference in New Issue