Created
April 5, 2016 14:26
-
-
Save ikr7/25fa40cfdac96bd85b6c155a6f09cefb to your computer and use it in GitHub Desktop.
デレステ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<title>デレステの Groove イベントの総ノーツ数から 曲編成を特定するやつ</title> | |
</head> | |
<body> | |
<h1>デレステの Groove イベントの総ノーツ数から 曲編成を特定するやつ</h1> | |
<p>※Masterのみです、一部 Groove イベントに登場し得ない楽曲が含まれる場合があります</p> | |
<input type="number"> | |
<div></div> | |
</body> | |
<script> | |
var songs = [{"name":"お願い!シンデレラ","type":"全属性","notes":477},{"name":"とどけ!アイドル","type":"全属性","notes":481},{"name":"We're the friends!","type":"全属性","notes":547},{"name":"輝く世界の魔法","type":"全属性","notes":585},{"name":"ススメ☆オトメ 〜jewel parade〜","type":"全属性","notes":466},{"name":"メッセージ","type":"全属性","notes":521},{"name":"Shine!!","type":"全属性","notes":540},{"name":"Star!!","type":"全属性","notes":569},{"name":"夕映えプレゼント","type":"全属性","notes":593},{"name":"流れ星キセキ","type":"全属性","notes":596},{"name":"夢色ハーモニー","type":"全属性","notes":630},{"name":"ゴキゲン Party Night","type":"全属性","notes":632},{"name":"Tulip","type":"全属性","notes":659},{"name":"できたて Evo! Revo! Generation!","type":"全属性","notes":671},{"name":"Snow Wings","type":"全属性","notes":682},{"name":"GOIN'!!!","type":"全属性","notes":575},{"name":"M@GIC☆","type":"全属性","notes":767},{"name":"Absolute NIne","type":"全属性","notes":622},{"name":"S(mile)ING!","type":"キュート","notes":438},{"name":"風色メロディ","type":"キュート","notes":409},{"name":"Happy × Days","type":"キュート","notes":478},{"name":"ススメ☆オトメ 〜jewel parade〜","type":"キュート","notes":517},{"name":"おねだりShall We 〜?","type":"キュート","notes":520},{"name":"ゴキゲン Party Night","type":"キュート","notes":548},{"name":"エヴリデイドリーム","type":"キュート","notes":552},{"name":"ショコラ・ティアラ","type":"キュート","notes":510},{"name":"ØωØver!!","type":"キュート","notes":606},{"name":"アタシポンコツアンドロイド","type":"キュート","notes":634},{"name":"Naked Romance","type":"キュート","notes":674},{"name":"パステルピンクな恋","type":"キュート","notes":684},{"name":"あんずのうた","type":"キュート","notes":700},{"name":"花簪 HANAKANZASHI","type":"キュート","notes":645},{"name":"Memories","type":"クール","notes":412},{"name":"Bright Blue","type":"クール","notes":389},{"name":"You're stars shine on me","type":"クール","notes":425},{"name":"ススメ☆オトメ 〜jewel parade〜","type":"クール","notes":406},{"name":"Angel Breeze","type":"クール","notes":524},{"name":"Twilight Sky","type":"クール","notes":582},{"name":"オルゴールの小箱","type":"クール","notes":531},{"name":"Never Say Never","type":"クール","notes":611},{"name":"ゴキゲン Party Night","type":"クール","notes":630},{"name":"ヴィーナスシンドローム","type":"クール","notes":612},{"name":"Nation Blue","type":"クール","notes":708},{"name":"華蕾夢ミル狂詩曲 ~魂ノ導~","type":"クール","notes":656},{"name":"-LEGNE- 仇なす剣 光の旋律","type":"クール","notes":630},{"name":"Tracing Pulse","type":"クール","notes":662},{"name":"アップルパイ・プリンセス","type":"パッション","notes":562},{"name":"ましゅまろ☆キッス","type":"パッション","notes":504},{"name":"ススメ☆オトメ 〜jewel parade〜","type":"パッション","notes":511},{"name":"DOKIDOKIリズム","type":"パッション","notes":569},{"name":"ミツボシ☆☆★","type":"パッション","notes":579},{"name":"ゴキゲン Party Night","type":"パッション","notes":630},{"name":"Orange Saphire","type":"パッション","notes":719},{"name":"Romantic Now","type":"パッション","notes":660},{"name":"LET'S GO HAPPY!!","type":"パッション","notes":703},{"name":"Rockin' Emotion","type":"パッション","notes":675},{"name":"絶対特権主張しますっ!","type":"パッション","notes":777},{"name":"TOKIMEKIエスカレート","type":"パッション","notes":800}]; | |
var matchSongs = function(N) { | |
var matches = []; | |
for (var i = 0; i < songs.length; i++) { | |
for (var j = i + 1; j < songs.length; j++) { | |
for (var k = j + 1; k < songs.length; k++) { | |
if (songs[i].notes + songs[j].notes + songs[k].notes === N) { | |
matches.push([songs[i], songs[j], songs[k]]); | |
} | |
} | |
} | |
} | |
return matches; | |
}; | |
var results = document.querySelector('div'); | |
document.querySelector('input').addEventListener('input', function (e) { | |
while (results.firstChild) { results.removeChild(results.firstChild); } | |
matchSongs(parseInt(e.target.value)).filter(function (groove) { | |
return groove.filter(function (song) { | |
return song.type !== '全属性'; | |
}).every(function (song, _, songs) { | |
return song.type === songs[0].type; | |
}); | |
}).forEach(function (groove) { | |
groove.forEach(function (song) { | |
results.innerText += | |
song.name + '(' + song.type + '): ' + song.notes + 'notes\n'; | |
}); | |
results.innerText += '========================\n'; | |
}); | |
}); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment