added player inventory

This commit is contained in:
2025-11-30 17:06:31 +01:00
parent 46b8c66ff5
commit cfea57e542
9 changed files with 166 additions and 54 deletions

View File

@@ -8,7 +8,8 @@ public class KeyObj extends Entity {
public KeyObj(GamePanel panel) {
super(panel);
name = "key";
name = "Normal Key";
description = "[" + name + "]\nIt opens a door.";
type = EntityType.ITEM;
down1 = initEntitySprites("objects/key");
}

View File

@@ -8,7 +8,8 @@ public class ShieldWoodObj extends Entity {
public ShieldWoodObj(GamePanel panel) {
super(panel);
name = "shield-wood";
name = "Wooden Shield";
description = "[" + name + "]\nAn old shield.\nIt's not that strong but\nit does its job.";
type = EntityType.ITEM;
down1 = initEntitySprites("objects/shield_wood");
defenseValue = 1;

View File

@@ -9,7 +9,8 @@ public class SwordNormalObj extends Entity {
public SwordNormalObj(GamePanel panel) {
super(panel);
name = "sword-normal";
name = "Normal Sword";
description = "[" + name + "]\nAn old sword.";
type = EntityType.ITEM;
down1 = initEntitySprites("objects/sword_normal");
attackValue = 1;