2020-04-17 13:41:40 +02:00
|
|
|
package personnage;
|
|
|
|
|
2020-04-17 15:19:48 +02:00
|
|
|
import carte.CarteCondition;
|
2020-05-14 12:36:15 +02:00
|
|
|
import condition.Condition;
|
2020-04-17 13:41:40 +02:00
|
|
|
import main.Joueur;
|
|
|
|
|
2020-04-18 14:05:53 +02:00
|
|
|
public abstract class CartePersonnage extends CarteCondition {
|
2020-04-21 15:27:27 +02:00
|
|
|
|
2020-04-18 13:30:33 +02:00
|
|
|
private int pv;
|
2020-04-17 13:41:40 +02:00
|
|
|
private Joueur joueur;
|
2020-04-23 11:00:11 +02:00
|
|
|
private Equipe equipe;
|
|
|
|
|
|
|
|
public enum Equipe{
|
|
|
|
NEUTRE,
|
|
|
|
SHADOW,
|
|
|
|
HUNTER
|
|
|
|
}
|
2020-04-17 13:41:40 +02:00
|
|
|
|
2020-04-21 15:27:27 +02:00
|
|
|
public CartePersonnage(String nom, String description, int pv, Joueur joueur) {
|
|
|
|
super(nom, description);
|
2020-04-18 14:05:53 +02:00
|
|
|
this.pv = pv;
|
2020-04-21 15:27:27 +02:00
|
|
|
this.joueur = joueur;
|
2020-04-17 13:41:40 +02:00
|
|
|
}
|
2020-04-22 13:05:36 +02:00
|
|
|
|
2020-04-21 11:46:41 +02:00
|
|
|
public abstract void utiliser();
|
2020-04-22 13:05:36 +02:00
|
|
|
|
2020-04-17 13:41:40 +02:00
|
|
|
|
2020-04-21 18:01:24 +02:00
|
|
|
public void attaquer(Joueur j, int blessure) {
|
|
|
|
j.addToStat(Joueur.PLAYER_HP, -blessure);
|
|
|
|
}
|
2020-04-22 13:05:36 +02:00
|
|
|
|
2020-04-17 13:41:40 +02:00
|
|
|
public boolean victoire(){
|
2020-04-21 16:37:23 +02:00
|
|
|
return this.getCondition().isTrue(this.joueur);
|
|
|
|
}
|
2020-04-17 13:41:40 +02:00
|
|
|
|
|
|
|
public Joueur getJoueur() {
|
|
|
|
return joueur;
|
2020-04-21 16:37:23 +02:00
|
|
|
}
|
2020-04-17 13:41:40 +02:00
|
|
|
|
|
|
|
public void setJoueur(Joueur j) {
|
2020-04-22 13:05:36 +02:00
|
|
|
this.joueur=j;
|
2020-04-21 16:37:23 +02:00
|
|
|
}
|
2020-04-17 13:41:40 +02:00
|
|
|
|
|
|
|
public void deplacer() {
|
|
|
|
|
|
|
|
}
|
2020-04-18 13:30:33 +02:00
|
|
|
|
|
|
|
public int getPv() {
|
|
|
|
return pv;
|
2020-04-17 15:19:48 +02:00
|
|
|
}
|
2020-04-17 13:41:40 +02:00
|
|
|
|
2020-04-23 11:00:11 +02:00
|
|
|
public Equipe getEquipe() {
|
|
|
|
return this.equipe;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void setEquipe(Equipe equipe) {
|
|
|
|
this.equipe = equipe;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-04-22 13:05:36 +02:00
|
|
|
|
|
|
|
|
2020-04-17 13:41:40 +02:00
|
|
|
}
|