Fixed: Building Apply Effect , Access Controlled
This commit is contained in:
@@ -54,7 +54,9 @@ public class Building0 extends BuildingCard {
|
||||
return new Building0(getEra(),getPrice());
|
||||
}
|
||||
@Override
|
||||
public void applyEffect(Player player) {
|
||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||
if(!player.buildingCards.contains(this))
|
||||
throw new IllegalArgumentException();
|
||||
int min_temp=player.getNType(CharacterType.INVENTOR);
|
||||
for(CharacterType type : CharacterType.values())
|
||||
{
|
||||
|
||||
@@ -19,7 +19,9 @@ public class Building10 extends BuildingCard {
|
||||
return new Building8(getEra(),getPrice());
|
||||
}
|
||||
@Override
|
||||
public void applyEffect(Player player) {
|
||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||
if(!player.buildingCards.contains(this))
|
||||
throw new IllegalArgumentException();
|
||||
HashMap<CharacterType,Integer> map = new HashMap<CharacterType,Integer>();
|
||||
|
||||
int numSet=player.getNType(CharacterType.INVENTOR);
|
||||
|
||||
@@ -26,7 +26,9 @@ public class Building11 extends BuildingCard {
|
||||
return new Building11(getEra(),getPrice(), getIcon(), getPrestigeMul());
|
||||
}
|
||||
@Override
|
||||
public void applyEffect(Player player) {
|
||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||
if(!player.buildingCards.contains(this))
|
||||
throw new IllegalArgumentException();
|
||||
player.addPrestige(player.getNType(getIcon()) * this.getPrestigeMul());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,9 @@ public class Building13 extends BuildingCard{
|
||||
return new Building13(getEra(),getPrice());
|
||||
}
|
||||
@Override
|
||||
public void applyEffect(Player player) {
|
||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||
if(!player.buildingCards.contains(this))
|
||||
throw new IllegalArgumentException();
|
||||
player.addPrestige(25);
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -56,7 +56,9 @@ public class Building4 extends BuildingCard {
|
||||
return new Building4(getEra(),getPrice());
|
||||
}
|
||||
@Override
|
||||
public void applyEffect(Player player) {
|
||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||
if(!player.buildingCards.contains(this))
|
||||
throw new IllegalArgumentException();
|
||||
HashMap<Integer,Integer> map = new HashMap<>();
|
||||
for(int i=0;i<10;i++)
|
||||
{
|
||||
|
||||
@@ -20,8 +20,9 @@ public class Building8 extends BuildingCard {
|
||||
return new Building8(getEra(),getPrice());
|
||||
}
|
||||
@Override
|
||||
public void applyEffect(Player player) {
|
||||
|
||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||
if(!player.buildingCards.contains(this))
|
||||
throw new IllegalArgumentException();
|
||||
for (Builder builder : player.builders) {
|
||||
player.addPrestige(builder.getPrestigeValue() * 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user