feat: Some game additions

This commit is contained in:
2026-02-11 21:37:01 +01:00
parent 6559cbe4c7
commit a8ce7b8ed1
12 changed files with 46 additions and 71 deletions

View File

@@ -23,6 +23,14 @@ public class ResourceManager {
ROOM2("rooms/2.png"),
ROOM3("rooms/3.png"),
ROOM4("rooms/4.png"),
ROOM5("rooms/5.png"),
ROOM6("rooms/6.png"),
ROOM7("rooms/7.png"),
ROOM8("rooms/8.png"),
ROOM9("rooms/9.png"),
ROOM10("rooms/10.png"),
ROOM11("rooms/11.png"),
ROOM12("rooms/12.png"),
ROOM_FROZEN("rooms/frozen.png"),
PLAYER_FRONT("player/front.png"),

View File

@@ -18,6 +18,7 @@ import tools.jackson.databind.*;
import tools.jackson.dataformat.yaml.YAMLFactory;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -48,7 +49,7 @@ public class DependencyManager extends InjectableValues {
// Construct all classes
for (Class<?> clazz : classes) {
for (var constructor : clazz.getDeclaredConstructors()) {
for (Constructor<?> constructor : clazz.getDeclaredConstructors()) {
var paramTypes = constructor.getParameterTypes();
var params = new Object[paramTypes.length];
boolean suitable = true;

View File

@@ -1,3 +1,3 @@
renderColliders: false
renderPlayerCollider: false
showPlayerCordsLogs: false
renderColliders: true
renderPlayerCollider: true
showPlayerCordsLogs: true

View File

@@ -3,7 +3,15 @@
# Intro NPC explains the goal + starter chest
# =========================
- id: "spawn"
texture: "ROOM1"
texture: "ROOM11"
colliders:
- start: { x: 76, y: 45 }
end: { x: 155, y: 67 }
- start: { x: 40, y: 160 }
end: { x: 70, y: 190 }
- start: { x: 150, y: 160 }
end: { x: 185, y: 190 }
mobs:
- type: "dialog"
texture: "OLD_MAN"
@@ -27,22 +35,8 @@
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
@@ -51,26 +45,12 @@
# LOOT ROOM 1
# =========================
- id: "truhlaright"
texture: "ROOM1"
objects:
- objectType: "chest"
cords: { x: 140, y: 45 }
items:
- id: 1
name: "Dagger"
type: { name: "weapon_sword", dealDamage: 2, attackCooldownMs: 300 } # TODO: Make it dagger
texture: "DAGGER"
- id: 2
name: "Bread"
type: { name: "food", addHealth: 3 }
texture: "BREAD"
- id: 9
name: "Shiny Rock"
type: { name: "junk" }
texture: "ROCK"
texture: "ROOM5"
colliders:
- start: { x: 140, y: 45 }
end: { x: 180, y: 67 }
- start: { x: 90, y: 100 }
end: { x: 140, y: 145 }
- start: { x: 40, y: 70 }
end: { x: 80, y: 100 }
west: "spawn"
east: "filler_1"
north: "klicnik"
@@ -80,11 +60,11 @@
# KEY KEEPER (QUEST NPC)
# =========================
- id: "klicnik"
texture: "ROOM1"
texture: "ROOM10"
mobs:
- type: "dialog"
texture: "KEY_KEEPER"
cords: { x: 100, y: 100 }
cords: { x: 90, y: 60 }
collider:
start: { x: 0, y: 52 }
end: { x: 44, y: 78 }
@@ -120,7 +100,7 @@
# BOSS ROOM
# =========================
- id: "boss"
texture: "ROOM1"
texture: "ROOM3"
mobs:
- type: "hittable_drops"
texture: "CAVE_BEAST"
@@ -153,7 +133,7 @@
# FINAL ROOM / EXIT
# =========================
- id: "final_room"
texture: "ROOM1"
texture: "ROOM6"
requirement:
item: "quest_item_final_key"
#objects:
@@ -170,7 +150,7 @@
# COMBAT FILLER A (zombie)
# =========================
- id: "empty_a"
texture: "ROOM1"
texture: "ROOM7"
mobs:
- type: "hittable_drops"
texture: "ZOMBIE"
@@ -226,7 +206,7 @@
# LOOT ROOM 2
# =========================
- id: "truhlarightright"
texture: "ROOM1"
texture: "ROOM2"
objects:
- objectType: "chest"
cords: { x: 100, y: 45 }
@@ -253,7 +233,7 @@
# EXTRA FILLER ROOMS (maze / dead ends)
# =========================
- id: "filler_1"
texture: "ROOM1"
texture: "ROOM3"
west: "truhlaright"
east: "filler_1b"
north: null
@@ -261,34 +241,34 @@
- id: "filler_1b"
texture: "ROOM1"
west: "filler_1"
west: "filler_7"
east: null
north: null
south: null
- id: "filler_2"
texture: "ROOM1"
texture: "ROOM7"
west: null
east: "empty_a"
north: "filler_loop_1"
south: null
- id: "filler_loop_1"
texture: "ROOM1"
texture: "ROOM4"
west: null
east: null
north: "filler_loop_2"
south: "filler_2"
- id: "filler_loop_2"
texture: "ROOM1"
texture: "ROOM3"
west: "filler_loop_3"
east: null
north: null
south: "filler_loop_1"
- id: "filler_loop_3"
texture: "ROOM1"
texture: "ROOM2"
west: null
east: "filler_loop_2"
north: null
@@ -302,21 +282,21 @@
south: null
- id: "filler_k_west"
texture: "ROOM1"
texture: "ROOM4"
west: "filler_k_west_2"
east: "klicnik"
north: null
south: null
- id: "filler_k_west_2"
texture: "ROOM1"
texture: "ROOM3"
west: null
east: "filler_k_west"
north: null
south: null
- id: "filler_boss_west"
texture: "ROOM1"
texture: "ROOM2"
west: null
east: "boss"
north: null
@@ -330,36 +310,22 @@
south: null
- id: "filler_rr_east"
texture: "ROOM1"
texture: "ROOM4"
west: "truhlarightright"
east: null
north: null
south: null
- id: "filler_south_1"
texture: "ROOM1"
texture: "ROOM3"
west: null
east: null
north: "truhlaright"
south: "filler_south_2"
- id: "filler_south_2"
texture: "ROOM1"
texture: "ROOM2"
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
south: null

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB