From 27dc0d353095f1f961ccec18d994960af367cb75 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 14 Jan 2024 12:59:58 +0900 Subject: [PATCH] enhance(drop-and-fusion): sweets mode --- .../sweets_monos/custard_color.svg | Bin 3087 -> 4521 bytes .../sweets_monos/pancakes_color.svg | Bin 25815 -> 25440 bytes .../sweets_monos/shortcake_color.svg | Bin 15485 -> 16834 bytes .../verts/chocolate_bar_color.svg | Bin 0 -> 525 bytes .../sweets_monos/verts/custard_color.svg | Bin 522 -> 511 bytes .../sweets_monos/verts/doughnut_color.svg | Bin 0 -> 568 bytes .../sweets_monos/verts/lollipop_color.svg | Bin 0 -> 554 bytes .../sweets_monos/verts/pancakes_color.svg | Bin 0 -> 582 bytes .../sweets_monos/verts/shaved_ice_color.svg | Bin 0 -> 547 bytes .../sweets_monos/verts/shortcake_color.svg | Bin 0 -> 499 bytes .../verts/soft_ice_cream_color.svg | Bin 0 -> 680 bytes .../src/pages/drop-and-fusion.game.vue | 65 +- .../frontend/src/pages/drop-and-fusion.vue | 2 +- .../src/scripts/drop-and-fusion-engine.ts | 584 ++++++++++++++++-- 14 files changed, 586 insertions(+), 65 deletions(-) create mode 100644 packages/frontend/assets/drop-and-fusion/sweets_monos/verts/chocolate_bar_color.svg create mode 100644 packages/frontend/assets/drop-and-fusion/sweets_monos/verts/doughnut_color.svg create mode 100644 packages/frontend/assets/drop-and-fusion/sweets_monos/verts/lollipop_color.svg create mode 100644 packages/frontend/assets/drop-and-fusion/sweets_monos/verts/pancakes_color.svg create mode 100644 packages/frontend/assets/drop-and-fusion/sweets_monos/verts/shaved_ice_color.svg create mode 100644 packages/frontend/assets/drop-and-fusion/sweets_monos/verts/shortcake_color.svg create mode 100644 packages/frontend/assets/drop-and-fusion/sweets_monos/verts/soft_ice_cream_color.svg diff --git a/packages/frontend/assets/drop-and-fusion/sweets_monos/custard_color.svg b/packages/frontend/assets/drop-and-fusion/sweets_monos/custard_color.svg index c76b3335e599f34d9e58263741d668f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GHFAPbztlCdM(5cv0VAc`=}oyydtkS7Sy98N6epDT(8m1B>1kdQHV+`)J2FTMNBT3 z#9Uu6fr<7{v}GJ?h#LUM6hg!pW-eG5tcBIsNH?o7-2tCh{=G}^uFQ^)HgTHQJYFm|L?EPtzaR4Ml|&q)*B3hLK%;RU{&AhTy_5#=3%;Fgz2}A-K{)64B9Z zDm0M;@UFg*RYtOR>f5u_Mqh!sYUSmmt?{s1^I3AOIZ#65BRT*GQCqy}<_k$P@S#SAyy-Z5J9XrOnxG>z3_y4&dj%pt8G zq1)fdyLSjQyumHJJ3%KnvYfOH;_1TVVNCa$S4$o0!4eNCctTf($VSm2GED6h4#O8% zHz&z?&z5^N ss!-ahq6Y+_IFz7=B!Hp(1xcba1D}O&OA^gJ?m$V#?K$qg*H6Fv0V(idn*aa+ diff --git a/packages/frontend/assets/drop-and-fusion/sweets_monos/pancakes_color.svg b/packages/frontend/assets/drop-and-fusion/sweets_monos/pancakes_color.svg index 69ad069cc26ad63cdb8a305599067d444e367c33..94b2ab69b5ff9332deaa26c41ecdb25bc540078e 100644 GIT binary patch literal 25440 zcmeI5ZEx$yb;sZ5Q>f~j4IopT;j`D?0M({J0jCL?-4@N8!nJkpHR81l*}L~{KYf4y zGZgh;Q6zO`ped9^);t>WaOTW;K4-XBzx(pjtzaPE)@^SR%AOGp*UuL86 z#dP`~$!t3P{)g{JfBE-6j9lcV)8GH=cr^a>`uco1oqqoOIr^MLi{;1ZAC|YzpC0aB zrrbEyjXX33nRC(o>;0Hl2=nKM``1s`3GE8(mdZQyaBgFJGQ-?^y5ia{e-3{xV-Z5Ag6|>v{Vnx?B7-6{UWC z<>Ke3`)^tIi2q%E z9K9}YpI$yJmOovOf4Y5LK79GcO=AABe@97NR==%pwg;YXUq6lRug8D%E=sau;(Qe6 z`HhRCJWFb5mPKXZYGC9iE{m$P;KIjI;j0-JS(G_93itUcN=iSfQ3U8l=+j~npqbAj z=c^hTCGiS@t^&>^j$&R}zlqzEs+qv%O#iw?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jS1Hf$T zL&N^gJ2U_umW_M2>2R?~b+t9VG!vBCn%7keIobdD3glB zDTAdR4D<*!?sXgV9O+Thvju4D8@7pK+iYfDwAg3i>aZ)n16(GYAmFIr(DrC?LeZ!O zEuiEWcsY=gIGwsav~Z;N;3H21dRdw=HaZ;#hut@^Fs;_uTupFx?X+%#TS`&xcZ%-^ zx0Ap8UBFe$Q(9dr>*OBZL!1yuxJ&v17snOG`~le$W6k+AH$BL})i5qy8_01v9n;Y# S^zkA<=XJ)Gz7GEBhu;8MDWOgP diff --git a/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/chocolate_bar_color.svg b/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/chocolate_bar_color.svg new file mode 100644 index 0000000000000000000000000000000000000000..5cd39cc9e30e1b2e6a112fdf528d74cea0798445 GIT binary patch literal 525 zcmZut(Qd*Z6n*zA7|#|;>k?b7CR1mYbeqX^%l6h3Y?%lRVC(*Vw6n=fLlsp(mis^wBYWFgNZW(xHGLXTLPNEXA%qpB&g<5p+29vKj-eF* literal 0 HcmV?d00001 diff --git a/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/custard_color.svg b/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/custard_color.svg index db547a5cfc12c92776015cff11a04d4f4cae07f7..dd4870dd7dc1cc3c87a13ea691a1875f907f1dcc 100644 GIT binary patch delta 62 zcmeBT`Om!JB%_(7j-jcKkuiugHqbFL_c1cnGuJUT@G;XfHUZH_AVH9-C?$P6E*t&g IvUEEx0Qhka00000 delta 73 zcmey*+{LotB%`B+j-jcKkqMYI(=jshF*X2^MkadZI>rV*=6c2^Ale8d2$lzFh*HwG NJUVW-hvx>i|JU>YYFNmE&&%(lSm)op)_QR_=1N^OlSu(5b{)tg={9_OpKryJDn zx9Dko&F|(2_X&AT=Y%X)3-tW5L^P&^+&o}}Yww$!kgn_EE{(0*lBFw~T2(CpkOUA+ z1e#GA3okH?2%S46d|lv_H3y7pskXKM&HkL3Vg$D^ZE-_v2lIHgg_$I*~qMk79qGCqhX zgTNBVSPC*51&C#w4x%*SbQ~f(Dh!YjXTYSKje`dw*g?rS6rnbN)&QrR0>#6~cTC_} I!ZNRVKTa8{>i_@% literal 0 HcmV?d00001 diff --git a/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/lollipop_color.svg b/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/lollipop_color.svg new file mode 100644 index 0000000000000000000000000000000000000000..d3778737a90c282cdc189a309c577ea39c00a8f3 GIT binary patch literal 554 zcmZuuT~EUx6n*zsAkSUtrB2sw)x=GW34SC_jlMMnSCm0Rah?C(+h!&%84qyp;hb|X zm)XU3ZOBIXRy$izh!aYbt(??$RnX_<^=Lv#8%irnXlbx#ScLuhiwx~_}6GVl@c*-}y~y{f}s_OEB41Ycp>;y@jqBuVePqvTto?bjh9WLd_B z+ku+5OEr4@g|OHR~t!V^H*=jT!lGqjI%T)=4?7jBfUkHhA}? zM%a$}blT?LeOo!*p=%wKHyV$ePjMIo*Q_Z+O=LmufJa=MMX5-mGr=R^7{I9*N05n0 z#6k1~E?|f`5)+XoyPcx~BA5t{!jqVfhX8tTA|Q*#0#4&GdiNghl;KD8<2yh41^xb~ Ar~m)} literal 0 HcmV?d00001 diff --git a/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/pancakes_color.svg b/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/pancakes_color.svg new file mode 100644 index 0000000000000000000000000000000000000000..b1a1a322e06b7cfd600fd06dabba40feaf669f2c GIT binary patch literal 582 zcmZuuU2oeU6n*cnU_28r*lBGiZlxt%HHod2mTubKEJI^f0v4um`tNt~TB()F!-aeA zIp=<`zB(N&I_fYQ?;6Z$hLLuiSH|rde82m$C@~si>r`vK(+zeWUtON9KW%R}yWe-$ zXgu!G-Ti0zb%XGNv0wRyvF&b)e*C;aoN~slzhi{^7>Am%X`1MiQy=#1CbUCux{(2p zB_NO(h;dF;R2WJm<;kenH#ir=38P+{eIH-FH$8KVUy4FYSyi%*qn&Ew9 zjKM$Z1+=68dgJQgpPX8~L=PtFU=3WgSiv$7ob}Mg9;pU@<4YnWFGwy+Qpj_%lm#he zK{L(?UrIrE1x5&(pUa$xr38E_c}DU~3NhP@6cJTQ<{3bfO{@!AmDMcr{{^6=FA6Bc UOQ^_!DN_S~FoRD@tGzt?2d6Ww!2kdN literal 0 HcmV?d00001 diff --git a/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/shaved_ice_color.svg b/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/shaved_ice_color.svg new file mode 100644 index 0000000000000000000000000000000000000000..00872c7a0c99475d9c549d3a573eeb7dae8d9931 GIT binary patch literal 547 zcmZuuU2no56n*zsFrI5Etsk{oO{UH)={A$;mhG)6XqgBNMeF|kE=H4?$ipS~aL&0O zj3%eOL`QCFp;d~hA7I2)p_x$I6t7oL?HHrl=8EM~E1qJd@nqZ@J|on;ZQZ@e92tZd1P!L>nPx+Z-fM_>n8k*szeIx`r6u;1}7iN@tQ5Ji>tnbBH&!g0Z2r}9O sn8q2fq9CJv7sHN2!mfJ^&pa2YLjdl8OX%!?494L8jS2jK+uOMH2YiR7ZU6uP literal 0 HcmV?d00001 diff --git a/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/shortcake_color.svg b/packages/frontend/assets/drop-and-fusion/sweets_monos/verts/shortcake_color.svg new file mode 100644 index 0000000000000000000000000000000000000000..e6ed1fbbf9eb8051c1d1616c9afb9adeed81d29f GIT binary patch literal 499 zcmZvYQE$Q^5XayB6pZJ#6fkbBR+FhSOS;Wux@CK73bssy2GF{1KWa3Yi98&+HpgpZn-(|i{2+I20&jRQivc%PFb7~~`l W`Z>N2XpRRS?C5WZyrZ2DVR}r%km=l z@4N2~SX>=<4cohZ@NFnLLd2O1o3`>{Tk`w6PqU1(VO)o5-L%1#Jhc4k@?!B}^=*0g z>-L%r`z^b@|7bri8J|h{GhRx$x?8dDKW-QTN_qX2GhUBlS4ep{9N-W`+i&GfzwTJxAl0A{;L@|qb|ZwzT=~!D4O!VP>N&Y z!{d8I%=28HPEXWg=++zRx9i>D`n@~rDew<(^d|&1?M_ZN^|v9>gKwHy|J1m`?OkZA zYQAZF_ZAt(zI}8vD#!h4eJJ|&DOB?pbmvFcH=dS4&FL~2jYYQ}YgU!~3mTyy(P&Xa zWHOO}j+Dhnm}$ZY;?&qoAWoCE378B8rl8WqrjX=XU=FD=HV2Jbs0eaQEh?dM$g|8U zeBCLCFcnG>J+~?*J7OUiqs|efQsk~Cmsp?yZQ|ERgCQG5hB4rT)9$%Er349Mf}Sl> V(22H4&De8$zqzDuFg@Po#XnI4!2|#R literal 0 HcmV?d00001 diff --git a/packages/frontend/src/pages/drop-and-fusion.game.vue b/packages/frontend/src/pages/drop-and-fusion.game.vue index f14f5dbff6..a8fa953c38 100644 --- a/packages/frontend/src/pages/drop-and-fusion.game.vue +++ b/packages/frontend/src/pages/drop-and-fusion.game.vue @@ -93,6 +93,7 @@ SPDX-License-Identifier: AGPL-3.0-only
SCORE: {{ getScoreUnit(gameMode) }}
MAX CHAIN:
TOTAL EARNINGS:
+
おにぎり個分
{{ i18n.ts.replaying }}
@@ -152,6 +153,18 @@ SPDX-License-Identifier: AGPL-3.0-only +
+
+
FUSION RECIPE
+
+
+ +
+
+
+
+
+
Surrender @@ -416,70 +429,70 @@ const SWEETS_MONOS: FrontendMonoDefinition[] = [{ img: '/client-assets/drop-and-fusion/sweets_monos/shortcake_color.svg', imgSizeX: 32, imgSizeY: 32, - spriteScale: 1.12, + spriteScale: 1, }, { id: 'f3468ef4-2e1e-4906-8795-f147f39f7e1f', sfxPitch: 0.5, img: '/client-assets/drop-and-fusion/sweets_monos/pancakes_color.svg', imgSizeX: 32, imgSizeY: 32, - spriteScale: 1.12, + spriteScale: 1, }, { id: 'bcb41129-6f2d-44ee-89d3-86eb2df564ba', sfxPitch: 0.75, img: '/client-assets/drop-and-fusion/sweets_monos/shaved_ice_color.svg', imgSizeX: 32, imgSizeY: 32, - spriteScale: 1.12, + spriteScale: 1, }, { id: 'f058e1ad-1981-409b-b3a7-302de0a43744', sfxPitch: 1, img: '/client-assets/drop-and-fusion/sweets_monos/soft_ice_cream_color.svg', imgSizeX: 32, imgSizeY: 32, - spriteScale: 1.12, + spriteScale: 1, }, { id: 'd22cfe38-5a3b-4b9c-a1a6-907930a3d732', sfxPitch: 1.5, img: '/client-assets/drop-and-fusion/sweets_monos/doughnut_color.svg', imgSizeX: 32, imgSizeY: 32, - spriteScale: 1.12, + spriteScale: 1, }, { id: '79867083-a073-427e-ae82-07a70d9f3b4f', sfxPitch: 2, img: '/client-assets/drop-and-fusion/sweets_monos/custard_color.svg', imgSizeX: 32, imgSizeY: 32, - spriteScale: 1.12, + spriteScale: 1, }, { id: '2e152a12-a567-4100-b4d4-d15d81ba47b1', sfxPitch: 2.5, img: '/client-assets/drop-and-fusion/sweets_monos/chocolate_bar_color.svg', imgSizeX: 32, imgSizeY: 32, - spriteScale: 1.12, + spriteScale: 1, }, { id: '12250376-2258-4716-8eec-b3a7239461fc', sfxPitch: 3, img: '/client-assets/drop-and-fusion/sweets_monos/lollipop_color.svg', imgSizeX: 32, imgSizeY: 32, - spriteScale: 1.12, + spriteScale: 1, }, { id: '4d4f2668-4be7-44a3-aa3a-856df6e25aa6', sfxPitch: 3.5, img: '/client-assets/drop-and-fusion/sweets_monos/candy_color.svg', imgSizeX: 32, imgSizeY: 32, - spriteScale: 1.12, + spriteScale: 1, }, { id: 'c9984b40-4045-44c3-b260-d47b7b4625b2', sfxPitch: 4, img: '/client-assets/drop-and-fusion/sweets_monos/cookie_color.svg', imgSizeX: 32, imgSizeY: 32, - spriteScale: 1.12, + spriteScale: 1, }]; const props = defineProps<{ @@ -510,11 +523,13 @@ function getScoreUnit(gameMode: string) { function getMonoRenderOptions(mono: Mono) { const def = monoDefinitions.value.find(x => x.id === mono.id)!; return { + sprite: { texture: def.img, xScale: (mono.sizeX / def.imgSizeX) * def.spriteScale, yScale: (mono.sizeY / def.imgSizeY) * def.spriteScale, }, + }; } @@ -1147,21 +1162,25 @@ onMounted(async () => { } /* -const getVerticesFromSvg = async (path: string) => { - const svgDoc = await fetch(path) - .then((response) => response.text()) - .then((svgString) => { - const parser = new DOMParser(); - return parser.parseFromString(svgString, 'image/svg+xml'); + const getVerticesFromSvg = async (path: string) => { + const svgDoc = await fetch(path) + .then((response) => response.text()) + .then((svgString) => { + const parser = new DOMParser(); + return parser.parseFromString(svgString, 'image/svg+xml'); + }); + const pathDatas = svgDoc.querySelectorAll('path'); + if (!pathDatas) return; + const vertices = Array.from(pathDatas).map((pathData) => { + return Matter.Svg.pathToVertices(pathData); }); - const pathDatas = svgDoc.querySelectorAll('path'); - if (!pathDatas) return; - const vertices = Array.from(pathDatas).map((pathData) => { - return Matter.Svg.pathToVertices(pathData); + return vertices; + }; + + getVerticesFromSvg('/client-assets/drop-and-fusion/sweets_monos/verts/doughnut_color.svg').then((vertices) => { + console.log('doughnut_color', vertices); }); - return vertices; -}; -*/ + */ await start(); diff --git a/packages/frontend/src/pages/drop-and-fusion.vue b/packages/frontend/src/pages/drop-and-fusion.vue index 5fc71f7001..18d3f56ca2 100644 --- a/packages/frontend/src/pages/drop-and-fusion.vue +++ b/packages/frontend/src/pages/drop-and-fusion.vue @@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + {{ i18n.ts.start }}
diff --git a/packages/frontend/src/scripts/drop-and-fusion-engine.ts b/packages/frontend/src/scripts/drop-and-fusion-engine.ts index 06668743e3..7c75822a20 100644 --- a/packages/frontend/src/scripts/drop-and-fusion-engine.ts +++ b/packages/frontend/src/scripts/drop-and-fusion-engine.ts @@ -14,6 +14,7 @@ export type Mono = { sizeY: number; shape: 'circle' | 'rectangle' | 'custom'; vertices?: Matter.Vector[][]; + verticesSize?: number; score: number; dropCandidate: boolean; }; @@ -280,47 +281,439 @@ const SQUARE_MONOS: Mono[] = [{ dropCandidate: true, }]; -const SWEETS_BASE_SIZE = 30; -// TODO: custom shape vertices +const SWEETS_BASE_SIZE = 40; const SWEETS_MONOS: Mono[] = [{ id: '77f724c0-88be-4aeb-8e1a-a00ed18e3844', level: 10, sizeX: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25, sizeY: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25, - shape: 'circle', - score: 512, + shape: 'custom', + vertices: [ + [ + { + 'x': 14, + 'y': 2, + }, + { + 'x': 2, + 'y': 13, + }, + { + 'x': 2, + 'y': 31, + }, + { + 'x': 30, + 'y': 23, + }, + { + 'x': 30, + 'y': 7, + }, + { + 'x': 29, + 'y': 6, + }, + { + 'x': 20, + 'y': 4, + }, + { + 'x': 17, + 'y': 3, + }, + { + 'x': 16, + 'y': 2, + }, + ], + ], + verticesSize: 32, + score: 400, dropCandidate: false, }, { id: 'f3468ef4-2e1e-4906-8795-f147f39f7e1f', level: 9, sizeX: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25, sizeY: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25, - shape: 'circle', - score: 256, + shape: 'custom', + vertices: [ + [ + { + 'x': 15, + 'y': 2, + }, + { + 'x': 14, + 'y': 3, + }, + { + 'x': 8, + 'y': 4, + }, + { + 'x': 6, + 'y': 5, + }, + { + 'x': 4, + 'y': 8, + }, + { + 'x': 4, + 'y': 15, + }, + { + 'x': 2, + 'y': 19, + }, + { + 'x': 2, + 'y': 22.36, + }, + { + 'x': 3, + 'y': 25, + }, + { + 'x': 5, + 'y': 28, + }, + { + 'x': 10, + 'y': 30, + }, + { + 'x': 22, + 'y': 30, + }, + { + 'x': 27, + 'y': 28, + }, + { + 'x': 29, + 'y': 25, + }, + { + 'x': 30, + 'y': 22, + }, + { + 'x': 30, + 'y': 19, + }, + { + 'x': 28, + 'y': 15, + }, + { + 'x': 28, + 'y': 8, + }, + { + 'x': 26, + 'y': 5, + }, + { + 'x': 24, + 'y': 4, + }, + { + 'x': 18, + 'y': 3, + }, + { + 'x': 17, + 'y': 2, + }, + ], + ], + verticesSize: 32, + score: 380, dropCandidate: false, }, { id: 'bcb41129-6f2d-44ee-89d3-86eb2df564ba', level: 8, sizeX: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25, sizeY: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25, - shape: 'circle', - score: 128, + shape: 'custom', + vertices: [ + [ + { + 'x': 15, + 'y': 2, + }, + { + 'x': 11, + 'y': 3, + }, + { + 'x': 8, + 'y': 6, + }, + { + 'x': 7, + 'y': 8, + }, + { + 'x': 6, + 'y': 11, + }, + { + 'x': 6, + 'y': 13, + }, + { + 'x': 7, + 'y': 16, + }, + { + 'x': 8, + 'y': 18, + }, + { + 'x': 15, + 'y': 30, + }, + { + 'x': 17, + 'y': 30, + }, + { + 'x': 24, + 'y': 18, + }, + { + 'x': 25, + 'y': 16, + }, + { + 'x': 26, + 'y': 13, + }, + { + 'x': 26, + 'y': 11, + }, + { + 'x': 25, + 'y': 8, + }, + { + 'x': 24, + 'y': 6, + }, + { + 'x': 21, + 'y': 3, + }, + { + 'x': 17, + 'y': 2, + }, + ], + ], + verticesSize: 32, + score: 300, dropCandidate: false, }, { id: 'f058e1ad-1981-409b-b3a7-302de0a43744', level: 7, sizeX: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25, sizeY: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25 * 1.25 * 1.25 * 1.25, - shape: 'circle', - score: 64, + shape: 'custom', + vertices: [ + [ + { + 'x': 17, + 'y': 2.541, + }, + { + 'x': 14, + 'y': 5.402, + }, + { + 'x': 10, + 'y': 7, + }, + { + 'x': 10, + 'y': 10.367, + }, + { + 'x': 8, + 'y': 11, + }, + { + 'x': 8, + 'y': 14, + }, + { + 'x': 5.781, + 'y': 16.265, + }, + { + 'x': 6.594, + 'y': 19.627, + }, + { + 'x': 9.414, + 'y': 21, + }, + { + 'x': 12, + 'y': 29.988, + }, + { + 'x': 21, + 'y': 29.988, + }, + { + 'x': 22.016, + 'y': 22.629, + }, + { + 'x': 23, + 'y': 21.772, + }, + { + 'x': 23, + 'y': 19.202, + }, + { + 'x': 25.783, + 'y': 17.473, + }, + { + 'x': 25.783, + 'y': 14.727, + }, + { + 'x': 24, + 'y': 13.173, + }, + { + 'x': 24, + 'y': 10.367, + }, + { + 'x': 22, + 'y': 9.233, + }, + { + 'x': 22, + 'y': 6.454, + }, + { + 'x': 18, + 'y': 5, + }, + ], + ], + verticesSize: 32, + score: 300, dropCandidate: false, }, { id: 'd22cfe38-5a3b-4b9c-a1a6-907930a3d732', level: 6, sizeX: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25 * 1.25 * 1.25, sizeY: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25 * 1.25 * 1.25, - shape: 'circle', - score: 32, + shape: 'custom', + vertices: [ + [ + { + 'x': 15, + 'y': 2, + }, + { + 'x': 11, + 'y': 3, + }, + { + 'x': 8, + 'y': 5, + }, + { + 'x': 7, + 'y': 6, + }, + { + 'x': 5, + 'y': 9, + }, + { + 'x': 4, + 'y': 12, + }, + { + 'x': 4, + 'y': 20, + }, + { + 'x': 5, + 'y': 23, + }, + { + 'x': 7, + 'y': 26, + }, + { + 'x': 11, + 'y': 29, + }, + { + 'x': 14, + 'y': 30, + }, + { + 'x': 18, + 'y': 30, + }, + { + 'x': 21, + 'y': 29, + }, + { + 'x': 25, + 'y': 26, + }, + { + 'x': 27, + 'y': 23, + }, + { + 'x': 28, + 'y': 20, + }, + { + 'x': 28, + 'y': 12, + }, + { + 'x': 27, + 'y': 9, + }, + { + 'x': 25, + 'y': 6, + }, + { + 'x': 24, + 'y': 5, + }, + { + 'x': 21, + 'y': 3, + }, + { + 'x': 17, + 'y': 2, + }, + ], + ], + verticesSize: 32, + score: 250, dropCandidate: false, }, { id: '79867083-a073-427e-ae82-07a70d9f3b4f', @@ -331,56 +724,163 @@ const SWEETS_MONOS: Mono[] = [{ vertices: [ [ { - 'x': 8, + 'x': 9, 'y': 15, }, { - 'x': 24, + 'x': 23, 'y': 15, }, - { - 'x': 26, - 'y': 26, - }, { 'x': 30, - 'y': 26, + 'y': 27, }, { - 'x': 24.7, + 'x': 25.7, 'y': 30, }, { - 'x': 7.34, + 'x': 6.34, 'y': 30, }, { 'x': 2, - 'y': 26, - }, - { - 'x': 6, - 'y': 26, + 'y': 27, }, ], ], - score: 16, + verticesSize: 32, + score: 200, dropCandidate: true, }, { id: '2e152a12-a567-4100-b4d4-d15d81ba47b1', level: 4, sizeX: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25, sizeY: SWEETS_BASE_SIZE * 1.25 * 1.25 * 1.25, - shape: 'circle', - score: 8, + shape: 'custom', + vertices: [ + [ + { + 'x': 12, + 'y': 2, + }, + { + 'x': 2, + 'y': 12, + }, + { + 'x': 2, + 'y': 14, + }, + { + 'x': 18, + 'y': 30, + }, + { + 'x': 20, + 'y': 30, + }, + { + 'x': 30, + 'y': 20, + }, + { + 'x': 30, + 'y': 18, + }, + { + 'x': 14, + 'y': 2, + }, + ], + ], + verticesSize: 32, + score: 200, dropCandidate: true, }, { id: '12250376-2258-4716-8eec-b3a7239461fc', level: 3, sizeX: SWEETS_BASE_SIZE * 1.25 * 1.25, sizeY: SWEETS_BASE_SIZE * 1.25 * 1.25, - shape: 'circle', - score: 4, + shape: 'custom', + vertices: [ + [ + { + 'x': 12, + 'y': 2, + }, + { + 'x': 7, + 'y': 3, + }, + { + 'x': 3, + 'y': 7, + }, + { + 'x': 2, + 'y': 12, + }, + { + 'x': 3, + 'y': 16, + }, + { + 'x': 5, + 'y': 19, + }, + { + 'x': 8, + 'y': 21, + }, + { + 'x': 12, + 'y': 22, + }, + { + 'x': 18, + 'y': 21, + }, + { + 'x': 27, + 'y': 30, + }, + { + 'x': 30, + 'y': 30, + }, + { + 'x': 30, + 'y': 27, + }, + { + 'x': 21, + 'y': 18, + }, + { + 'x': 22, + 'y': 14.25, + }, + { + 'x': 22, + 'y': 11, + }, + { + 'x': 21, + 'y': 8, + }, + { + 'x': 19, + 'y': 5, + }, + { + 'x': 16.5, + 'y': 3, + }, + ], + ], + verticesSize: 32, + score: 120, dropCandidate: true, }, { id: '4d4f2668-4be7-44a3-aa3a-856df6e25aa6', @@ -392,14 +892,14 @@ const SWEETS_MONOS: Mono[] = [{ [ { 'x': 12, - 'y': 1.9180000000000001, + 'y': 1.9, }, { 'x': 4, 'y': 4, }, { - 'x': 2.016, + 'x': 2, 'y': 12, }, { @@ -419,7 +919,7 @@ const SWEETS_MONOS: Mono[] = [{ 'y': 25.372, }, { - 'x': 16.008, + 'x': 16, 'y': 26, }, { @@ -455,7 +955,7 @@ const SWEETS_MONOS: Mono[] = [{ 'y': 7, }, { - 'x': 16.008, + 'x': 16, 'y': 6, }, { @@ -464,7 +964,8 @@ const SWEETS_MONOS: Mono[] = [{ }, ], ], - score: 2, + verticesSize: 32, + score: 20, dropCandidate: true, }, { id: 'c9984b40-4045-44c3-b260-d47b7b4625b2', @@ -472,7 +973,7 @@ const SWEETS_MONOS: Mono[] = [{ sizeX: SWEETS_BASE_SIZE, sizeY: SWEETS_BASE_SIZE, shape: 'circle', - score: 1, + score: 30, dropCandidate: true, }]; @@ -524,7 +1025,7 @@ export class DropAndFusionGame extends EventEmitter<{ private stock: { id: string; mono: Mono }[] = []; private holding: { id: string; mono: Mono } | null = null; - private get monoDefinitions() { + public get monoDefinitions() { switch (this.gameMode) { case 'normal': return NORAML_MONOS; case 'yen': return YEN_MONOS; @@ -646,8 +1147,8 @@ export class DropAndFusionGame extends EventEmitter<{ return Matter.Bodies.rectangle(x, y, mono.sizeX, mono.sizeY, options); } else if (mono.shape === 'custom') { return Matter.Bodies.fromVertices(x, y, mono.vertices!.map(i => i.map(j => ({ - x: (j.x / 32) * mono.sizeX, - y: (j.y / 32) * mono.sizeY, + x: (j.x / mono.verticesSize!) * mono.sizeX, + y: (j.y / mono.verticesSize!) * mono.sizeY, }))), options); } else { throw new Error('unrecognized shape'); @@ -687,7 +1188,8 @@ export class DropAndFusionGame extends EventEmitter<{ this.emit('monoAdded', nextMono); } - const comboBonus = this.gameMode === 'yen' ? 1 : 1 + ((this.combo - 1) / 5); + const hasComboBonus = this.gameMode !== 'yen' && this.gameMode !== 'sweets'; + const comboBonus = hasComboBonus ? 1 + ((this.combo - 1) / 5) : 1; const additionalScore = Math.round(currentMono.score * comboBonus); this.score += additionalScore;