Test méthode initCartePersonnage
This commit is contained in:
@ -29,6 +29,26 @@ public class Allie extends Unique{
|
||||
|
||||
Condition winCondition = new ConditionMultiple(conditions);
|
||||
|
||||
this.setCondition(winCondition);
|
||||
this.setEquipe(CartePersonnage.Equipe.NEUTRE);
|
||||
this.setJoueur(joueur);
|
||||
joueur.setCartePersonnage(this);
|
||||
}
|
||||
|
||||
public Allie() {
|
||||
super("ALLIE","desc", 8, null);
|
||||
|
||||
Action action = new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,this.getPv(),false);
|
||||
Effet effet = new EffetSelf(action);
|
||||
this.setEffet(effet);
|
||||
|
||||
List<Condition> conditions = new ArrayList<Condition>();
|
||||
|
||||
conditions.add(new ConditionStatistiques(ConditionStatistiques.PLATEAU, Plateau.PARTIE_FINIE, 1, ConditionStatistiques.EQUAL));
|
||||
conditions.add(new ConditionStatistiques(ConditionStatistiques.JOUEUR, Joueur.PLAYER_HP, 0, ConditionStatistiques.LESS));
|
||||
|
||||
Condition winCondition = new ConditionMultiple(conditions);
|
||||
|
||||
this.setCondition(winCondition);
|
||||
this.setEquipe(CartePersonnage.Equipe.NEUTRE);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public abstract class CartePersonnage extends CarteCondition {
|
||||
super(nom, description);
|
||||
this.pv = pv;
|
||||
this.joueur = joueur;
|
||||
joueur.setCartePersonnage(this);
|
||||
|
||||
}
|
||||
|
||||
public abstract void utiliser();
|
||||
|
@ -11,6 +11,12 @@ public class Franklin extends Unique{
|
||||
this.setCondition(new WinConditionHunter());
|
||||
this.setEquipe(CartePersonnage.Equipe.HUNTER);
|
||||
}
|
||||
|
||||
public Franklin() {
|
||||
super("Franklin", "desc", 12, null);
|
||||
this.setCondition(new WinConditionHunter());
|
||||
this.setEquipe(CartePersonnage.Equipe.HUNTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
|
@ -10,6 +10,18 @@ import main.Joueur;
|
||||
|
||||
public class Vampire extends CartePersonnage{
|
||||
|
||||
|
||||
public Vampire() {
|
||||
super("Vampire","desc", 13,null);
|
||||
|
||||
Action action = new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,2,true);
|
||||
Effet effet = new EffetSelf(action);
|
||||
this.setEffet(effet);
|
||||
this.setCondition(new WinConditionShadow());
|
||||
this.setEquipe(CartePersonnage.Equipe.SHADOW);
|
||||
|
||||
}
|
||||
|
||||
public Vampire(Joueur joueur) {
|
||||
super("Vampire","desc", 13, joueur);
|
||||
|
||||
@ -19,8 +31,13 @@ public class Vampire extends CartePersonnage{
|
||||
this.setEffet(effet);
|
||||
this.setCondition(new WinConditionShadow());
|
||||
this.setEquipe(CartePersonnage.Equipe.SHADOW);
|
||||
this.setJoueur(joueur);
|
||||
joueur.setCartePersonnage(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Lance l'action d'attaquer de Vampire
|
||||
* <br><br> Effet : Soin 2 PV
|
||||
|
Reference in New Issue
Block a user