Fix->Building
This commit is contained in:
@@ -13,8 +13,13 @@ public class Building0 extends BuildingCard {
|
|||||||
|
|
||||||
boolean purchased ;
|
boolean purchased ;
|
||||||
int numSet;
|
int numSet;
|
||||||
public Building0(int era,int price,EffectType effectType) {
|
|
||||||
super(era,price,0,EffectType.CARDSET);
|
|
||||||
|
|
||||||
|
public Building0(int era,int price) {
|
||||||
|
super(era,price);
|
||||||
|
effectType=EffectType.CARDSET;
|
||||||
|
effectId=0;
|
||||||
purchased = false;
|
purchased = false;
|
||||||
numSet = 0;
|
numSet = 0;
|
||||||
}
|
}
|
||||||
@@ -29,18 +34,15 @@ public class Building0 extends BuildingCard {
|
|||||||
HashMap<CharacterType,Integer> map = new HashMap<CharacterType,Integer>();
|
HashMap<CharacterType,Integer> map = new HashMap<CharacterType,Integer>();
|
||||||
for(CharacterType type : CharacterType.values())
|
for(CharacterType type : CharacterType.values())
|
||||||
{
|
{
|
||||||
map.put(type,0);
|
map.merge(type, 1, Integer::sum);
|
||||||
}
|
}
|
||||||
for(Character c : player.getCharacterCards())
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
purchased = true;
|
purchased = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public BuildingCard clone() {
|
public BuildingCard clone() {
|
||||||
return new Building0(getEra(),getPrice(),getEffectType());
|
return new Building0(getEra(),getPrice());
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void applyEffect(ArrayList<Player> players) {
|
public void applyEffect(ArrayList<Player> players) {
|
||||||
|
|||||||
@@ -12,19 +12,19 @@ public abstract class BuildingCard extends PlayableCard implements Cloneable {
|
|||||||
return price;
|
return price;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int effectId;
|
protected EffectType effectType;
|
||||||
public int getEffectId(){
|
protected int effectId;
|
||||||
|
|
||||||
|
public int getEffectId() {
|
||||||
return effectId;
|
return effectId;
|
||||||
}
|
}
|
||||||
private EffectType effectType;
|
|
||||||
public EffectType getEffectType() {
|
public EffectType getEffectType() {
|
||||||
return effectType;
|
return effectType;
|
||||||
}
|
}
|
||||||
public BuildingCard(int era,int price,int effectId,EffectType effectType) {
|
|
||||||
|
public BuildingCard(int era,int price) {
|
||||||
super(era);
|
super(era);
|
||||||
this.price = price;
|
this.price = price;
|
||||||
this.effectId=effectId;
|
|
||||||
this.effectType = effectType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user