Commit 2051b009 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

Merge branch 'feature-bonus-trophies' into 'V3.7'

Bonus trophies

See merge request !737
parents 15e2590a 2936d25c
......@@ -152,6 +152,8 @@ robbery_1_limit=Nedobytný
robbery_1_limit_description=Za 3 poháry na střední úroveň
robbery_2_limit=Bytelně nedobytný
robbery_2_limit_description=Za 3 poháry na těžkou úroveň
robbery_bonus_finished=Zlatá mříž
robbery_bonus_finished_description=Za dohrání na bonusovou obtížnost hru
# <!-- Pursuit -->
pursuit_1_finished=Kompas
......@@ -164,6 +166,8 @@ pursuit_1_limit=Plnou parou
pursuit_1_limit_description=Za 3 poháry na střední úroveň
pursuit_2_limit=Na plný plyn
pursuit_2_limit_description=Za 3 poháry na těžkou úroveň
pursuit_bonus_finished=Atlas světa
pursuit_bonus_finished_description=Za dohrání na bonusovou obtížnost hru
# <!-- Kidnapping -->
kidnapping_1_finished=Nastražené ucho
......@@ -176,6 +180,8 @@ kidnapping_1_limit=Spící netopýr
kidnapping_1_limit_description=Za 3 poháry na střední úroveň
kidnapping_2_limit=Netopýří koruna
kidnapping_2_limit_description=Za 3 poháry na těžkou úroveň
kidnapping_bonus_finished=Kovadlinka
kidnapping_bonus_finished_description=Za dohrání na bonusovou obtížnost hru
# <!-- Night watch -->
night_watch_1_finished=Večernice
......@@ -188,6 +194,8 @@ night_watch_1_limit=Sýček
night_watch_1_limit_description=Za 3 poháry na střední úroveň
night_watch_2_limit=Výr velký
night_watch_2_limit_description=Za 3 poháry na těžkou úroveň
night_watch_bonus_finished=Dalekohled De Luxe
night_watch_bonus_finished_description=Za dohrání na bonusovou obtížnost hru
# <!-- Shooting range -->
shooting_range_1_finished=Sváteční střelec
......@@ -200,6 +208,8 @@ shooting_range_1_limit=Johnny Na-hlavě-jablko-trefil
shooting_range_1_limit_description=Za 3 poháry na střední úroveň
shooting_range_2_limit=Billy Ustřel-mouchu-z-nosu
shooting_range_2_limit_description=Za 3 poháry na těžkou úroveň
shooting_range_bonus_finished=Davidův prak
shooting_range_bonus_finished_description=Za dohrání na bonusovou obtížnost hru
# <!-- In the darkness -->
in_the_darkness_1_finished=Svit lucerny
......@@ -212,6 +222,8 @@ in_the_darkness_1_limit=Poslepu
in_the_darkness_1_limit_description=Za 3 poháry na střední úroveň
in_the_darkness_2_limit=Pohmatu
in_the_darkness_2_limit_description=Za 3 poháry na těžkou úroveň
in_the_darkness_bonus_finished=Pytel plný zlata
in_the_darkness_bonus_finished_description=Za dohrání na bonusovou obtížnost hru
# <!-- Crime Scene -->
crime_scene_1_finished=Památníček
......@@ -224,6 +236,8 @@ crime_scene_1_limit=Slůní paměť
crime_scene_1_limit_description=Za 3 poháry na střední úroveň
crime_scene_2_limit=Sloní paměť
crime_scene_2_limit_description=Za 3 poháry na těžkou úroveň
crime_scene_bonus_finished=Památkář
crime_scene_bonus_finished_description=Za dohrání na bonusovou obtížnost hru
# <!-- Runes -->
runes_1_finished=Vševidoucí brýle
......@@ -236,6 +250,8 @@ runes_1_limit=Ostrovid
runes_1_limit_description=Za 3 poháry na střední úroveň
runes_2_limit=Bystrozrak
runes_2_limit_description=Za 3 poháry na těžkou úroveň
runes_bonus_finished=Nedostižný Tagger
runes_bonus_finished_description=Za dohrání na bonusovou obtížnost hru
# <!-- Protocol -->
protocol_1_finished=Zlatá složka
......@@ -248,6 +264,8 @@ protocol_1_limit=Archivář
protocol_1_limit_description=Za 3 poháry na střední úroveň
protocol_2_limit=Aranžér
protocol_2_limit_description=Za 3 poháry na těžkou úroveň
protocol_bonus_finished=Protokolář
protocol_bonus_finished_description=Za dohrání na bonusovou obtížnost hru
# <!-- Safe -->
safe_1_finished=Diamantový pilník
......@@ -260,6 +278,8 @@ safe_1_limit=Kasař
safe_1_limit_description=Za 3 poháry na střední úroveň
safe_2_limit=Zámečník
safe_2_limit_description=Za 3 poháry na těžkou úroveň
safe_bonus_finished=Kasařské nádobíčko
safe_bonus_finished_description=Za dohrání na bonusovou obtížnost hru
# <!-- Specialni trofeje -->
user_consecutively3days=Prasklina ve zdi
......
......@@ -153,6 +153,8 @@ robbery_1_limit=Unbezwingbar
robbery_1_limit_description=Für 3 Pokale auf der mittleren Stufe
robbery_2_limit=Solide unbezwingbar
robbery_2_limit_description=Für 3 Pokale auf der schwierigen Stufe
robbery_bonus_finished=<DE>Zlatá mříž<DE>
robbery_bonus_finished_description=<DE>Za dohrání na bonusovou obtížnost hru<DE>
# <!-- Pursuit -->
pursuit_1_finished=Kompass
......@@ -165,6 +167,8 @@ pursuit_1_limit=Volldampf
pursuit_1_limit_description=Für 3 Pokale auf der mittleren Stufe
pursuit_2_limit=Voll aufs Gas
pursuit_2_limit_description=Für 3 Pokale auf der schwierigen Stufe
pursuit_bonus_finished=<DE>Atlas světa<DE>
pursuit_bonus_finished_description=<DE>Za dohrání na bonusovou obtížnost hru<DE>
# <!-- Kidnapping -->
kidnapping_1_finished=Aufgestelltes Ohr
......@@ -177,6 +181,8 @@ kidnapping_1_limit=Schlafende Fledermaus
kidnapping_1_limit_description=Für 3 Pokale auf der mittleren Stufe
kidnapping_2_limit=Fledermaus-Krone
kidnapping_2_limit_description=Für 3 Pokale auf der schwierigen Stufe
kidnapping_bonus_finished=<DE>Kovadlinka<DE>
kidnapping_bonus_finished_description=<DE>Za dohrání na bonusovou obtížnost hru<DE>
# <!-- Night watch -->
night_watch_1_finished=Abendstern
......@@ -189,6 +195,8 @@ night_watch_1_limit=Kauz
night_watch_1_limit_description=Für 3 Pokale auf der mittleren Stufe
night_watch_2_limit=Uhu
night_watch_2_limit_description=Für 3 Pokale auf der schwierigen Stufe
night_watch_bonus_finished=<DE>Dalekohled De Luxe<DE>
night_watch_bonus_finished_description=<DE>Za dohrání na bonusovou obtížnost hru<DE>
# <!-- Shooting range -->
shooting_range_1_finished=Sonntags-Schütze
......@@ -201,6 +209,8 @@ shooting_range_1_limit=Johnny Schießt-den-Apfel-vom-Kopf
shooting_range_1_limit_description=Für 3 Pokale auf der mittleren Stufe
shooting_range_2_limit=Billy Schießt-die-Fliege-von-der-Nase
shooting_range_2_limit_description=Für 3 Pokale auf der schwierigen Stufe
shooting_range_bonus_finished=<DE>Davidův prak<DE>
shooting_range_bonus_finished_description=<DE>Za dohrání na bonusovou obtížnost hru<DE>
# <!-- In the darkness -->
in_the_darkness_1_finished=Licht der Laterne
......@@ -213,6 +223,8 @@ in_the_darkness_1_limit=Blind
in_the_darkness_1_limit_description=Für 3 Pokale auf mittlerer Schwierigkeit
in_the_darkness_2_limit=Tastend
in_the_darkness_2_limit_description=Für 3 Pokale auf der schwierigen Stufe
in_the_darkness_bonus_finished=<DE>Pytel plný zlata<DE>
in_the_darkness_bonus_finished_description=<DE>Za dohrání na bonusovou obtížnost hru<DE>
# <!-- Crime Scene -->
crime_scene_1_finished=Erinnerungsbuch
......@@ -225,6 +237,8 @@ crime_scene_1_limit=Elefantenkalbes Gedächtnis
crime_scene_1_limit_description=Für 3 Pokale auf mittlerer Schwierigkeit
crime_scene_2_limit=Elefanten Gedächtnis
crime_scene_2_limit_description=Für 3 Pokale auf der schwierigen Stufe
crime_scene_bonus_finished=<DE>Památkář<DE>
crime_scene_bonus_finished_description=<DE>Za dohrání na bonusovou obtížnost hru<DE>
# <!-- Runes -->
runes_1_finished=Alles-Seher-Brille
......@@ -237,6 +251,8 @@ runes_1_limit=Adlerauge
runes_1_limit_description=Für 3 Pokale auf mittlerer Schwierigkeit
runes_2_limit=Scharfäugig
runes_2_limit_description=Für 3 Pokale auf der schwierigen Stufe
runes_bonus_finished=<DE>Nedostižný Tagger<DE>
runes_bonus_finished_description=<DE>Za dohrání na bonusovou obtížnost hru<DE>
# <!-- Protocol -->
protocol_1_finished=goldene Mappe
......@@ -249,6 +265,8 @@ protocol_1_limit=Archivar
protocol_1_limit_description=Für 3 Pokale auf mittlerer Schwierigkeit
protocol_2_limit=Arrangeur
protocol_2_limit_description=Für 3 Pokale auf der schwierigen Stufe
protocol_bonus_finished=<DE>Protokolář<DE>
protocol_bonus_finished_description=<DE>Za dohrání na bonusovou obtížnost hru<DE>
# <!-- Safe -->
safe_1_finished=Diamantfeile
......@@ -261,6 +279,8 @@ safe_1_limit=Langfinger
safe_1_limit_description=Für 3 Pokale auf mittlerer Schwierigkeit
safe_2_limit=Schlosser
safe_2_limit_description=Für 3 Pokale auf der schwierigen Stufe
safe_bonus_finished=<DE>Kasařské nádobíčko<DE>
safe_bonus_finished_description=<DE>Za dohrání na bonusovou obtížnost hru<DE>
# <!-- Specialni trofeje -->
user_consecutively3days=Riss in der Wand
......
......@@ -154,6 +154,8 @@ robbery_1_limit=Nedobytný
robbery_1_limit_description=Za 3 poháre na strednú úroveň
robbery_2_limit=Pevne nedobytný
robbery_2_limit_description=Za tri poháre na ťažkú úroveň
robbery_bonus_finished=<SK>Zlatá mříž<SK>
robbery_bonus_finished_description=<SK>Za dohrání na bonusovou obtížnost hru<SK>
# <!-- Pursuit -->
pursuit_1_finished=Kompas
......@@ -166,6 +168,8 @@ pursuit_1_limit=Plnou parou
pursuit_1_limit_description=Za tri poháre na strednú úroveň
pursuit_2_limit=Na plný plyn
pursuit_2_limit_description=Za 3 poháre na ťažkú úroveň
pursuit_bonus_finished=<SK>Atlas světa<SK>
pursuit_bonus_finished_description=<SK>Za dohrání na bonusovou obtížnost hru<SK>
# <!-- Kidnapping -->
kidnapping_1_finished=Nastražené ucho
......@@ -178,6 +182,8 @@ kidnapping_1_limit=Spiaci netopier
kidnapping_1_limit_description=Za tri poháre na strednú úroveň
kidnapping_2_limit=Netopierská koruna
kidnapping_2_limit_description=Za tri poháre na ťažkú úroveň
kidnapping_bonus_finished=<SK>Kovadlinka<SK>
kidnapping_bonus_finished_description=<SK>Za dohrání na bonusovou obtížnost hru<SK>
# <!-- Night watch -->
night_watch_1_finished=Večernica
......@@ -190,6 +196,8 @@ night_watch_1_limit=Sýček
night_watch_1_limit_description=Za 3 poháre na strednú úroveň
night_watch_2_limit=Vír veľký
night_watch_2_limit_description=Za tri poháre na ťažkú úroveň
night_watch_bonus_finished=<SK>Dalekohled De Luxe<SK>
night_watch_bonus_finished_description=<SK>Za dohrání na bonusovou obtížnost hru<SK>
# <!-- Shooting range -->
shooting_range_1_finished=Sviatočný strelec
......@@ -202,6 +210,8 @@ shooting_range_1_limit=Johnny Na-hlave-jablko-trafil
shooting_range_1_limit_description=Za tri poháre na strednú úroveň
shooting_range_2_limit=Billy Ustrel-muchu-z-nosu
shooting_range_2_limit_description=Za tri poháre na ťažkú úroveň
shooting_range_bonus_finished=<SK>Davidův prak<SK>
shooting_range_bonus_finished_description=<SK>Za dohrání na bonusovou obtížnost hru<SK>
# <!-- In the darkness -->
in_the_darkness_1_finished=Svit lucerny
......@@ -214,6 +224,8 @@ in_the_darkness_1_limit=Poslepiačky
in_the_darkness_1_limit_description=Za tri poháre na strednú úroveň
in_the_darkness_2_limit=Pohmatom
in_the_darkness_2_limit_description=Za tri poháre na ťažkú úroveň
in_the_darkness_bonus_finished=<SK>Pytel plný zlata<SK>
in_the_darkness_bonus_finished_description=<SK>Za dohrání na bonusovou obtížnost hru<SK>
# <!-- Crime Scene -->
crime_scene_1_finished=Pamätníček
......@@ -226,6 +238,8 @@ crime_scene_1_limit=Pamäť sloníčaťa
crime_scene_1_limit_description=Za tri poháre na strednú úroveň
crime_scene_2_limit=Slonia pamäť
crime_scene_2_limit_description=Za tri poháre na ťažkú úroveň
crime_scene_bonus_finished=<SK>Památkář<SK>
crime_scene_bonus_finished_description=<SK>Za dohrání na bonusovou obtížnost hru<SK>
# <!-- Runes -->
runes_1_finished=Vševidiace okuliare
......@@ -238,6 +252,8 @@ runes_1_limit=Ostrovid
runes_1_limit_description=Za tri poháre na strednú úroveň
runes_2_limit=Bystrozrak
runes_2_limit_description=Za tri poháre na ťažkú úroveň
runes_bonus_finished=<SK>Nedostižný Tagger<SK>
runes_bonus_finished_description=<SK>Za dohrání na bonusovou obtížnost hru<SK>
# <!-- Protocol -->
protocol_1_finished=Zlatá zložka
......@@ -250,6 +266,8 @@ protocol_1_limit=Archivár
protocol_1_limit_description=Za tri poháre na strednú úroveň
protocol_2_limit=Aranžér
protocol_2_limit_description=Za tri poháre na ťažkú úroveň
protocol_bonus_finished=<SK>Protokolář<SK>
protocol_bonus_finished_description=<SK>Za dohrání na bonusovou obtížnost hru<SK>
# <!-- Safe -->
safe_1_finished=Diamantový pilník
......@@ -262,6 +280,8 @@ safe_1_limit=Vreckový zlodej
safe_1_limit_description=Za tri poháre na strednú úroveň
safe_2_limit=Zámočník
safe_2_limit_description=Za tri poháre na ťažkú úroveň
safe_bonus_finished=<SK>Kasařské nádobíčko<SK>
safe_bonus_finished_description=<SK>Za dohrání na bonusovou obtížnost hru<SK>
# <!-- Specialni trofeje -->
user_consecutively3days=Prasklina v stene
......
......@@ -28,7 +28,8 @@ public enum GameTrophyTypeDefinition {
PLAY_LIMIT_2(TrophyGlobalTypeDefinition.PLAY_LIMIT, "playTrophy2"),
PLAY_LIMIT_1(TrophyGlobalTypeDefinition.PLAY_LIMIT, "playTrophy1"),
DIFFICULTY_LIMIT_2(TrophyGlobalTypeDefinition.DIFFICULTY_LIMIT, "difficultyTrophy2"),
DIFFICULTY_LIMIT_1(TrophyGlobalTypeDefinition.DIFFICULTY_LIMIT, "difficultyTrophy1");
DIFFICULTY_LIMIT_1(TrophyGlobalTypeDefinition.DIFFICULTY_LIMIT, "difficultyTrophy1"),
BONUS_PLAYED(TrophyGlobalTypeDefinition.BONUS_PLAYED, "bonusTrophy");
private TrophyGlobalTypeDefinition trophyGlobalTypeDefinition;
private String dbFieldName;
......
......@@ -26,5 +26,6 @@ public enum TrophyGlobalTypeDefinition {
PLAY_LIMIT,
DIFFICULTY_LIMIT,
BONUS_PLAYED,
}
......@@ -112,4 +112,50 @@ public class GameTrophy {
return false;
}
}
public static class GamePlayed implements GameTrophyResolver {
public static final String GAME_SELECT_FOR_GAME_AND_DIFFICULTY = "SELECT " + GameDAO.GAME_SELECT_COLUMNS + " FROM game WHERE game_number = ? AND difficulty_number = ? AND user_id = ? AND end_time IS NOT NULL";
private static List<Game> getGamesForGameAndDifficulty(User user, GameTrophyDefinition trophyDef) {
List<Game> games = new ArrayList<Game>();
try {
PreparedStatement statement = TablexiaStorage.getInstance().prepareStatement(GAME_SELECT_FOR_GAME_AND_DIFFICULTY);
statement.setInt(1, trophyDef.getGameDefinition().getGameNumber());
statement.setInt(2, trophyDef.getLimit());
statement.setLong(3, user.getId());
try {
ResultSet resultSet = statement.executeQuery();
while (resultSet.next()) {
games.add(GameDAO.prepareGameObject(resultSet));
}
resultSet.close();
} catch (SQLException e) {
Log.err(GameTrophy.class, "Cannot select game with user_id: " + user.getId() + ", game_number: " + trophyDef.getGameDefinition().getGameNumber() + ", difficulty: " + trophyDef.getLimit(), e);
}
statement.close();
} catch (SQLException e) {
Log.err(GameTrophy.class, "Cannot select game with user_id: " + user.getId() + ", game_number: " + trophyDef.getGameDefinition().getGameNumber() + ", difficulty: " + trophyDef.getLimit(), e);
}
return games;
}
@Override
public boolean hasGameTrophy(User user, GameTrophyDefinition trophyDef) {
List<Game> games = getGamesForGameAndDifficulty(user, trophyDef);
if (games.isEmpty()) {
return false;
}
for (Game game : games) {
if (GameDAO.getGameResult(game).getStarCount() == AbstractTablexiaGame.GameResult.THREE_STAR.getStarCount() ||
GameDAO.getGameResult(game).getStarCount() == AbstractTablexiaGame.GameResult.TWO_STAR.getStarCount() ||
GameDAO.getGameResult(game).getStarCount() == AbstractTablexiaGame.GameResult.ONE_STAR.getStarCount() ||
GameDAO.getGameResult(game).getStarCount() == AbstractTablexiaGame.GameResult.NO_STAR.getStarCount()) {
return true;
}
}
return false;
}
}
}
......@@ -97,7 +97,7 @@ public class HallOfFameScreen extends AbstractTablexiaScreen<Map<ITrophyDefiniti
private static final Point SCREEN_SIZE = new Point(TablexiaSettings.getWorldSize(), TablexiaSettings.getMinWorldHeight());
private static final int TROPHY_DIALOG_WIDTH = 350;
private static final int TROPHY_DIALOG_HEIGHT = 350;
private static final int BACKGROUND_TILE_REPEAT_COUNT = 61;
private static final int BACKGROUND_TILE_REPEAT_COUNT = 68;
private static final long MOUSE_CHEESE_ANIM_DURATION = 1500;
private static final long MOUSE_DIALOG_DURATION = 8000;
private static final float MOUSE_DIALOG_PADDING = 8;
......
......@@ -111,60 +111,70 @@ public class TrophyHelper {
trophiesProperties.put(GameTrophyDefinition.ROBBERY_PLAY3, new Trio<Float, Float, Float>(2.15f, 0.6f, 1f));// robbery_10_finished,15
trophiesProperties.put(GameTrophyDefinition.ROBBERY_DIFF1, new Trio<Float, Float, Float>(2.25f, 0.2f, 1f));// robbery_1_limit,16
trophiesProperties.put(GameTrophyDefinition.ROBBERY_DIFF2, new Trio<Float, Float, Float>(2.65f, 0.2f, 1f));// robbery_2_limit,19
trophiesProperties.put(GameTrophyDefinition.ROBBERY_BONUS, new Trio<Float, Float, Float>(8.3f, 0.275f, 0.3f));// robbery_bonus_finished,59
trophiesProperties.put(GameTrophyDefinition.PURSUIT_PLAY1, new Trio<Float, Float, Float>(1.51f, 0.62f, 1f));// pursuit_1_finished,9
trophiesProperties.put(GameTrophyDefinition.PURSUIT_PLAY2, new Trio<Float, Float, Float>(1.35f, 0.55f, 1f));// pursuit_5_finished,7
trophiesProperties.put(GameTrophyDefinition.PURSUIT_PLAY3, new Trio<Float, Float, Float>(1.51f, 0.33f, 1f));// pursuit_10_finished,10
trophiesProperties.put(GameTrophyDefinition.PURSUIT_DIFF1, new Trio<Float, Float, Float>(1.74f, 0.68f, 1f));// pursuit_1_limit,11
trophiesProperties.put(GameTrophyDefinition.PURSUIT_DIFF2, new Trio<Float, Float, Float>(1.81f, 0.39f, 1f));// pursuit_2_limit,12
trophiesProperties.put(GameTrophyDefinition.PURSUIT_BONUS, new Trio<Float, Float, Float>(8.5f, 0.5f, 0.3f));// pursuit_bonus_finished,61
trophiesProperties.put(GameTrophyDefinition.KIDNAPPING_PLAY1, new Trio<Float, Float, Float>(0.95f, 0.65f, 1f));// kidnapping_1_finished,3
trophiesProperties.put(GameTrophyDefinition.KIDNAPPING_PLAY2, new Trio<Float, Float, Float>(1.0f, 0.2f, 1f));// kidnapping_5_finished,4
trophiesProperties.put(GameTrophyDefinition.KIDNAPPING_PLAY3, new Trio<Float, Float, Float>(1.15f, 0.5f, 1f));// kidnapping_10_finished,5
trophiesProperties.put(GameTrophyDefinition.KIDNAPPING_DIFF1, new Trio<Float, Float, Float>(0.75f, 0.4f, 1f));// kidnapping_1_limit,1
trophiesProperties.put(GameTrophyDefinition.KIDNAPPING_DIFF2, new Trio<Float, Float, Float>(0.6f, 0.7f, 1f));// kidnapping_2_limit,0
trophiesProperties.put(GameTrophyDefinition.KIDNAPPING_BONUS, new Trio<Float, Float, Float>(8.4f, 0.07f, 0.28f));// kidnapping_bonus_finished,60
trophiesProperties.put(GameTrophyDefinition.NIGHT_WATCH_PLAY1, new Trio<Float, Float, Float>(3.5f, 0.5f, 1f));// night_watch_1_finished,22
trophiesProperties.put(GameTrophyDefinition.NIGHT_WATCH_PLAY2, new Trio<Float, Float, Float>(3.63f, 0.6f, 1f));// night_watch_5_finished,23
trophiesProperties.put(GameTrophyDefinition.NIGHT_WATCH_PLAY3, new Trio<Float, Float, Float>(3.8f, 0.5f, 1f));// night_watch_10_finished,25
trophiesProperties.put(GameTrophyDefinition.NIGHT_WATCH_DIFF1, new Trio<Float, Float, Float>(3.78f, 0.77f, 1f));// night_watch_1_limit,24
trophiesProperties.put(GameTrophyDefinition.NIGHT_WATCH_DIFF2, new Trio<Float, Float, Float>(3.25f, 0.5f, 1f));// night_watch_2_limit,21
trophiesProperties.put(GameTrophyDefinition.NIGHT_WATCH_BONUS, new Trio<Float, Float, Float>(8.0f, 0.7f, 0.25f));// night_watch_bonus_finished,55
trophiesProperties.put(GameTrophyDefinition.SHOOTING_RANGE_PLAY1, new Trio<Float, Float, Float>(4.0f, 0.7f, 1f));// shooting_range_1_finished,26
trophiesProperties.put(GameTrophyDefinition.SHOOTING_RANGE_PLAY2, new Trio<Float, Float, Float>(4.1f, 0.4f, 1f));// shooting_range_5_finished,27
trophiesProperties.put(GameTrophyDefinition.SHOOTING_RANGE_PLAY3, new Trio<Float, Float, Float>(4.5f, 0.55f, 1f));// shooting_range_10_finished,30
trophiesProperties.put(GameTrophyDefinition.SHOOTING_RANGE_DIFF1, new Trio<Float, Float, Float>(4.35f, 0.5f, 0.6f));// shooting_range_1_limit,29
trophiesProperties.put(GameTrophyDefinition.SHOOTING_RANGE_DIFF2, new Trio<Float, Float, Float>(4.27f, 0.7f, 0.8f));// shooting_range_2_limit,28
trophiesProperties.put(GameTrophyDefinition.SHOOTING_RANGE_BONUS, new Trio<Float, Float, Float>(8.01f, 0.15f, 0.3f));// shooting_range_bonus_finished,56
trophiesProperties.put(GameTrophyDefinition.IN_THE_DARKNESS_PLAY1, new Trio<Float, Float, Float>(4.7f, 0.43f, 0.7f));// in_the_darkness_1_finished,32
trophiesProperties.put(GameTrophyDefinition.IN_THE_DARKNESS_PLAY2, new Trio<Float, Float, Float>(5.05f, 0.77f, 0.7f));// in_the_darkness_5_finished,33
trophiesProperties.put(GameTrophyDefinition.IN_THE_DARKNESS_PLAY3, new Trio<Float, Float, Float>(4.85f, 0.1f, 0.7f));// in_the_darkness_10_finished.34
trophiesProperties.put(GameTrophyDefinition.IN_THE_DARKNESS_DIFF1, new Trio<Float, Float, Float>(4.85f, 0.65f, 0.7f));// in_the_darkness_1_limit,31
trophiesProperties.put(GameTrophyDefinition.IN_THE_DARKNESS_DIFF2, new Trio<Float, Float, Float>(5.21f, 0.4f, 0.7f));// in_the_darkness_2_limit,35
trophiesProperties.put(GameTrophyDefinition.IN_THE_DARKNESS_BONUS, new Trio<Float, Float, Float>(8.53f, 0.13f, 0.25f));// in_the_darkness_bonus_finished,62
trophiesProperties.put(GameTrophyDefinition.CRIME_SCENE_PLAY1, new Trio<Float, Float, Float>(5.6f, 0.65f, 0.5f));// crime_scene_1_finished,36
trophiesProperties.put(GameTrophyDefinition.CRIME_SCENE_PLAY2, new Trio<Float, Float, Float>(5.45f, 0.42f, 0.5f));// crime_scene_5_finished,37
trophiesProperties.put(GameTrophyDefinition.CRIME_SCENE_PLAY3, new Trio<Float, Float, Float>(5.75f, 0.23f, 0.5f));// crime_scene_10_finished.38
trophiesProperties.put(GameTrophyDefinition.CRIME_SCENE_DIFF1, new Trio<Float, Float, Float>(6.36f, 0.12f, 0.5f));// crime_scene_1_limit,39
trophiesProperties.put(GameTrophyDefinition.CRIME_SCENE_DIFF2, new Trio<Float, Float, Float>(6.1f, 0.14f, 0.5f));// crime_scene_2_limit,40
trophiesProperties.put(GameTrophyDefinition.CRIME_SCENE_BONUS, new Trio<Float, Float, Float>(8.8f, 0.3f, 0.3f));// crime_scene_bonus_finished,64
trophiesProperties.put(GameTrophyDefinition.RUNES_PLAY1, new Trio<Float, Float, Float>(5.89f, 0.81f, 0.5f));// runes_1_finished,41
trophiesProperties.put(GameTrophyDefinition.RUNES_PLAY2, new Trio<Float, Float, Float>(5.63f, 0.21f, 0.5f));// runes_5_finished,42
trophiesProperties.put(GameTrophyDefinition.RUNES_PLAY3, new Trio<Float, Float, Float>(5.36f, 0.63f, 0.5f));// runes_10_finished,43
trophiesProperties.put(GameTrophyDefinition.RUNES_DIFF1, new Trio<Float, Float, Float>(5.37f, 0.1f, 0.5f));// runes_1_limit,44
trophiesProperties.put(GameTrophyDefinition.RUNES_DIFF2, new Trio<Float, Float, Float>(5.98f, 0.21f, 0.5f));// runes_2_limit,45
trophiesProperties.put(GameTrophyDefinition.RUNES_BONUS, new Trio<Float, Float, Float>(8.7f, 0.21f, 0.3f));// runes_bonus_finished,63
trophiesProperties.put(GameTrophyDefinition.PROTOCOL_PLAY1, new Trio<>(6.6f,0.5f,0.5f)); //protocol_1_finished,46
trophiesProperties.put(GameTrophyDefinition.PROTOCOL_PLAY2, new Trio<>(6.72f,0.2f,0.5f)); //protocol_5_finished,47
trophiesProperties.put(GameTrophyDefinition.PROTOCOL_PLAY3, new Trio<>(6.87f,0.28f,0.5f)); //protocol_10_finished,48
trophiesProperties.put(GameTrophyDefinition.PROTOCOL_DIFF1, new Trio<>(7.05f,0.2f,0.5f)); //protocol_1_limit,49
trophiesProperties.put(GameTrophyDefinition.PROTOCOL_DIFF2, new Trio<>(7.2f,0.4f,0.5f)); //protocol_2_limit,50
trophiesProperties.put(GameTrophyDefinition.PROTOCOL_BONUS, new Trio<>(8.1f, 0.2f, 0.3f));// protocol_bonus_finished,57
trophiesProperties.put(GameTrophyDefinition.SAFE_PLAY1, new Trio<>(7.4f,0.55f,0.5f)); //safe_1_finished,51
trophiesProperties.put(GameTrophyDefinition.SAFE_PLAY2, new Trio<>(7.48f,0.2f,0.5f)); //safe_5_finished,52
trophiesProperties.put(GameTrophyDefinition.SAFE_PLAY3, new Trio<>(7.6f,0.33f,0.5f)); //safe_10_finished,53
trophiesProperties.put(GameTrophyDefinition.SAFE_DIFF1, new Trio<>(7.7f,0.6f,0.5f)); //safe_1_limit,54
trophiesProperties.put(GameTrophyDefinition.SAFE_DIFF2, new Trio<>(7.8f,0.22f,0.5f)); //safe_2_limit,55
trophiesProperties.put(GameTrophyDefinition.SAFE_BONUS, new Trio<>(8.25f, 0.03f, 0.25f));// safe_bonus_finished,58
//USER TROPHIES
trophiesProperties.put(UserTrophyDefinition.CONSECUTIVELY_DAYSBACK_3, new Trio<Float, Float, Float>(0.87f, 0.38f, 1f));//user_consecutively3days,2
......
......@@ -44,6 +44,7 @@ public class TrophyHelperTest {
expectedTrophies.add(GameTrophyDefinition.ROBBERY_PLAY3);
expectedTrophies.add(GameTrophyDefinition.ROBBERY_DIFF1);
expectedTrophies.add(GameTrophyDefinition.ROBBERY_DIFF2);
expectedTrophies.add(GameTrophyDefinition.ROBBERY_BONUS);
checkPossibleTrophies(expectedTrophies, TrophyHelper.getPossibleTrophiesForGame(GameDefinition.ROBBERY));
......@@ -54,6 +55,7 @@ public class TrophyHelperTest {
expectedTrophies.add(GameTrophyDefinition.PURSUIT_PLAY3);
expectedTrophies.add(GameTrophyDefinition.PURSUIT_DIFF1);
expectedTrophies.add(GameTrophyDefinition.PURSUIT_DIFF2);
expectedTrophies.add(GameTrophyDefinition.PURSUIT_BONUS);
checkPossibleTrophies(expectedTrophies, TrophyHelper.getPossibleTrophiesForGame(GameDefinition.PURSUIT));
......@@ -64,6 +66,7 @@ public class TrophyHelperTest {
expectedTrophies.add(GameTrophyDefinition.KIDNAPPING_PLAY3);
expectedTrophies.add(GameTrophyDefinition.KIDNAPPING_DIFF1);
expectedTrophies.add(GameTrophyDefinition.KIDNAPPING_DIFF2);
expectedTrophies.add(GameTrophyDefinition.KIDNAPPING_BONUS);
checkPossibleTrophies(expectedTrophies, TrophyHelper.getPossibleTrophiesForGame(GameDefinition.KIDNAPPING));
......@@ -74,6 +77,7 @@ public class TrophyHelperTest {
expectedTrophies.add(GameTrophyDefinition.NIGHT_WATCH_PLAY3);
expectedTrophies.add(GameTrophyDefinition.NIGHT_WATCH_DIFF1);
expectedTrophies.add(GameTrophyDefinition.NIGHT_WATCH_DIFF2);
expectedTrophies.add(GameTrophyDefinition.NIGHT_WATCH_BONUS);
checkPossibleTrophies(expectedTrophies, TrophyHelper.getPossibleTrophiesForGame(GameDefinition.NIGHT_WATCH));
......@@ -84,6 +88,7 @@ public class TrophyHelperTest {
expectedTrophies.add(GameTrophyDefinition.SHOOTING_RANGE_PLAY3);
expectedTrophies.add(GameTrophyDefinition.SHOOTING_RANGE_DIFF1);
expectedTrophies.add(GameTrophyDefinition.SHOOTING_RANGE_DIFF2);
expectedTrophies.add(GameTrophyDefinition.SHOOTING_RANGE_BONUS);
checkPossibleTrophies(expectedTrophies, TrophyHelper.getPossibleTrophiesForGame(GameDefinition.SHOOTING_RANGE));
......@@ -94,6 +99,7 @@ public class TrophyHelperTest {
expectedTrophies.add(GameTrophyDefinition.IN_THE_DARKNESS_PLAY3);
expectedTrophies.add(GameTrophyDefinition.IN_THE_DARKNESS_DIFF1);
expectedTrophies.add(GameTrophyDefinition.IN_THE_DARKNESS_DIFF2);
expectedTrophies.add(GameTrophyDefinition.IN_THE_DARKNESS_BONUS);
checkPossibleTrophies(expectedTrophies, TrophyHelper.getPossibleTrophiesForGame(GameDefinition.IN_THE_DARKNESS));
expectedTrophies = new ArrayList<>();
......@@ -103,6 +109,7 @@ public class TrophyHelperTest {
expectedTrophies.add(GameTrophyDefinition.RUNES_PLAY3);
expectedTrophies.add(GameTrophyDefinition.RUNES_DIFF1);
expectedTrophies.add(GameTrophyDefinition.RUNES_DIFF2);
expectedTrophies.add(GameTrophyDefinition.RUNES_BONUS);
checkPossibleTrophies(expectedTrophies, TrophyHelper.getPossibleTrophiesForGame(GameDefinition.RUNES));
......@@ -113,9 +120,32 @@ public class TrophyHelperTest {
expectedTrophies.add(GameTrophyDefinition.CRIME_SCENE_PLAY3);
expectedTrophies.add(GameTrophyDefinition.CRIME_SCENE_DIFF1);
expectedTrophies.add(GameTrophyDefinition.CRIME_SCENE_DIFF2);
expectedTrophies.add(GameTrophyDefinition.CRIME_SCENE_BONUS);
checkPossibleTrophies(expectedTrophies, TrophyHelper.getPossibleTrophiesForGame(GameDefinition.CRIME_SCENE));
expectedTrophies = new ArrayList<>();
Collections.addAll(expectedTrophies, UserTrophyDefinition.values());
expectedTrophies.add(GameTrophyDefinition.PROTOCOL_PLAY1);
expectedTrophies.add(GameTrophyDefinition.PROTOCOL_PLAY2);
expectedTrophies.add(GameTrophyDefinition.PROTOCOL_PLAY3);
expectedTrophies.add(GameTrophyDefinition.PROTOCOL_DIFF1);
expectedTrophies.add(GameTrophyDefinition.PROTOCOL_DIFF2);
expectedTrophies.add(GameTrophyDefinition.PROTOCOL_BONUS);
checkPossibleTrophies(expectedTrophies, TrophyHelper.getPossibleTrophiesForGame(GameDefinition.PROTOCOL));
expectedTrophies = new ArrayList<>();
Collections.addAll(expectedTrophies, UserTrophyDefinition.values());
expectedTrophies.add(GameTrophyDefinition.SAFE_PLAY1);
expectedTrophies.add(GameTrophyDefinition.SAFE_PLAY2);
expectedTrophies.add(GameTrophyDefinition.SAFE_PLAY3);
expectedTrophies.add(GameTrophyDefinition.SAFE_DIFF1);
expectedTrophies.add(GameTrophyDefinition.SAFE_DIFF2);
expectedTrophies.add(GameTrophyDefinition.SAFE_BONUS);
checkPossibleTrophies(expectedTrophies, TrophyHelper.getPossibleTrophiesForGame(GameDefinition.SAFE));
}
@Test
......
TestGameInTheDarknessEasyNoneStar
TestGameInTheDarknessEasyOneStar
TestGameInTheDarknessEasyTwoStars
TestGameInTheDarknessEasyThreeStars
TestGameInTheDarknessMediumNoneStar
TestGameInTheDarknessMediumOneStar
TestGameInTheDarknessMediumTwoStars
TestGameInTheDarknessMediumThreeStars
TestGameInTheDarknessHardNoneStar
TestGameInTheDarknessHardOneStar
TestGameInTheDarknessHardTwoStars
TestGameInTheDarknessHardThreeStars
TestGameInTheDarknessBonusNoneStar
TestGameInTheDarknessBonusOneStar
TestGameInTheDarknessBonusTwoStars
TestGameInTheDarknessBonusThreeStars
TestGameInTheDarknessEasyScenario
TestGameInTheDarknessMediumScenario
TestGameInTheDarknessHardScenario
TestGameInTheDarknessBonusScenario
\ No newline at end of file
TestScenarioHallOfFameRobberyTrophies
TestScenarioHallOfFamePursuitTrophies
TestScenarioHallOfFameKidnappingTrophies
TestScenarioHallOfFameNightWatchTrophies
TestScenarioHallOfFameShootingRangeTrophies
TestScenarioHallOfFameInTheDarknessTrophies
TestScenarioHallOfFameCrimeSceneTrophies
TestScenarioHallOfFameRunesTrophies
TestScenarioHallOfFameProtocolTrophies
TestScenarioHallOfFameSafeTrophies
TestScenarioHeapOfTrophies
\ No newline at end of file
......@@ -59,7 +59,7 @@ public class TestScenarioHeapOfTrophies extends AbstractTestScenario {
waitForScreen("5. Wait for screen HallOfFameScreen", HallOfFameScreen.class);
checkHeapImage(6, 0);
openAndCheckScoreTable(7, user, 0, 0, 0, 0, 0, 0, 0, 0);
openAndCheckScoreTable(7, user, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
writeToLogFile("\nADD GAME ROBBERY EASY 0 STARS ---> CHECK TABLE SCORE [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n");
addNewScoreAndGoToHallOfFame(8, user, GameDefinition.ROBBERY, GameDifficulty.EASY, AbstractTablexiaGame.GameResult.NO_STAR);
......@@ -69,7 +69,7 @@ public class TestScenarioHeapOfTrophies extends AbstractTestScenario {
writeToLogFile("\nADD GAME ROBBERY EASY 1 STARS ---> CHECK TABLE SCORE [1, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n");
addNewScoreAndGoToHallOfFame(11, user, GameDefinition.ROBBERY, GameDifficulty.EASY, AbstractTablexiaGame.GameResult.ONE_STAR);
checkHeapImage(12, 1);
openAndCheckScoreTable(13, user, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
openAndCheckScoreTable(13, user, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
writeToLogFile("\nADD GAME PURSUIT MEDIUM 0 STARS ---> CHECK TABLE SCORE [1, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n");
addNewScoreAndGoToHallOfFame(14, user, GameDefinition.PURSUIT, GameDifficulty.MEDIUM, AbstractTablexiaGame.GameResult.NO_STAR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment