diff --git a/vacuum_gambit.p8 b/vacuum_gambit.p8 index df5c5eb..082694e 100644 --- a/vacuum_gambit.p8 +++ b/vacuum_gambit.p8 @@ -612,30 +612,25 @@ end function ship_m:hitsomething(dmg) if (dmg <= 0) return false self.shield_refresh_ready = lframe + self.shieldpenalty - if self.shield >= dmg then + if self.shield > 0 then self.shield -= dmg - self:ow(true) + if self.shield > 0 then + blip(self,12) + else + self.shield = 0 + blip(self,9) + end return false end - dmg -= self.shield - self.shield = 0 self.hp -= dmg if self.hp < 0 then self:die() return true end - self:ow(false) + blip(self, 7) return false end -function ship_m:ow(shielded) - if (shielded) then - blip(self,12,3) - return - end - blip(self, 7, 3) -end - function ship_m:refresh_shield() if (self.shield >= self.maxshield) return if (lframe < self.shield_refresh_ready) return @@ -1625,10 +1620,10 @@ function init_blip_pals() end end -function blip(obj, col, frames) +function blip(obj, col) obj.fx_pal = blip_pals[col] if (obj.___fx_pal_event) obj.___fx_pal_event:abort() - events:push_back(blip_fx.new{frames=frames, obj=obj}) + events:push_back(blip_fx.new{frames=3, obj=obj}) end bossspark = split"7,7,10,10,9,9,9,8,8,8,2,2,5,5"