master
a327ex 2021-04-14 21:02:57 -03:00
parent 15dfd5a1c5
commit ef194d5476
6 changed files with 300 additions and 95 deletions

Binary file not shown.

View File

@ -923,3 +923,39 @@ Still slow... But I got something done :)
| Bane | Nightmare | the area also deals X damage per second and slows enemies by 50% |
| Psykino | Magnetic Force | enemies take 4X damage and are pushed away when the area expires |
| Barrager | Barrage | every 3rd attack the barrage shoots 15 projectiles and they push harder |
# Day 57 - 14/04/21
Finished remaining 5 characters and revised all class bonuses. So 40/40 characters and 13/13 classes done. Now the only thing left are items and then all content will be done.
| Character | Classes | Description |
| --- | --- | --- |
| Highlander | warrior | deals 5X AoE damage |
| Fairy | enchanter, healer | periodically heals 1 unit at random and grants it +100% attack speed for 6 seconds |
| Priest | healer | heals all allies for 20% their max HP |
| Infestor | curser, swarmer | curses nearby enemies for 6 seconds, they will release 2 critters on death |
| Flagellant | enchanter, psyker | deals 2X damage to self and grants +4% damage to all allies per cast |
| Character | Lv.3 Effect Name | Lv.3 Effect Description |
| --- | --- | --- |
| Highlander | Moulinet | quickly repeats the attack 3 times |
| Fairy | Whimsy | heals 2 units instead and grants them an additional 100% attack speed |
| Priest | Divine Intervention | at the start of the round pick 3 units at random and grants them a buff that prevents death once |
| Infestor | Infestation | triples the number of critters released |
| Flagellant | Zealotry | deals 2X damage to all allies and grants +12% damage to all allies per cast |
| Class | Set Color | Set Numbers | Total Units | Set Effect |
| --- | --- | --- | --- | --- |
| Ranger | green | 3/6 | 7 | +10/20% chance to release a barrage to allied rangers |
| Warrior | yellow | 3/6 | 8 | +25/50 defense to allied warriors |
| Mage | blue | 3/6 | 8 | -15/30 enemy defense |
| Rogue | red | 3/6 | 8 | +10/20% chance to crit to allied rogues, dealing 4x damage |
| Healer | green | 2/4 | 5 | +15/30% healing effectiveness |
| Enchanter | blue/red | 2/4 | 5 | +15/25% damage to all allies |
| Nuker | blue/purple | 3/6 | 7 | +15/25% area damage and size to allied nukers |
| Conjurer | orange | 2/4 | 4 | +25/50% summon damage and duration |
| Psyker | white | 2/4 | 4 | +5/10% damage and attack speed per active set to allied psykers |
| Curser | purple | 2/4 | 5 | +25/50% curse dueration |
| Forcer | yellow | 2/4 | 5 | +25/50% knockback force to all allies |
| Swarmer | orange | 2/4 | 4 | +1/3 health to critters |
| Voider | purple | 2/4 | 5 | +15/25% DoT to allied voiders |

View File

@ -430,6 +430,15 @@ function Seeker:hit(damage, projectile)
end
end)
end
if self.infested then
critter1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
trigger:after(0.01, function()
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}
end
end)
end
end
end
@ -461,17 +470,27 @@ function Seeker:slow(amount, duration)
end
function Seeker:curse(curse, duration, arg1)
function Seeker:curse(curse, duration, arg1, arg2)
local curse_m = 1
if main.current.curser_level == 2 then curse_m = 1.5
elseif main.current.curser_level == 1 then curse_m = 1.25
else curse_m = 1 end
if curse == 'launcher' then
self.t:after(duration, function()
self.t:after(duration*curse_m, function()
self.launcher_push = arg1
self:push(random:float(50, 75), random:table{0, math.pi, math.pi/2, -math.pi/2})
self.launcher = arg2
self:push(random:float(50, 75)*self.launcher.knockback_m, random:table{0, math.pi, math.pi/2, -math.pi/2})
end, 'launcher_curse')
elseif curse == 'bard' then
self.bard_cursed = true
elseif curse == 'bane' then
self.baned = true
self.t:after(duration, function() self.baned = false end, 'bane_curse')
self.t:after(duration*curse_m, function() self.baned = false end, 'bane_curse')
elseif curse == 'infestor' then
self.infested = arg1
self.infested_dmg = arg2
self.t:after(duration*curse_m, function() self.infested = false end, 'infestor_curse')
end
end

View File

@ -19,6 +19,7 @@ function init()
music.volume = 0
local s = {tags = {sfx}}
flagellant1 = Sound('Whipping Horse 3.ogg', s)
bard2 = Sound('376532__womb-affliction__flute-trill.ogg', s)
bard1 = Sound('Magical Impact 12.ogg', s)
frost1 = Sound('Frost Bolt 20.ogg', s)
@ -184,7 +185,7 @@ function init()
['psykino'] = fg[0],
['barrager'] = green[0],
['highlander'] = yellow[0],
['sapper'] = blue[0],
['fairy'] = green[0],
['priest'] = green[0],
['infestor'] = orange[0],
['flagellant'] = fg[0],
@ -228,7 +229,7 @@ function init()
['psykino'] = 'fg',
['barrager'] = 'green',
['highlander'] = 'yellow',
['sapper'] = 'blue',
['fairy'] = 'green',
['priest'] = 'green',
['infestor'] = 'orange',
['flagellant'] = 'fg',
@ -272,7 +273,7 @@ function init()
['psykino'] = {'mage', 'psyker', 'forcer'},
['barrager'] = {'ranger', 'forcer'},
['highlander'] = {'warrior'},
['sapper'] = {'enchanter', 'voider', 'healer'},
['fairy'] = {'enchanter', 'healer'},
['priest'] = {'healer'},
['infestor'] = {'curser', 'swarmer'},
['flagellant'] = {'psyker', 'enchanter'},
@ -316,7 +317,7 @@ function init()
['psykino'] = '[blue]Mage, [fg]Psyker, [yellow]Forcer',
['barrager'] = '[green]Ranger, [yellow]Forcer',
['highlander'] = '[yellow]Warrior',
['sapper'] = '[blue]Enchanter, [purple]Voider, [green]Healer',
['fairy'] = '[blue]Enchanter, [green]Healer',
['priest'] = '[green]Healer',
['infestor'] = '[purple]Curser, [orange]Swarmer',
['flagellant'] = '[fg]Psyker, [blue]Enchanter',
@ -376,11 +377,11 @@ function init()
['bane'] = function(lvl) return '[fg]creates a large area that curses enemies to take [yellow]+50%[fg] damage' end,
['psykino'] = function(lvl) return '[fg]pulls enemies together for [yellow]2[fg] seconds' end,
['barrager'] = function(lvl) return '[fg]shoots a barrage of [yellow]5[fg] arrows, each dealing [yellow]' .. get_character_stat('barrager', lvl, 'dmg') .. '[fg] damage and pushing enemies' end,
['highlander'] = function(lvl) return '[fg]deals [yellow]' .. 6*get_character_stat('highlander', lvl, 'dmg') .. '[fg] AoE damage' end,
['sapper'] = function(lvl) return '[fg]periodically steals [yellow]5%[fg] max HP per second from nearby enemies and gain 25% increased movement speed' end,
['highlander'] = function(lvl) return '[fg]deals [yellow]' .. 5*get_character_stat('highlander', lvl, 'dmg') .. '[fg] AoE damage' end,
['fairy'] = function(lvl) return '[fg]periodically heals [yellow]1[fg] unit at random and grants it [yellow]+100%[fg] attack speed for [yellow]6[fg] seconds' end,
['priest'] = function(lvl) return '[fg]heals all allies for [yellow]20%[fg] their max HP' end,
['infestor'] = function(lvl) return '[fg]curses enemies in an area for [yellow]6[fg] seconds, they will release multiple critters on death' end,
['flagellant'] = function(lvl) return '[fg]deals damage to self and grants [yellow]+4%[fg] damage to all allies per cast' end,
['infestor'] = function(lvl) return '[fg]curses nearby enemies for [yellow]6[fg] seconds, they will release [yellow]2[fg] critters on death' end,
['flagellant'] = function(lvl) return '[fg]deals [yellow]' .. 2*get_character_stat('flagellant', lvl, 'dmg') .. '[fg] damage to self and grants [yellow]+4%[fg] damage to all allies per cast' end,
}
character_effect_names = {
@ -420,8 +421,8 @@ function init()
['bane'] = '[purple]Nightmare',
['psykino'] = '[fg]Magnetic Force',
['barrager'] = '[green]Barrage',
['highlander'] = '[yellow]Crosscut',
['sapper'] = '[blue]Enduring Sap',
['highlander'] = '[yellow]Moulinet',
['fairy'] = '[green]Whimsy',
['priest'] = '[green]Divine Intervention',
['infestor'] = '[orange]Infestation',
['flagellant'] = '[red]Zealotry',
@ -449,23 +450,23 @@ function init()
['psykeeper'] = '[light_bg]Crucio',
['engineer'] = '[light_bg]Upgrade',
['plague_doctor'] = '[light_bg]Black Death Steam',
['fisherman'] = '[light_bg]Electric Net',
['barbarian'] = '[light_bg]Seism',
['juggernaut'] = '[light_bg]Brutal Impact',
['lich'] = '[light_bg]Piercing Frost',
['lich'] = '[light_bg]Chain Frost',
['cryomancer'] = '[light_bg]Frostbite',
['pyromancer'] = '[light_bg]Ignite',
['corruptor'] = '[light_bg]Corruption',
['beastmaster'] = '[light_bg]Call of the Wild',
['launcher'] = '[light_bg]Kineticism',
['spiker'] = '[light_bg]Caltrops',
['bard'] = "[red]The Bard'light_bgSong",
['assassin'] = '[light_bg]Toxic Delivery',
['host'] = '[light_bg]Invasion',
['carver'] = '[light_bg]World Tree',
['bane'] = '[light_bg]Baneling Swarm',
['bane'] = '[light_bg]Nightmare',
['psykino'] = '[light_bg]Magnetic Force',
['barrager'] = '[light_bg]Ballista Sinitra',
['barbarian'] = '[light_bg]Berserk',
['sapper'] = '[light_bg]Chain Reaction',
['barrager'] = '[light_bg]Barrage',
['highlander'] = '[light_bg]Moulinet',
['fairy'] = '[light_bg]Whimsy',
['priest'] = '[light_bg]Divine Intervention',
['infestor'] = '[light_bg]Infestation',
['flagellant'] = '[light_bg]Zealotry',
@ -508,11 +509,11 @@ function init()
['bane'] = function() return '[fg]the area also deals [yellow]' .. get_character_stat('bane', 3, 'dmg') .. '[fg] damage per second and slows enemies by [yellow]50%[fg]' end,
['psykino'] = function() return '[fg]enemies take [yellow]' .. 4*get_character_stat('psykino', 3, 'dmg') .. '[fg] damage and are pushed away when the area expires' end,
['barrager'] = function() return '[fg]every 3rd attack the barrage shoots [yellow]15[fg] projectiles and they push harder' end,
['crosscut'] = function() return '[fg]two crosscutting areas of +100% size are created instead' end,
['sapper'] = function() return '[fg]sapped enemies permanently take [yellow]' .. get_character_stat('sapper', 3, 'dmg') .. '[fg] damage per second' end,
['highlander'] = function() return '[fg]quickly repeats the attack [yellow]3[fg] times' end,
['fairy'] = function() return '[fg]heals [yellow]2[fg] units instead and grants them an additional [yellow]100%[fg] attack speed' end,
['priest'] = function() return '[fg]at the start of the round pick [yellow]3[fg] units at random and grants them a buff that prevents death once' end,
['infestor'] = function() return '[fg][yellow]triples[fg] the number of critters released' end,
['flagellant'] = function() return '[fg]deals damage to all allies instead and grants stacking [yellow]+10%[fg] damage to all allies per cast' end,
['flagellant'] = function() return '[fg]deals [yellow]' .. 2*get_character_stat('flagellant', 3, 'dmg') .. '[fg] damage to all allies and grants [yellow]+12%[fg] damage to all allies per cast' end,
}
character_stats = {
@ -553,7 +554,7 @@ function init()
['psykino'] = function(lvl) return get_character_stat_string('psykino', lvl) end,
['barrager'] = function(lvl) return get_character_stat_string('barrager', lvl) end,
['highlander'] = function(lvl) return get_character_stat_string('highlander', lvl) end,
['sapper'] = function(lvl) return get_character_stat_string('sapper', lvl) end,
['fairy'] = function(lvl) return get_character_stat_string('fairy', lvl) end,
['priest'] = function(lvl) return get_character_stat_string('priest', lvl) end,
['infestor'] = function(lvl) return get_character_stat_string('infestor', lvl) end,
['flagellant'] = function(lvl) return get_character_stat_string('flagellant', lvl) end,
@ -577,7 +578,6 @@ function init()
['mini_boss'] = {hp = 1, dmg = 1, aspd = 1, area_dmg = 1, area_size = 1, def = 1, mvspd = 0.3},
['enemy_critter'] = {hp = 1, dmg = 1, aspd = 1, area_dmg = 1, area_size = 1, def = 1, mvspd = 0.5},
['saboteur'] = {hp = 1, dmg = 1, aspd = 1, area_dmg = 1, area_size = 1, def = 1, mvspd = 1.4},
['overlord'] = {hp = 1.5, dmg = 1, aspd = 1, area_dmg = 1, area_size = 1, def = 1, mvspd = 0.5},
}
local ylb1 = function(lvl) return lvl >= 2 and 'fg' or (lvl >= 1 and 'yellow' or 'light_bg') end
@ -591,8 +591,8 @@ function init()
['enchanter'] = function(lvl) return '[' .. ylb1(lvl) .. ']2[' .. ylb2(lvl) .. ']/4 [fg]- [' .. ylb1(lvl) .. ']+15%[' .. ylb2(lvl) .. ']/+25% [fg]damage to all allies' end,
['nuker'] = function(lvl) return '[' .. ylb1(lvl) .. ']3[' .. ylb2(lvl) .. ']/6 [fg]- [' .. ylb1(lvl) .. ']+15%[' .. ylb2(lvl) .. ']/+25% [fg]area damage and size to allied nukers' end,
['conjurer'] = function(lvl) return '[' .. ylb1(lvl) .. ']2[' .. ylb2(lvl) .. ']/4 [fg]- [' .. ylb1(lvl) .. ']+25%[' .. ylb2(lvl) .. ']/+50% [fg]summon damage and duration' end,
['psyker'] = function(lvl) return '[' .. ylb1(lvl) .. ']2[' .. ylb2(lvl) .. ']/4 [fg]- [' .. ylb1(lvl) .. ']+5%[' .. ylb2(lvl) .. ']/+10% [fg]damage and health per active set to allied psykers' end,
['curser'] = function(lvl) return '[' .. ylb1(lvl) .. ']2[' .. ylb2(lvl) .. ']/4 [fg]- [' .. ylb1(lvl) .. ']+25%[' .. ylb2(lvl) .. ']/+50% [fg]curse effectiveness and duration' end,
['psyker'] = function(lvl) return '[' .. ylb1(lvl) .. ']2[' .. ylb2(lvl) .. ']/4 [fg]- [' .. ylb1(lvl) .. ']+5%[' .. ylb2(lvl) .. ']/+10% [fg]damage and attack speed per active set to allied psykers' end,
['curser'] = function(lvl) return '[' .. ylb1(lvl) .. ']2[' .. ylb2(lvl) .. ']/4 [fg]- [' .. ylb1(lvl) .. ']+25%[' .. ylb2(lvl) .. ']/+50% [fg]curse duration' end,
['forcer'] = function(lvl) return '[' .. ylb1(lvl) .. ']2[' .. ylb2(lvl) .. ']/4 [fg]- [' .. ylb1(lvl) .. ']+25%[' .. ylb2(lvl) .. ']/+50% [fg]knockback force to all allies' end,
['swarmer'] = function(lvl) return '[' .. ylb1(lvl) .. ']2[' .. ylb2(lvl) .. ']/4 [fg]- [' .. ylb1(lvl) .. ']+1[' .. ylb2(lvl) .. ']/+3 [fg]hits to critters' end,
['voider'] = function(lvl) return '[' .. ylb1(lvl) .. ']2[' .. ylb2(lvl) .. ']/4 [fg]- [' .. ylb1(lvl) .. ']+15%[' .. ylb2(lvl) .. ']/+25% [fg]damage over time to allied voiders' end,
@ -602,7 +602,7 @@ function init()
[1] = {'vagrant', 'swordsman', 'wizard', 'archer', 'scout', 'cleric'},
[2] = {'saboteur', 'sage', 'squire', 'dual_gunner', 'hunter', 'chronomancer', 'barbarian', 'cryomancer', 'beastmaster', 'launcher', 'bard', 'carver'},
[3] = {'outlaw', 'elementor', 'stormweaver', 'spellblade', 'psykeeper', 'engineer', 'juggernaut', 'pyromancer', 'corruptor', 'assassin', 'bane', 'barrager', 'infestor', 'flagellant'},
[4] = {'priest', 'highlander', 'psykino', 'lich', 'host', 'sapper', 'blade', 'plague_doctor', 'cannoneer'},
[4] = {'priest', 'highlander', 'psykino', 'lich', 'host', 'fairy', 'blade', 'plague_doctor', 'cannoneer'},
}
non_attacking_characters = {'cleric', 'stormweaver', 'squire', 'chronomancer', 'sage'}
@ -645,7 +645,7 @@ function init()
['psykino'] = 4,
['barrager'] = 3,
['highlander'] = 4,
['sapper'] = 4,
['fairy'] = 4,
['priest'] = 4,
['infestor'] = 3,
['flagellant'] = 3,
@ -809,7 +809,9 @@ function init()
main = Main()
main:add(BuyScreen'buy_screen')
main:go_to('buy_screen', 22, {
{character = 'barrager', level = 3},
{character = 'flagellant', level = 3},
{character = 'scout', level = 3},
{character = 'archer', level = 3},
})
--[[
main:add(Arena'arena')

View File

@ -321,6 +321,106 @@ function Player:init(args)
end
end
end)
elseif self.character == 'highlander' then
self.attack_sensor = Circle(self.x, self.y, 64)
self.t:cooldown(4, function() local enemies = self:get_objects_in_shape(self.attack_sensor, main.current.enemies); return enemies and #enemies > 0 end, function()
if self.level == 3 then
self.t:every(0.25, function()
self:attack(48)
end, 3)
else
self:attack(48)
end
end, nil, nil, 'attack')
elseif self.character == 'fairy' then
self.t:every(6, function()
if self.level == 3 then
local units = self:get_all_units()
local unit_1 = random:table_remove(units)
local unit_2 = random:table_remove(units)
unit_1:heal(0.2*unit_1.max_hp*(self.heal_effect_m or 1))
unit_1.fairy_aspd_m = 3
unit_1.t:after(5.98, function() unit_1.fairy_aspd_m = 1 end)
unit_2:heal(0.2*unit_2.max_hp*(self.heal_effect_m or 1))
unit_2.fairy_aspd_m = 3
unit_2.t:after(5.98, function() unit_2.fairy_aspd_m = 1 end)
heal1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
buff1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
else
local unit = random:table(self:get_all_units())
unit:heal(0.2*unit.max_hp*(self.heal_effect_m or 1))
unit.fairy_aspd_m = 2
unit.t:after(5.98, function() unit.fairy_aspd_m = 1 end)
heal1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
buff1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
end
end)
elseif self.character == 'priest' then
if self.level == 3 then
self.t:after(0.01, function()
local all_units = self:get_all_units()
local unit_1 = random:table_remove(all_units)
local unit_2 = random:table_remove(all_units)
local unit_3 = random:table_remove(all_units)
if unit_1 then unit_1.divined = true end
if unit_2 then unit_2.divined = true end
if unit_3 then unit_3.divined = true end
end)
end
self.t:every(10, function()
local all_units = self:get_all_units()
for _, unit in ipairs(all_units) do unit:heal(0.2*unit.max_hp*(self.heal_effect_m or 1)) end
heal1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
end)
elseif self.character == 'infestor' then
self.t:every(8, function()
local enemies = main.current.main:get_objects_by_classes(main.current.enemies)
for _, enemy in ipairs(enemies) do
if self:distance_to_object(enemy) < 128 then
enemy:curse('infestor', 6, (self.level == 3 and 6 or 2), self.dmg)
HitCircle{group = main.current.effects, x = self.x, y = self.y, rs = 6, color = orange[0], duration = 0.1}
LightningLine{group = main.current.effects, src = self, dst = enemy, color = orange[0]}
end
end
end)
elseif self.character == 'flagellant' then
self.t:every(8, function()
if self.level == 3 then
flagellant1:play{pitch = random:float(0.95, 1.05), volume = 0.4}
buff1:play{pitch = random:float(0.95, 1.05), volume = 0.3}
local all_units = self:get_all_units()
local dmg = self.dmg
for _, unit in ipairs(all_units) do
hit2:play{pitch = random:float(0.95, 1.05), volume = 0.4}
unit:hit(2*dmg)
if not unit.flagellant_dmg_m then
unit.flagellant_dmg_m = 1
end
unit.flagellant_dmg_m = unit.flagellant_dmg_m + 0.12
end
else
buff1:play{pitch = random:float(0.95, 1.05), volume = 0.3}
flagellant1:play{pitch = random:float(0.95, 1.05), volume = 0.4}
local all_units = self:get_all_units()
for _, unit in ipairs(all_units) do
if unit.character == 'flagellant' then
hit2:play{pitch = random:float(0.95, 1.05), volume = 0.4}
unit:hit(2*unit.dmg)
end
if not unit.flagellant_dmg_m then
unit.flagellant_dmg_m = 1
end
unit.flagellant_dmg_m = unit.flagellant_dmg_m + 0.04
end
end
end)
end
self:calculate_stats(true)
@ -333,6 +433,8 @@ function Player:init(args)
if #self.previous_positions > 256 then self.previous_positions[257] = nil end
end)
end
self.first_frame_calculate_stats = true
end
@ -391,10 +493,9 @@ function Player:update(dt)
elseif main.current.warrior_level == 0 then self.warrior_def_a = 0 end
end
if table.any(self.classes, function(v) return v == 'healer' end) then
if main.current.healer_level == 1 then self.heal_effect_m = 1.25
else self.heal_effect_m = 1 end
end
if main.current.healer_level == 2 then self.heal_effect_m = 1.3
elseif main.current.healer_level == 1 then self.heal_effect_m = 1.15
else self.heal_effect_m = 1 end
if table.any(self.classes, function(v) return v == 'nuker' end) then
if main.current.nuker_level == 2 then self.nuker_area_size_m = 1.25; self.nuker_area_dmg_m = 1.25
@ -402,10 +503,9 @@ function Player:update(dt)
elseif main.current.nuker_level == 0 then self.nuker_area_size_m = 1; self.nuker_area_dmg_m = 1 end
end
if table.any(self.classes, function(v) return v == 'conjurer' end) then
if main.current.conjurer_level == 1 then self.conjurer_buff_m = 1.25
else self.conjurer_buff_m = 1 end
end
if main.current.conjurer_level == 2 then self.conjurer_buff_m = 1.5
elseif main.current.conjurer_level == 1 then self.conjurer_buff_m = 1.25
else self.conjurer_buff_m = 1 end
if table.any(self.classes, function(v) return v == 'rogue' end) then
if main.current.rogue_level == 2 then self.chance_to_crit = 20
@ -413,14 +513,50 @@ function Player:update(dt)
elseif main.current.rogue_level == 0 then self.chance_to_crit = 0 end
end
if table.any(self.classes, function(v) return v == 'enchanter' end) then
if main.current.enchanter_level == 1 then self.enchanter_dmg_m = 1.25
else self.enchanter_dmg_m = 1 end
if main.current.enchanter_level == 2 then self.enchanter_dmg_m = 1.25
elseif main.current.enchanter_level == 1 then self.enchanter_dmg_m = 1.15
else self.enchanter_dmg_m = 1 end
if table.any(self.classes, function(v) return v == 'psyker' end) then
local class_levels = get_class_levels(self:get_all_units())
local number_of_active_sets = 0
if class_levels.ranger >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.warrior >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.mage >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.rogue >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.healer >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.conjurer >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.enchanter >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.psyker >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.curser >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.forcer >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.swarmer >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if class_levels.voider >= 1 then number_of_active_sets = number_of_active_sets + 1 end
if main.current.psyker_level == 2 then
self.psyker_dmg_m = 1 + 0.1*number_of_active_sets
self.psyker_aspd_m = 1 + 0.1*number_of_active_sets
elseif main.current.psyker_level == 1 then
self.psyker_dmg_m = 1 + 0.05*number_of_active_sets
self.psyker_aspd_m = 1 + 0.05*number_of_active_sets
else
self.psyker_dmg_m = 1
self.psyker_aspd_m = 1
end
end
if main.current.forcer_level == 2 then self.knockback_m = 1.5
elseif main.current.forcer_level == 1 then self.knockback_m = 1.25
else self.knockback_m = 1 end
if table.any(self.classes, function(v) return v == 'voider' end) then
if main.current.voider_level == 2 then self.dot_dmg_m = 1.25
elseif main.current.voider_level == 1 then self.dot_dmg_m = 1.15
else self.dot_dmg_m = 1 end
end
self.buff_def_a = (self.warrior_def_a or 0)
self.buff_aspd_m = (self.chronomancer_aspd_m or 1)*(self.vagrant_aspd_m or 1)*(self.outlaw_aspd_m or 1)
self.buff_dmg_m = (self.squire_dmg_m or 1)*(self.vagrant_dmg_m or 1)*(main.current.enchanter_dmg_m or 1)*(self.swordsman_dmg_m or 1)
self.buff_aspd_m = (self.chronomancer_aspd_m or 1)*(self.vagrant_aspd_m or 1)*(self.outlaw_aspd_m or 1)*(self.fairy_aspd_m or 1)*(self.psyker_aspd_m or 1)
self.buff_dmg_m = (self.squire_dmg_m or 1)*(self.vagrant_dmg_m or 1)*(self.enchanter_dmg_m or 1)*(self.swordsman_dmg_m or 1)*(self.flagellant_dmg_m or 1)*(self.psyker_dmg_m or 1)
self.buff_def_m = (self.squire_def_m or 1)
self.buff_area_size_m = (self.nuker_area_size_m or 1)
self.buff_area_dmg_m = (self.nuker_area_dmg_m or 1)
@ -516,7 +652,7 @@ function Player:on_collision_enter(other, contact)
end
elseif table.any(main.current.enemies, function(v) return other:is(v) end) then
other:push(random:float(25, 35), self:angle_to_object(other))
other:push(random:float(25, 35)*self.knockback_m, self:angle_to_object(other))
if self.character == 'vagrant' or self.character == 'psykeeper' then other:hit(2*self.dmg)
else other:hit(self.dmg) end
if other.headbutting then
@ -573,19 +709,29 @@ function Player:hit(damage)
end
if self.hp <= 0 then
hit4:play{pitch = random:float(0.95, 1.05), volume = 0.5}
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
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
main.current:die()
else
if self.leader then self:recalculate_followers()
else self.parent:recalculate_followers() end
end
if self.divined then
self:heal(self.max_hp)
heal1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
buff1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
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)
self.divined = false
if self.dot_area then self.dot_area.dead = true; self.dot_area = nil end
else
hit4:play{pitch = random:float(0.95, 1.05), volume = 0.5}
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
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
main.current:die()
else
if self.leader then self:recalculate_followers()
else self.parent:recalculate_followers() end
end
if self.dot_area then self.dot_area.dead = true; self.dot_area = nil end
end
end
end
@ -790,7 +936,7 @@ function Player:attack(area, mods)
character = self.character, level = self.level, parent = self}
Area(table.merge(t, mods))
if self.character == 'swordsman' or self.character == 'barbarian' or self.character == 'juggernaut' then
if self.character == 'swordsman' or self.character == 'barbarian' or self.character == 'juggernaut' or self.character == 'highlander' then
_G[random:table{'swordsman1', 'swordsman2'}]:play{pitch = random:float(0.9, 1.1), volume = 0.75}
elseif self.character == 'elementor' then
elementor1:play{pitch = random:float(0.9, 1.1), volume = 0.5}
@ -1110,7 +1256,7 @@ function Projectile:on_trigger_enter(other, contact)
end
if self.character == 'assassin' then
other:apply_dot(self.crit and 4*self.dmg or self.dmg/2, 3)
other:apply_dot((self.crit and 4*self.dmg or self.dmg/2)*self.dot_dmg_m*(main.current.chronomancer_dot), 3)
end
if self.parent.chain_infused then
@ -1145,7 +1291,7 @@ function Projectile:on_trigger_enter(other, contact)
end
if self.knockback then
other:push(self.knockback, self.r)
other:push(self.knockback*self.knockback_m, self.r)
end
end
end
@ -1169,8 +1315,10 @@ function Area:init(args)
enemy:hit(self.dmg + self.dmg*0.33*#enemies)
elseif self.character == 'blade' and self.level == 3 then
enemy:hit(self.dmg + self.dmg*0.5*#enemies)
elseif self.character == 'highlander' then
enemy:hit(6*self.dmg)
elseif self.character == 'launcher' then
enemy:curse('launcher', 4, (self.level == 3 and 6*self.dmg or 2*self.dmg))
enemy:curse('launcher', 4, (self.level == 3 and 6*self.dmg or 2*self.dmg), self.parent)
else
enemy:hit(self.dmg)
end
@ -1179,7 +1327,7 @@ function Area:init(args)
for i = 1, 1 do HitParticle{group = main.current.effects, x = enemy.x, y = enemy.y, color = enemy.color} end
if self.character == 'wizard' or self.character == 'elementor' then
magic_hit1:play{pitch = random:float(0.95, 1.05), volume = 0.5}
elseif self.character == 'swordsman' or self.character == 'barbarian' or self.character == 'juggernaut' then
elseif self.character == 'swordsman' or self.character == 'barbarian' or self.character == 'juggernaut' or self.character == 'highlander' then
hit2:play{pitch = random:float(0.95, 1.05), volume = 0.35}
elseif self.character == 'blade' then
blade_hit1:play{pitch = random:float(0.9, 1.1), volume = 0.35}
@ -1199,7 +1347,7 @@ function Area:init(args)
if self.juggernaut_push then
local r = self.parent:angle_to_object(enemy)
enemy:push(random:float(75, 100), r)
enemy:push(random:float(75, 100)*self.knockback_m, r)
enemy.juggernaut_push = 3*self.dmg
end
end
@ -1256,7 +1404,7 @@ function DotArea:init(args)
pyro1:play{pitch = random:float(1.5, 1.8), volume = 0.1}
enemy.pyrod = self
end
enemy:hit(self.dmg/5)
enemy:hit(self.dot_dmg_m*self.dmg/5)
HitCircle{group = main.current.effects, x = enemy.x, y = enemy.y, rs = 6, color = fg[0], duration = 0.1}
for i = 1, 1 do HitParticle{group = main.current.effects, x = enemy.x, y = enemy.y, color = self.color} end
for i = 1, 1 do HitParticle{group = main.current.effects, x = enemy.x, y = enemy.y, color = enemy.color} end
@ -1274,7 +1422,7 @@ function DotArea:init(args)
if self.level == 3 then
enemy:slow(0.4, 4)
end
enemy:hit(2*self.dmg)
enemy:hit(self.dot_dmg_m*2*self.dmg)
HitCircle{group = main.current.effects, x = enemy.x, y = enemy.y, rs = 6, color = fg[0], duration = 0.1}
for i = 1, 1 do HitParticle{group = main.current.effects, x = enemy.x, y = enemy.y, color = self.color} end
for i = 1, 1 do HitParticle{group = main.current.effects, x = enemy.x, y = enemy.y, color = enemy.color} end
@ -1293,7 +1441,7 @@ function DotArea:init(args)
enemy:curse('bane', 0.5)
if self.level == 3 then
enemy:slow(0.5, 0.5)
enemy:hit(self.dmg/2)
enemy:hit(self.dot_dmg_m*self.dmg/2)
HitCircle{group = main.current.effects, x = enemy.x, y = enemy.y, rs = 6, color = fg[0], duration = 0.1}
for i = 1, 1 do HitParticle{group = main.current.effects, x = enemy.x, y = enemy.y, color = self.color} end
for i = 1, 1 do HitParticle{group = main.current.effects, x = enemy.x, y = enemy.y, color = enemy.color} end
@ -1383,7 +1531,7 @@ function ForceArea:init(args)
local enemies = main.current.main:get_objects_in_shape(self.shape, main.current.enemies)
for _, enemy in ipairs(enemies) do
enemy:hit(4*self.parent.dmg)
enemy:push(50, self:angle_to_object(enemy))
enemy:push(50*self.knockback_m, self:angle_to_object(enemy))
end
end
end)
@ -1615,7 +1763,7 @@ function Pet:on_trigger_enter(other)
if self.pierce <= 0 then
camera:shake(2, 0.5)
other:hit(self.parent.dmg*(self.conjurer_buff_m or 1))
other:push(35, self:angle_to_object(other))
other:push(35*self.knockback_m, self:angle_to_object(other))
self.dead = true
local n = random:int(3, 4)
for i = 1, n do HitParticle{group = main.current.effects, x = x, y = y, r = random:float(0, 2*math.pi), color = self.color} end
@ -1623,7 +1771,7 @@ function Pet:on_trigger_enter(other)
else
camera:shake(2, 0.5)
other:hit(self.parent.dmg*(self.conjurer_buff_m or 1))
other:push(35, self:angle_to_object(other))
other:push(35*self.knockback_m, self:angle_to_object(other))
self.pierce = self.pierce - 1
end
hit2:play{pitch = random:float(0.95, 1.05), volume = 0.35}
@ -1717,8 +1865,8 @@ function Critter:init(args)
self.invulnerable = true
self.t:after(0.5, function() self.invulnerable = false end)
self.dmg = self.parent.dmg
self.hp = 1
self.dmg = args.dmg or self.parent.dmg
self.hp = 1 + ((main.current.swarmer_level == 2 and 3) or (main.current.swarmer_level == 1 and 1) or 0)
end
@ -1762,7 +1910,7 @@ end
function Critter:hit(damage)
if self.dead or self.invulnerable then return end
self.hfx:use('hit', 0.25, 200, 10)
self.hp = self.hp - damage
self.hp = self.hp - 1
-- self:show_hp()
if self.hp <= 0 then self:die() end
end

46
todo
View File

@ -23,23 +23,23 @@
* Randomizer - randomly does the 4 ones above
Orbitter - spawns shooters that orbit the boss
8. Additional characters and classes
9. Lv.3 effects for every character
Classes
Ranger: chance to release a barrage on attack
Warrior: increased defense
Mage: decreased enemy defense
Nuker: increased area damage and size
Rogue: chance to crit
Healer: increased healing effectiveness
Enchanter: increased damage
Conjurer: increased summon damage and duration
Psyker: increased damage and health based on number of active sets
Curser: increased curse effect and duration
Forcer: increased knockback force
Swarmer: increased critter health
Voider: increased damage over time
Characters
* 8. Additional characters and classes
* 9. Lv.3 effects for every character
* Classes
* Ranger: chance to release a barrage on attack
* Warrior: increased defense
* Mage: decreased enemy defense
* Nuker: increased area damage and size
* Rogue: chance to crit
* Healer: increased healing effectiveness
* Enchanter: increased damage
* Conjurer: increased summon damage and duration
* Psyker: increased damage and health based on number of active sets
* Curser: increased curse effect and duration
* Forcer: increased knockback force
* Swarmer: increased critter health
* Voider: increased damage over time
* Characters
* Vagrant [psyker, ranger, warrior]: shoots a projectile - Lv.3: Champion - gains increased damage and attack speed based on number of active sets
* Swordsman [warrior]: deals AoE damage, deals extra damage for each unit hit - Lv.3: Cleave - damage is doubled
* Wizard [mage]: shoots a projectile that deals AoE damage - Lv.3: Magic Missile - the projectile chains 5 times, each dealing AoE damage on impact
@ -76,12 +76,12 @@
* Bane [curser, voider]: creates a large area that curses enemies to take increased damage - Lv.3: Nightmare - the area also deals DoT and slows enemies
* Psykino [mage, psyker, forcer]: quickly pulls enemies together and then releases them with a force - Lv.3: Magnetic Force - enemies pulled together are forced to collide with each other before being released
* Barrager [ranger, forcer]: shoots a barrage of 5 arrows that knocks enemies back - Lv.3: every 3rd attack the barrage shoots 15 projectiles and they push harder
Highlander [warrior]: creates a small area that deals massive damage - Lv.3: Crosscut - two crosscutting areas of larger size are created instead
Sapper [enchanter, voider, healer]: periodically steals health from nearby enemies and gain increased movement speed - Lv.3: Enduring Sap - sapped enemies permanently take damage over time, even outside the sapper's area of effect
Priest [healer]: heals all units periodically - Lv.3: Divine Intervention - at the start of the round pick 3 units at random and grants them a buff that prevents them from dying once
Infestor [curser, swarmer]: curses nearby enemies for 6 seconds, they will release multiple critters on death - Lv.3: Infestation - triples the number of critters released
Flagellant [psyker, enchanter]: periodically deals damage to self and grants a damage buff to all allies - Lv.3: Zealotry - deals damage to all allies instead and also grants a massive damage buff
Sets
* Highlander [warrior]: creates a small area that deals massive damage - Lv.3: Crosscut - two crosscutting areas of larger size are created instead
* Fairy [enchanter, healer]: periodically heals 1 random unit that has less than 100% HP and grants it +200% attack speed for 6 seconds - Lv.3: heals and buffs 2 units instead
* Priest [healer]: heals all units periodically - Lv.3: Divine Intervention - at the start of the round pick 3 units at random and grants them a buff that prevents them from dying once
* Infestor [curser, swarmer]: curses nearby enemies for 6 seconds, they will release multiple critters on death - Lv.3: Infestation - triples the number of critters released
* Flagellant [psyker, enchanter]: periodically deals damage to self and grants a damage buff to all allies - Lv.3: Zealotry - deals damage to all allies instead and also grants a massive damage buff
* Sets
Ranger = 8/8
Warrior = 8/8
Mage = 8/8