Assorted improvements

master
a327ex 2021-05-30 12:00:03 -03:00
parent e44363cc75
commit 968c09a8d9
6 changed files with 53 additions and 22 deletions

View File

@ -858,6 +858,7 @@ end
function Arena:die()
if not self.died_text and not self.won then
self.t:cancel('divine_punishment')
self.died = true
system.save_run()
self.t:tween(2, self, {main_slow_amount = 0}, math.linear, function() self.main_slow_amount = 0 end)
@ -1162,6 +1163,7 @@ function CharacterHP:draw()
graphics.pop()
if state.cooldown_snake then
if table.any(non_cooldown_characters, function(v) return v == self.parent.character end) then return end
local p = self.parent
graphics.push(p.x, p.y, 0, self.hfx.hit.x, self.hfx.hit.y)
if not p.dead then

View File

@ -118,14 +118,14 @@ function BuyScreen:on_enter(from, level, units, passives)
b.info_text:activate({
{text = '[fg]tutorial', font = pixul_font, alignment = 'center'},
}, nil, nil, nil, nil, 16, 4, nil, 2)
b.info_text.x, b.info_text.y = b.x, b.y + 16
b.info_text.x, b.info_text.y = b.x, b.y + 20
end, mouse_exit = function(b)
b.info_text:deactivate()
b.info_text.dead = true
b.info_text = nil
end}
self.restart_button = Button{group = self.ui, x = gw/2 + 156, y = 18, force_update = true, button_text = 'R', fg_color = 'bg10', bg_color = 'bg', action = function(b)
self.restart_button = Button{group = self.ui, x = gw/2 + 156, y = 18, force_update = true, hold_button = 1, button_text = 'R', fg_color = 'bg10', bg_color = 'bg', action = function(b)
self.transitioning = true
ui_transition2:play{pitch = random:float(0.95, 1.05), volume = 0.5}
ui_switch2:play{pitch = random:float(0.95, 1.05), volume = 0.5}
@ -152,7 +152,7 @@ function BuyScreen:on_enter(from, level, units, passives)
b.info_text:activate({
{text = '[fg]restart run', font = pixul_font, alignment = 'center'},
}, nil, nil, nil, nil, 16, 4, nil, 2)
b.info_text.x, b.info_text.y = b.x, b.y + 16
b.info_text.x, b.info_text.y = b.x, b.y + 20
end, mouse_exit = function(b)
b.info_text:deactivate()
b.info_text.dead = true
@ -577,14 +577,38 @@ function Button:update(dt)
self:update_game_object(dt)
if main.current.in_credits and not self.credits_button then return end
if self.selected and input.m1.pressed then
self:action()
if self.hold_button then
if self.selected and input.m1.pressed then
self.press_time = love.timer.getTime()
self.spring:pull(0.2, 200, 10)
end
if self.press_time then
if input.m1.down and love.timer.getTime() - self.press_time > self.hold_button then
self:action()
self.press_time = nil
self.spring:pull(0.1, 200, 10)
end
end
if input.m1.released then
self.press_time = nil
self.spring:pull(0.1, 200, 10)
end
else
if self.selected and input.m1.pressed then
self:action()
end
end
end
function Button:draw()
graphics.push(self.x, self.y, 0, self.spring.x, self.spring.y)
if self.hold_button and self.press_time then
graphics.set_line_width(5)
graphics.set_color(fg[-5])
graphics.arc('open', self.x, self.y, 0.6*self.shape.w, 0, math.remap(love.timer.getTime() - self.press_time, 0, self.hold_button, 0, 1)*2*math.pi)
graphics.set_line_width(1)
end
graphics.rectangle(self.x, self.y, self.shape.w, self.shape.h, 4, 4, self.selected and fg[0] or _G[self.bg_color][0])
self.text:draw(self.x, self.y + 1, 0, 1, 1)
graphics.pop()

View File

@ -749,6 +749,7 @@ function init()
}
non_attacking_characters = {'cleric', 'stormweaver', 'squire', 'chronomancer', 'sage', 'psykeeper', 'bane', 'carver', 'fairy', 'priest', 'flagellant'}
non_cooldown_characters = {'squire', 'chronomancer', 'psykeeper'}
character_tiers = {
['vagrant'] = 1,
@ -1185,18 +1186,11 @@ function init()
--[[
main:add(Arena'arena')
main:go_to('arena', 23, {
{character = 'dual_gunner', level = 3},
{character = 'engineer', level = 3},
{character = 'spellblade', level = 3},
{character = 'assassin', level = 3},
{character = 'scout', level = 3},
{character = 'engineer', level = 3},
{character = 'swordsman', level = 3},
{character = 'archer', level = 3},
{character = 'infestor', level = 3},
{character = 'host', level = 3},
{character = 'lich', level = 3},
{character = 'psykino', level = 3},
{character = 'wizard', level = 1},
{character = 'spellblade', level = 1},
{character = 'chronomancer', level = 1},
{character = 'lich', level = 1},
{character = 'psykino', level = 1},
}, passives)
]]--

View File

@ -239,8 +239,8 @@ function Unit:calculate_stats(first_run)
else
local x = self.level
local y = {0, 1, 3, 3, 4, 6, 5, 6, 9, 7, 8, 12, 10, 11, 15, 12, 13, 18, 16, 17, 21, 17, 20, 24, 25}
self.base_hp = 28 + 18*y[x]
self.base_dmg = 5 + 3*y[x]
self.base_hp = 25 + 16.5*y[x]
self.base_dmg = 4.5 + 2.5*y[x]
self.base_mvspd = 70 + 3*y[x]
end
else

View File

@ -548,7 +548,7 @@ function Player:init(args)
LightningLine{group = main.current.effects, src = {x = enemy.x, y = enemy.y - 32}, dst = enemy, color = blue[0], duration = 0.2}
_G[random:table{'spark1', 'spark2', 'spark3'}]:play{pitch = random:float(0.9, 1.1), volume = 0.3}
end
end)
end, nil, nil, 'divine_punishment')
end
if self.unwavering_stance and table.any(self.classes, function(v) return v == 'warrior' end) then

15
todo
View File

@ -1,4 +1,15 @@
Hide cursor during waves
Mouse follow control?
Bench - https://i.imgur.com/B1gNVKk.png
Item reroll for 10 gold
Item reroll for 15 gold
Option to have an arrow at the head of the snake - https://imgur.com/a/poXVsoN
Balance option for when there are more sets - https://i.imgur.com/JMynwbL.png
Bench? - https://i.imgur.com/B1gNVKk.png
Patch Notes:
Decreased projectile speed for the exploder (blue enemy)
Added tooltips for "restart run" and "tutorial" buttons on the shop
Added a hold mechanism to the restart button, now it will only trigger a restart if you hold the button down for 1 second
Fixed text that was going outside the screen for the Priest and the Assassin
Fixed bug where Divine Punishment would continue triggering after death
Removed cooldown visuals on snake for units that don't have cooldowns (Squire, Chronomancer and Psykeeper)
Slightly decreased base game's difficulty