add repairKit class

This commit is contained in:
2026-05-11 12:29:43 +03:30
parent 24175b68bf
commit c80c0425b1
@@ -0,0 +1,21 @@
package org.project.item.consumables;
import org.project.entity.Entity;
import org.project.entity.players.Player;
public class repairKit extends Consumable{
public repairKit() {
super("Repair Kit",1);
}
@Override
public void use(Entity target) {
if (!hasCharges()) {
System.out.println("Repair Kit is not available");
return;
}
((Player) (target)).getArmor().repair();
consume();
System.out.println("(" + getQuantity() + " charges remaining)");
}
}