worked on combat

This commit is contained in:
jslightham
2019-05-27 14:15:04 -04:00
parent 9e8c5e812c
commit c0fc0bc2cf
8 changed files with 90 additions and 14 deletions

View File

@@ -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;
}
}

View File

@@ -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);
}
}