diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-11 09:37:23 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-11 09:37:23 +0800 |
| commit | 89a8e09c0d0958d0dff4eb8ca1f5d7e0eb4a1c6e (patch) | |
| tree | 3fe9bf27fa3e13828aeb13705c54abf5a68482b2 /data | |
| parent | 24abb521363788162da14ba7716fce6c9ba551a8 (diff) | |
feat: add sticky heart
Diffstat (limited to 'data')
| -rw-r--r-- | data/bulletData.lua | 11 | ||||
| -rw-r--r-- | data/enemyData.lua | 4 | ||||
| -rw-r--r-- | data/heartTypes.lua | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/data/bulletData.lua b/data/bulletData.lua index 2a9535a..a52ba98 100644 --- a/data/bulletData.lua +++ b/data/bulletData.lua @@ -40,6 +40,17 @@ local bulletData = { end end }, + stickyheart = { + damage = 80, + afterShot = function () + end, + afterHit = function (x, y, enemyType) + local slowed = enemies.getWithinRage(x, y, 100) + for _, enemy in ipairs(slowed) do + enemy:getSticky(5) + end + end + }, greenheart = { damage = 100, afterShot = function () diff --git a/data/enemyData.lua b/data/enemyData.lua index dba10cc..79fe9d0 100644 --- a/data/enemyData.lua +++ b/data/enemyData.lua @@ -41,7 +41,9 @@ local enemyData = { }, }, drops = { - { type = "bigheart", amount = 1, chances = 1 } + { type = "purpleheart", amount = 1, chances = 1 }, + { type = "stickyheart", amount = 1, chances = 0.5 }, + { type = "bigheart", amount = 1, chances = 0.01 } }, }, librarian = { diff --git a/data/heartTypes.lua b/data/heartTypes.lua index 2c9a033..efd21b4 100644 --- a/data/heartTypes.lua +++ b/data/heartTypes.lua @@ -7,11 +7,11 @@ local heartTypes = { "brownheart", "giftheart", "greenheart", - "mendingheart", "purpleheart", "radiantheart", "redheart", "shinyheart", + "stickyheart", "twinheart", "whiteheart", "yellowheart" |
