From eb6d37f99c268e060424b657c36f7edeb57d3aa1 Mon Sep 17 00:00:00 2001 From: annabunches Date: Tue, 3 Oct 2023 16:25:34 -0400 Subject: [PATCH] Scale weapon speed by size for balance. --- src/kani.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/kani.lua b/src/kani.lua index e0862f1..f5d1047 100644 --- a/src/kani.lua +++ b/src/kani.lua @@ -37,6 +37,14 @@ local POWER_DAMAGE_LOOKUP = { [4] = 10, } +local SPEED_SIZE_LOOKUP = { + [1] = 10, + [2] = 5, + [3] = 3, + [4] = 1, +} + + class("Kani").extends(Entity) function Kani:init(ui) @@ -117,7 +125,7 @@ function Kani:fire() local bullet = Bullet( POWER_SIZE_LOOKUP[self.weaponPower], POWER_DAMAGE_LOOKUP[self.weaponPower], - geom.vector2D.new(5,0), + geom.vector2D.new(SPEED_SIZE_LOOKUP[self.weaponPower],0), 0x4 ) bullet:moveTo(self.x+16, self.y)