Scale weapon speed by size for balance.
This commit is contained in:
parent
b0c44846e5
commit
eb6d37f99c
10
src/kani.lua
10
src/kani.lua
|
@ -37,6 +37,14 @@ local POWER_DAMAGE_LOOKUP <const> = {
|
|||
[4] = 10,
|
||||
}
|
||||
|
||||
local SPEED_SIZE_LOOKUP <const> = {
|
||||
[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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user