diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/ConstructedLeagueData.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/ConstructedLeagueData.java index 7ecf6183b..b2797b97f 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/ConstructedLeagueData.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/ConstructedLeagueData.java @@ -66,6 +66,9 @@ public class ConstructedLeagueData implements LeagueData { CardCollection leaguePrize = _leaguePrizes.getPrizeForLeague(leagueStanding.getStanding(), leagueStandings.size(), leagueStanding.getGamesPlayed(), maxGamesCount, _collectionType); if (leaguePrize != null) collectionsManager.addItemsToPlayerCollection(true, "End of league prizes", leagueStanding.getPlayerName(), _prizeCollectionType, leaguePrize.getAll().values()); + final CardCollection leagueTrophies = _leaguePrizes.getTrophiesForLeague(leagueStanding.getStanding(), leagueStandings.size(), leagueStanding.getGamesPlayed(), maxGamesCount, _collectionType); + if (leagueTrophies != null) + collectionsManager.addItemsToPlayerCollection(true, "End of league prizes", leagueStanding.getPlayerName(), CollectionType.TROPHY, leagueTrophies.getAll().values()); } status++; } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/FixedLeaguePrizes.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/FixedLeaguePrizes.java index 47cc8143b..65fbcb439 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/FixedLeaguePrizes.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/FixedLeaguePrizes.java @@ -56,6 +56,11 @@ public class FixedLeaguePrizes implements LeaguePrizes { } } + @Override + public CardCollection getTrophiesForLeague(int position, int playersCount, int gamesPlayed, int maxGamesPlayed, CollectionType collectionType) { + return null; + } + //1st - 60 boosters, 4 tengwar, 3 foil rares //2nd - 55 boosters, 3 tengwar, 2 foil rares //3rd - 50 boosters, 2 tengwar, 1 foil rare diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/LeaguePrizes.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/LeaguePrizes.java index acbf5a881..0e5ee4e19 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/LeaguePrizes.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/LeaguePrizes.java @@ -9,4 +9,6 @@ public interface LeaguePrizes { public CardCollection getPrizeForLeagueMatchLoser(int winCountThisSerie, int totalGamesPlayedThisSerie); public CardCollection getPrizeForLeague(int position, int playersCount, int gamesPlayed, int maxGamesPlayed, CollectionType collectionType); + + public CardCollection getTrophiesForLeague(int position, int playersCount, int gamesPlayed, int maxGamesPlayed, CollectionType collectionType); } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/NewConstructedLeagueData.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/NewConstructedLeagueData.java index ace9867d1..b85d6da5a 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/NewConstructedLeagueData.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/NewConstructedLeagueData.java @@ -70,6 +70,9 @@ public class NewConstructedLeagueData implements LeagueData { CardCollection leaguePrize = _leaguePrizes.getPrizeForLeague(leagueStanding.getStanding(), leagueStandings.size(), leagueStanding.getGamesPlayed(), maxGamesPlayed, _collectionType); if (leaguePrize != null) collectionsManager.addItemsToPlayerCollection(true, "End of league prizes", leagueStanding.getPlayerName(), _prizeCollectionType, leaguePrize.getAll().values()); + final CardCollection leagueTrophies = _leaguePrizes.getTrophiesForLeague(leagueStanding.getStanding(), leagueStandings.size(), leagueStanding.getGamesPlayed(), maxGamesPlayed, _collectionType); + if (leagueTrophies != null) + collectionsManager.addItemsToPlayerCollection(true, "End of league prizes", leagueStanding.getPlayerName(), CollectionType.TROPHY, leagueTrophies.getAll().values()); } status++; } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/NewSealedLeagueData.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/NewSealedLeagueData.java index 95d264d9d..66fd105ef 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/NewSealedLeagueData.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/NewSealedLeagueData.java @@ -93,6 +93,9 @@ public class NewSealedLeagueData implements LeagueData { CardCollection leaguePrize = _leaguePrizes.getPrizeForLeague(leagueStanding.getStanding(), leagueStandings.size(), leagueStanding.getGamesPlayed(), maxGamesTotal, _collectionType); if (leaguePrize != null) collectionsManager.addItemsToPlayerCollection(true, "End of league prizes", leagueStanding.getPlayerName(), _prizeCollectionType, leaguePrize.getAll().values()); + final CardCollection leagueTrophies = _leaguePrizes.getTrophiesForLeague(leagueStanding.getStanding(), leagueStandings.size(), leagueStanding.getGamesPlayed(), maxGamesTotal, _collectionType); + if (leagueTrophies != null) + collectionsManager.addItemsToPlayerCollection(true, "End of league prizes", leagueStanding.getPlayerName(), CollectionType.TROPHY, leagueTrophies.getAll().values()); } status++; } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/SealedLeagueData.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/SealedLeagueData.java index d3a3d88d4..3e37461ad 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/SealedLeagueData.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/SealedLeagueData.java @@ -94,6 +94,9 @@ public class SealedLeagueData implements LeagueData { CardCollection leaguePrize = _leaguePrizes.getPrizeForLeague(leagueStanding.getStanding(), leagueStandings.size(), leagueStanding.getGamesPlayed(), maxGamesPlayed, _collectionType); if (leaguePrize != null) collectionsManager.addItemsToPlayerCollection(true, "End of league prizes", leagueStanding.getPlayerName(), _prizeCollectionType, leaguePrize.getAll().values()); + final CardCollection leagueTrophies = _leaguePrizes.getTrophiesForLeague(leagueStanding.getStanding(), leagueStandings.size(), leagueStanding.getGamesPlayed(), maxGamesPlayed, _collectionType); + if (leagueTrophies != null) + collectionsManager.addItemsToPlayerCollection(true, "End of league prizes", leagueStanding.getPlayerName(), CollectionType.TROPHY, leagueTrophies.getAll().values()); } status++; } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/DailyTournamentPrizes.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/DailyTournamentPrizes.java index 515c9658d..f2fe3aae1 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/DailyTournamentPrizes.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/DailyTournamentPrizes.java @@ -27,6 +27,11 @@ public class DailyTournamentPrizes implements TournamentPrizes { return tournamentPrize; } + @Override + public CardCollection getTrophyForTournament(PlayerStanding playerStanding, int playersCount) { + return null; + } + @Override public String getRegistryRepresentation() { return _registryRepresentation; diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/DefaultTournament.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/DefaultTournament.java index 71b671a8b..a218b7c95 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/DefaultTournament.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/DefaultTournament.java @@ -305,6 +305,9 @@ public class DefaultTournament implements Tournament { CardCollection prizes = _tournamentPrizes.getPrizeForTournament(playerStanding, list.size()); if (prizes != null) collectionsManager.addItemsToPlayerCollection(true, "Tournament " +getTournamentName()+" prize", playerStanding.getPlayerName(), CollectionType.MY_CARDS, prizes.getAll().values()); + CardCollection trophies = _tournamentPrizes.getTrophyForTournament(playerStanding, list.size()); + if (trophies != null) + collectionsManager.addItemsToPlayerCollection(true, "Tournament " +getTournamentName()+" trophy", playerStanding.getPlayerName(), CollectionType.TROPHY, trophies.getAll().values()); } } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/NoPrizes.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/NoPrizes.java index 929afccaf..09319e4b5 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/NoPrizes.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/NoPrizes.java @@ -9,6 +9,11 @@ public class NoPrizes implements TournamentPrizes{ return null; } + @Override + public CardCollection getTrophyForTournament(PlayerStanding playerStanding, int playersCount) { + return null; + } + @Override public String getRegistryRepresentation() { return null; diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationOnDemandPrizes.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationOnDemandPrizes.java index 328586947..314a00d5a 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationOnDemandPrizes.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationOnDemandPrizes.java @@ -40,6 +40,11 @@ public class SingleEliminationOnDemandPrizes implements TournamentPrizes{ return tournamentPrize; } + @Override + public CardCollection getTrophyForTournament(PlayerStanding playerStanding, int playersCount) { + return null; + } + private String getRandom(List list) { return list.get(new Random().nextInt(list.size())); } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentPrizes.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentPrizes.java index 5babbf1f5..44acf6e80 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentPrizes.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentPrizes.java @@ -5,6 +5,7 @@ import com.gempukku.lotro.game.CardCollection; public interface TournamentPrizes { public CardCollection getPrizeForTournament(PlayerStanding playerStanding, int playersCount); + public CardCollection getTrophyForTournament(PlayerStanding playerStanding, int playersCount); public String getRegistryRepresentation(); public String getPrizeDescription(); }