Sorcerer update 3/4

master
a327ex 2021-06-04 01:05:59 -03:00
parent f3997b08a7
commit 521ce0cca5
6 changed files with 56 additions and 40 deletions

View File

@ -265,6 +265,8 @@ function Arena:on_enter(from, level, units, passives)
if self.arena_clear_text then return end if self.arena_clear_text then return end
if self.quitting then return end if self.quitting then return end
if self.spawning_enemies then return end if self.spawning_enemies then return end
if self.won then return end
if self.choosing_passives then return end
local n = self.enemy_spawns_prevented local n = self.enemy_spawns_prevented
if math.floor(n/4) <= 0 then return end if math.floor(n/4) <= 0 then return end
@ -327,7 +329,7 @@ function Arena:update(dt)
-- print(self.enemy_spawns_prevented) -- print(self.enemy_spawns_prevented)
if input.escape.pressed and not self.transitioning and not self.in_credits then if input.escape.pressed and not self.transitioning and not self.in_credits and not self.choosing_passives then
if not self.paused then if not self.paused then
trigger:tween(0.25, _G, {slow_amount = 0}, math.linear, function() trigger:tween(0.25, _G, {slow_amount = 0}, math.linear, function()
slow_amount = 0 slow_amount = 0
@ -381,6 +383,7 @@ function Arena:update(dt)
} }
max_units = 7 + current_new_game_plus max_units = 7 + current_new_game_plus
main:add(BuyScreen'buy_screen') main:add(BuyScreen'buy_screen')
locked_state = nil
system.save_run() system.save_run()
main:go_to('buy_screen', 0, {}, passives) main:go_to('buy_screen', 0, {}, passives)
end, text = Text({{text = '[wavy, bg]restarting...', font = pixul_font, alignment = 'center'}}, global_text_tags)} end, text = Text({{text = '[wavy, bg]restarting...', font = pixul_font, alignment = 'center'}}, global_text_tags)}
@ -521,6 +524,7 @@ function Arena:update(dt)
} }
max_units = 7 + current_new_game_plus max_units = 7 + current_new_game_plus
main:add(BuyScreen'buy_screen') main:add(BuyScreen'buy_screen')
locked_state = nil
system.save_run() system.save_run()
main:go_to('buy_screen', 0, {}, passives) main:go_to('buy_screen', 0, {}, passives)
end, text = Text({{text = '[wavy, bg]restarting...', font = pixul_font, alignment = 'center'}}, global_text_tags)} end, text = Text({{text = '[wavy, bg]restarting...', font = pixul_font, alignment = 'center'}}, global_text_tags)}
@ -550,10 +554,13 @@ end
function Arena:quit() function Arena:quit()
if self.died then return end
self.quitting = true self.quitting = true
if self.level == 25 then if self.level == 25 then
if not self.win_text and not self.win_text2 then if not self.win_text and not self.win_text2 then
self.won = true self.won = true
locked_state = nil
system.save_run() system.save_run()
trigger:tween(1, _G, {slow_amount = 0}, math.linear, function() slow_amount = 0 end, 'slow_amount') trigger:tween(1, _G, {slow_amount = 0}, math.linear, function() slow_amount = 0 end, 'slow_amount')
trigger:tween(4, camera, {x = gw/2, y = gh/2, r = 0}, math.linear, function() camera.x, camera.y, camera.r = gw/2, gh/2, 0 end) trigger:tween(4, camera, {x = gw/2, y = gh/2, r = 0}, math.linear, function() camera.x, camera.y, camera.r = gw/2, gh/2, 0 end)
@ -880,9 +887,10 @@ end
function Arena:die() function Arena:die()
if not self.died_text and not self.won then if not self.died_text and not self.won and not self.arena_clear_text then
self.t:cancel('divine_punishment') self.t:cancel('divine_punishment')
self.died = true self.died = true
locked_state = nil
system.save_run() system.save_run()
self.t:tween(2, self, {main_slow_amount = 0}, math.linear, function() self.main_slow_amount = 0 end) self.t:tween(2, self, {main_slow_amount = 0}, math.linear, function() self.main_slow_amount = 0 end)
self.died_text = Text2{group = self.ui, x = gw/2, y = gh/2 - 32, lines = { self.died_text = Text2{group = self.ui, x = gw/2, y = gh/2 - 32, lines = {
@ -916,6 +924,7 @@ function Arena:die()
end, text = Text({{text = '[wavy, bg]restarting...', font = pixul_font, alignment = 'center'}}, global_text_tags)} end, text = Text({{text = '[wavy, bg]restarting...', font = pixul_font, alignment = 'center'}}, global_text_tags)}
end} end}
end) end)
return true
end end
end end
@ -988,8 +997,8 @@ function Arena:transition()
TransitionEffect{group = main.transitions, x = self.player.x, y = self.player.y, color = self.color, transition_action = function(t) TransitionEffect{group = main.transitions, x = self.player.x, y = self.player.y, color = self.color, transition_action = function(t)
slow_amount = 1 slow_amount = 1
main:add(BuyScreen'buy_screen') main:add(BuyScreen'buy_screen')
system.save_run(self.level, gold, self.units, passives, run_passive_pool_by_tiers, locked_state) system.save_run(self.level, gold, self.units, self.passives, run_passive_pool_by_tiers, locked_state)
main:go_to('buy_screen', self.level, self.units, passives) main:go_to('buy_screen', self.level, self.units, self.passives)
t.t:after(0.1, function() t.t:after(0.1, function()
t.text:set_text({ t.text:set_text({
{text = '[nudge_down, bg]gold gained: ' .. tostring(gold_gained), font = pixul_font, alignment = 'center', height_multiplier = 1.5}, {text = '[nudge_down, bg]gold gained: ' .. tostring(gold_gained), font = pixul_font, alignment = 'center', height_multiplier = 1.5},
@ -1115,6 +1124,8 @@ function Arena:spawn_n_enemies(p, j, n, pass)
if self.died then return end if self.died then return end
if self.arena_clear_text then return end if self.arena_clear_text then return end
if self.quitting then return end if self.quitting then return end
if self.won then return end
if self.choosing_passives then return end
if n and n <= 0 then return end if n and n <= 0 then return end
j = j or 1 j = j or 1

View File

@ -116,7 +116,7 @@ function BuyScreen:on_enter(from, level, units, passives)
end, mouse_enter = function(b) end, mouse_enter = function(b)
b.info_text = InfoText{group = main.current.ui, force_update = true} b.info_text = InfoText{group = main.current.ui, force_update = true}
b.info_text:activate({ b.info_text:activate({
{text = '[fg]tutorial', font = pixul_font, alignment = 'center'}, {text = '[fg]guide', font = pixul_font, alignment = 'center'},
}, nil, nil, nil, nil, 16, 4, nil, 2) }, nil, nil, nil, nil, 16, 4, nil, 2)
b.info_text.x, b.info_text.y = b.x, b.y + 20 b.info_text.x, b.info_text.y = b.x, b.y + 20
end, mouse_exit = function(b) end, mouse_exit = function(b)
@ -733,7 +733,7 @@ function LockButton:update(dt)
if not self.parent.locked then locked_state = nil end if not self.parent.locked then locked_state = nil end
if self.parent.locked then if self.parent.locked then
locked_state = {locked = true, cards = {self.parent.cards[1] and self.parent.cards[1].unit, self.parent.cards[2] and self.parent.cards[2].unit, self.parent.cards[3] and self.parent.cards[3].unit}} locked_state = {locked = true, cards = {self.parent.cards[1] and self.parent.cards[1].unit, self.parent.cards[2] and self.parent.cards[2].unit, self.parent.cards[3] and self.parent.cards[3].unit}}
system.save_run(self.parent.level, gold, self.parent.units, passives, run_passive_pool_by_tiers, locked_state) system.save_run(self.parent.level == 1 and 0 or self.parent.level, gold, self.parent.units, passives, run_passive_pool_by_tiers, locked_state)
end end
ui_switch2:play{pitch = random:float(0.95, 1.05), volume = 0.5} ui_switch2:play{pitch = random:float(0.95, 1.05), volume = 0.5}
self.selected = true self.selected = true
@ -802,7 +802,7 @@ function RerollButton:update(dt)
self.spring:pull(0.2, 200, 10) self.spring:pull(0.2, 200, 10)
gold = gold - 2 gold = gold - 2
self.parent.shop_text:set_text{{text = '[wavy_mid, fg]shop [fg]- [fg, nudge_down]gold: [yellow, nudge_down]' .. gold, font = pixul_font, alignment = 'center'}} self.parent.shop_text:set_text{{text = '[wavy_mid, fg]shop [fg]- [fg, nudge_down]gold: [yellow, nudge_down]' .. gold, font = pixul_font, alignment = 'center'}}
system.save_run(self.parent.level, gold, self.parent.units, passives, run_passive_pool_by_tiers, locked_state) system.save_run(self.parent.level == 1 and 0 or self.parent.level, gold, self.parent.units, passives, run_passive_pool_by_tiers, locked_state)
end end
end end
end end
@ -1107,6 +1107,7 @@ function PassiveCard:update(dt)
if self.selected and input.m1.pressed and self.arena.choosing_passives then if self.selected and input.m1.pressed and self.arena.choosing_passives then
self.arena.choosing_passives = false self.arena.choosing_passives = false
table.insert(passives, self.passive) table.insert(passives, self.passive)
table.insert(self.arena.passives, self.passive)
self.arena:restore_passives_to_pool(self.card_i) self.arena:restore_passives_to_pool(self.card_i)
trigger:tween(0.25, _G, {slow_amount = 1}, math.linear, function() trigger:tween(0.25, _G, {slow_amount = 1}, math.linear, function()
slow_amount = 1 slow_amount = 1
@ -1242,7 +1243,7 @@ function ShopCard:update(dt)
_G[random:table{'coins1', 'coins2', 'coins3'}]:play{pitch = random:float(0.95, 1.05), volume = 0.5} _G[random:table{'coins1', 'coins2', 'coins3'}]:play{pitch = random:float(0.95, 1.05), volume = 0.5}
self:die() self:die()
self.parent.cards[self.i] = nil self.parent.cards[self.i] = nil
system.save_run(self.parent.level, gold, self.parent.units, passives, run_passive_pool_by_tiers, locked_state) system.save_run(self.parent.level == 1 and 0 or self.parent.level, gold, self.parent.units, passives, run_passive_pool_by_tiers, locked_state)
else else
error1:play{pitch = random:float(0.95, 1.05), volume = 0.5} error1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
self.spring:pull(0.2, 200, 10) self.spring:pull(0.2, 200, 10)

View File

@ -479,9 +479,11 @@ function Seeker:hit(damage, projectile)
if self.infested then if self.infested then
critter1:play{pitch = random:float(0.95, 1.05), volume = 0.5} critter1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
trigger:after(0.01, function() trigger:after(0.01, function()
if type(self.infested) == 'number' then
for i = 1, self.infested do for i = 1, self.infested do
Critter{group = main.current.main, x = self.x, y = self.y, color = orange[0], r = random:float(0, 2*math.pi), v = 10, dmg = self.infested_dmg, parent = self.infested_ref} Critter{group = main.current.main, x = self.x, y = self.y, color = orange[0], r = random:float(0, 2*math.pi), v = 10, dmg = self.infested_dmg, parent = self.infested_ref}
end end
end
end) end)
end end

View File

@ -1389,10 +1389,6 @@ function update(dt)
state.fullscreen = false state.fullscreen = false
end end
if input.p.pressed then
system.save_state()
end
--[[ --[[
if input.f12.pressed then if input.f12.pressed then
steam.userStats.resetAllStats(true) steam.userStats.resetAllStats(true)

View File

@ -1212,11 +1212,14 @@ function Player:hit(damage)
else else
hit4:play{pitch = random:float(0.95, 1.05), volume = 0.5} hit4:play{pitch = random:float(0.95, 1.05), volume = 0.5}
slow(0.25, 1) slow(0.25, 1)
self.dead = true
for i = 1, random:int(4, 6) do HitParticle{group = main.current.effects, x = self.x, y = self.y, color = self.color} end for i = 1, random:int(4, 6) do HitParticle{group = main.current.effects, x = self.x, y = self.y, color = self.color} end
HitCircle{group = main.current.effects, x = self.x, y = self.y, rs = 12}:scale_down(0.3):change_color(0.5, self.color) HitCircle{group = main.current.effects, x = self.x, y = self.y, rs = 12}:scale_down(0.3):change_color(0.5, self.color)
if self.leader and #self.followers == 0 then if self.leader and #self.followers == 0 then
main.current:die() if main.current:die() then
self.dead = true
else
self.hp = 1
end
else else
if self.leader then self:recalculate_followers() if self.leader then self:recalculate_followers()
else self.parent:recalculate_followers() end else self.parent:recalculate_followers() end
@ -1669,7 +1672,7 @@ function Projectile:die(x, y, r, n)
self.dead = true self.dead = true
if self.character == 'wizard' then if self.character == 'wizard' then
Area{group = main.current.effects, x = self.x, y = self.y, r = self.r, w = self.parent.area_size_m*32, color = self.color, dmg = self.parent.area_dmg_m*self.dmg, character = self.character, level = self.level, parent = self, Area{group = main.current.effects, x = self.x, y = self.y, r = self.r, w = self.parent.area_size_m*24, color = self.color, dmg = self.parent.area_dmg_m*self.dmg, character = self.character, level = self.level, parent = self,
void_rift = self.parent.void_rift, echo_barrage = self.parent.echo_barrage} void_rift = self.parent.void_rift, echo_barrage = self.parent.echo_barrage}
elseif self.character == 'blade' then elseif self.character == 'blade' then
Area{group = main.current.effects, x = self.x, y = self.y, r = self.r, w = self.parent.area_size_m*64, color = self.color, dmg = self.parent.area_dmg_m*self.dmg, character = self.character, level = self.level, parent = self, Area{group = main.current.effects, x = self.x, y = self.y, r = self.r, w = self.parent.area_size_m*64, color = self.color, dmg = self.parent.area_dmg_m*self.dmg, character = self.character, level = self.level, parent = self,

49
todo
View File

@ -11,39 +11,30 @@ Sorcerer update
Rename tutorial to guide or manual Rename tutorial to guide or manual
Add visuals for defensive ouroboros Add visuals for defensive ouroboros
Unlock automatically on shop enter Unlock automatically on shop enter
Bug fixes
Headbutter damage should falloff faster after it strikes
https://i.imgur.com/QN0Ntq2.png
https://i.imgur.com/YfhqDYr.png
https://i.imgur.com/ps4OA7o.png
https://i.imgur.com/j1LS3zt.png
https://i.imgur.com/XXJn4uW.png
Fix bug where quitting on level 1 jumps to level 2
Fix lock bug after death/win - https://i.imgur.com/iUyOtLk.png
Fix enemies still spawning after arena clear (this happens with the extra enemy spawns that were blocked earlier)
Fix death + win at the same time bug
Fix leader distance being off on certain speeds
Balance Balance
Buff tanks, maybe add a simple forcer ability to them Buff tanks, maybe add a simple forcer ability to them
Buff 24/25 HP again Buff 24/25 HP again
Buff headbutter (+ trigger range) Buff headbutter (+ trigger range)
* New Bugs
* Sorcerer = sorcerers repeat their attacks once every 4/3/2 attacks Fix leader (snake head) distance being off by 1 or 2 pixels on certain snake speeds
* Arcanist (tier 1 sorcerer) - launches a slow piercing orb that launches other piercing projectiles, Lv.3 effect - 50% increased attack speed for the orb and 2 projectiles are released per cast
* Sorcerer + Conjurer = Illusionist - launches a projectile that deals X damage and creates copies that do the same, Lv.3 effect - doubles the number of copies created and they release 12 projectiles on death that pierce and ricochet once
* Sorcerer + Voider = Witch - creates an area that ricochets around the arena and deals X damage over time, Lv.3 effect - the area periodically releases projectiles that chain once
* Sorcerer + Curser = Silencer - curses 6 nearby enemies for 6 seconds, preventing them from using special attacks, Lv.3 effect - the curse also deals X damage over time
* Sorcerer + Nuker = Vulcanist - creates a volcano that explodes the nearby area 4 times, Lv.3 effect - the number and speed of explosions is doubled
* Sorcerer + Forcer = Warden - creates a force field around a random unit that prevents enemies from entering, Lv.3 effect - creates the force field around 2 units instead
* Sorcerer + Psyker = Psychic - creates a small area that deals X damage, Lv.3 effect - the attack can happen from any distance and repeats twice
* Magician (tier 1 mage) - creates a small area that deals X damage, Lv.3 effect - the magician becomes invulnerable for 6 seconds
Sorcerer update patch notes Sorcerer update patch notes
Summary: This update adds 1 new class with 8 new units, implements more QoL features, further balance changes and lots of bug fixes.
Added sorcerer class: sorcerers repeat their attacks once every 4/3/2 attacks
Added 8 new units:
Arcanist (tier 1 sorcerer) - launches a slow piercing orb that launches other piercing projectiles, Lv.3 effect - 50% increased attack speed for the orb and 2 projectiles are released per cast
Illusionist (tier 3 sorcerer, conjurer) - launches a projectile that deals X damage and creates copies that do the same, Lv.3 effect - doubles the number of copies created and they release 12 projectiles on death that pierce and ricochet once
Witch (tier 2 sorcerer, voider) - creates an area that ricochets around the arena and deals X damage over time, Lv.3 effect - the area periodically releases projectiles that chain once
Silencer (tier 2 sorcerer, curser) - curses 6 nearby enemies for 6 seconds, preventing them from using special attacks, Lv.3 effect - the curse also deals X damage over time
Vulcanist (tier 4 sorcerer, nuker) - creates a volcano that explodes the nearby area 4 times, Lv.3 effect - the number and speed of explosions is doubled
Warden (tier 4 sorcerer, forcer) - creates a force field around a random unit that prevents enemies from entering, Lv.3 effect - creates the force field around 2 units instead
Psychic (tier 2 sorcerer, psyker) - creates a small area that deals X damage, Lv.3 effect - the attack can happen from any distance and repeats twice
Magician (tier 1 mage) - creates a small area that deals X damage, Lv.3 effect - the magician becomes invulnerable for 6 seconds
Changed cursers to trigger only when near enemies Changed cursers to trigger only when near enemies
Decreased projectile speed for the exploder (blue enemy) Decreased projectile speed for the exploder (blue enemy)
Changed shooters (white enemy) to scale with NG+ difficulty Changed shooters (white enemy) to scale with NG+ difficulty
Increased damage and movement speed for enemy swarmers (small purple enemies) Increased damage and movement speed for enemy swarmers (small purple enemies)
Added tooltips for "restart run" and "tutorial" buttons on the shop Added tooltips for "restart run" and "guide" buttons on the shop
Fixed text that was going outside the screen for the Priest and the Assassin Fixed text that was going outside the screen for the Priest and the Assassin
Fixed bug where Divine Punishment would continue triggering after death 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) Removed cooldown visuals on snake for units that don't have cooldowns (Squire, Chronomancer and Psykeeper)
@ -61,6 +52,15 @@ Sorcerer update patch notes
Added Nuker class to Wizard Added Nuker class to Wizard
Change Wizard's Lv.3 effect's chain to 2 (from 3) Change Wizard's Lv.3 effect's chain to 2 (from 3)
Fixed Blade's Lv.3 effect's damage text not being rounded Fixed Blade's Lv.3 effect's damage text not being rounded
Fixed headbutter (orange enemy) damage buff lasting too long after an attack
Fixed a crash whenever the Fairy would try to select a unit that just died this or last frame
Fixed a crash that would happen when trying to restart the game through the menu on the passive selection screen
Fixed a bug where you could die and win at the same time
Fixed a crash triggered by infested enemies on death rarely
Fixed a bug where quitting on level 1 would automatically jump to level 2
Fixed a bug where lock state would carry over after a run death/win/restart
Fixed a bug where items from a previous restarted run would remain after the 1st round
--- ---
@ -71,6 +71,8 @@ Trappers:
Triangler - drops a trap and the 3rd trap will trigger the area, dealing X AoE damage 2-3 times Triangler - drops a trap and the 3rd trap will trigger the area, dealing X AoE damage 2-3 times
Brawlers: units focused on crashing on enemies Brawlers: units focused on crashing on enemies
https://i.imgur.com/5YubukS.png - unit idea https://i.imgur.com/5YubukS.png - unit idea
Conjurer unit that creates an unit that actively protects you from enemy projectiles
Passive that makes critters and summons block enemy projectiles
Hexblaster? - curser that consumes curses to deal damage Hexblaster? - curser that consumes curses to deal damage
Bench? - https://i.imgur.com/B1gNVKk.png Bench? - https://i.imgur.com/B1gNVKk.png
Balance option for when there are more sets - https://i.imgur.com/JMynwbL.png Balance option for when there are more sets - https://i.imgur.com/JMynwbL.png
@ -80,6 +82,7 @@ Remove level 3 units from rotation
Hide cursor during waves Hide cursor during waves
Mouse follow control? Mouse follow control?
Visuals for divine intervertion, fairy buff Visuals for divine intervertion, fairy buff
Fix enemies still spawning after arena clear (this happens with the extra enemy spawns that were blocked earlier)
Roguelite update: Roguelite update:
Slay the Spire-like node selection map (copy code from SHOOTRX repo as this is already implemented there) Slay the Spire-like node selection map (copy code from SHOOTRX repo as this is already implemented there)