From 7326c989963c059b4ca9faa49715e70cd727d121 Mon Sep 17 00:00:00 2001 From: Donald Burr Date: Sat, 5 Mar 2016 21:35:23 -0800 Subject: [PATCH] Revert "Add gem calc" This reverts commit f7b0cf4739bbc9d772f57b6c25aa3704ff1f9e4b. --- command_line/rankcalc.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/command_line/rankcalc.py b/command_line/rankcalc.py index f8c0b63..e31b367 100755 --- a/command_line/rankcalc.py +++ b/command_line/rankcalc.py @@ -30,29 +30,25 @@ import getopt from math import floor # algorithm from: http://decaf.kouhi.me/lovelive/index.php?title=Gameplay#Ranks -def calc(game_version, starting_rank, starting_exp, desired_rank, half_exp): +def calc(game_version, starting_rank, starting_exp, desired_rank): required_exp = 0 for rank in range(starting_rank, desired_rank): required_exp_for_next_rank = round(34.45 * rank - 551) # account for half EXP on JP (only if rank < 100) - if half_exp and rank < 100: + if game_version == "JP" and rank < 100: required_exp_for_next_rank = required_exp_for_next_rank // 2 #print "AT RANK %d NEED %d EXP" % (rank, required_exp_for_next_rank) required_exp = required_exp + required_exp_for_next_rank # account for exp we already have required_exp = required_exp - starting_exp + print "To get from rank %d (with %d EXP) to rank %d on %s requires %d EXP." % (starting_rank, starting_exp, desired_rank, game_version, required_exp) + print "Equivalent to playing the following number of songs of difficulty level:" + # round up because you can't play half of a song (although you can play a song half-assedly :P and I often do :P) easy_count = (required_exp // 12) + 1 normal_count = (required_exp // 26) + 1 hard_count = (required_exp // 46) + 1 ex_count = (required_exp // 83) + 1 - easy_3x_count = (required_exp // (12*3)) + 1 - normal_3x_count = (required_exp // (26*3)) + 1 - hard_3x_count = (required_exp // (46*3)) + 1 - ex_3x_count = (required_exp // (83*3)) + 1 - easy_3xb_count = (required_exp // (12*3)) + 1 - normal_3xb_count = (required_exp // (26*3)) + 1 - hard_3xb_count = (required_exp // (46*3)) + 1 - ex_3xb_count = (required_exp // (83*3)) + 1 + print "EASY (%d) NORMAL (%d) HARD (%d) EXPERT (%d)" % (easy_count, normal_count, hard_count, ex_count) # calc LP LP = 25 + floor(min(desired_rank, 300) / 2) + floor(max(desired_rank - 300, 0) / 3) # calc friend slots