From 3522cba95a69497f27f897d253f045a7e7b8ec75 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Wed, 19 Feb 2025 16:00:23 +0800 Subject: 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 --- data/enemyData.lua | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 data/enemyData.lua (limited to 'data/enemyData.lua') 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 -- cgit v1.2.3