diff options
| author | Eltrac <hi@guhub.cn> | 2025-02-19 16:00:23 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-02-19 16:00:23 +0800 |
| commit | 3522cba95a69497f27f897d253f045a7e7b8ec75 (patch) | |
| tree | d69ab265d6000a627a76b89d3e9100461c004478 /data/enemyData.lua | |
| parent | 959e37dc868ba4a1d58b08e1acf97a18e5dc9b87 (diff) | |
refactor: organize project structure
- change the way modules are imported, defining module directly in globals
- move enemy data and heart data into individual files and /data directory
Diffstat (limited to 'data/enemyData.lua')
| -rw-r--r-- | data/enemyData.lua | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/data/enemyData.lua b/data/enemyData.lua new file mode 100644 index 0000000..45f83ce --- /dev/null +++ b/data/enemyData.lua @@ -0,0 +1,41 @@ +enemyData = { + lancer = { + size = 12, + speed = 25, + appearance = { + color = { 0, 1, 1 } + }, + drops = { + { type = "blueheart", amount = 1, chances = 1 }, + { type = "blueheart", amount = 1, chances = 0.25 } + }, + }, + gorilla = { + size = 25, + speed = 10, + appearance = { + color = { 224/255, 122/255, 95/255 } + } + , + drops = { + { type = "bigheart", amount = 1, chances = 1 } + }, + }, + fairy = { + size = 8, + speed = 60, + appearance = { + color = { 251/255, 243/255, 185/255 } + } + , + drops = { + { type = "yellowheart", amount = 2, chances = 1 }, + { type = "shinyheart", amount = 1, chances = 0.2 } + }, + } +} + +enemyTypes = {} +for type, _ in pairs(enemyData) do + table.insert(enemyTypes, type) +end |
