worked on combat
This commit is contained in:
@@ -16,6 +16,7 @@ public class Item {
|
||||
this.isConsumable = isConsumable;
|
||||
this.health = health;
|
||||
this.weight = weight;
|
||||
this.damage = 1;
|
||||
}
|
||||
|
||||
public Item(int id, String name, String description, int weight, int damage) {
|
||||
@@ -63,5 +64,8 @@ public class Item {
|
||||
public boolean equals(Item item){
|
||||
return this.id == item.id && this.name.equals(item.name) && this.description.equals(item.description) && this.isConsumable == item.isConsumable && this.health == item.health && this.weight == item.weight;
|
||||
}
|
||||
public int getDamage() {
|
||||
return this.damage;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,4 +5,5 @@ public class Pen extends Item{
|
||||
super(11, "Pen", "An old-fashioned feathered pen with ink dried on the tip", false, 10, 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user