Bob
This commit is contained in:
@ -40,16 +40,9 @@ public class Allie extends Unique{
|
||||
*/
|
||||
public void utiliser() {
|
||||
|
||||
if(!this.isCapaciteUsed()) {
|
||||
if(this.getJoueur().getRevele() && !this.isCapaciteUsed()) {
|
||||
this.getEffet().utiliser(this.getJoueur());
|
||||
this.setCapaciteUsed(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,8 +8,8 @@ import main.Joueur;
|
||||
|
||||
public class Bob extends CartePersonnage{
|
||||
|
||||
public Bob(String nom, String desc ,int hp, Joueur joueur) throws Exception {
|
||||
super(nom,desc, hp, joueur);
|
||||
public Bob(Joueur joueur){
|
||||
super("BOB","desc", 10, joueur);
|
||||
Condition condition = new ConditionStatistiques(ConditionStatistiques.JOUEUR, Joueur.PLAYER_NB_EQUIPEMENTS, 5, ConditionStatistiques.MORE);
|
||||
this.setCondition(condition);
|
||||
|
||||
@ -19,25 +19,24 @@ public class Bob extends CartePersonnage{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attaquer(Joueur j, int attaque) {
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
|
||||
if(attaque >= 2 && j.getRevele()) {
|
||||
if(blessure >= 2 && j.getRevele()) {
|
||||
|
||||
Joueur thisJoueur = this.getJoueur();
|
||||
|
||||
if(thisJoueur.choisir()) {
|
||||
((EffetTarget)this.getEffet()).setTarget(j);
|
||||
utiliser();
|
||||
}else {
|
||||
super.attaquer(j, blessure);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void utiliser() {
|
||||
Joueur j = this.getJoueur();
|
||||
this.getEffet().utiliser(j);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,11 +12,14 @@ public abstract class CartePersonnage extends CarteCondition {
|
||||
super(nom, description);
|
||||
this.pv = pv;
|
||||
this.joueur = joueur;
|
||||
joueur.setCartePersonnage(this);
|
||||
}
|
||||
|
||||
public abstract void utiliser();
|
||||
|
||||
public abstract void attaquer(Joueur j, int blessure);
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
j.addToStat(Joueur.PLAYER_HP, -blessure);
|
||||
}
|
||||
|
||||
public boolean victoire(){
|
||||
return this.getCondition().isTrue(this.joueur);
|
||||
|
@ -18,14 +18,17 @@ public class Charles extends CartePersonnage{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
|
||||
if(this.getJoueur().getRevele()){
|
||||
Joueur joueur = this.getJoueur();
|
||||
super.attaquer(j, blessure);
|
||||
|
||||
// TODO Choisir effet
|
||||
if(joueur.getStat(Joueur.PLAYER_HP) > 2 && joueur.getRevele()){
|
||||
|
||||
Plateau p = j.getPlateau();
|
||||
utiliser();
|
||||
p.attaquer(this.getJoueur(), j);
|
||||
p.attaquer(this.getJoueur(), j);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,13 +34,7 @@ public class Daniel extends CartePersonnage{
|
||||
|
||||
@Override
|
||||
public void utiliser() {
|
||||
// TODO Listener mort
|
||||
|
||||
this.getJoueur().setRevele(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ public class Emi extends CartePersonnage{
|
||||
this.setCondition(new WinConditionHunter());
|
||||
}
|
||||
|
||||
//m<>thode
|
||||
|
||||
public void deplacer() {
|
||||
|
||||
}
|
||||
@ -21,11 +21,4 @@ public class Emi extends CartePersonnage{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import main.Plateau;
|
||||
|
||||
public class Franklin extends Unique{
|
||||
|
||||
//constructeur
|
||||
public Franklin(String nom, int hp, Joueur joueur) {
|
||||
super(nom, nom, hp, joueur);
|
||||
this.setCondition(new WinConditionHunter());
|
||||
@ -22,13 +21,13 @@ public class Franklin extends Unique{
|
||||
public void utiliser() {
|
||||
Joueur joueur = this.getJoueur();
|
||||
|
||||
if(this.isCapaciteUsed() && joueur.getRevele()) {
|
||||
if(!this.isCapaciteUsed() && joueur.getRevele()) {
|
||||
|
||||
Plateau p = joueur.getPlateau();
|
||||
int roll = p.roll6();
|
||||
|
||||
Joueur joueur2 = joueur.choisirTous();
|
||||
joueur2.addToStat(Joueur.PLAYER_HP, -roll);
|
||||
super.attaquer(joueur2, roll);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,13 +21,13 @@ public class Georges extends Unique{
|
||||
public void utiliser() {
|
||||
Joueur joueur = this.getJoueur();
|
||||
|
||||
if(this.isCapaciteUsed() && joueur.getRevele()) {
|
||||
if(!this.isCapaciteUsed() && joueur.getRevele()) {
|
||||
|
||||
Plateau p = joueur.getPlateau();
|
||||
int roll = p.roll4();
|
||||
|
||||
Joueur joueur2 = joueur.choisirTous();
|
||||
joueur2.addToStat(Joueur.PLAYER_HP, -roll);
|
||||
super.attaquer(joueur2, roll);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,27 +4,16 @@ import condition.WinConditionShadow;
|
||||
import main.Joueur;
|
||||
|
||||
public class LoupGarou extends CartePersonnage {
|
||||
//constructeur
|
||||
|
||||
public LoupGarou(String nom, String desc ,int hp, Joueur joueur) {
|
||||
super(nom,desc, hp, joueur);
|
||||
|
||||
this.setCondition(new WinConditionShadow());
|
||||
}
|
||||
|
||||
//m<>thodes
|
||||
public void contreAttaquer(Joueur j) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void utiliser() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -15,11 +15,4 @@ public class Metamorphe extends CartePersonnage{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,9 +10,7 @@ public abstract class Unique extends CartePersonnage{
|
||||
super(nom,desc, hp, joueur);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isCapaciteUsed() {
|
||||
return capaciteUsed;
|
||||
}
|
||||
@ -20,11 +18,4 @@ public abstract class Unique extends CartePersonnage{
|
||||
public void setCapaciteUsed(boolean capaciteUsed) {
|
||||
this.capaciteUsed = capaciteUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void utiliser() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ public class Vampire extends CartePersonnage{
|
||||
*/
|
||||
public void attaquer(Joueur j, int blessure) {
|
||||
|
||||
super.attaquer(j, blessure);
|
||||
if(this.getJoueur().getRevele())
|
||||
{
|
||||
utiliser(this.getJoueur());
|
||||
|
Reference in New Issue
Block a user