From ded9d2b26b2f5cbb5828e39683dbc5c1645418d1 Mon Sep 17 00:00:00 2001 From: Elred19 <65461188+Elred19@users.noreply.github.com> Date: Thu, 21 May 2020 22:23:46 +0200 Subject: [PATCH] Ajout durabilite + attaque --- src/item/weapon/Weapon.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/item/weapon/Weapon.java b/src/item/weapon/Weapon.java index 726b02b..358fa68 100644 --- a/src/item/weapon/Weapon.java +++ b/src/item/weapon/Weapon.java @@ -5,10 +5,19 @@ public class Weapon extends Item { private float attack; - - public Weapon(String name, float attack) { + private int durability; + public Weapon(String name, float attack, int durability) { super(name); this.attack = attack; + this.durability = durability; + } + public String getNmae() { + return(this.name); + } + public float getAttack() { + return(this.attack); + } + public int getDurability() { + return(this.durability); } - }