From 131b6c30f807691328a91c312e5ce36977421eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20D=C3=ADaz?= Date: Fri, 7 Oct 2016 19:59:28 -0400 Subject: [PATCH] Removed berry rate since the formula is yet unknown --- .../java/com/icecream/snorlax/module/Pokemons.java | 3 +++ .../snorlax/module/feature/encounter/Encounter.java | 5 +---- .../feature/encounter/EncounterNotification.java | 12 +++++------- app/src/main/res/values/strings.xml | 9 ++++----- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/com/icecream/snorlax/module/Pokemons.java b/app/src/main/java/com/icecream/snorlax/module/Pokemons.java index 93e88e0..afdeb6f 100644 --- a/app/src/main/java/com/icecream/snorlax/module/Pokemons.java +++ b/app/src/main/java/com/icecream/snorlax/module/Pokemons.java @@ -157,6 +157,7 @@ private double getRate(int index, double multiplier) { return Math.round(Math.min(100.0d, mCaptureProbability.getCaptureProbability(index) * 100d * multiplier) * 100.0d) / 100.0d; } + @Deprecated public double getWithPokeballAndBerry() { return getRate(0, 1.5); } @@ -165,6 +166,7 @@ public double getWithGreatball() { return getRate(1, 1); } + @Deprecated public double getWithGreatballAndBerry() { return getRate(1, 1.5); } @@ -173,6 +175,7 @@ public double getWithUltraball() { return getRate(2, 1); } + @Deprecated public double getWithUltraballAndBerry() { return getRate(2, 1.5); } diff --git a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/Encounter.java b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/Encounter.java index ab9474a..c2ab1ef 100644 --- a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/Encounter.java +++ b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/Encounter.java @@ -163,11 +163,8 @@ private void onEncounter(PokemonData pokemonData, CaptureProbability captureProb data.getMove1WithFormat(), data.getMove2WithFormat(), probability.getWithPokeball(), - probability.getWithPokeballAndBerry(), probability.getWithGreatball(), - probability.getWithGreatballAndBerry(), - probability.getWithUltraball(), - probability.getWithUltraballAndBerry() + probability.getWithUltraball() ); } diff --git a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java index e8d7848..66dd7fc 100644 --- a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java +++ b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java @@ -56,7 +56,7 @@ final class EncounterNotification { } @SuppressWarnings("deprecation") - void show(int pokemonNumber, String pokemonName, double iv, int attack, int defense, int stamina, int cp, double level, int hp, String move1, String move2, double pokeRate, double pokeBerryRate, double greatRate, double greatBerryRate, double ultraRate, double ultraBerryRate) { + void show(int pokemonNumber, String pokemonName, double iv, int attack, int defense, int stamina, int cp, double level, int hp, String move1, String move2, double pokeRate, double greatRate, double ultraRate) { new Handler(Looper.getMainLooper()).post(() -> { Notification notification = new NotificationCompat.Builder(mContext) @@ -71,19 +71,17 @@ void show(int pokemonNumber, String pokemonName, double iv, int attack, int defe false )) .setContentTitle(mContext.getString(R.string.notification_title, pokemonName, cp, level)) - .setContentText(mContext.getString(R.string.notification_content, iv, attack, defense, stamina, hp)) + .setContentText(mContext.getString(R.string.notification_content, iv, attack, defense, stamina)) .setStyle(new NotificationCompat.InboxStyle() - .addLine(mContext.getString(R.string.notification_categoty_stats_content, iv, attack, defense, stamina, hp)) + .addLine(mContext.getString(R.string.notification_categoty_stats_content_iv, iv, attack, defense, stamina)) + .addLine(mContext.getString(R.string.notification_categoty_stats_content_hp, hp)) .addLine(getBoldSpannable(mContext.getString(R.string.notification_categoty_moves_title))) .addLine(mContext.getString(R.string.notification_categoty_moves_content, move1, move2)) .addLine(getBoldSpannable(mContext.getString(R.string.notification_categoty_catch_title))) - .addLine(mContext.getString(R.string.notification_categoty_catch_content_pokeball, pokeRate, pokeBerryRate)) - .addLine(mContext.getString(R.string.notification_categoty_catch_content_greatball, greatRate, greatBerryRate)) - .addLine(mContext.getString(R.string.notification_categoty_catch_content_ultraball, ultraRate, ultraBerryRate)) + .addLine(mContext.getString(R.string.notification_categoty_catch_content, pokeRate, greatRate, ultraRate)) ) .setColor(ContextCompat.getColor(mContext, R.color.red_700)) .setAutoCancel(true) - //.setVibrate(new long[]{0, 60, 300, 60}) .setVibrate(new long[]{0}) .setPriority(Notification.PRIORITY_MAX) .setCategory(NotificationCompat.CATEGORY_ALARM) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 143da9c..fd519b5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -17,18 +17,17 @@ Install Pokemon Go to launch it %1$s (CP %2$d) LV %3$3.1f - %1$4.1f%% [A/D/S %2$d/%3$d/%4$d] and HP %5$d + %1$4.1f%% [A/D/S %2$d/%3$d/%4$d] Stats - %1$4.1f%% [A/D/S %2$d/%3$d/%4$d] and HP %5$d + %1$4.1f%% [A/D/S %2$d/%3$d/%4$d] + HP %1$d Moves %1$s - %2$s Catch Rate - Pokeball %1$4.1f%% - %2$4.1f%% - Greatball %1$4.1f%% - %2$4.1f%% - Ultraball %1$4.1f%% - %2$4.1f%% + Poké %1$4.1f%% - Great %2$4.1f%% - Ultra %3$4.1f%% General general_mock_key