Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Herobrine1010 #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified src/assets/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/chara/ako.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/chara/aya.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/chara/eve.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/chara/himari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/chara/hina.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/chara/maya.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/chara/moga.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/chara/rimi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/chara/tomoe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/objects/coronet_rimi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/objects/croquette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/objects/logo_afterglow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/objects/logo_hello-happy-world.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/objects/logo_pastelpalettes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/objects/logo_poppinparty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/objects/logo_roselia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/sounds/band/afterglow-original.mp3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/assets/sounds/band/poppinparty-original.mp3
Binary file not shown.
Binary file added src/assets/sounds/band/roselia-original.mp3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/assets/sounds/chara/himari/A!A!O!.mp3
Binary file not shown.
Binary file not shown.
Binary file added src/assets/sounds/chara/hina/Let's go! Go go!.mp3
Binary file not shown.
Binary file not shown.
Binary file added src/assets/sounds/chara/kaoru/あ~儚い~.mp3
Binary file not shown.
Binary file added src/assets/sounds/chara/kaoru/儚い~.mp3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/assets/sounds/chara/kasumi_fall_1.wav
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/assets/sounds/chara/misaki/Let‘s smile.mp3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/assets/sounds/chara/ran/行くよ.mp3
Binary file not shown.
Binary file added src/assets/sounds/chara/rimi/ぎゃっ!.mp3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
48 changes: 48 additions & 0 deletions src/band-data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import logo_poppinparty from "./assets/objects/logo_poppinparty.png";
import logo_afterglow from "./assets/objects/logo_afterglow.png";
import logo_pastelpalettes from "./assets/objects/logo_pastelpalettes.png";
import logo_roselia from "./assets/objects/logo_roselia.png";
import logo_hellohappyworld from "./assets/objects/logo_hello-happy-world.png";

//The following clips are from 「BanG Dream! ガルパ ピコ~大盛り~」episode 9
import poppinparty_sound_1 from "./assets/sounds/band/poppinparty-original.mp3";
import afterglow_sound_1 from "./assets/sounds/band/afterglow-original.mp3";
import pastelpalettes_sound_1 from "./assets/sounds/band/pastelpalettes-original.mp3";
import roselia_sound_1 from "./assets/sounds/band/roselia-original.mp3";
import hellohappyworld_sound_1 from "./assets/sounds/band/hellohappyworld-original.mp3";

//You may add more SE if you like.


export interface BandData{
name:string;
sounds?:string[];
logo:string;
}
export const bandData: BandData[]=[{
name:"Popipa",
sounds:[poppinparty_sound_1],
logo:logo_poppinparty,
},
{
name:"Afterglow",
sounds:[afterglow_sound_1],
logo:logo_afterglow,
},
{
name:"Pastel Palettes",
sounds:[pastelpalettes_sound_1],
logo:logo_pastelpalettes
},
{
name:"Roselia",
sounds:[roselia_sound_1],
logo:logo_roselia
},
{
name:"Hello ! Happy World",
sounds:[hellohappyworld_sound_1],
logo:logo_hellohappyworld,
}

]
127 changes: 125 additions & 2 deletions src/character-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,56 @@ import moga from "./assets/chara/moga.png";
import himari from "./assets/chara/himari.png";
import tomoe from "./assets/chara/tomoe.png";

import ksm_fall_1 from "./assets/sounds/chara/kasumi_fall_1.wav";
import kasumi_fall_1 from "./assets/sounds/chara/kasumi/一緒にキラキラドキドキしよう.mp3";
import kasumi_fall_2 from "./assets/sounds/chara/kasumi/あっ待って!.mp3";
import arisa_fall_1 from "./assets/sounds/chara/arisa/ちょっとだけな.mp3";
import arisa_fall_2 from "./assets/sounds/chara/arisa/よっしゃー行くぞ!.mp3";
import arisa_dropped_1 from "./assets/sounds/chara/arisa/あ、すみません….mp3";
import tae_fall_1 from "./assets/sounds/chara/tae/うんうん~行ける!.mp3";
import rimi_fall_1 from "./assets/sounds/chara/rimi/みんなとなら、きっと大丈夫.mp3";
import rimi_fall_2 from "./assets/sounds/chara/rimi/私、すっごくドキドキしてる.mp3";
import rimi_dropped_1 from "./assets/sounds/chara/rimi/ぎゃっ!.mp3";
import saaya_fall_1 from "./assets/sounds/chara/saaya/あっ危な~い.mp3";
import saaya_fall_2 from "./assets/sounds/chara/saaya/今日の山吹ベーカリーは、ポイント百倍です.mp3";
import ran_fall_1 from "./assets/sounds/chara/ran/って、どこに行くが決まった?.mp3";
import ran_fall_2 from "./assets/sounds/chara/ran/みてて、私たちの本気.mp3";
import ran_fall_3 from "./assets/sounds/chara/ran/行くよ.mp3";
import himari_fall_1 from "./assets/sounds/chara/himari/A!A!O!.mp3";
import himari_fall_2 from "./assets/sounds/chara/himari/ひまりちゃん、参上!.mp3";
import tsugumi_fall_1 from "./assets/sounds/chara/tsugumi/が、頑張るぞー.mp3";
import tsugumi_fall_2 from "./assets/sounds/chara/tsugumi/何事もチャレンジだよね.mp3";
import moca_fall_1 from "./assets/sounds/chara/moca/あたしにまかせなさい~.mp3";
import moca_fall_2 from "./assets/sounds/chara/moca/モカちゃんやっちゃうよ~.mp3";
import tomoe_fall_1 from "./assets/sounds/chara/tomoe/全力で突っ走るぞ!.mp3";
import tomoe_fall_2 from "./assets/sounds/chara/tomoe/果てに決めよぜ!.mp3";
import aya_fall_1 from "./assets/sounds/chara/aya/さ!行こう!.mp3";
import aya_fall_2 from "./assets/sounds/chara/aya/よし~頑張るぞ~.mp3";
import chisato_fall_1 from "./assets/sounds/chara/chisato/素敵な時間を過ごしましょう!.mp3";
import hina_fall_1 from "./assets/sounds/chara/hina/Let's go! Go go!.mp3";
import maya_fall_1 from "./assets/sounds/chara/maya/やる気は十分です.mp3";
import eve_fall_1 from "./assets/sounds/chara/eve/さーレッツ武士道!.mp3";
import yukina_fall_1 from "./assets/sounds/chara/yukina/完璧に決めて見せるわ.mp3";
import yukina_fall_2 from "./assets/sounds/chara/yukina/油断はしない、全力で行くわ.mp3";
import yukina_fall_3 from "./assets/sounds/chara/yukina/目指すは頂点、ただ一つよ.mp3";
import sayo_fall_1 from "./assets/sounds/chara/sayo/さ、気を引き締めて.mp3";
import sayo_fall_2 from "./assets/sounds/chara/sayo/行きましょう、頂点へ!.mp3";
import lisa_fall_1 from "./assets/sounds/chara/lisa/あたしの全てを込めるよ!.mp3";
import lisa_fall_2 from "./assets/sounds/chara/lisa/乗り乗りて行こう~.mp3";
import rinko_fall_1 from "./assets/sounds/chara/rinko/が、頑張ります.mp3";
import rinko_fall_2 from "./assets/sounds/chara/rinko/私も、い、行きます.mp3";
import ako_fall_1 from "./assets/sounds/chara/ako/カッコイイ亚子を見せちゃうよ!.mp3";
import ako_fall_2 from "./assets/sounds/chara/ako/バンバンーって感じで行こう!.mp3";
import kokoro_fall_1 from "./assets/sounds/chara/kokoro/さー世界を笑顔に!.mp3";
import kokoro_fall_2 from "./assets/sounds/chara/kokoro/何が起きるが楽しみね.mp3";
import hagumi_fall_1 from "./assets/sounds/chara/hagumi/すごいワクワクするね.mp3";
import hagumi_fall_2 from "./assets/sounds/chara/hagumi/よし!はぐみ、頑張るよ!.mp3";
import kanon_fall_1 from "./assets/sounds/chara/kanon/よ、よろしくお願いします!.mp3";
import kaoru_fall_1 from "./assets/sounds/chara/kaoru/あ~儚い~.mp3";
import kaoru_fall_2 from "./assets/sounds/chara/kaoru/儚い~.mp3";
import misaki_fall_1 from "./assets/sounds/chara/misaki/Let‘s smile.mp3";
import misaki_fall_2 from "./assets/sounds/chara/misaki/さてと、それじゃやりますか!.mp3";
import misaki_fall_3 from "./assets/sounds/chara/misaki/はいはい~みんな大好きミッシェルだよ~.mp3";


export interface CharacterData {
name: string;
Expand All @@ -47,128 +96,202 @@ export const characterData: CharacterData[] = [
file: ksm,
group: "Popipa",
sounds: {
fall: [ksm_fall_1],
fall: [kasumi_fall_1,kasumi_fall_2],
},
},
{
name: "Arisa",
file: arisa,
group: "Popipa",
sounds:{
fall:[arisa_fall_1,arisa_fall_2],
dropped:[arisa_dropped_1]
}
},
{
name: "Rimi",
file: rimi,
group: "Popipa",
sounds:{
fall:[rimi_fall_1,rimi_fall_2],
dropped:[rimi_dropped_1]
},
},
{
name: "Saya",
file: saaya,
group: "Popipa",
sounds:{
fall:[saaya_fall_1,saaya_fall_2]
},
},
{
name: "Tae",
file: otae,
group: "Popipa",
sounds:{
fall:[tae_fall_1]
},
},
{
name: "Yukina",
file: yukina,
group: "Roselia",
sounds:{
fall:[yukina_fall_1,yukina_fall_2,yukina_fall_3]
},
},
{
name: "Risa",
file: risa,
group: "Roselia",
sounds:{
fall:[lisa_fall_1,lisa_fall_2]
},
},
{
name: "Sayo",
file: sayo,
group: "Roselia",
sounds:{
fall:[sayo_fall_1,sayo_fall_2]
},
},
{
name: "Rinko",
file: rinko,
group: "Roselia",
sounds:{
fall:[rinko_fall_1,rinko_fall_2]
},
},
{
name: "Ako",
file: ako,
group: "Roselia",
sounds:{
fall:[ako_fall_1,ako_fall_2]
},
},
{
name: "Aya",
file: aya,
group: "Pastel Palettes",
sounds:{
fall:[aya_fall_1,aya_fall_2]
},
},
{
name: "Chisato",
file: chisato,
group: "Pastel Palettes",
sounds:{
fall:[chisato_fall_1]
},
},
{
name: "Maya",
file: maya,
group: "Pastel Palettes",
sounds:{
fall:[maya_fall_1]
},
},
{
name: "Eve",
file: eve,
group: "Pastel Palettes",
sounds:{
fall:[eve_fall_1]
},
},
{
name: "Hina",
file: hina,
group: "Pastel Palettes",
sounds:{
fall:[hina_fall_1]
},
},
{
name: "Kokoro",
file: kokoro,
group: "Hello ! Happy World",
sounds:{
fall:[kokoro_fall_1,kokoro_fall_2]
},
},
{
name: "Hagumi",
file: hagumi,
group: "Hello ! Happy World",
sounds:{
fall:[hagumi_fall_1,hagumi_fall_2]
},
},
{
name: "Kanon",
file: kanon,
group: "Hello ! Happy World",
sounds:{
fall:[kanon_fall_1]
},
},
{
name: "Michelle",
file: michelle,
group: "Hello ! Happy World",
preview: michelleSmall,
sounds:{
fall:[misaki_fall_1,misaki_fall_2,misaki_fall_3]
},
},
{
name: "Kaoru",
file: kaoru,
group: "Hello ! Happy World",
sounds:{
fall:[kaoru_fall_1,kaoru_fall_2]
},
},
{
name: "Ran",
file: ran,
group: "Afterglow",
sounds:{
fall:[ran_fall_1,ran_fall_2,ran_fall_3]
},
},
{
name: "Tomoe",
file: tomoe,
group: "Afterglow",
sounds:{
fall:[tomoe_fall_2,tomoe_fall_1]
},
},
{
name: "Tsugumi",
file: tsugumi,
group: "Afterglow",
sounds:{
fall:[tsugumi_fall_1,tsugumi_fall_2]
},
},
{
name: "Moga",
file: moga,
group: "Afterglow",
sounds:{
fall:[moca_fall_1,moca_fall_2]
},
},
{
name: "Himari",
file: himari,
group: "Afterglow",
sounds:{
fall:[himari_fall_1,himari_fall_2]
},
},
];
41 changes: 37 additions & 4 deletions src/clear.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { ROWS, COLUMNS } from "./config";
import { COLUMNS, ROWS } from "./config";
import { characterData } from "./character-data";
import { bandData } from "./band-data";
import { app } from "./index";

let soundPlaying: PIXI.sound.Sound;

const groupMap = characterData
.map((e) => [e.name, e.group])
.reduce((obj, [key, val]) => {
obj[key] = val;
return obj;
}, {} as { [name: string]: string });

const groupMembers = characterData.reduce((acc, curr) => {
return {
...acc,
Expand All @@ -17,7 +20,8 @@ const groupMembers = characterData.reduce((acc, curr) => {
};
}, {} as { [key: string]: string[] });

export const findClearPieces = (pieces: (string | null)[][]) => {
export const findClearPieces =(pieces: (string | null)[][]) => {
var pieces_copy=JSON.parse(JSON.stringify(pieces));
const chunks: [number, number][][][] = Array(ROWS)
.fill(null)
.map(() => [...Array(COLUMNS).fill(null)]);
Expand Down Expand Up @@ -81,5 +85,34 @@ export const findClearPieces = (pieces: (string | null)[][]) => {
return groupMembers[groupMap[members[0]]]?.length === members.length;
})
.reduce((acc, curr) => (acc.length > curr.length ? acc : curr), []);
return members.length > 0 ? members : undefined;

if(members.length>0){
var groupToClear; //literally the name of the group to be cleared
for(let i=0;i<members.length;i++) {
if (pieces_copy[members[i][1]][members[i][0]] != "item") {
groupToClear = groupMap[pieces_copy[members[i][1]][members[i][0]]];
break;
}//The loop here is for averting the case of "item",
}// thus ensuring a non-undefined value from the "groupMap".
for(let i=0;i<bandData.length;i++) {
if (bandData[i].name === groupToClear) {
//From here randomly play the voice clip of the band
if(bandData[i].sounds) {
if (soundPlaying?.isPlaying) {
soundPlaying.destroy();
}
// @ts-ignore
soundPlaying = app.loader.resources[bandData[i].sounds[Math.floor(Math.random() * bandData[i].sounds?.length)]].sound;
soundPlaying.play({ volume: 1, });
}
//From here you may code for the animation. You can use bandData[i] for the BandData object in this clear process.
//...(your code please)
break;
}
}

return members;
}
// return members.length > 0 ? members : undefined;
return undefined;
};
Loading