Modification 1 classes EtreVivant, Monstre, Personnage 3

This commit is contained in:
Nicolas 2019-04-16 15:27:42 +02:00
parent 89d3594fb7
commit a159725229
2 changed files with 29 additions and 2 deletions

View File

@ -117,4 +117,5 @@ public class EtreVivant {
}

View File

@ -30,11 +30,37 @@ public void equiper(Armure armure) {
public void seDeplacer(Salle salle) {
this.salle=salle;
}
public void allerMarche(Salle salle){
this.salle=salle;
public void allerMarche(Salle marche){
this.salle=marche;
}
public void soin() {
this.pVie=this.pVieMax;
}
public void attaquer(Monstre monstre) {
if(arme!=null) {
monstre.pVie=monstre.pVie-(arme.getpArme()+getpAttaque());
}
else {
monstre.pVie=monstre.pVie=getpAttaque();
}
}
public void getBourse() {
System.out.println(this.getBourse(););
}
/**
* @return the arme
*/
public Arme getArme() {
return arme;
}
/**
* @return the armure
*/
public Armure getArmure() {
return armure;
}
}