Files
game/game/src/main/resources/setup/rooms.yaml

368 lines
7.5 KiB
YAML

# =========================
# START ROOM
# Intro NPC explains the goal + starter chest
# =========================
- id: "spawn"
texture: "ROOM1"
mobs:
- type: "dialog"
texture: "OLD_MAN"
cords: { x: 90, y: 90 }
collider:
start: { x: 0, y: 52 }
end: { x: 44, y: 78 }
dialog:
text: "You fell down here too? This cave is cursed..."
onEnd:
type: continue
nextDialog:
text: "The only way out is guarded by a beast deep inside."
onEnd:
type: continue
nextDialog:
text: "Kill it. Bring its skin to the Key Keeper."
onEnd:
type: continue
nextDialog:
text: "He will give you the key to the final gate."
onEnd: { type: end }
objects:
- objectType: "chest"
cords: { x: 120, y: 50 }
items:
- id: 100
name: "Rusty Sword"
type: { name: "weapon_sword", dealDamage: 2 }
texture: "RUSTY_SWORD"
- id: 101
name: "Apple"
type: { name: "food", addHealth: 2 }
texture: "APPLE"
west: "empty_a"
east: "truhlaright"
north: "filler_entrance_north"
south: null
# =========================
# LOOT ROOM 1
# =========================
- id: "truhlaright"
texture: "ROOM1"
objects:
- objectType: "chest"
cords: { x: 100, y: 45 }
items:
- id: 1
name: "Dagger"
type: { name: "weapon_dagger", dealDamage: 2, attackCooldownMs: 300 }
texture: "DAGGER"
- id: 2
name: "Bread"
type: { name: "food", addHealth: 3 }
texture: "BREAD"
- id: 9
name: "Shiny Rock"
type: { name: "junk" }
texture: "ROCK"
colliders:
- start: { x: 100, y: 45 }
end: { x: 140, y: 67 }
west: "spawn"
east: "filler_1"
north: "klicnik"
south: "filler_south_1"
# =========================
# KEY KEEPER (QUEST NPC)
# =========================
- id: "klicnik"
texture: "ROOM1"
mobs:
- type: "dialog"
texture: "KEY_KEEPER"
cords: { x: 100, y: 100 }
collider:
start: { x: 0, y: 52 }
end: { x: 44, y: 78 }
dialog:
text: "Want to leave? Bring me the beast's skin."
onEnd:
type: ask_question
answers:
- answer: "I have it"
requirement:
item: "quest_item_boss_skin"
dialog:
text: "Well done. Here is the key."
giveItem:
id: 300
name: "Cave Exit Key"
type: { name: "quest_item_final_key" }
texture: "KEY"
onEnd: { type: end }
- answer: "Not yet"
dialog:
text: "Then go back before it finds you."
onEnd: { type: end }
west: "filler_k_west"
east: "truhlarightright"
north: "final_room"
south: "truhlaright"
# =========================
# BOSS ROOM
# =========================
- id: "boss"
texture: "ROOM1"
mobs:
- type: "hittable_drops"
texture: "CAVE_BEAST"
cords: { x: 100, y: 100 }
collider:
start: { x: 0, y: 52 }
end: { x: 44, y: 78 }
health: 40
itemsDrops:
- id: 200
name: "Beast Skin"
type: { name: "quest_item_boss_skin" }
texture: "BOSS_SKIN"
tasks:
- type: "following_player"
speed: 2
updateRateMs: 80
- type: "attacking_player"
damage: 8
reach: 18
updateRateMs: 400
west: "filler_boss_west"
east: null
north: null
south: "empty_c"
# =========================
# FINAL ROOM / EXIT
# =========================
- id: "final_room"
texture: "ROOM_EXIT"
requirement:
item: "quest_item_final_key"
objects:
- objectType: "exit"
cords: { x: 140, y: 40 }
west: null
east: null
north: null
south: "klicnik"
# =========================
# COMBAT FILLER A (zombie)
# =========================
- id: "empty_a"
texture: "ROOM1"
mobs:
- type: "hittable_drops"
texture: "ZOMBIE"
cords: { x: 110, y: 100 }
collider:
start: { x: 0, y: 52 }
end: { x: 44, y: 78 }
health: 6
tasks:
- type: "following_player"
speed: 1
updateRateMs: 120
- type: "attacking_player"
damage: 2
reach: 15
updateRateMs: 700
west: "filler_2"
east: "spawn"
north: null
south: "filler_deadend_1"
# =========================
# COMBAT FILLER B (blind hunter)
# =========================
- id: "empty_c"
texture: "ROOM1"
mobs:
- type: "hittable_drops"
texture: "BLIND_HUNTER"
cords: { x: 100, y: 100 }
collider:
start: { x: 0, y: 52 }
end: { x: 44, y: 78 }
health: 20
tasks:
- type: "blind_following_player"
speed: 1
updateRateMs: 100
- type: "attacking_player"
damage: 6
reach: 15
updateRateMs: 500
west: "filler_c_west"
east: null
north: "boss"
south: null
# =========================
# LOOT ROOM 2
# =========================
- id: "truhlarightright"
texture: "ROOM1"
objects:
- objectType: "chest"
cords: { x: 100, y: 45 }
items:
- id: 7
name: "Axe"
type: { name: "weapon_axe", dealDamage: 4, attackCooldownMs: 800 }
texture: "AXE"
- id: 8
name: "Apple"
type: { name: "food", addHealth: 2 }
texture: "APPLE"
colliders:
- start: { x: 100, y: 45 }
end: { x: 140, y: 67 }
west: "klicnik"
east: "filler_rr_east"
north: null
south: null
# =========================
# EXTRA FILLER ROOMS (maze / dead ends)
# =========================
- id: "filler_1"
texture: "ROOM1"
west: "truhlaright"
east: "filler_1b"
north: null
south: null
- id: "filler_1b"
texture: "ROOM1"
west: "filler_1"
east: null
north: null
south: null
- id: "filler_2"
texture: "ROOM1"
west: null
east: "empty_a"
north: "filler_loop_1"
south: null
- id: "filler_loop_1"
texture: "ROOM1"
west: null
east: null
north: "filler_loop_2"
south: "filler_2"
- id: "filler_loop_2"
texture: "ROOM1"
west: "filler_loop_3"
east: null
north: null
south: "filler_loop_1"
- id: "filler_loop_3"
texture: "ROOM1"
west: null
east: "filler_loop_2"
north: null
south: null
- id: "filler_deadend_1"
texture: "ROOM1"
west: null
east: null
north: "empty_a"
south: null
- id: "filler_k_west"
texture: "ROOM1"
west: "filler_k_west_2"
east: "klicnik"
north: null
south: null
- id: "filler_k_west_2"
texture: "ROOM1"
west: null
east: "filler_k_west"
north: null
south: null
- id: "filler_boss_west"
texture: "ROOM1"
west: null
east: "boss"
north: null
south: null
- id: "filler_c_west"
texture: "ROOM1"
west: null
east: "empty_c"
north: null
south: null
- id: "filler_rr_east"
texture: "ROOM1"
west: "truhlarightright"
east: null
north: null
south: null
- id: "filler_south_1"
texture: "ROOM1"
west: null
east: null
north: "truhlaright"
south: "filler_south_2"
- id: "filler_south_2"
texture: "ROOM1"
west: null
east: null
north: "filler_south_1"
south: null
- id: "filler_entrance_north"
texture: "ROOM1"
west: null
east: "filler_north_2"
north: null
south: "spawn"
- id: "filler_north_2"
texture: "ROOM1"
west: "filler_entrance_north"
east: null
north: null
south: null