Add gun to inventory that fires bullets

This commit is contained in:
Peter Stockings
2026-01-20 21:31:21 +11:00
parent 1713ba76de
commit bac2c130aa
5 changed files with 263 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ export const ITEMS: Record<string, Item> = {
id: "iron_sword",
name: "Iron Sword",
type: "Weapon",
weaponType: "melee",
textureKey: "items",
spriteIndex: 2,
stats: {
@@ -40,6 +41,35 @@ export const ITEMS: Record<string, Item> = {
stats: {
attack: 4
},
throwable: true
throwable: true,
stackable: true,
quantity: 1
},
"pistol": {
id: "pistol",
name: "Pistol",
type: "Weapon",
weaponType: "ranged",
textureKey: "weapons",
spriteIndex: 1,
stats: {
attack: 10,
range: 8,
magazineSize: 6,
currentAmmo: 6,
ammoType: "9mm",
projectileSpeed: 15,
fireSound: "shoot"
}
},
"ammo_9mm": {
id: "ammo_9mm",
name: "9mm Ammo",
type: "Ammo",
ammoType: "9mm",
textureKey: "weapons",
spriteIndex: 23,
stackable: true,
quantity: 10 // Finds a pack of 10
}
};