Création des cartes lumières pour insertion dans la bdd
This commit is contained in:
@ -13,12 +13,19 @@ public abstract class CarteCondition extends CarteEffet implements Serializable{
|
||||
*/
|
||||
private static final long serialVersionUID = 903022795821166067L;
|
||||
|
||||
|
||||
public CarteCondition() {
|
||||
super("","");
|
||||
this.condition = new Condition();
|
||||
}
|
||||
|
||||
|
||||
public CarteCondition(String nom, String description) {
|
||||
super(nom, description);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Condition condition;
|
||||
|
||||
|
||||
|
@ -14,11 +14,14 @@ public abstract class CarteEffet extends Carte implements Serializable{
|
||||
private static final long serialVersionUID = -5248405395465365805L;
|
||||
private Effet effet;
|
||||
|
||||
|
||||
public CarteEffet(String nom, String description) {
|
||||
super(nom, description);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @param j Appel la méthode utiliser de effet sur le joueur j
|
||||
*/
|
||||
|
@ -4,10 +4,14 @@ import main.Joueur;
|
||||
import main.Type;
|
||||
|
||||
|
||||
public abstract class Equipement extends CartePiochable<Type>{
|
||||
public abstract class CarteEquipement<T extends Type> extends CartePiochable<Type>{
|
||||
|
||||
|
||||
public Equipement(String nom, String description) {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 7537771209935892801L;
|
||||
|
||||
public CarteEquipement(String nom, String description) {
|
||||
super(nom, description);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
31
src/carte/CarteEquipementStat.java
Normal file
31
src/carte/CarteEquipementStat.java
Normal file
@ -0,0 +1,31 @@
|
||||
package carte;
|
||||
|
||||
import condition.Condition;
|
||||
import effet.Effet;
|
||||
import effet.action.ActionAltererStatistiquesJoueur;
|
||||
import main.Joueur;
|
||||
import main.Type;
|
||||
|
||||
public class CarteEquipementStat<T extends Type> extends CarteEquipement<Type>{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1602387056611454284L;
|
||||
|
||||
public CarteEquipementStat(String nom, String description) {
|
||||
super(nom, description);
|
||||
}
|
||||
|
||||
public CarteEquipementStat(Effet effet, Condition condition) {
|
||||
super("","");
|
||||
this.setEffet(effet);
|
||||
this.setCondition(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reverse(Joueur j) {
|
||||
ActionAltererStatistiquesJoueur action = ((ActionAltererStatistiquesJoueur) this.getEffet().getAction()).getReverseAction();
|
||||
action.affecte(j, j);
|
||||
}
|
||||
}
|
@ -4,6 +4,8 @@ import java.io.Serializable;
|
||||
|
||||
import condition.Condition;
|
||||
import effet.Effet;
|
||||
import effet.EffetChoisirCible;
|
||||
import effet.EffetSelf;
|
||||
import main.Joueur;
|
||||
import main.Type;
|
||||
|
||||
@ -17,11 +19,17 @@ public class CartePiochable<T extends Type> extends CarteCondition implements Se
|
||||
}
|
||||
|
||||
public CartePiochable(Effet e, Condition c) {
|
||||
super("","");
|
||||
super();
|
||||
this.setEffet(e);
|
||||
this.setCondition(c);
|
||||
}
|
||||
|
||||
public CartePiochable(Effet effet) {
|
||||
super();
|
||||
this.setEffet(effet);
|
||||
this.setCondition(new Condition());
|
||||
}
|
||||
|
||||
/*
|
||||
* @param j Appel la méthode utiliser de effet sur le joueur j
|
||||
*/
|
||||
|
@ -1,17 +0,0 @@
|
||||
package carte;
|
||||
|
||||
import effet.action.ActionAltererStatistiquesJoueur;
|
||||
import main.Joueur;
|
||||
|
||||
public class EquipementStat extends Equipement{
|
||||
|
||||
public EquipementStat(String nom, String description) {
|
||||
super(nom, description);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reverse(Joueur j) {
|
||||
ActionAltererStatistiquesJoueur action = ((ActionAltererStatistiquesJoueur) this.getEffet().getAction()).getReverseAction();
|
||||
action.affecte(j, j);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user