VampireTest
This commit is contained in:
@ -18,14 +18,14 @@ public class Allie extends Unique{
|
||||
public Allie(Joueur joueur) {
|
||||
super("ALLIE","desc", 8, joueur);
|
||||
|
||||
Action action = new ActionAltererStatistiquesJoueur("HP",this.getPv(),false);
|
||||
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.MORE));
|
||||
conditions.add(new ConditionStatistiques(ConditionStatistiques.JOUEUR, Joueur.PLAYER_HP, 0, ConditionStatistiques.LESS));
|
||||
|
||||
Condition winCondition = new ConditionMultiple(conditions);
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class Bob extends CartePersonnage{
|
||||
|
||||
if(thisJoueur.choisir()) {
|
||||
((EffetTarget)this.getEffet()).setTarget(j);
|
||||
utiliser();
|
||||
this.utiliser(thisJoueur);
|
||||
}else {
|
||||
super.attaquer(j, blessure);
|
||||
}
|
||||
@ -36,7 +36,7 @@ public class Bob extends CartePersonnage{
|
||||
|
||||
@Override
|
||||
public void utiliser() {
|
||||
Joueur j = this.getJoueur();
|
||||
this.getEffet().utiliser(j);
|
||||
}
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -14,13 +14,14 @@ public abstract class CartePersonnage extends CarteCondition {
|
||||
this.joueur = joueur;
|
||||
joueur.setCartePersonnage(this);
|
||||
}
|
||||
|
||||
|
||||
public abstract void utiliser();
|
||||
|
||||
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
j.addToStat(Joueur.PLAYER_HP, -blessure);
|
||||
}
|
||||
|
||||
|
||||
public boolean victoire(){
|
||||
return this.getCondition().isTrue(this.joueur);
|
||||
}
|
||||
@ -30,7 +31,7 @@ public abstract class CartePersonnage extends CarteCondition {
|
||||
}
|
||||
|
||||
public void setJoueur(Joueur j) {
|
||||
joueur=j;
|
||||
this.joueur=j;
|
||||
}
|
||||
|
||||
public void deplacer() {
|
||||
@ -41,4 +42,6 @@ public abstract class CartePersonnage extends CarteCondition {
|
||||
return pv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -27,13 +27,11 @@ public class Charles extends CartePersonnage{
|
||||
if(joueur.getStat(Joueur.PLAYER_HP) > 2 && joueur.getRevele()){
|
||||
|
||||
Plateau p = j.getPlateau();
|
||||
utiliser();
|
||||
utiliser(joueur);
|
||||
p.attaquer(this.getJoueur(), j);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public void utiliser() {
|
||||
this.getEffet().utiliser(this.getJoueur());
|
||||
}
|
||||
}
|
||||
|
@ -26,15 +26,13 @@ public class Daniel extends CartePersonnage{
|
||||
|
||||
conditions.add(new ConditionMultiple(conditions2));
|
||||
|
||||
|
||||
Condition winCondition = new ConditionMultipleOR(conditions);
|
||||
|
||||
this.setCondition(winCondition);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
|
||||
public void utiliser() {
|
||||
this.getJoueur().setRevele(true);
|
||||
this.getJoueur().reveal();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,10 +15,8 @@ public class Emi extends CartePersonnage{
|
||||
public void deplacer() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
|
||||
public void utiliser() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ public class Franklin extends Unique{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void utiliser() {
|
||||
Joueur joueur = this.getJoueur();
|
||||
|
||||
|
@ -11,13 +11,6 @@ public class Georges extends Unique{
|
||||
this.setCondition(new WinConditionHunter());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void utiliser() {
|
||||
Joueur joueur = this.getJoueur();
|
||||
|
||||
|
@ -10,10 +10,8 @@ public class LoupGarou extends CartePersonnage {
|
||||
|
||||
this.setCondition(new WinConditionShadow());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public void utiliser() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,10 +9,7 @@ public class Metamorphe extends CartePersonnage{
|
||||
super(nom,desc, hp, joueur);
|
||||
this.setCondition(new WinConditionShadow());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public void utiliser() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ public abstract class Unique extends CartePersonnage{
|
||||
|
||||
public Unique(String nom, String desc ,int hp, Joueur joueur) {
|
||||
super(nom,desc, hp, joueur);
|
||||
|
||||
this.capaciteUsed = false;
|
||||
}
|
||||
|
||||
public boolean isCapaciteUsed() {
|
||||
|
@ -10,20 +10,14 @@ import main.Joueur;
|
||||
|
||||
public class Vampire extends CartePersonnage{
|
||||
|
||||
public Vampire(String nom, String desc ,int hp, Joueur joueur) {
|
||||
super(nom,desc, hp, joueur);
|
||||
public Vampire(Joueur joueur) {
|
||||
super("Vampire","desc", 13, joueur);
|
||||
|
||||
Action action = new ActionAltererStatistiquesJoueur("HP",2,true);
|
||||
Action action = new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,2,true);
|
||||
Effet effet = new EffetSelf(action);
|
||||
this.setEffet(effet);
|
||||
this.setCondition(new WinConditionShadow());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void utiliser()
|
||||
{
|
||||
this.getEffet().utiliser(this.getJoueur());
|
||||
}
|
||||
|
||||
/**
|
||||
* Lance l'action d'attaquer de Vampire
|
||||
@ -36,9 +30,10 @@ public class Vampire extends CartePersonnage{
|
||||
super.attaquer(j, blessure);
|
||||
if(this.getJoueur().getRevele())
|
||||
{
|
||||
utiliser(this.getJoueur());
|
||||
this.utiliser(this.getJoueur());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void utiliser() {
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user