From c311ada15e8083f4b23fed0163f80d7ac0b5a8e4 Mon Sep 17 00:00:00 2001 From: elacey Date: Thu, 23 May 2019 13:43:34 -0400 Subject: [PATCH] Added new constructor for weapons --- src/com/bayviewglen/zork/Items/Item.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/com/bayviewglen/zork/Items/Item.java b/src/com/bayviewglen/zork/Items/Item.java index 7e4abcc..7d5c64f 100644 --- a/src/com/bayviewglen/zork/Items/Item.java +++ b/src/com/bayviewglen/zork/Items/Item.java @@ -7,6 +7,7 @@ public class Item { private boolean isConsumable; private int health; private int weight; + private int damage; public Item(int id, String name, String description, boolean isConsumable, int health, int weight) { this.id = id; @@ -16,6 +17,14 @@ public class Item { this.health = health; this.weight = weight; } + + public Item(int id, String name, String description, int weight, int damage) { + this.id = id; + this.name = name; + this.description = description; + this.weight = weight; + this.damage = damage; + } public String getDescription() { return description;