Added new constructor for weapons
This commit is contained in:
@@ -7,6 +7,7 @@ public class Item {
|
|||||||
private boolean isConsumable;
|
private boolean isConsumable;
|
||||||
private int health;
|
private int health;
|
||||||
private int weight;
|
private int weight;
|
||||||
|
private int damage;
|
||||||
|
|
||||||
public Item(int id, String name, String description, boolean isConsumable, int health, int weight) {
|
public Item(int id, String name, String description, boolean isConsumable, int health, int weight) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
@@ -16,6 +17,14 @@ public class Item {
|
|||||||
this.health = health;
|
this.health = health;
|
||||||
this.weight = weight;
|
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() {
|
public String getDescription() {
|
||||||
return description;
|
return description;
|
||||||
|
|||||||
Reference in New Issue
Block a user