Skip to content

Commit

Permalink
Add MedFes calculations for # of songs needed to play
Browse files Browse the repository at this point in the history
  • Loading branch information
dburr committed Dec 9, 2015
1 parent 53137ab commit b5bfa2d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
17 changes: 17 additions & 0 deletions web_app/js/sif_tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,15 @@ function calculate_rank() {
var normal_count = Math.round(required_exp / 26);
var hard_count = Math.round(required_exp / 46);
var expert_count = Math.round(required_exp / 83);
var m3_easy_count = Math.round(required_exp / (12*3));
var m3_normal_count = Math.round(required_exp / (26*3));
var m3_hard_count = Math.round(required_exp / (46*3));
var m3_expert_count = Math.round(required_exp / (83*3));
// Increases the amount of EXP gained by 10%.
var m3b_easy_count = Math.round(required_exp / (12*1.1*3));
var m3b_normal_count = Math.round(required_exp / (26*1.1*3));
var m3b_hard_count = Math.round(required_exp / (46*1.1*3));
var m3b_expert_count = Math.round(required_exp / (83*1.1*3));
// calc LP and FP
var LP = 25 + Math.floor(Math.min(desired_rank, 300) / 2) + Math.floor(Math.max(desired_rank - 300, 0) / 3);
// calc friend slots
Expand All @@ -372,6 +381,14 @@ function calculate_rank() {
$("#rank-result-songs-normal").text(normal_count);
$("#rank-result-songs-hard").text(hard_count);
$("#rank-result-songs-expert").text(expert_count);
$("#rank-result-songs-easy-mf").text(m3_easy_count);
$("#rank-result-songs-normal-mf").text(m3_normal_count);
$("#rank-result-songs-hard-mf").text(m3_hard_count);
$("#rank-result-songs-expert-mf").text(m3_expert_count);
$("#rank-result-songs-easy-mfb").text(m3b_easy_count);
$("#rank-result-songs-normal-mfb").text(m3b_normal_count);
$("#rank-result-songs-hard-mfb").text(m3b_hard_count);
$("#rank-result-songs-expert-mfb").text(m3b_expert_count);
// rank-results-lp">-</span> LP and <span id="rank-results-fp
$("#rank-results-lp").text(LP);
$("#rank-results-fp").text(friend_slots);
Expand Down
10 changes: 5 additions & 5 deletions web_app/sif_tools.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ <h1>SIF Tools</h1>
<h1>Results</h1>EXP required:&nbsp;&nbsp;&nbsp;<span id="rank-result-exp">-</span><br>
<br>
You will need to play the following number of songs in order to get this amount of EXP:<br>
<br>
EASY:&nbsp;&nbsp;&nbsp;<span id="rank-result-songs-easy">-</span><br>
NORMAL:&nbsp;&nbsp;&nbsp;<span id="rank-result-songs-normal">-</span><br>
HARD:&nbsp;&nbsp;&nbsp;<span id="rank-result-songs-hard">-</span><br>
EXPERT:&nbsp;&nbsp;&nbsp;<span id="rank-result-songs-expert">-</span><br>
<br>(Single / 3xMedFes / 3xMedFes w/EXP boost)<br /><br />
EASY:&nbsp;&nbsp;&nbsp;<span id="rank-result-songs-easy">-</span> / <span id="rank-result-songs-easy-mf">-</span> / <span id="rank-result-songs-easy-mfb">-</span><br>
NORMAL:&nbsp;&nbsp;&nbsp;<span id="rank-result-songs-normal">-</span> / <span id="rank-result-songs-normal-mf">-</span> / <span id="rank-result-songs-normal-mfb">-</span><br>
HARD:&nbsp;&nbsp;&nbsp;<span id="rank-result-songs-hard">-</span> / <span id="rank-result-songs-hard-mf">-</span> / <span id="rank-result-songs-hard-mfb">-</span><br>
EXPERT:&nbsp;&nbsp;&nbsp;<span id="rank-result-songs-expert">-</span> / <span id="rank-result-songs-expert-mf">-</span> / <span id="rank-result-songs-expert-mfb">-</span><br>
<br>
At this rank you will have <span id="rank-results-lp">-</span> LP and <span id="rank-results-fp">-</span> friend slots.<br>
<br>
Expand Down

0 comments on commit b5bfa2d

Please sign in to comment.