master
a327ex 2021-02-28 01:45:33 -03:00
parent 0d0ca8564b
commit ee1f8d71da
4 changed files with 125 additions and 111 deletions

View File

@ -50,24 +50,8 @@ function Arena:on_enter(from, level)
WallCover{group = self.post_main, vertices = math.to_rectangle_vertices(self.x1, -40, self.x2, self.y1), color = bg[-1]} WallCover{group = self.post_main, vertices = math.to_rectangle_vertices(self.x1, -40, self.x2, self.y1), color = bg[-1]}
WallCover{group = self.post_main, vertices = math.to_rectangle_vertices(self.x1, self.y2, self.x2, gh + 40), color = bg[-1]} WallCover{group = self.post_main, vertices = math.to_rectangle_vertices(self.x1, self.y2, self.x2, gh + 40), color = bg[-1]}
self.player = Player{group = self.main, x = gw/2, y = gh/2, leader = true, character = 'swordsman'} self.player = Player{group = self.main, x = gw/2, y = gh/2, leader = true, character = 'vagrant'}
self.player:add_follower(Player{group = self.main, character = 'outlaw'}) -- self.player:add_follower(Player{group = self.main, character = 'elementor'})
-- self.player:add_follower(Player{group = self.main, character = 'squire'})
self.player:add_follower(Player{group = self.main, character = 'blade'})
--[[
self.player:add_follower(Player{group = self.main, character = 'sage'})
self.player:add_follower(Player{group = self.main, character = 'archer'})
self.player:add_follower(Player{group = self.main, character = 'spellblade'})
self.player:add_follower(Player{group = self.main, character = 'cleric'})
self.player:add_follower(Player{group = self.main, character = 'wizard'})
self.player:add_follower(Player{group = self.main, character = 'squire'})
self.player:add_follower(Player{group = self.main, character = 'scout'})
self.player:add_follower(Player{group = self.main, character = 'swordsman'})
self.player:add_follower(Player{group = self.main, character = 'scout'})
self.player:add_follower(Player{group = self.main, character = 'wizard'})
self.player:add_follower(Player{group = self.main, character = 'blade'})
self.player:add_follower(Player{group = self.main, character = 'elementor'})
]]--
self.win_condition = random:table{'time', 'enemy_kill', 'wave'} self.win_condition = random:table{'time', 'enemy_kill', 'wave'}
if self.win_condition == 'wave' then if self.win_condition == 'wave' then
@ -233,7 +217,7 @@ function Arena:update(dt)
if self.win_condition == 'enemy_kill' then if self.win_condition == 'enemy_kill' then
if self.can_quit then if self.can_quit then
self.t:after(2, function() self.t:after(2, function()
-- PostArenaScreen{group = self.ui, x = gw/2, y = gh/2} PostArenaScreen{group = self.ui, x = gw/2, y = gh/2}
end) end)
end end
@ -244,7 +228,7 @@ function Arena:update(dt)
if #self.main:get_objects_by_classes(self.enemies) > 0 then if #self.main:get_objects_by_classes(self.enemies) > 0 then
self.can_quit = true self.can_quit = true
else else
-- PostArenaScreen{group = self.ui, x = gw/2, y = gh/2} PostArenaScreen{group = self.ui, x = gw/2, y = gh/2}
end end
end) end)
end end
@ -387,3 +371,23 @@ function Arena:spawn_n_enemies(p, j, n)
end} end}
end, n, nil, 'spawn_enemies_' .. j) end, n, nil, 'spawn_enemies_' .. j)
end end
PostArenaScreen = Object:extend()
PostArenaScreen:implement(GameObject)
function PostArenaScreen:init(args)
self:init_game_object(args)
end
function PostArenaScreen:update(dt)
self:update_game_object(dt)
end
function PostArenaScreen:draw()
end

View File

@ -217,7 +217,7 @@ Note: remember to attribute https://freesound.org/people/Hybrid_V/sounds/321215/
# Day 10 - 26/02/21 # Day 10 - 26/02/21
Another day with almost no sleep and just general low energy because of it... I managed to things done though. I got all the class set bonuses working. Here's what they do: Another day with almost no sleep and just general low energy because of it... I managed to get things done though. I got all the class set bonuses working. Here's what they do:
| Class | Set Numbers | Set Effect | | Class | Set Numbers | Set Effect |
| --- | --- | --- | | --- | --- | --- |
@ -231,3 +231,85 @@ Another day with almost no sleep and just general low energy because of it... I
| Enchanter | 3 | +25% damage to all allies | | Enchanter | 3 | +25% damage to all allies |
Tomorrow I should get started on going from arena to arena, buying characters and figuring out enemy scaling. Tomorrow I should get started on going from arena to arena, buying characters and figuring out enemy scaling.
# Day 11 - 27/02/21
Took a break today. Although I went through the game's stats because I noticed some of them were diverging from my internal docs as well as the tables posted to the devlog a few days ago. Here are current tables
based on what's actually in the code:
### Classes
| Class | Set Color | Set Numbers | Total Units | Set Effect |
| --- | --- | --- | --- | --- |
| Ranger | green | 2/4 | 5 | 10/20% chance to release a barrage |
| Warrior | yellow | 2/4 | 5 |+25/+50 ally defense |
| Healer | green | 3 | 3 | +25% healing effectiveness |
| Mage | blue | 2/4 | 5 | -15/-30 enemy defense |
| Nuker | blue | 2/4 | 5 | +15/25% area damage and size |
| Conjurer | yellow | 2 | 3 | +25% construct damage and duration |
| Rogue | red | 2/4 | 5 | 10/20% chance to crit dealing 4x damage |
| Enchanter | red | 3 | 3 | +25% damage to all allies |
### Characters
| Character | Description | Trigger Range | Effect Range |
| --- | --- | --- | --- |
| Vagrant | shoots a projectile | medium | |
| Swordsman | deals damage in an area around the unit | small | medium |
| Wizard | shoots a projectile that deals AoE damage | big | very small |
| Archer | shoots an arrow that pierces | very big | |
| Scout | throws a knife that chains 3 times | small | |
| Cleric | heals every unit when any one drops below 50% HP | | |
| Outlaw | throws a fan of 5 knives | medium | |
| Blade | shoots multiple blades that deal AoE damage on contact | small | small |
| Elementor | deals massive AoE damage to a random target | big | big |
| Saboteur | calls 4 other saboteurs to seek targets and deal AoE damage | | very small |
| Stormweaver | infuses all allied projectiles with chain lightning | medium | small |
| Sage | shoots a slow projectile that draws enemies in | medium | small |
| Squire | improves damage and defense for adjacent units as well as healing them periodically | | |
| Cannoneer | shoots a projectile that deals massive AoE damage | long | medium |
| Dual Gunner | shoots two parallel projectiles | medium | |
| Hunter | shoots an arrow with a chance to summon a pet | very long | |
| Chronomancer | improves attack speed for adjacent units | | |
| Spellblade | knives that pierce spiral outwards | | |
| Psykeeper | all damage taken is stored and distributed as healing to all allies | | |
| Engineer | drops sentries that attacks with a burst of projectiles | | medium |
### Character Classes
| Character | Classes |
| --- | --- |
| Vagrant | warrior, ranger, psy |
| Swordsman | warrior |
| Wizard | mage |
| Archer | ranger |
| Cleric | healer |
| Scout | rogue |
| Outlaw | rogue, warrior |
| Blade | warrior, nuker |
| Elementor | mage, nuker |
| Saboteur | rogue, conjurer, nuker |
| Stormweaver | enchanter |
| Sage | mage, nuker |
| Squire | warrior, healer, enchanter |
| Cannoneer | ranger, nuker |
| Dual Gunner | ranger, rogue |
| Hunter | ranger, conjurer |
| Chronomancer | mage, enchanter |
| Spellblade | mage, rogue |
| Psykeeper | healer, psy |
| Engineer | conjurer |
### Class Stat Multipliers
| Class | HP | DMG | ASPD | Area DMG | Area Size | DEF | MVSPD |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Warrior | 1.40 | 1.10 | 0.90 | 1.00 | 1.00 | 1.25 | 0.90 |
| Ranger | 1.00 | 1.20 | 1.50 | 1.00 | 1.00 | 0.90 | 1.20 |
| Healer | 1.20 | 1.00 | 0.50 | 1.00 | 1.00 | 1.20 | 1.00 |
| Mage | 0.60 | 1.40 | 1.00 | 1.25 | 1.20 | 0.75 | 1.00 |
| Rogue | 0.80 | 1.30 | 1.10 | 0.60 | 0.60 | 0.80 | 1.40 |
| Nuker | 0.90 | 1.00 | 0.75 | 1.50 | 1.30 | 1.00 | 1.00 |
| Conjurer | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| Enchanter | 1.20 | 1.00 | 1.00 | 1.00 | 1.00 | 1.20 | 1.20 |
| Psy | 1.50 | 1.00 | 1.00 | 1.00 | 1.00 | 0.50 | 1.00 |

View File

@ -21,7 +21,7 @@ function Player:init(args)
end, nil, nil, 'shoot') end, nil, nil, 'shoot')
elseif self.character == 'swordsman' then elseif self.character == 'swordsman' then
self.color = orange[0] self.color = yellow[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'warrior'} self.classes = {'warrior'}
@ -46,7 +46,7 @@ function Player:init(args)
end, nil, nil, 'shoot') end, nil, nil, 'shoot')
elseif self.character == 'archer' then elseif self.character == 'archer' then
self.color = yellow[0] self.color = green[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'ranger'} self.classes = {'ranger'}
@ -107,7 +107,7 @@ function Player:init(args)
end, nil, nil, 'shoot') end, nil, nil, 'shoot')
elseif self.character == 'blade' then elseif self.character == 'blade' then
self.color = orange[0] self.color = yellow[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'warrior', 'nuker'} self.classes = {'warrior', 'nuker'}
@ -140,13 +140,13 @@ function Player:init(args)
self.t:every(8, function() self.t:every(8, function()
self.t:every(0.25, function() self.t:every(0.25, function()
SpawnEffect{group = main.current.effects, x = self.x, y = self.y, action = function(x, y) SpawnEffect{group = main.current.effects, x = self.x, y = self.y, action = function(x, y)
Saboteur{group = main.current.main, x = x, y = y, parent = self} Saboteur{group = main.current.main, x = x, y = y, parent = self, conjurer_buff_m = self.conjurer_buff_m or 1}
end} end}
end, 4) end, 4)
end) end)
elseif self.character == 'stormweaver' then elseif self.character == 'stormweaver' then
self.color = blue[0] self.color = red[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'enchanter'} self.classes = {'enchanter'}
@ -164,7 +164,7 @@ function Player:init(args)
end) end)
elseif self.character == 'sage' then elseif self.character == 'sage' then
self.color = purple[0] self.color = blue[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'mage', 'nuker'} self.classes = {'mage', 'nuker'}
@ -178,7 +178,7 @@ function Player:init(args)
end) end)
elseif self.character == 'squire' then elseif self.character == 'squire' then
self.color = green[0] self.color = yellow[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'warrior', 'healer', 'enchanter'} self.classes = {'warrior', 'healer', 'enchanter'}
@ -199,7 +199,7 @@ function Player:init(args)
end) end)
elseif self.character == 'cannoneer' then elseif self.character == 'cannoneer' then
self.color = yellow[0] self.color = green[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'ranger', 'nuker'} self.classes = {'ranger', 'nuker'}
@ -213,7 +213,7 @@ function Player:init(args)
end, nil, nil, 'shoot') end, nil, nil, 'shoot')
elseif self.character == 'dual_gunner' then elseif self.character == 'dual_gunner' then
self.color = yellow[0] self.color = green[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'ranger', 'rogue'} self.classes = {'ranger', 'rogue'}
@ -227,10 +227,10 @@ function Player:init(args)
end, nil, nil, 'shoot') end, nil, nil, 'shoot')
elseif self.character == 'hunter' then elseif self.character == 'hunter' then
self.color = orange[0] self.color = green[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'ranger', 'rogue'} self.classes = {'ranger', 'conjurer'}
self.attack_sensor = Circle(self.x, self.y, 160) self.attack_sensor = Circle(self.x, self.y, 160)
self.t:cooldown(2, function() local enemies = self:get_objects_in_shape(self.attack_sensor, main.current.enemies); return enemies and #enemies > 0 end, function() self.t:cooldown(2, function() local enemies = self:get_objects_in_shape(self.attack_sensor, main.current.enemies); return enemies and #enemies > 0 end, function()
@ -241,7 +241,7 @@ function Player:init(args)
end, nil, nil, 'shoot') end, nil, nil, 'shoot')
elseif self.character == 'chronomancer' then elseif self.character == 'chronomancer' then
self.color = purple[0] self.color = blue[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'mage', 'enchanter'} self.classes = {'mage', 'enchanter'}
@ -288,7 +288,7 @@ function Player:init(args)
end) end)
elseif self.character == 'engineer' then elseif self.character == 'engineer' then
self.color = orange[0] self.color = yellow[0]
self:set_as_rectangle(9, 9, 'dynamic', 'player') self:set_as_rectangle(9, 9, 'dynamic', 'player')
self.visual_shape = 'rectangle' self.visual_shape = 'rectangle'
self.classes = {'conjurer'} self.classes = {'conjurer'}
@ -449,10 +449,6 @@ function Player:update(dt)
self.r = self:get_angle() self.r = self:get_angle()
end end
end end
if self.character == 'blade' then
print(self.def)
end
end end
@ -750,7 +746,7 @@ function Projectile:die(x, y, r, n)
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} 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}
elseif self.character == 'cannoneer' then elseif self.character == 'cannoneer' then
Area{group = main.current.effects, x = self.x, y = self.y, r = self.r, w = self.parent.area_size_m*96, color = self.color, dmg = self.parent.area_dmg_m*self.dmg, character = self.character} Area{group = main.current.effects, x = self.x, y = self.y, r = self.r, w = self.parent.area_size_m*96, color = self.color, dmg = 2*self.parent.area_dmg_m*self.dmg, character = self.character}
end end
end end
@ -836,7 +832,7 @@ function Projectile:on_trigger_enter(other, contact)
if self.character == 'hunter' and random:bool(40) then if self.character == 'hunter' and random:bool(40) then
trigger:after(0.01, function() trigger:after(0.01, function()
SpawnEffect{group = main.current.effects, x = self.parent.x, y = self.parent.y, color = orange[0], action = function(x, y) SpawnEffect{group = main.current.effects, x = self.parent.x, y = self.parent.y, color = orange[0], action = function(x, y)
Pet{group = main.current.main, x = x, y = y, r = self.parent:angle_to_object(other), v = 150, parent = self.parent} Pet{group = main.current.main, x = x, y = y, r = self.parent:angle_to_object(other), v = 150, parent = self.parent, conjurer_buff_m = self.conjurer_buff_m or 1}
end} end}
end) end)
end end
@ -1035,7 +1031,7 @@ function Pet:on_trigger_enter(other)
if table.any(main.current.enemies, function(v) return other:is(v) end) then if table.any(main.current.enemies, function(v) return other:is(v) end) then
if self.pierce <= 0 then if self.pierce <= 0 then
camera:shake(2, 0.5) camera:shake(2, 0.5)
other:hit(self.parent.dmg) other:hit(self.parent.dmg*(self.conjurer_buff_m or 1))
other:push(35, self:angle_to_object(other)) other:push(35, self:angle_to_object(other))
self.dead = true self.dead = true
local n = random:int(3, 4) local n = random:int(3, 4)
@ -1043,7 +1039,7 @@ function Pet:on_trigger_enter(other)
HitCircle{group = main.current.effects, x = x, y = y}:scale_down() HitCircle{group = main.current.effects, x = x, y = y}:scale_down()
else else
camera:shake(2, 0.5) camera:shake(2, 0.5)
other:hit(self.parent.dmg) other:hit(self.parent.dmg*(self.conjurer_buff_m or 1))
other:push(35, self:angle_to_object(other)) other:push(35, self:angle_to_object(other))
self.pierce = self.pierce - 1 self.pierce = self.pierce - 1
end end
@ -1103,7 +1099,7 @@ end
function Saboteur:on_collision_enter(other, contact) function Saboteur:on_collision_enter(other, contact)
if table.any(main.current.enemies, function(v) return other:is(v) end) then if table.any(main.current.enemies, function(v) return other:is(v) end) then
camera:shake(4, 0.5) camera:shake(4, 0.5)
local t = {group = main.current.effects, x = self.x, y = self.y, r = self.r, w = self.area_size_m*64, color = self.color, dmg = self.area_dmg_m*self.dmg, character = self.character} local t = {group = main.current.effects, x = self.x, y = self.y, r = self.r, w = self.area_size_m*64, color = self.color, dmg = self.area_dmg_m*self.dmg*(self.conjurer_buff_m or 1), character = self.character}
Area(table.merge(t, mods or {})) Area(table.merge(t, mods or {}))
self.dead = true self.dead = true
end end

68
todo
View File

@ -1,68 +0,0 @@
Vagrant: shoots a projectile at any nearby enemy, medium range
Scout: throws a knife that chains 3 times at any nearby enemy, small range
Cleric: heals every unit when any one drops below 50% HP
Swordsman: deals physical damage in a medium area around the unit, small range, AoE has medium range
Archer: shoots an arrow that pierces at any nearby enemy, very long range
Wizard: shoots a projectile at any nearby enemy and deals AoE damage on contact, long range, AoE has very small range
Outlaw: throws a leque of knives at nearby enemies, medium range
Blade: shoots multiple blades at nearby enemies, each dealing AoE damage on contact, small range, AoE has small range
Elementor: deals massive AoE damage to a random target, long range, AoE has medium range
Saboteur: calls on other saboteurs to seek targets and explode on contact, AoE has small range
Stormweaver: infuses all projectile attacks with chain lightning, small range
Sage: shoots a slow projectile that draws enemies in, medium range, AoE has small range
Squire: improves damage and defense for adjacent units, as well as healing them periodically
Cannoneer: shoots a projectile at any nearby enemy and deals massive AoE damage on contact, long range, AoE has medium range
Dual Gunner: shoots two parallel projectiles at any nearby enemy, medium range
Hunter: shoots an arrow at any nearby enemy with a chance to summon a pet that will trample through enemies knocking them away, arrow has long range, pet has small range
Chronomancer: dramatically improves attack speed for adjacent units
Spellblade: knives spiral outwards and pierce enemies
Psykeeper: all damage taken is stored and distributed as healing
Engineer: drops a sentry that uses random attacks, medium range
Ranger: yellow, 10%/20% chance to release a barrage on attack
Warrior: orange, +25/+50 defense to all warriors
Healer: green, 25% increased healing effectiveness
Mage: blue, -15/-30 enemy defense
Nuker: purple, 15%/25% increased area damage and size
Conjurer: orange, 25% increased construct damage and duration
Rogue: red, 10%/20% chance to crit dealing 4x damage
Enchanter: pink, 25% increased damage to all allies
Psy: white, 2X damage taken returned
Vagrant [warrior, ranger, psy]
Scout [rogue]
Cleric [healer]
Swordsman [warrior]
Archer [ranger]
Wizard [mage]
Outlaw [rogue, warrior]
Blade [warrior, nuker]
Elementor [mage, nuker]
Saboteur [rogue, conjurer, nuker]
Stormweaver [enchanter]
Sage [mage, nuker]
Squire [warrior, healer, enchanter]
Cannoneer [ranger, nuker]
Dual Gunner [ranger, rogue]
Hunter [ranger, conjurer]
Chronomancer [mage, enchanter]
Spellblade [mage, rogue]
Psykeeper [healer, psy]
Engineer [conjurer]
Ranger [2, 4] (5)
Warrior [2, 4] (5)
Healer [3]
Mage [2, 4] (5)
Nuker [2, 4] (5)
Conjurer [2] (3)
Rogue [2, 4] (5)
Enchanter [3] (3)
Psy [n] (2)
HP
Damage
Area damage
Area of effect
Attack speed
Defense -> if defense >= 0 then dmg_m = 100/(100+defense) else dmg_m = 2-100/(100-defense)