summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-03-13 11:55:28 +0800
committerEltrac <hi@guhub.cn>2025-03-13 11:55:28 +0800
commitc6e86ae57442b665d138bdb8bdbd2f7bbd9f5520 (patch)
tree89fb10c7a3f4b558fa73399fa07327c0c4d66337 /data
parent7da9c57f410caec093156fd7c1da3c190643efcc (diff)
feat: pokobs drop a broken heart when a bullet hits them
also add a hook (onHit) to define behavior after a enemy is hit
Diffstat (limited to 'data')
-rw-r--r--data/enemyData.lua5
-rw-r--r--data/roomData.lua188
2 files changed, 99 insertions, 94 deletions
diff --git a/data/enemyData.lua b/data/enemyData.lua
index faa9f3e..ea38366 100644
--- a/data/enemyData.lua
+++ b/data/enemyData.lua
@@ -112,6 +112,11 @@ local enemyData = {
{ type = "brokenheart", amount = 1, chances = 1 },
{ type = "brokenheart", amount = 1, chances = 0.5 }
},
+ onHit = function(shot)
+ local Loot = require "objects.loot"
+ local lootItem = Loot:new("brokenheart", shot.x, shot.y)
+ table.insert(G.currentRoom.objects.loots, lootItem)
+ end
}
}
diff --git a/data/roomData.lua b/data/roomData.lua
index 2292bb7..3a7abaa 100644
--- a/data/roomData.lua
+++ b/data/roomData.lua
@@ -9,100 +9,100 @@ local roomData = {
enemies = {},
manualPlacementOnly = true
},
- lancerParty = {
- name = "Lancers' Party",
- type = roomType.COMBAT,
- width = config.defaultRoomW,
- height = config.defaultRoomH,
- enemies = {
- {"lancer", "topRight"},
- {"lancer", "topLeft"},
- {"lancer", "bottomRight"},
- {"lancer", "bottomLeft"},
- },
- obstacles = {
- {"pillar", "center"}
- },
- },
- blueberries = {
- name = "Blueberries",
- type = roomType.COMBAT,
- width = config.defaultRoomW,
- height = config.defaultRoomH,
- enemies = {
- {"lancer", "leftCenter"},
- {"lancer", "rightCenter"},
- {"citrusLitulon", "topCenter"},
- {"citrusLitulon", "center"},
- {"citrusLitulon", "bottomCenter"},
- },
- obstacles = {
- {"pillar", "topRight"},
- {"pillar", "bottomLeft"},
- {"pillar", "topLeft"},
- {"pillar", "bottomRight"},
- },
- },
- spigerCave = {
- name = "Spiger Cave",
- type = roomType.COMBAT,
- width = config.defaultRoomW,
- height = config.defaultRoomH,
- enemies = {
- {"spiger", "leftCenter"},
- {"spiger", "rightCenter"},
- {"spiger", "center"},
- },
- obstacles = {
- {"pillar", "topCenter"},
- {"pillar", "bottomCenter"},
- },
- },
- library = {
- name = "Library",
- type = roomType.COMBAT,
- width = config.defaultRoomW,
- height = config.defaultRoomH,
- enemies = {
- {"librarian", "topCenter"},
- {"librarian", "bottomCenter"},
- {"lancer", "center"},
- },
- obstacles = {
- {"pillar", "topRight"},
- {"pillar", "bottomLeft"},
- {"pillar", "topLeft"},
- {"pillar", "bottomRight"},
- },
- },
- bookstore = {
- name = "Book Store",
- type = roomType.COMBAT,
- width = config.defaultRoomW,
- height = config.defaultRoomH,
- enemies = {
- {"librarian", "topRight"},
- {"librarian", "bottomRight"},
- {"librarian", "topLeft"},
- {"librarian", "bottomLeft"},
- },
- obstacles = {
- {"pillar", "center"},
- },
- },
- fireflyForest = {
- name = "Firefly Forest",
- type = roomType.COMBAT,
- width = config.defaultRoomW,
- height = config.defaultRoomH,
- enemies = {
- {"citrusLitulon","random"},
- {"citrusLitulon","random"},
- {"citrusLitulon","random"},
- {"citrusLitulon","random"},
- {"citrusLitulon","random"},
- }
- },
+ -- lancerParty = {
+ -- name = "Lancers' Party",
+ -- type = roomType.COMBAT,
+ -- width = config.defaultRoomW,
+ -- height = config.defaultRoomH,
+ -- enemies = {
+ -- {"lancer", "topRight"},
+ -- {"lancer", "topLeft"},
+ -- {"lancer", "bottomRight"},
+ -- {"lancer", "bottomLeft"},
+ -- },
+ -- obstacles = {
+ -- {"pillar", "center"}
+ -- },
+ -- },
+ -- blueberries = {
+ -- name = "Blueberries",
+ -- type = roomType.COMBAT,
+ -- width = config.defaultRoomW,
+ -- height = config.defaultRoomH,
+ -- enemies = {
+ -- {"lancer", "leftCenter"},
+ -- {"lancer", "rightCenter"},
+ -- {"citrusLitulon", "topCenter"},
+ -- {"citrusLitulon", "center"},
+ -- {"citrusLitulon", "bottomCenter"},
+ -- },
+ -- obstacles = {
+ -- {"pillar", "topRight"},
+ -- {"pillar", "bottomLeft"},
+ -- {"pillar", "topLeft"},
+ -- {"pillar", "bottomRight"},
+ -- },
+ -- },
+ -- spigerCave = {
+ -- name = "Spiger Cave",
+ -- type = roomType.COMBAT,
+ -- width = config.defaultRoomW,
+ -- height = config.defaultRoomH,
+ -- enemies = {
+ -- {"spiger", "leftCenter"},
+ -- {"spiger", "rightCenter"},
+ -- {"spiger", "center"},
+ -- },
+ -- obstacles = {
+ -- {"pillar", "topCenter"},
+ -- {"pillar", "bottomCenter"},
+ -- },
+ -- },
+ -- library = {
+ -- name = "Library",
+ -- type = roomType.COMBAT,
+ -- width = config.defaultRoomW,
+ -- height = config.defaultRoomH,
+ -- enemies = {
+ -- {"librarian", "topCenter"},
+ -- {"librarian", "bottomCenter"},
+ -- {"lancer", "center"},
+ -- },
+ -- obstacles = {
+ -- {"pillar", "topRight"},
+ -- {"pillar", "bottomLeft"},
+ -- {"pillar", "topLeft"},
+ -- {"pillar", "bottomRight"},
+ -- },
+ -- },
+ -- bookstore = {
+ -- name = "Book Store",
+ -- type = roomType.COMBAT,
+ -- width = config.defaultRoomW,
+ -- height = config.defaultRoomH,
+ -- enemies = {
+ -- {"librarian", "topRight"},
+ -- {"librarian", "bottomRight"},
+ -- {"librarian", "topLeft"},
+ -- {"librarian", "bottomLeft"},
+ -- },
+ -- obstacles = {
+ -- {"pillar", "center"},
+ -- },
+ -- },
+ -- fireflyForest = {
+ -- name = "Firefly Forest",
+ -- type = roomType.COMBAT,
+ -- width = config.defaultRoomW,
+ -- height = config.defaultRoomH,
+ -- enemies = {
+ -- {"citrusLitulon","random"},
+ -- {"citrusLitulon","random"},
+ -- {"citrusLitulon","random"},
+ -- {"citrusLitulon","random"},
+ -- {"citrusLitulon","random"},
+ -- }
+ -- },
daddyAndSon = {
name = "Daddies and Sons",
type = roomType.COMBAT,