From 1c4281352167c311046651165de2fcdbb3504649 Mon Sep 17 00:00:00 2001 From: a327ex Date: Sun, 25 Jul 2021 11:50:13 -0300 Subject: [PATCH] Maintenance update 3 --- arena.lua | 10 ---------- buy_screen.lua | 12 ------------ enemies.lua | 10 +--------- main.lua | 4 ---- player.lua | 10 +++++----- todo | 1 - 6 files changed, 6 insertions(+), 41 deletions(-) diff --git a/arena.lua b/arena.lua index 4113d89..c09d0cb 100644 --- a/arena.lua +++ b/arena.lua @@ -104,8 +104,6 @@ function Arena:on_enter(from, level, loop, units, passives, shop_level, shop_xp, if self.level == 1000 then self.level_1000_text = Text2{group = self.ui, x = gw/2, y = gh/2, lines = {{text = '[fg, wavy_mid]SNKRX', font = fat_font, alignment = 'center'}}} - -- self.level_1000_text2 = Text2{group = self.ui, x = gw/2, y = gh/2 + 64, lines = {{text = '[fg, wavy_mid]SNKRX', font = pixul_font, alignment = 'center'}}} - -- Wall{group = self.main, vertices = math.to_rectangle_vertices(gw/2 - 0.45*self.level_1000_text.w, gh/2 - 0.3*self.level_1000_text.h, gw/2 + 0.45*self.level_1000_text.w, gh/2 - 3), snkrx = true, color = bg[-1]} elseif (self.level - (25*self.loop)) % 6 == 0 or self.level % 25 == 0 then self.boss_level = true @@ -254,17 +252,9 @@ function Arena:on_enter(from, level, loop, units, passives, shop_level, shop_xp, local t1 = Text2{group = self.floor, x = gw/2, y = gh/2 + 2, sx = 0.6, sy = 0.6, lines = {{text = '[light_bg]<- or a -> or d', font = fat_font, alignment = 'center'}}} local t2 = Text2{group = self.floor, x = gw/2, y = gh/2 + 18, lines = {{text = '[light_bg]turn left turn right', font = pixul_font, alignment = 'center'}}} local t3 = Text2{group = self.floor, x = gw/2, y = gh/2 + 46, sx = 0.6, sy = 0.6, lines = {{text = '[light_bg]esc - options', font = fat_font, alignment = 'center'}}} - --[[ - local t4 = Text2{group = self.floor, x = gw/2, y = gh/2 + 68, sx = 0.6, sy = 0.6, lines = {{text = '[light_bg]n - mute sfx', font = fat_font, alignment = 'center'}}} - local t5 = Text2{group = self.floor, x = gw/2, y = gh/2 + 90, sx = 0.6, sy = 0.6, lines = {{text = '[light_bg]m - mute music', font = fat_font, alignment = 'center'}}} - ]]-- t1.t:after(8, function() t1.t:tween(0.2, t1, {sy = 0}, math.linear, function() t1.sy = 0 end) end) t2.t:after(8, function() t2.t:tween(0.2, t2, {sy = 0}, math.linear, function() t2.sy = 0 end) end) t3.t:after(8, function() t3.t:tween(0.2, t3, {sy = 0}, math.linear, function() t3.sy = 0 end) end) - --[[ - t4.t:after(8, function() t4.t:tween(0.2, t4, {sy = 0}, math.linear, function() t4.sy = 0 end) end) - t5.t:after(8, function() t4.t:tween(0.2, t5, {sy = 0}, math.linear, function() t5.sy = 0 end) end) - ]]-- end -- Calculate class levels diff --git a/buy_screen.lua b/buy_screen.lua index 3548461..dc6dfa6 100644 --- a/buy_screen.lua +++ b/buy_screen.lua @@ -170,18 +170,6 @@ function BuyScreen:on_enter(from, level, loop, units, passives, shop_level, shop trigger:tween(1, main_song_instance, {volume = 0.2, pitch = 1}, math.linear) - --[[ - if self.level == 1 then - self.screen_text = Text2{group = self.ui, x = gw/2, y = gh/2, lines = { - {text = '[bg3]press K if screen is too large', font = pixul_font, alignment = 'center'}, - {text = '[bg3]press L if screen is too small', font = pixul_font, alignment = 'center'}, - }} - self.t:after(8, function() - self.t:tween(0.2, self.screen_text, {sy = 0}, math.linear, function() self.screen_text.sy = 0 end) - end) - end - ]]-- - locked_state = {locked = self.locked, cards = {self.cards[1] and self.cards[1].unit, self.cards[2] and self.cards[2].unit, self.cards[3] and self.cards[3].unit}} system.save_run(self.level, self.loop, gold, self.units, self.passives, self.shop_level, self.shop_xp, run_passive_pool, locked_state) end diff --git a/enemies.lua b/enemies.lua index 22053b5..61f9c81 100644 --- a/enemies.lua +++ b/enemies.lua @@ -170,15 +170,6 @@ function Seeker:init(args) self:set_as_steerable(self.v, 2000, 4*math.pi, 4) end - --[[ - if random:bool(35) then - local n = random:int(1, 3) - self.speed_booster = n == 1 - self.exploder = n == 2 - self.headbutter = n == 3 - end - ]]-- - if self.speed_booster then self.color = green[0]:clone() self.area_sensor = Circle(self.x, self.y, 128) @@ -604,6 +595,7 @@ function Seeker:hit(damage, projectile, dot, from_enemy) if pyrod then trigger:after(0.01, function() + if not main.current.main.world then return end Area{group = main.current.main, x = self.x, y = self.y, color = red[0], w = 32*pyrod.parent.area_size_m, r = random:float(0, 2*math.pi), dmg = pyrod.parent.area_dmg_m*pyrod.dmg, character = pyrod.character, level = pyrod.level, parent = pyrod.parent} end) diff --git a/main.lua b/main.lua index 384f3e1..65a6cc9 100644 --- a/main.lua +++ b/main.lua @@ -14,10 +14,6 @@ function init() input:bind('move_left', {'a', 'left', 'dpleft', 'm1'}) input:bind('move_right', {'d', 'e', 's', 'right', 'dpright', 'm2'}) - --[[ - input:bind('move_up', {'w', 'up', 'dpup'}) - input:bind('move_down', {'s', 'down', 'dpdown'}) - ]]-- input:bind('enter', {'space', 'return', 'fleft', 'fdown', 'fright'}) local s = {tags = {sfx}} diff --git a/player.lua b/player.lua index b397a03..da29bda 100644 --- a/player.lua +++ b/player.lua @@ -681,10 +681,10 @@ function Player:init(args) local units = self:get_all_units() local unit_1 = random:table(units) local runs = 0 - while table.any(non_attacking_characters, function(v) return v == unit_1 end) and runs < 1000 do unit_1 = random:table(units); runs = runs + 1 end + while table.any(non_attacking_characters, function(v) return v == unit_1.character end) and runs < 1000 do unit_1 = random:table(units); runs = runs + 1 end local unit_2 = random:table(units) local runs = 0 - while table.any(non_attacking_characters, function(v) return v == unit_2 end) and runs < 1000 do unit_2 = random:table(units); runs = runs + 1 end + while table.any(non_attacking_characters, function(v) return v == unit_2.character end) and runs < 1000 do unit_2 = random:table(units); runs = runs + 1 end if unit_1 then unit_1.fairy_aspd_m = 3 unit_1.fairyd = true @@ -716,7 +716,7 @@ function Player:init(args) else local unit = random:table(self:get_all_units()) local runs = 0 - while table.any(non_attacking_characters, function(v) return v == unit end) and runs < 1000 do unit = random:table(self:get_all_units()); runs = runs + 1 end + while table.any(non_attacking_characters, function(v) return v == unit.character end) and runs < 1000 do unit = random:table(self:get_all_units()); runs = runs + 1 end if unit then unit.fairyd = true unit.fairy_aspd_m = 2 @@ -925,7 +925,7 @@ function Player:init(args) end local mage = random:table(mages) local runs = 0 - while table.any(non_attacking_characters, function(v) return v == mage end) and runs < 1000 do mage = random:table(mages); runs = runs + 1 end + while table.any(non_attacking_characters, function(v) return v == mage.character end) and runs < 1000 do mage = random:table(mages); runs = runs + 1 end if mage then mage.awakening_aspd_m = (self.awakening == 1 and 1.5) or (self.awakening == 2 and 1.75) or (self.awakening == 3 and 2) mage.awakening_dmg_m = (self.awakening == 1 and 1.5) or (self.awakening == 2 and 1.75) or (self.awakening == 3 and 2) @@ -1011,7 +1011,7 @@ function Player:init(args) if enchanter_amount >= 2 then local unit = random:table(units) local runs = 0 - while table.any(non_attacking_characters, function(v) return v == unit end) and runs < 1000 do unit = random:table(units); runs = runs + 1 end + while table.any(non_attacking_characters, function(v) return v == unit.character end) and runs < 1000 do unit = random:table(units); runs = runs + 1 end unit.enchanted_aspd_m = (self.enchanted == 1 and 1.33) or (self.enchanted == 2 and 1.66) or (self.enchanted == 3 and 1.99) end end) diff --git a/todo b/todo index 111ec18..d24b9df 100644 --- a/todo +++ b/todo @@ -21,7 +21,6 @@ Weekly maintenance updates: While in the item selection screen: * R rerolls items * 1, 2, 3, 4 buys items - * Credit yongminparks #2