t1197: match combo (+5% per earlier match, resets after 5 s) and plain +x% indicator; docs (NL) and build for t1193-t1198
@@ -93,7 +93,25 @@ vastgehouden blokje krijgt dezelfde schaal-tween als Tim's KWin Click
93
93
Tween (150 ms easeOutBack naar 80 %, 720 ms easeOutElastic terug).
94
94
Wissels (speler en bot) animeren visueel in 100 ms easeOutCubic (t1121).
95
95
Landt een cluster meteen in een match, dan is die sprong 25 % sterker,
96
stapeling additief (t1120). Zie `docs/ASSUMPTIONS.md`.
96
stapeling additief (t1120). Daarbovenop telt een **combo** (t1197): elke
97
eerdere match in de lopende combo geeft +5 % sprong (1e match +0 %, 2e
98
+5 %, 3e +10 %, …); maak je 5 s geen match, dan begint de combo opnieuw.
99
Combo en landingsketting tellen op; boven het veld staat het totaal als
100
gele “+x%” met oranje rand. Zie `docs/ASSUMPTIONS.md`.
101
102
**Menu tijdens het spel (t1193).** In **Spelen** en **Offline Strijd**
103
staat rechtsboven een kleine menuknop (☰). Die pauzeert het spel en
104
biedt **Verder** en **Terug naar hoofdmenu**. Terug naar het menu beëindigt
105
de wedstrijd: ingelogd zie je eerst het puntenscherm (titel “Spel
106
beëindigd”) zodat de punten tot dan toe via `play_finish` bij je profiel
107
komen; uitgelogd ga je direct naar het menu. In Offline Strijd volgt dan
108
geen volgende ronde. De server-limieten op punten blijven gelden.
109
110
**Laatste planeet (t1196).** De laatst gekozen planeet (standaard of
111
eigen) staat bij elk planeetkeuzescherm (Spelen, Offline Strijd, Online)
112
alvast geselecteerd. Ingelogd staat die in je profiel op de server
113
(`set_last_planet`), uitgelogd in `localStorage`. Is een eigen planeet
114
verwijderd, dan valt de keuze terug op Terra.
97
115
98
116
99
117
## Planeten (stage 3)
@@ -150,8 +168,10 @@ schuift die tekst naar boven en vliegen blokjes van jouw planeet (ook
150
168
eigen planeten) in boogjes naar het getal onderaan: je profieltotaal.
151
169
Elk blokje is één nieuw verdiend punt, dus het getal loopt van het
152
170
totaal vóór de ronde naar het nieuwe totaal dat de server bevestigt.
153
Het tempo begint op 15 blokjes per seconde en wordt elke seconde 10
154
blokjes/s sneller (253 punten ≈ 5,8 s, 800 ≈ 11,2 s, 2000 ≈ 18,6 s). Daarna ga je, net als voorheen,
171
Het tempo begint op 3 blokjes per seconde en versnelt per beloning
172
precies zo veel dat het laatste blokje altijd na ~4 s vertrekt, hoeveel
173
punten het ook zijn (t1194; bij weinig punten een vast tempo, zie
174
`docs/ASSUMPTIONS.md`). Daarna nog de vlucht van het laatste blokje. Daarna ga je, net als voorheen,
155
175
naar het menu, de volgende ronde, het resultaatscherm of de lobby.
156
176
Uitgelogd verandert er niets. Zie `docs/ASSUMPTIONS.md` (t1173).
157
177
@@ -175,14 +195,17 @@ Op het menu kies je **Offline Strijd**, daarna een planeet. Je speelt
175
195
tegen lokale bots alsof het multiplayer is (schoten, miss-kans,
176
196
miniatuurvelden), helemaal in de browser. Eerst 1 tegenstander, daarna
177
197
2, en verder N tegenstanders voor N−1 rondes, met stijgende skill
178
(5 % + 1 % per ronde). Als je verliest zie je de bereikte ronde.
198
(5 % + 1 % per ronde). Als je verliest zie je de bereikte ronde en
199
hoeveel tegenstanders je in totaal (over alle rondes) hebt verslagen
200
(t1198). De HUD toont alleen “Ronde N”.
179
201
Zie `docs/ASSUMPTIONS.md` (t1119).
180
202
181
203
## Online spelen (stage 2)
182
204
183
205
Solo blijft werken, ook als online nog niet is ingesteld. Op het menu kies je
184
206
**Online spelen**. Na inloggen via [auth.timfalken.com](https://auth.timfalken.com)
185
maak je een lobby (of val je in met een code). Onbeperkt aantal spelers, praktisch
207
(gestart vanuit Online kom je terug in het online-paneel; gestart vanaf
208
het hoofdmenu kom je terug op het hoofdmenu, t1193) maak je een lobby (of val je in met een code). Onbeperkt aantal spelers, praktisch
186
209
maximum 32. Iedereen drukt op Gereed; de host start als er minstens twee spelers
187
210
zijn en iedereen gereed is.
188
211
@@ -93,7 +93,25 @@ vastgehouden blokje krijgt dezelfde schaal-tween als Tim's KWin Click93
Tween (150 ms easeOutBack naar 80 %, 720 ms easeOutElastic terug).93
Tween (150 ms easeOutBack naar 80 %, 720 ms easeOutElastic terug).94
Wissels (speler en bot) animeren visueel in 100 ms easeOutCubic (t1121).94
Wissels (speler en bot) animeren visueel in 100 ms easeOutCubic (t1121).95
Landt een cluster meteen in een match, dan is die sprong 25 % sterker,95
Landt een cluster meteen in een match, dan is die sprong 25 % sterker,96
stapeling additief (t1120). Zie `docs/ASSUMPTIONS.md`.96
stapeling additief (t1120). Daarbovenop telt een **combo** (t1197): elke97
eerdere match in de lopende combo geeft +5 % sprong (1e match +0 %, 2e98
+5 %, 3e +10 %, …); maak je 5 s geen match, dan begint de combo opnieuw.99
Combo en landingsketting tellen op; boven het veld staat het totaal als100
gele “+x%” met oranje rand. Zie `docs/ASSUMPTIONS.md`.101
102
**Menu tijdens het spel (t1193).** In **Spelen** en **Offline Strijd**103
staat rechtsboven een kleine menuknop (☰). Die pauzeert het spel en104
biedt **Verder** en **Terug naar hoofdmenu**. Terug naar het menu beëindigt105
de wedstrijd: ingelogd zie je eerst het puntenscherm (titel “Spel106
beëindigd”) zodat de punten tot dan toe via `play_finish` bij je profiel107
komen; uitgelogd ga je direct naar het menu. In Offline Strijd volgt dan108
geen volgende ronde. De server-limieten op punten blijven gelden.109
110
**Laatste planeet (t1196).** De laatst gekozen planeet (standaard of111
eigen) staat bij elk planeetkeuzescherm (Spelen, Offline Strijd, Online)112
alvast geselecteerd. Ingelogd staat die in je profiel op de server113
(`set_last_planet`), uitgelogd in `localStorage`. Is een eigen planeet114
verwijderd, dan valt de keuze terug op Terra.97
115
98
116
99
## Planeten (stage 3)117
## Planeten (stage 3)@@ -150,8 +168,10 @@ schuift die tekst naar boven en vliegen blokjes van jouw planeet (ook150
eigen planeten) in boogjes naar het getal onderaan: je profieltotaal.168
eigen planeten) in boogjes naar het getal onderaan: je profieltotaal.151
Elk blokje is één nieuw verdiend punt, dus het getal loopt van het169
Elk blokje is één nieuw verdiend punt, dus het getal loopt van het152
totaal vóór de ronde naar het nieuwe totaal dat de server bevestigt.170
totaal vóór de ronde naar het nieuwe totaal dat de server bevestigt.153
Het tempo begint op 15 blokjes per seconde en wordt elke seconde 10171
Het tempo begint op 3 blokjes per seconde en versnelt per beloning154
blokjes/s sneller (253 punten ≈ 5,8 s, 800 ≈ 11,2 s, 2000 ≈ 18,6 s). Daarna ga je, net als voorheen,172
precies zo veel dat het laatste blokje altijd na ~4 s vertrekt, hoeveel173
punten het ook zijn (t1194; bij weinig punten een vast tempo, zie174
`docs/ASSUMPTIONS.md`). Daarna nog de vlucht van het laatste blokje. Daarna ga je, net als voorheen,155
naar het menu, de volgende ronde, het resultaatscherm of de lobby.175
naar het menu, de volgende ronde, het resultaatscherm of de lobby.156
Uitgelogd verandert er niets. Zie `docs/ASSUMPTIONS.md` (t1173).176
Uitgelogd verandert er niets. Zie `docs/ASSUMPTIONS.md` (t1173).157
177
@@ -175,14 +195,17 @@ Op het menu kies je **Offline Strijd**, daarna een planeet. Je speelt175
tegen lokale bots alsof het multiplayer is (schoten, miss-kans,195
tegen lokale bots alsof het multiplayer is (schoten, miss-kans,176
miniatuurvelden), helemaal in de browser. Eerst 1 tegenstander, daarna196
miniatuurvelden), helemaal in de browser. Eerst 1 tegenstander, daarna177
2, en verder N tegenstanders voor N−1 rondes, met stijgende skill197
2, en verder N tegenstanders voor N−1 rondes, met stijgende skill178
(5 % + 1 % per ronde). Als je verliest zie je de bereikte ronde.198
(5 % + 1 % per ronde). Als je verliest zie je de bereikte ronde en199
hoeveel tegenstanders je in totaal (over alle rondes) hebt verslagen200
(t1198). De HUD toont alleen “Ronde N”.179
Zie `docs/ASSUMPTIONS.md` (t1119).201
Zie `docs/ASSUMPTIONS.md` (t1119).180
202
181
## Online spelen (stage 2)203
## Online spelen (stage 2)182
204
183
Solo blijft werken, ook als online nog niet is ingesteld. Op het menu kies je205
Solo blijft werken, ook als online nog niet is ingesteld. Op het menu kies je184
**Online spelen**. Na inloggen via [auth.timfalken.com](https://auth.timfalken.com)206
**Online spelen**. Na inloggen via [auth.timfalken.com](https://auth.timfalken.com)185
maak je een lobby (of val je in met een code). Onbeperkt aantal spelers, praktisch207
(gestart vanuit Online kom je terug in het online-paneel; gestart vanaf208
het hoofdmenu kom je terug op het hoofdmenu, t1193) maak je een lobby (of val je in met een code). Onbeperkt aantal spelers, praktisch186
maximum 32. Iedereen drukt op Gereed; de host start als er minstens twee spelers209
maximum 32. Iedereen drukt op Gereed; de host start als er minstens twee spelers187
zijn en iedereen gereed is.210
zijn en iedereen gereed is.188
211
@@ -1023,7 +1023,6 @@ var BLOCK_REGISTRY = {
1023
1023
var I18N_CATALOG = {
1024
1024
"locales": {
1025
1025
"en": {
1026
"menu.tagline": "Three in a row, and your blocks get rocket boosters.",
1027
1026
"menu.play": "Play",
1028
1027
"menu.offline": "Offline Battle",
1029
1028
"menu.online": "Play online",
@@ -1038,7 +1037,6 @@ var I18N_CATALOG = {
1038
1037
"menu.logout": "Log out",
1039
1038
"menu.player": "player",
1040
1039
"planet.title": "Choose a field",
1041
"planet.tagline": "Each field is a planet, with its own people, gravity, air and mass.",
1042
1040
"planet.back": "Back",
1043
1041
"planet.customBadge": "Yours",
1044
1042
"stats.powerLabel": "Power",
@@ -1073,7 +1071,7 @@ var I18N_CATALOG = {
1073
1071
"online.you": "you",
1074
1072
"designer.title": "Planet Designer",
1075
1073
"designer.taglineBefore": "Total:",
1076
"designer.taglineAfter": "points. You unlock blocks by earning points — you do not spend them.",
1074
"designer.taglineAfter": "points.",
1077
1075
"designer.empty": "You don’t have any planets of your own yet. Create one.",
1078
1076
"designer.new": "New planet",
1079
1077
"designer.editTitle": "Edit planet",
@@ -1104,19 +1102,16 @@ var I18N_CATALOG = {
1104
1102
"designer.defaultPeople": "People",
1105
1103
"hud.points": "Points",
1106
1104
"hud.round": "Round {n}",
1107
"hud.skill": "Skill {n}%",
1108
1105
"hud.out": "Out",
1109
1106
"hud.miniPoints": "Points {n}",
1110
1107
"hud.opponent.one": "opponent",
1111
1108
"hud.opponent.few": "opponents",
1112
1109
"hud.opponent.many": "opponents",
1113
1110
"hud.opponent.other": "opponents",
1114
"hud.opponentsLine": "{n} {word}",
1115
1111
"offline.resultTitle": "Offline Battle",
1116
1112
"offline.reachedBefore": "You reached round",
1117
1113
"offline.reachedAfter": ".",
1118
1114
"offline.reached": "You reached round {n}.",
1119
"offline.detail": "You played against {n} {opponents} at skill {skill}%.",
1120
1115
"offline.backMenu": "Back to the menu",
1121
1116
"gameover.title": "You lost",
1122
1117
"gameover.detail": "Every column is locked.",
@@ -1305,10 +1300,18 @@ var I18N_CATALOG = {
1305
1300
"reward.won": "You won!",
1306
1301
"reward.lost": "You lost...",
1307
1302
"reward.total": "Total points",
1308
"reward.continue": "Tap to continue"
1303
"reward.continue": "Tap to continue",
1304
"game.menu": "Menu",
1305
"game.paused": "Paused",
1306
"game.resume": "Resume",
1307
"game.backToMenu": "Back to main menu",
1308
"reward.ended": "Game ended",
1309
"offline.defeated.one": "{n} opponent defeated",
1310
"offline.defeated.few": "{n} opponents defeated",
1311
"offline.defeated.many": "{n} opponents defeated",
1312
"offline.defeated.other": "{n} opponents defeated"
1309
1313
},
1310
1314
"nl": {
1311
"menu.tagline": "Drie op een rij, en je blokjes krijgen raketmotoren.",
1312
1315
"menu.play": "Spelen",
1313
1316
"menu.offline": "Offline Strijd",
1314
1317
"menu.online": "Online spelen",
@@ -1323,7 +1326,6 @@ var I18N_CATALOG = {
1323
1326
"menu.logout": "Uitloggen",
1324
1327
"menu.player": "speler",
1325
1328
"planet.title": "Kies een veld",
1326
"planet.tagline": "Elk veld is een planeet, met een eigen volk, zwaartekracht, lucht en massa.",
1327
1329
"planet.back": "Terug",
1328
1330
"planet.customBadge": "Eigen",
1329
1331
"stats.powerLabel": "Power",
@@ -1358,7 +1360,7 @@ var I18N_CATALOG = {
1358
1360
"online.you": "jij",
1359
1361
"designer.title": "Planeetontwerper",
1360
1362
"designer.taglineBefore": "Totaal:",
1361
"designer.taglineAfter": "punten. Blokjes ontgrendel je door punten te verdienen — je geeft ze niet uit.",
1363
"designer.taglineAfter": "punten.",
1362
1364
"designer.empty": "Je hebt nog geen eigen planeten. Maak er een aan.",
1363
1365
"designer.new": "Nieuwe planeet",
1364
1366
"designer.editTitle": "Planeet bewerken",
@@ -1389,19 +1391,16 @@ var I18N_CATALOG = {
1389
1391
"designer.defaultPeople": "Volk",
1390
1392
"hud.points": "Punten",
1391
1393
"hud.round": "Ronde {n}",
1392
"hud.skill": "Skill {n}%",
1393
1394
"hud.out": "Uit",
1394
1395
"hud.miniPoints": "Punten {n}",
1395
1396
"hud.opponent.one": "tegenstander",
1396
1397
"hud.opponent.few": "tegenstanders",
1397
1398
"hud.opponent.many": "tegenstanders",
1398
1399
"hud.opponent.other": "tegenstanders",
1399
"hud.opponentsLine": "{n} {word}",
1400
1400
"offline.resultTitle": "Offline Strijd",
1401
1401
"offline.reachedBefore": "Je hebt ronde",
1402
1402
"offline.reachedAfter": " bereikt.",
1403
1403
"offline.reached": "Je hebt ronde {n} bereikt.",
1404
"offline.detail": "Je speelde tegen {n} {opponents} met skill {skill}%.",
1405
1404
"offline.backMenu": "Terug naar het menu",
1406
1405
"gameover.title": "Je hebt verloren",
1407
1406
"gameover.detail": "Alle kolommen zitten vast.",
@@ -1590,10 +1589,18 @@ var I18N_CATALOG = {
1590
1589
"reward.won": "Gewonnen!",
1591
1590
"reward.lost": "Verloren...",
1592
1591
"reward.total": "Totaal punten",
1593
"reward.continue": "Tik om verder te gaan"
1592
"reward.continue": "Tik om verder te gaan",
1593
"game.menu": "Menu",
1594
"game.paused": "Gepauzeerd",
1595
"game.resume": "Verder spelen",
1596
"game.backToMenu": "Terug naar hoofdmenu",
1597
"reward.ended": "Spel gestopt",
1598
"offline.defeated.one": "{n} tegenstander verslagen",
1599
"offline.defeated.few": "{n} tegenstanders verslagen",
1600
"offline.defeated.many": "{n} tegenstanders verslagen",
1601
"offline.defeated.other": "{n} tegenstanders verslagen"
1594
1602
},
1595
1603
"de": {
1596
"menu.tagline": "Drei in einer Reihe — und deine Blöcke bekommen Raketenantrieb.",
1597
1604
"menu.play": "Spielen",
1598
1605
"menu.offline": "Offline-Kampf",
1599
1606
"menu.online": "Online spielen",
@@ -1608,7 +1615,6 @@ var I18N_CATALOG = {
1608
1615
"menu.logout": "Abmelden",
1609
1616
"menu.player": "Spieler",
1610
1617
"planet.title": "Wähle ein Feld",
1611
"planet.tagline": "Jedes Feld ist ein Planet mit eigenem Volk, eigener Schwerkraft, Luft und Masse.",
1612
1618
"planet.back": "Zurück",
1613
1619
"planet.customBadge": "Eigene",
1614
1620
"stats.powerLabel": "Power",
@@ -1643,7 +1649,7 @@ var I18N_CATALOG = {
1643
1649
"online.you": "du",
1644
1650
"designer.title": "Planeten-Designer",
1645
1651
"designer.taglineBefore": "Gesamt:",
1646
"designer.taglineAfter": "Punkte. Blöcke schaltest du frei, indem du Punkte verdienst — du gibst sie nicht aus.",
1652
"designer.taglineAfter": "Punkte.",
1647
1653
"designer.empty": "Du hast noch keine eigenen Planeten. Erstelle einen.",
1648
1654
"designer.new": "Neuer Planet",
1649
1655
"designer.editTitle": "Planet bearbeiten",
@@ -1674,19 +1680,16 @@ var I18N_CATALOG = {
1674
1680
"designer.defaultPeople": "Volk",
1675
1681
"hud.points": "Punkte",
1676
1682
"hud.round": "Runde {n}",
1677
"hud.skill": "Können {n} %",
1678
1683
"hud.out": "Raus",
1679
1684
"hud.miniPoints": "Punkte {n}",
1680
1685
"hud.opponent.one": "Gegner",
1681
1686
"hud.opponent.few": "Gegner",
1682
1687
"hud.opponent.many": "Gegner",
1683
1688
"hud.opponent.other": "Gegner",
1684
"hud.opponentsLine": "{n} {word}",
1685
1689
"offline.resultTitle": "Offline-Kampf",
1686
1690
"offline.reachedBefore": "Du hast Runde",
1687
1691
"offline.reachedAfter": " erreicht.",
1688
1692
"offline.reached": "Du hast Runde {n} erreicht.",
1689
"offline.detail": "Du hast gegen {n} {opponents} mit Können {skill} % gespielt.",
1690
1693
"offline.backMenu": "Zurück zum Menü",
1691
1694
"gameover.title": "Du hast verloren",
1692
1695
"gameover.detail": "Alle Spalten sind festgesetzt.",
@@ -1875,10 +1878,18 @@ var I18N_CATALOG = {
1875
1878
"reward.won": "Gewonnen!",
1876
1879
"reward.lost": "Verloren...",
1877
1880
"reward.total": "Punkte gesamt",
1878
"reward.continue": "Tippen zum Fortfahren"
1881
"reward.continue": "Tippen zum Fortfahren",
1882
"game.menu": "Menü",
1883
"game.paused": "Pausiert",
1884
"game.resume": "Weiterspielen",
1885
"game.backToMenu": "Zurück zum Hauptmenü",
1886
"reward.ended": "Spiel beendet",
1887
"offline.defeated.one": "{n} Gegner besiegt",
1888
"offline.defeated.few": "{n} Gegner besiegt",
1889
"offline.defeated.many": "{n} Gegner besiegt",
1890
"offline.defeated.other": "{n} Gegner besiegt"
1879
1891
},
1880
1892
"fr": {
1881
"menu.tagline": "Trois d’affilée, et tes blocs s’équipent de propulseurs.",
1882
1893
"menu.play": "Jouer",
1883
1894
"menu.offline": "Combat hors ligne",
1884
1895
"menu.online": "Jouer en ligne",
@@ -1893,7 +1904,6 @@ var I18N_CATALOG = {
1893
1904
"menu.logout": "Déconnexion",
1894
1905
"menu.player": "joueur",
1895
1906
"planet.title": "Choisis un terrain",
1896
"planet.tagline": "Chaque terrain est une planète, avec son peuple, sa gravité, son air et sa masse.",
1897
1907
"planet.back": "Retour",
1898
1908
"planet.customBadge": "Perso",
1899
1909
"stats.powerLabel": "Puissance",
@@ -1928,7 +1938,7 @@ var I18N_CATALOG = {
1928
1938
"online.you": "toi",
1929
1939
"designer.title": "Concepteur de planètes",
1930
1940
"designer.taglineBefore": "Total :",
1931
"designer.taglineAfter": "points. Tu débloques des blocs en gagnant des points — tu ne les dépenses pas.",
1941
"designer.taglineAfter": "points.",
1932
1942
"designer.empty": "Tu n’as pas encore de planète à toi. Crées-en une.",
1933
1943
"designer.new": "Nouvelle planète",
1934
1944
"designer.editTitle": "Modifier la planète",
@@ -1959,19 +1969,16 @@ var I18N_CATALOG = {
1959
1969
"designer.defaultPeople": "Peuple",
1960
1970
"hud.points": "Points",
1961
1971
"hud.round": "Manche {n}",
1962
"hud.skill": "Niveau {n} %",
1963
1972
"hud.out": "Éliminé",
1964
1973
"hud.miniPoints": "Points {n}",
1965
1974
"hud.opponent.one": "adversaire",
1966
1975
"hud.opponent.few": "adversaires",
1967
1976
"hud.opponent.many": "adversaires",
1968
1977
"hud.opponent.other": "adversaires",
1969
"hud.opponentsLine": "{n} {word}",
1970
1978
"offline.resultTitle": "Combat hors ligne",
1971
1979
"offline.reachedBefore": "Tu as atteint la manche",
1972
1980
"offline.reachedAfter": ".",
1973
1981
"offline.reached": "Tu as atteint la manche {n}.",
1974
"offline.detail": "Tu as joué contre {n} {opponents} au niveau {skill} %.",
1975
1982
"offline.backMenu": "Retour au menu",
1976
1983
"gameover.title": "Tu as perdu",
1977
1984
"gameover.detail": "Toutes les colonnes sont bloquées.",
@@ -2160,10 +2167,18 @@ var I18N_CATALOG = {
2160
2167
"reward.won": "Victoire !",
2161
2168
"reward.lost": "Perdu...",
2162
2169
"reward.total": "Total des points",
2163
"reward.continue": "Touchez pour continuer"
2170
"reward.continue": "Touchez pour continuer",
2171
"game.menu": "Menu",
2172
"game.paused": "En pause",
2173
"game.resume": "Reprendre",
2174
"game.backToMenu": "Retour au menu principal",
2175
"reward.ended": "Partie terminée",
2176
"offline.defeated.one": "{n} adversaire vaincu",
2177
"offline.defeated.few": "{n} adversaires vaincus",
2178
"offline.defeated.many": "{n} adversaires vaincus",
2179
"offline.defeated.other": "{n} adversaires vaincus"
2164
2180
},
2165
2181
"ja": {
2166
"menu.tagline": "三つ揃えると、ブロックにロケットが点火します。",
2167
2182
"menu.play": "プレイ",
2168
2183
"menu.offline": "オフライン対戦",
2169
2184
"menu.online": "オンラインで遊ぶ",
@@ -2178,7 +2193,6 @@ var I18N_CATALOG = {
2178
2193
"menu.logout": "ログアウト",
2179
2194
"menu.player": "プレイヤー",
2180
2195
"planet.title": "フィールドを選ぶ",
2181
"planet.tagline": "各フィールドは惑星です。固有の民、重力、大気、質量を持ちます。",
2182
2196
"planet.back": "戻る",
2183
2197
"planet.customBadge": "自作",
2184
2198
"stats.powerLabel": "パワー",
@@ -2213,7 +2227,7 @@ var I18N_CATALOG = {
2213
2227
"online.you": "あなた",
2214
2228
"designer.title": "惑星デザイナー",
2215
2229
"designer.taglineBefore": "合計:",
2216
"designer.taglineAfter": "ポイント。ポイントを獲得するとブロックが解放されます。消費はしません。",
2230
"designer.taglineAfter": "ポイント。",
2217
2231
"designer.empty": "まだ自分の惑星がありません。新しく作ってみましょう。",
2218
2232
"designer.new": "新しい惑星",
2219
2233
"designer.editTitle": "惑星を編集",
@@ -2244,19 +2258,16 @@ var I18N_CATALOG = {
2244
2258
"designer.defaultPeople": "民",
2245
2259
"hud.points": "ポイント",
2246
2260
"hud.round": "ラウンド {n}",
2247
"hud.skill": "スキル {n}%",
2248
2261
"hud.out": "脱落",
2249
2262
"hud.miniPoints": "ポイント {n}",
2250
2263
"hud.opponent.one": "相手",
2251
2264
"hud.opponent.few": "相手",
2252
2265
"hud.opponent.many": "相手",
2253
2266
"hud.opponent.other": "相手",
2254
"hud.opponentsLine": "{word} {n} 人",
2255
2267
"offline.resultTitle": "オフライン対戦",
2256
2268
"offline.reachedBefore": "到達ラウンド:",
2257
2269
"offline.reachedAfter": "。",
2258
2270
"offline.reached": "ラウンド {n} まで到達しました。",
2259
"offline.detail": "スキル {skill}% の{opponents}{n}人と対戦しました。",
2260
2271
"offline.backMenu": "メニューに戻る",
2261
2272
"gameover.title": "負けました",
2262
2273
"gameover.detail": "すべての列がロックされました。",
@@ -2445,10 +2456,18 @@ var I18N_CATALOG = {
2445
2456
"reward.won": "勝利!",
2446
2457
"reward.lost": "敗北...",
2447
2458
"reward.total": "合計ポイント",
2448
"reward.continue": "タップして続ける"
2459
"reward.continue": "タップして続ける",
2460
"game.menu": "メニュー",
2461
"game.paused": "一時停止中",
2462
"game.resume": "再開",
2463
"game.backToMenu": "メインメニューに戻る",
2464
"reward.ended": "ゲーム終了",
2465
"offline.defeated.one": "{n}人の相手を倒した",
2466
"offline.defeated.few": "{n}人の相手を倒した",
2467
"offline.defeated.many": "{n}人の相手を倒した",
2468
"offline.defeated.other": "{n}人の相手を倒した"
2449
2469
},
2450
2470
"zh": {
2451
"menu.tagline": "三个一排,你的方块就会装上火箭。",
2452
2471
"menu.play": "开始游戏",
2453
2472
"menu.offline": "离线对战",
2454
2473
"menu.online": "在线游戏",
@@ -2463,7 +2482,6 @@ var I18N_CATALOG = {
2463
2482
"menu.logout": "退出",
2464
2483
"menu.player": "玩家",
2465
2484
"planet.title": "选择场地",
2466
"planet.tagline": "每块场地都是一颗星球,有自己的居民、重力、空气和质量。",
2467
2485
"planet.back": "返回",
2468
2486
"planet.customBadge": "自制",
2469
2487
"stats.powerLabel": "力量",
@@ -2498,7 +2516,7 @@ var I18N_CATALOG = {
2498
2516
"online.you": "你",
2499
2517
"designer.title": "星球设计器",
2500
2518
"designer.taglineBefore": "总分:",
2501
"designer.taglineAfter": "分。通过得分解锁方块——分数不会被消耗。",
2519
"designer.taglineAfter": "分。",
2502
2520
"designer.empty": "你还没有自己的星球。来创建一个吧。",
2503
2521
"designer.new": "新星球",
2504
2522
"designer.editTitle": "编辑星球",
@@ -2529,19 +2547,16 @@ var I18N_CATALOG = {
2529
2547
"designer.defaultPeople": "居民",
2530
2548
"hud.points": "分数",
2531
2549
"hud.round": "第 {n} 轮",
2532
"hud.skill": "水平 {n}%",
2533
2550
"hud.out": "出局",
2534
2551
"hud.miniPoints": "分数 {n}",
2535
2552
"hud.opponent.one": "对手",
2536
2553
"hud.opponent.few": "对手",
2537
2554
"hud.opponent.many": "对手",
2538
2555
"hud.opponent.other": "对手",
2539
"hud.opponentsLine": "{n} 名{word}",
2540
2556
"offline.resultTitle": "离线对战",
2541
2557
"offline.reachedBefore": "你到达了第",
2542
2558
"offline.reachedAfter": " 轮。",
2543
2559
"offline.reached": "你到达了第 {n} 轮。",
2544
"offline.detail": "你以 {skill}% 的水平对战了 {n} 名{opponents}。",
2545
2560
"offline.backMenu": "返回菜单",
2546
2561
"gameover.title": "你输了",
2547
2562
"gameover.detail": "所有列都已锁定。",
@@ -2730,10 +2745,18 @@ var I18N_CATALOG = {
2730
2745
"reward.won": "你赢了!",
2731
2746
"reward.lost": "你输了...",
2732
2747
"reward.total": "总积分",
2733
"reward.continue": "点击继续"
2748
"reward.continue": "点击继续",
2749
"game.menu": "菜单",
2750
"game.paused": "已暂停",
2751
"game.resume": "继续游戏",
2752
"game.backToMenu": "返回主菜单",
2753
"reward.ended": "游戏结束",
2754
"offline.defeated.one": "击败了 {n} 名对手",
2755
"offline.defeated.few": "击败了 {n} 名对手",
2756
"offline.defeated.many": "击败了 {n} 名对手",
2757
"offline.defeated.other": "击败了 {n} 名对手"
2734
2758
},
2735
2759
"ko": {
2736
"menu.tagline": "세 개를 나란히 맞추면 블록에 로켓이 점화됩니다.",
2737
2760
"menu.play": "플레이",
2738
2761
"menu.offline": "오프라인 대결",
2739
2762
"menu.online": "온라인 플레이",
@@ -2748,7 +2771,6 @@ var I18N_CATALOG = {
2748
2771
"menu.logout": "로그아웃",
2749
2772
"menu.player": "플레이어",
2750
2773
"planet.title": "필드 선택",
2751
"planet.tagline": "각 필드는 행성입니다. 고유한 주민, 중력, 공기, 질량을 가집니다.",
2752
2774
"planet.back": "뒤로",
2753
2775
"planet.customBadge": "내 것",
2754
2776
"stats.powerLabel": "파워",
@@ -2783,7 +2805,7 @@ var I18N_CATALOG = {
2783
2805
"online.you": "나",
2784
2806
"designer.title": "행성 디자이너",
2785
2807
"designer.taglineBefore": "합계:",
2786
"designer.taglineAfter": "점. 점수를 모으면 블록이 해금됩니다. 점수를 쓰지는 않습니다.",
2808
"designer.taglineAfter": "점.",
2787
2809
"designer.empty": "아직 내 행성이 없습니다. 하나 만들어 보세요.",
2788
2810
"designer.new": "새 행성",
2789
2811
"designer.editTitle": "행성 편집",
@@ -2814,19 +2836,16 @@ var I18N_CATALOG = {
2814
2836
"designer.defaultPeople": "주민",
2815
2837
"hud.points": "점수",
2816
2838
"hud.round": "{n}라운드",
2817
"hud.skill": "숙련도 {n}%",
2818
2839
"hud.out": "탈락",
2819
2840
"hud.miniPoints": "점수 {n}",
2820
2841
"hud.opponent.one": "상대",
2821
2842
"hud.opponent.few": "상대",
2822
2843
"hud.opponent.many": "상대",
2823
2844
"hud.opponent.other": "상대",
2824
"hud.opponentsLine": "{word} {n}명",
2825
2845
"offline.resultTitle": "오프라인 대결",
2826
2846
"offline.reachedBefore": "도달한 라운드:",
2827
2847
"offline.reachedAfter": ".",
2828
2848
"offline.reached": "{n}라운드까지 도달했습니다.",
2829
"offline.detail": "숙련도 {skill}%의 {opponents} {n}명과 대결했습니다.",
2830
2849
"offline.backMenu": "메뉴로 돌아가기",
2831
2850
"gameover.title": "패배했습니다",
2832
2851
"gameover.detail": "모든 열이 잠겼습니다.",
@@ -3015,10 +3034,18 @@ var I18N_CATALOG = {
3015
3034
"reward.won": "승리!",
3016
3035
"reward.lost": "패배...",
3017
3036
"reward.total": "총 포인트",
3018
"reward.continue": "탭하여 계속"
3037
"reward.continue": "탭하여 계속",
3038
"game.menu": "메뉴",
3039
"game.paused": "일시정지",
3040
"game.resume": "계속하기",
3041
"game.backToMenu": "메인 메뉴로 돌아가기",
3042
"reward.ended": "게임 종료",
3043
"offline.defeated.one": "상대 {n}명 격파",
3044
"offline.defeated.few": "상대 {n}명 격파",
3045
"offline.defeated.many": "상대 {n}명 격파",
3046
"offline.defeated.other": "상대 {n}명 격파"
3019
3047
},
3020
3048
"pl": {
3021
"menu.tagline": "Trzy w rzędzie, a twoje klocki dostają napęd rakietowy.",
3022
3049
"menu.play": "Graj",
3023
3050
"menu.offline": "Walka offline",
3024
3051
"menu.online": "Graj online",
@@ -3033,7 +3060,6 @@ var I18N_CATALOG = {
3033
3060
"menu.logout": "Wyloguj się",
3034
3061
"menu.player": "gracz",
3035
3062
"planet.title": "Wybierz pole",
3036
"planet.tagline": "Każde pole to planeta, z własnym ludem, grawitacją, powietrzem i masą.",
3037
3063
"planet.back": "Wstecz",
3038
3064
"planet.customBadge": "Twoja",
3039
3065
"stats.powerLabel": "Moc",
@@ -3068,7 +3094,7 @@ var I18N_CATALOG = {
3068
3094
"online.you": "ty",
3069
3095
"designer.title": "Kreator planet",
3070
3096
"designer.taglineBefore": "Suma:",
3071
"designer.taglineAfter": "pkt. Odblokowujesz klocki, zdobywając punkty — nie wydajesz ich.",
3097
"designer.taglineAfter": "pkt.",
3072
3098
"designer.empty": "Nie masz jeszcze własnych planet. Utwórz jedną.",
3073
3099
"designer.new": "Nowa planeta",
3074
3100
"designer.editTitle": "Edytuj planetę",
@@ -3099,19 +3125,16 @@ var I18N_CATALOG = {
3099
3125
"designer.defaultPeople": "Lud",
3100
3126
"hud.points": "Punkty",
3101
3127
"hud.round": "Runda {n}",
3102
"hud.skill": "Umiejętność {n}%",
3103
3128
"hud.out": "Poza",
3104
3129
"hud.miniPoints": "Punkty {n}",
3105
3130
"hud.opponent.one": "przeciwnik",
3106
3131
"hud.opponent.few": "przeciwników",
3107
3132
"hud.opponent.many": "przeciwników",
3108
3133
"hud.opponent.other": "przeciwników",
3109
"hud.opponentsLine": "{n} {word}",
3110
3134
"offline.resultTitle": "Walka offline",
3111
3135
"offline.reachedBefore": "Dotarłeś do rundy",
3112
3136
"offline.reachedAfter": ".",
3113
3137
"offline.reached": "Dotarłeś do rundy {n}.",
3114
"offline.detail": "Grałeś przeciwko {n} {opponents} przy umiejętności {skill}%.",
3115
3138
"offline.backMenu": "Powrót do menu",
3116
3139
"gameover.title": "Przegrałeś",
3117
3140
"gameover.detail": "Wszystkie kolumny są zablokowane.",
@@ -3300,10 +3323,18 @@ var I18N_CATALOG = {
3300
3323
"reward.won": "Wygrana!",
3301
3324
"reward.lost": "Przegrana...",
3302
3325
"reward.total": "Suma punktów",
3303
"reward.continue": "Dotknij, aby kontynuować"
3326
"reward.continue": "Dotknij, aby kontynuować",
3327
"game.menu": "Menu",
3328
"game.paused": "Pauza",
3329
"game.resume": "Wznów",
3330
"game.backToMenu": "Powrót do menu głównego",
3331
"reward.ended": "Gra zakończona",
3332
"offline.defeated.one": "{n} pokonany przeciwnik",
3333
"offline.defeated.few": "{n} pokonanych przeciwników",
3334
"offline.defeated.many": "{n} pokonanych przeciwników",
3335
"offline.defeated.other": "{n} pokonanych przeciwników"
3304
3336
},
3305
3337
"ru": {
3306
"menu.tagline": "Три в ряд — и твои блоки получают ракетные двигатели.",
3307
3338
"menu.play": "Играть",
3308
3339
"menu.offline": "Офлайн-бой",
3309
3340
"menu.online": "Играть онлайн",
@@ -3318,7 +3349,6 @@ var I18N_CATALOG = {
3318
3349
"menu.logout": "Выйти",
3319
3350
"menu.player": "игрок",
3320
3351
"planet.title": "Выбери поле",
3321
"planet.tagline": "Каждое поле — это планета со своим народом, гравитацией, воздухом и массой.",
3322
3352
"planet.back": "Назад",
3323
3353
"planet.customBadge": "Своя",
3324
3354
"stats.powerLabel": "Мощность",
@@ -3353,7 +3383,7 @@ var I18N_CATALOG = {
3353
3383
"online.you": "ты",
3354
3384
"designer.title": "Конструктор планет",
3355
3385
"designer.taglineBefore": "Всего:",
3356
"designer.taglineAfter": "очков. Блоки открываются за заработанные очки — тратить их не нужно.",
3386
"designer.taglineAfter": "очков.",
3357
3387
"designer.empty": "У тебя ещё нет своих планет. Создай одну.",
3358
3388
"designer.new": "Новая планета",
3359
3389
"designer.editTitle": "Изменить планету",
@@ -3384,19 +3414,16 @@ var I18N_CATALOG = {
3384
3414
"designer.defaultPeople": "Народ",
3385
3415
"hud.points": "Очки",
3386
3416
"hud.round": "Раунд {n}",
3387
"hud.skill": "Мастерство {n} %",
3388
3417
"hud.out": "Вне",
3389
3418
"hud.miniPoints": "Очки {n}",
3390
3419
"hud.opponent.one": "противник",
3391
3420
"hud.opponent.few": "противника",
3392
3421
"hud.opponent.many": "противников",
3393
3422
"hud.opponent.other": "противников",
3394
"hud.opponentsLine": "{n} {word}",
3395
3423
"offline.resultTitle": "Офлайн-бой",
3396
3424
"offline.reachedBefore": "Ты дошёл до раунда",
3397
3425
"offline.reachedAfter": ".",
3398
3426
"offline.reached": "Ты дошёл до раунда {n}.",
3399
"offline.detail": "Ты играл против {n} {opponents} с мастерством {skill} %.",
3400
3427
"offline.backMenu": "Вернуться в меню",
3401
3428
"gameover.title": "Ты проиграл",
3402
3429
"gameover.detail": "Все столбцы заблокированы.",
@@ -3585,10 +3612,18 @@ var I18N_CATALOG = {
3585
3612
"reward.won": "Победа!",
3586
3613
"reward.lost": "Поражение...",
3587
3614
"reward.total": "Всего очков",
3588
"reward.continue": "Нажмите, чтобы продолжить"
3615
"reward.continue": "Нажмите, чтобы продолжить",
3616
"game.menu": "Меню",
3617
"game.paused": "Пауза",
3618
"game.resume": "Продолжить",
3619
"game.backToMenu": "В главное меню",
3620
"reward.ended": "Игра окончена",
3621
"offline.defeated.one": "{n} противник побеждён",
3622
"offline.defeated.few": "{n} противника побеждено",
3623
"offline.defeated.many": "{n} противников побеждено",
3624
"offline.defeated.other": "{n} противников побеждено"
3589
3625
},
3590
3626
"es": {
3591
"menu.tagline": "Tres en raya, y tus bloques ganan motores cohete.",
3592
3627
"menu.play": "Jugar",
3593
3628
"menu.offline": "Combate sin conexión",
3594
3629
"menu.online": "Jugar en línea",
@@ -3603,7 +3638,6 @@ var I18N_CATALOG = {
3603
3638
"menu.logout": "Cerrar sesión",
3604
3639
"menu.player": "jugador",
3605
3640
"planet.title": "Elige un campo",
3606
"planet.tagline": "Cada campo es un planeta, con su pueblo, gravedad, aire y masa.",
3607
3641
"planet.back": "Volver",
3608
3642
"planet.customBadge": "Tuya",
3609
3643
"stats.powerLabel": "Potencia",
@@ -3638,7 +3672,7 @@ var I18N_CATALOG = {
3638
3672
"online.you": "tú",
3639
3673
"designer.title": "Diseñador de planetas",
3640
3674
"designer.taglineBefore": "Total:",
3641
"designer.taglineAfter": "puntos. Desbloqueas bloques al ganar puntos; no los gastas.",
3675
"designer.taglineAfter": "puntos.",
3642
3676
"designer.empty": "Aún no tienes planetas propios. Crea uno.",
3643
3677
"designer.new": "Nuevo planeta",
3644
3678
"designer.editTitle": "Editar planeta",
@@ -3669,19 +3703,16 @@ var I18N_CATALOG = {
3669
3703
"designer.defaultPeople": "Pueblo",
3670
3704
"hud.points": "Puntos",
3671
3705
"hud.round": "Ronda {n}",
3672
"hud.skill": "Nivel {n} %",
3673
3706
"hud.out": "Fuera",
3674
3707
"hud.miniPoints": "Puntos {n}",
3675
3708
"hud.opponent.one": "rival",
3676
3709
"hud.opponent.few": "rivales",
3677
3710
"hud.opponent.many": "rivales",
3678
3711
"hud.opponent.other": "rivales",
3679
"hud.opponentsLine": "{n} {word}",
3680
3712
"offline.resultTitle": "Combate sin conexión",
3681
3713
"offline.reachedBefore": "Has llegado a la ronda",
3682
3714
"offline.reachedAfter": ".",
3683
3715
"offline.reached": "Has llegado a la ronda {n}.",
3684
"offline.detail": "Jugaste contra {n} {opponents} con un nivel del {skill} %.",
3685
3716
"offline.backMenu": "Volver al menú",
3686
3717
"gameover.title": "Has perdido",
3687
3718
"gameover.detail": "Todas las columnas están bloqueadas.",
@@ -3870,7 +3901,16 @@ var I18N_CATALOG = {
3870
3901
"reward.won": "¡Has ganado!",
3871
3902
"reward.lost": "Has perdido...",
3872
3903
"reward.total": "Puntos totales",
3873
"reward.continue": "Toca para continuar"
3904
"reward.continue": "Toca para continuar",
3905
"game.menu": "Menú",
3906
"game.paused": "En pausa",
3907
"game.resume": "Continuar",
3908
"game.backToMenu": "Volver al menú principal",
3909
"reward.ended": "Partida terminada",
3910
"offline.defeated.one": "{n} rival derrotado",
3911
"offline.defeated.few": "{n} rivales derrotados",
3912
"offline.defeated.many": "{n} rivales derrotados",
3913
"offline.defeated.other": "{n} rivales derrotados"
3874
3914
}
3875
3915
},
3876
3916
"errors": {
@@ -5173,6 +5213,9 @@ function GameCore (planet, rng)
5173
5213
this.spawnInterval = PlanetMod.SPAWN_INTERVAL;
5174
5214
/** Seconds of actual play in this match / round (t1189). */
5175
5215
this.playTime = 0;
5216
/** t1197: matches in the current combo and seconds since the last one. */
5217
this.combo = 0;
5218
this.comboAge = 0;
5176
5219
this.settleTime = PlanetMod.SETTLE_TIME;
5177
5220
this.score = 0;
5178
5221
this.state = 'playing';
@@ -5211,6 +5254,10 @@ GameCore.SWAP_DISTANCE = SWAP_DISTANCE;
5211
5254
GameCore.SNAP_Y = SNAP_Y;
5212
5255
GameCore.HORIZONTAL_SLOP = HORIZONTAL_SLOP;
5213
5256
GameCore.LANDING_CHAIN_BONUS = LANDING_CHAIN_BONUS;
5257
/** t1197: each match in a combo adds this much jump height (additive). */
5258
GameCore.COMBO_STEP = 0.05;
5259
/** t1197: the combo resets when no match is made for this long (s). */
5260
GameCore.COMBO_RESET_S = 5;
5214
5261
GameCore.COLUMN_WARN_ROWS = COLUMN_WARN_ROWS;
5215
5262
GameCore.DEFAULT_MISS_CHANCE = 0.30;
5216
5263
GameCore.STATE_STILL = STATE_STILL;
@@ -5688,6 +5735,14 @@ GameCore.prototype.tick = function (dt)
5688
5735
// t1192: waiting received blocks drop first, as soon as there is room.
5689
5736
if (this.garbageQueue.length)
5690
5737
{ this.drainGarbageQueue(); }
5738
// t1197: combo expires after COMBO_RESET_S without a match.
5739
this.comboAge += dt;
5740
if (this.combo > 0 && this.comboAge >= GameCore.COMBO_RESET_S)
5741
{
5742
this.combo = 0;
5743
if (!this.hasActiveLandingChain())
5744
{ this.lastChainIndicator = null; }
5745
}
5691
5746
this.spawnTimer += dt;
5692
5747
var iv = this.currentSpawnInterval();
5693
5748
while (this.spawnTimer >= iv)
@@ -7723,15 +7778,21 @@ GameCore.prototype.resolveMatches = function ()
7723
7778
}
7724
7779
}
7725
7780
var chain = this.landingChainFor(group);
7726
var bonusMul = 1 + LANDING_CHAIN_BONUS * chain;
7781
// t1197: combo bonus = COMBO_STEP per earlier match in this combo,
7782
// added to the landing-chain bonus (one shown "+x%").
7783
var comboBonus = GameCore.COMBO_STEP * this.combo;
7784
var bonusMul = 1 + LANDING_CHAIN_BONUS * chain + comboBonus;
7727
7785
height *= bonusMul;
7728
7786
this.launchCluster(group, height, { landingChain: chain });
7729
7787
launched.push({
7730
7788
blocks: group,
7731
7789
jumpHeight: height,
7732
7790
landingChain: chain,
7791
comboBonus: comboBonus,
7733
7792
chainBonus: bonusMul
7734
7793
});
7794
this.combo += 1;
7795
this.comboAge = 0;
7735
7796
}
7736
7797
this.finishLandingChains(launched);
7737
7798
this.updateChainIndicator(launched);
@@ -8253,24 +8314,35 @@ GameCore.prototype.finishLandingChains = function (launched)
8253
8314
GameCore.prototype.updateChainIndicator = function (launched)
8254
8315
{
8255
8316
var maxChain = 0;
8317
var maxPct = 0;
8256
8318
for (var i = 0; i < launched.length; i++)
8257
8319
{
8258
8320
var ch = launched[i].landingChain || 0;
8259
8321
if (ch > maxChain)
8260
8322
{ maxChain = ch; }
8323
var pct = Math.round(((launched[i].chainBonus || 1) - 1) * 100);
8324
if (pct > maxPct)
8325
{ maxPct = pct; }
8261
8326
}
8262
if (maxChain >= 1)
8327
if (maxPct > 0)
8263
8328
{
8264
8329
this.lastChainIndicator = {
8265
8330
chain: maxChain,
8266
bonusPct: Math.round(maxChain * LANDING_CHAIN_BONUS * 100)
8331
combo: this.combo,
8332
bonusPct: maxPct
8267
8333
};
8268
8334
return;
8269
8335
}
8270
if (!this.hasActiveLandingChain())
8336
if (!this.hasActiveLandingChain() && !(launched.length && this.combo > 0))
8271
8337
{ this.lastChainIndicator = null; }
8272
8338
};
8273
8339
8340
/** Bonus (percent) the next match would get from the combo alone (t1197). */
8341
GameCore.prototype.comboBonusPct = function ()
8342
{
8343
return Math.round(GameCore.COMBO_STEP * this.combo * 100);
8344
};
8345
8274
8346
GameCore.prototype.hasActiveLandingChain = function ()
8275
8347
{
8276
8348
var ids = Object.keys(this.clusters);
@@ -9214,6 +9286,8 @@ Online._apply = function (data)
9214
9286
{ this.lifetimePoints = data.lifetime_points; }
9215
9287
if (data.locale !== undefined)
9216
9288
{ this.locale = data.locale; }
9289
if (data.last_planet !== undefined)
9290
{ this.lastPlanet = data.last_planet; }
9217
9291
if (data.blocks)
9218
9292
{ this.blocks = data.blocks; }
9219
9293
if (data.planets)
@@ -9321,6 +9395,13 @@ Online.deletePlanet = function (id)
9321
9395
return this.request('planet_delete', { id: id });
9322
9396
};
9323
9397
9398
/** Remember the last chosen planet on the profile (t1196). */
9399
Online.setLastPlanet = function (planetId)
9400
{
9401
this.lastPlanet = planetId;
9402
return this.request('set_last_planet', { planet_id: planetId });
9403
};
9404
9324
9405
Online.setLocale = function (locale)
9325
9406
{
9326
9407
return this.request('set_locale', { locale: locale });
@@ -9499,9 +9580,10 @@ Online.stopPolling = function ()
9499
9580
}
9500
9581
};
9501
9582
9583
/** Login from the Online screen: come back to online play (t1193). */
9502
9584
Online.loginUrl = function ()
9503
9585
{
9504
return 'auth.php';
9586
return 'auth.php?return=online';
9505
9587
};
9506
9588
9507
9589
Online.logoutUrl = function ()
@@ -11795,9 +11877,21 @@ function OfflineBattle (opts)
11795
11877
this.shotLocals = [];
11796
11878
this.bots = [];
11797
11879
this.playerId = 'player';
11880
/** Opponents knocked out over all rounds of this battle (t1198). */
11881
this.defeated = 0;
11798
11882
this._initBots();
11799
11883
}
11800
11884
11885
/** Mark a bot as out once; counts towards `defeated` (t1198). */
11886
OfflineBattle.prototype._eliminate = function (bot)
11887
{
11888
if (bot.eliminated)
11889
{ return; }
11890
bot.eliminated = true;
11891
bot.score = bot.core ? bot.core.score : bot.score;
11892
this.defeated += 1;
11893
};
11894
11801
11895
OfflineBattle.prototype._initBots = function ()
11802
11896
{
11803
11897
var P = PlanetMod();
@@ -11955,8 +12049,7 @@ OfflineBattle.prototype.tick = function (dt, playerCore)
11955
12049
{ continue; }
11956
12050
if (bot.core.state === 'gameover')
11957
12051
{
11958
bot.eliminated = true;
11959
bot.score = bot.core.score;
12052
this._eliminate(bot);
11960
12053
continue;
11961
12054
}
11962
12055
bot.core.tick(dt);
@@ -11983,10 +12076,7 @@ OfflineBattle.prototype.tick = function (dt, playerCore)
11983
12076
for (var i = 0; i < this.bots.length; i++)
11984
12077
{
11985
12078
if (this.bots[i].core && this.bots[i].core.state === 'gameover')
11986
{
11987
this.bots[i].eliminated = true;
11988
this.bots[i].score = this.bots[i].core.score;
11989
}
12079
{ this._eliminate(this.bots[i]); }
11990
12080
}
11991
12081
11992
12082
if (playerCore && playerCore.state === 'gameover')
@@ -12077,10 +12167,15 @@ if (typeof module !== 'undefined' && module.exports && typeof Offline !== 'undef
12077
12167
* planet arc from the top of the screen into a counter at the bottom
12078
12168
* centre, one block per newly earned point. Each arrival adds 1.
12079
12169
*
12080
* Spawn rate accelerates: rate(t) = RATE0 + ACCEL·t blocks/s, so the
12081
* number spawned after t seconds is N(t) = RATE0·t + ACCEL·t²/2, and
12082
* block i (0-based) leaves at T(i) = the t where N(t) = i.
12083
* t1178: RATE0 = 15, ACCEL = 10 → 253 points ≈ 5.8 s, 800 ≈ 11.2 s, 2000 ≈ 18.6 s.
12170
* Spawn rate (t1194): starts at RATE0 = 3 blocks/s and accelerates
12171
* linearly, rate(t) = RATE0 + a·t, with `a` chosen per reward so the last
12172
* block always leaves at SPAWN_END = 4 s, whatever the point count.
12173
* Blocks spawned after t seconds: N(t) = RATE0·t + a·t²/2; block i
12174
* (0-based) leaves at T(i) = the t where N(t) = i. The last block is
12175
* i = n − 1, so N(4) = n − 1 → a = 2·((n − 1) − RATE0·T) / T².
12176
* If n − 1 ≤ RATE0·T (n ≤ 13) a would be ≤ 0: then a constant rate
12177
* (n − 1) / T is used (a = 0), so it still ends at 4 s (1 point: one
12178
* block at t = 0).
12084
12179
*
12085
12180
* The pure timing / sequencing part (Reward.spawnTime, Reward.createSequence)
12086
12181
* has no DOM and is unit-tested. Reward.play wires it to an overlay.
@@ -12089,10 +12184,10 @@ if (typeof module !== 'undefined' && module.exports && typeof Offline !== 'undef
12089
12184
{
12090
12185
'use strict';
12091
12186
12092
/** Blocks per second at t = 0 (t1177: 10, t1178: 15). */
12093
var RATE0 = 15;
12094
/** Rate increase in blocks/s per second (t1175: 3, t1177: 5, t1178: 10). */
12095
var ACCEL = 10;
12187
/** Blocks per second at t = 0 (t1177: 10, t1178: 15, t1194: 3). */
12188
var RATE0 = 3;
12189
/** Seconds after the first block when the last block leaves (t1194). */
12190
var SPAWN_END = 4;
12096
12191
var INTRO = 1.0; // centred title before it rises
12097
12192
var RISE = 0.6; // title tween to the top
12098
12193
var FLIGHT = 0.7; // one block's arc duration
@@ -12100,14 +12195,28 @@ var HOLD = 1.5; // final total shown before continuing
12100
12195
var HOLD_ZERO = 1.5; // earned 0: show the number briefly
12101
12196
var WAIT_MAX = 8; // give up waiting for the server after this
12102
12197
12103
/** Seconds after the start of counting when block i (0-based) leaves. */
12104
function spawnTime (i)
12198
/**
12199
* Spawn parameters for a reward of n blocks (t1194): { r0, a } with
12200
* rate(t) = r0 + a·t and the last block (i = n − 1) leaving at SPAWN_END.
12201
*/
12202
function spawnParams (n)
12203
{
12204
var T = SPAWN_END;
12205
var last = Math.max(0, (n | 0) - 1);
12206
if (last <= RATE0 * T)
12207
{ return { r0: last / T, a: 0 }; }
12208
return { r0: RATE0, a: 2 * (last - RATE0 * T) / (T * T) };
12209
}
12210
12211
/** Seconds after the start of counting when block i (0-based) of n leaves. */
12212
function spawnTime (i, n)
12105
12213
{
12106
12214
if (!(i > 0))
12107
12215
{ return 0; }
12108
if (ACCEL === 0)
12109
{ return i / RATE0; }
12110
return (-RATE0 + Math.sqrt(RATE0 * RATE0 + 2 * ACCEL * i)) / ACCEL;
12216
var p = spawnParams(n == null ? i + 1 : n);
12217
if (p.a === 0)
12218
{ return p.r0 > 0 ? i / p.r0 : 0; }
12219
return (-p.r0 + Math.sqrt(p.r0 * p.r0 + 2 * p.a * i)) / p.a;
12111
12220
}
12112
12221
12113
12222
/** Blocks spawned (left the top) by time t, capped at n. */
@@ -12115,8 +12224,9 @@ function spawnedBy (t, n)
12115
12224
{
12116
12225
if (!(t >= 0) || !(n > 0))
12117
12226
{ return 0; }
12227
var p = spawnParams(n);
12118
12228
// Block i has left when T(i) <= t, i.e. i <= N(t).
12119
var k = Math.floor(RATE0 * t + ACCEL * t * t / 2 + 1e-9) + 1;
12229
var k = Math.floor(p.r0 * t + p.a * t * t / 2 + 1e-9) + 1;
12120
12230
return Math.min(n, Math.max(0, k));
12121
12231
}
12122
12232
@@ -12133,7 +12243,7 @@ function countDuration (n, flight)
12133
12243
flight = flight == null ? FLIGHT : flight;
12134
12244
if (!(n > 0))
12135
12245
{ return 0; }
12136
return spawnTime(n - 1) + flight;
12246
return spawnTime(n - 1, n) + flight;
12137
12247
}
12138
12248
12139
12249
/**
@@ -12365,8 +12475,9 @@ function play (opts)
12365
12475
var W = 0;
12366
12476
var H = 0;
12367
12477
12368
title.textContent = opts.won ? tr('reward.won', 'You won!') : tr('reward.lost', 'You lost...');
12369
title.className = 'reward-title' + (opts.won ? ' won' : ' lost');
12478
// t1193: quitting via the in-game menu shows a neutral title.
12479
title.textContent = opts.title ? String(opts.title) : (opts.won ? tr('reward.won', 'You won!') : tr('reward.lost', 'You lost...'));
12480
title.className = 'reward-title' + (opts.title ? ' ended' : (opts.won ? ' won' : ' lost'));
12370
12481
if (label)
12371
12482
{ label.textContent = tr('reward.total', 'Total points'); }
12372
12483
counter.textContent = '';
@@ -12552,7 +12663,8 @@ function play (opts)
12552
12663
12553
12664
var Reward = {
12554
12665
RATE0: RATE0,
12555
ACCEL: ACCEL,
12666
SPAWN_END: SPAWN_END,
12667
spawnParams: spawnParams,
12556
12668
INTRO: INTRO,
12557
12669
RISE: RISE,
12558
12670
FLIGHT: FLIGHT,
@@ -13236,6 +13348,7 @@ window.onload = function ()
13236
13348
app.debugPhysics = isPhysicsDebugEnabled();
13237
13349
var play = document.getElementById('btn-play');
13238
13350
play.addEventListener('click', onPlay);
13351
bindGameMenu();
13239
13352
play.addEventListener('pointerup', function (e)
13240
13353
{
13241
13354
// A touch-friendly path: some mobile browsers swallow the click
@@ -13366,6 +13479,7 @@ function startPlay (opts)
13366
13479
{ bindPointer(app.scene.canvas); }
13367
13480
refreshHud();
13368
13481
showEl('hud');
13482
setGameMenuButton(!app.online && !app.spectating);
13369
13483
}
13370
13484
catch (err)
13371
13485
{
@@ -13465,6 +13579,10 @@ function teardownPlay ()
13465
13579
app.columnWarn = [];
13466
13580
app.pointerId = null;
13467
13581
app.gameOverShown = false;
13582
app.paused = false;
13583
app.quitting = false;
13584
hideEl('game-menu');
13585
setGameMenuButton(false);
13468
13586
hideEl('hud');
13469
13587
hideEl('game-over');
13470
13588
hideEl('spectator');
@@ -14032,6 +14150,14 @@ function tickView (dt)
14032
14150
placeTile(app.cells[i], col, row);
14033
14151
}
14034
14152
14153
// t1193: in-game menu open (Spelen / Offline Strijd) or quitting:
14154
// the field, bots and timers stand still; only the view is kept.
14155
if (app.paused)
14156
{
14157
syncSprites(0);
14158
return;
14159
}
14160
14035
14161
app.core.tick(dt);
14036
14162
if (app.offline && app.battle)
14037
14163
{ tickOffline(dt); }
@@ -14233,7 +14359,16 @@ function fieldFromEvent (e)
14233
14359
14234
14360
function playingForDrag ()
14235
14361
{
14236
return app.core && app.core.state === 'playing';
14362
return app.core && app.core.state === 'playing' && !app.paused;
14363
}
14364
14365
/** Touches on HUD buttons / menus are UI taps, not field drags (t1193). */
14366
function isUiTouchTarget (e)
14367
{
14368
var el = e && e.target;
14369
if (!el || !el.closest)
14370
{ return false; }
14371
return !!el.closest('button, a, input, select, #game-menu, #reward');
14237
14372
}
14238
14373
14239
14374
function startDragFromEvent (e)
@@ -14383,6 +14518,8 @@ function onTouchStart (e)
14383
14518
{
14384
14519
if (!playingForDrag())
14385
14520
{ return; }
14521
if (app.activeTouchId == null && isUiTouchTarget(e))
14522
{ return; }
14386
14523
if (app.activeTouchId != null)
14387
14524
{
14388
14525
if (e.preventDefault)
@@ -14708,31 +14845,20 @@ function showOfflineResult ()
14708
14845
app.offlineResultShown = true;
14709
14846
var battle = app.battle;
14710
14847
var reached = document.getElementById('offline-reached');
14711
var sch = battle.schedule;
14712
var n = sch.opponents;
14713
var skill = Math.round(sch.skill * 100);
14714
14848
var line = document.getElementById('offline-reached-line');
14715
14849
if (line && typeof I18n !== 'undefined')
14716
14850
{ line.textContent = I18n.t('offline.reached', { n: battle.round }); }
14717
14851
else if (reached)
14718
14852
{ reached.textContent = String(battle.round); }
14853
// t1198: "X opponents defeated" over all rounds (replaces the
14854
// opponents / skill line).
14719
14855
var detail = document.getElementById('offline-result-detail');
14720
14856
if (detail)
14721
14857
{
14722
if (typeof I18n !== 'undefined')
14723
{
14724
detail.textContent = I18n.t('offline.detail', {
14725
n: n,
14726
opponents: I18n.plural('hud.opponent', n),
14727
skill: skill
14728
});
14729
}
14730
else
14731
{
14732
var noun = n === 1 ? 'opponent' : 'opponents';
14733
detail.textContent = 'You played against ' + n + ' ' + noun
14734
+ ' at skill ' + skill + '%.';
14735
}
14858
var beaten = battle.defeated || 0;
14859
detail.textContent = (typeof I18n !== 'undefined')
14860
? I18n.plural('offline.defeated', beaten, { n: beaten })
14861
: beaten + (beaten === 1 ? ' opponent defeated' : ' opponents defeated');
14736
14862
}
14737
14863
hideEl('game-over');
14738
14864
showEl('offline-result');
@@ -14750,34 +14876,11 @@ function refreshOfflineHud ()
14750
14876
return;
14751
14877
}
14752
14878
el.hidden = false;
14879
// t1195: the Offline Strijd HUD shows only "Round N".
14753
14880
var sch = app.battle.schedule;
14754
var n = sch.opponents;
14755
14881
var r = document.getElementById('offline-round');
14756
var o = document.getElementById('offline-opponents');
14757
var s = document.getElementById('offline-skill');
14758
if (typeof I18n !== 'undefined')
14759
{
14760
if (r)
14761
{ r.textContent = I18n.t('hud.round', { n: sch.round }); }
14762
if (o)
14763
{
14764
o.textContent = I18n.t('hud.opponentsLine', {
14765
n: n, word: I18n.plural('hud.opponent', n)
14766
});
14767
}
14768
if (s)
14769
{ s.textContent = I18n.t('hud.skill', { n: Math.round(sch.skill * 100) }); }
14770
}
14771
else
14772
{
14773
var noun = n === 1 ? 'opponent' : 'opponents';
14774
if (r)
14775
{ r.textContent = 'Round ' + sch.round; }
14776
if (o)
14777
{ o.textContent = n + ' ' + noun; }
14778
if (s)
14779
{ s.textContent = 'Skill ' + Math.round(sch.skill * 100) + '%'; }
14780
}
14882
if (r)
14883
{ r.textContent = (typeof I18n !== 'undefined') ? I18n.t('hud.round', { n: sch.round }) : 'Round ' + sch.round; }
14781
14884
}
14782
14885
14783
14886
function hideOfflineHud ()
@@ -14795,14 +14898,16 @@ function refreshChainIndicator ()
14795
14898
var info = app.core && app.core.lastChainIndicator;
14796
14899
var active = app.core && app.core.hasActiveLandingChain
14797
14900
&& app.core.hasActiveLandingChain();
14798
// Show only while a chained cluster is still in the air.
14799
if (!info || info.chain < 1 || app.mode !== 'playing' || !active)
14901
var comboOn = app.core && app.core.combo > 0;
14902
// t1197: just "+x%" (landing chain + combo bonus of the last launch),
14903
// while a boosted cluster flies or the combo is still alive.
14904
if (!info || !(info.bonusPct > 0) || app.mode !== 'playing' || !(active || comboOn))
14800
14905
{
14801
14906
el.hidden = true;
14802
14907
return;
14803
14908
}
14804
14909
el.hidden = false;
14805
el.textContent = 'x' + info.chain + ' +' + info.bonusPct + '%';
14910
el.textContent = '+' + info.bonusPct + '%';
14806
14911
}
14807
14912
14808
14913
function hideChainIndicator ()
@@ -15281,7 +15386,17 @@ function bindOnlineUi ()
15281
15386
15282
15387
var params = new URLSearchParams(window.location.search);
15283
15388
if (params.get('online') === '1' || params.get('auth') === 'unconfigured')
15284
{ openOnlinePanel(); }
15389
{
15390
openOnlinePanel();
15391
// t1193: one-shot; a reload must not jump to online play again.
15392
try
15393
{
15394
params.delete('online');
15395
var rest = params.toString();
15396
window.history.replaceState(null, '', window.location.pathname + (rest ? '?' + rest : '') + window.location.hash);
15397
}
15398
catch (e) { /* ignore */ }
15399
}
15285
15400
}
15286
15401
15287
15402
function openOnlinePanel ()
@@ -15447,13 +15562,32 @@ function selectedPlanetId ()
15447
15562
return 'terra';
15448
15563
}
15449
15564
15565
/**
15566
* Pre-select the last chosen planet (t1196): logged in the profile value
15567
* (server), otherwise / as fallback localStorage, otherwise Terra. A
15568
* deleted custom planet falls back to the default (setSelectedPlanet).
15569
*/
15450
15570
function restoreSelectedPlanet ()
15451
15571
{
15452
var id = 'terra';
15453
try
15454
{ id = localStorage.getItem('meteors-planet') || 'terra'; }
15455
catch (e) {}
15456
setSelectedPlanet(id, true);
15572
var id = null;
15573
if (typeof Online !== 'undefined' && Online.me && Online.lastPlanet)
15574
{ id = Online.lastPlanet; }
15575
if (!id)
15576
{
15577
try
15578
{ id = localStorage.getItem('meteors-planet'); }
15579
catch (e) {}
15580
}
15581
setSelectedPlanet(id || 'terra', true);
15582
}
15583
15584
function rememberPlanetChoice (id)
15585
{
15586
if (typeof Online === 'undefined' || !Online.me || !Online.setLastPlanet)
15587
{ return; }
15588
if (Online.lastPlanet === id)
15589
{ return; }
15590
Promise.resolve(Online.setLastPlanet(id)).then(null, function () {});
15457
15591
}
15458
15592
15459
15593
function setSelectedPlanet (id, silent)
@@ -15473,6 +15607,7 @@ function setSelectedPlanet (id, silent)
15473
15607
catch (e) {}
15474
15608
if (!silent)
15475
15609
{
15610
rememberPlanetChoice(found.id);
15476
15611
var grid = document.getElementById('planet-grid');
15477
15612
if (grid && !grid.hidden && grid.children.length)
15478
15613
{ renderPlanetGrid('planet-grid', false); }
@@ -15633,6 +15768,102 @@ function refreshMenuAccount ()
15633
15768
{ localLogin.hidden = !(typeof Online !== 'undefined' && Online.local); }
15634
15769
}
15635
15770
15771
/* ---------- t1193 in-game menu (Spelen / Offline Strijd) ----------- */
15772
15773
function setGameMenuButton (show)
15774
{
15775
var btn = document.getElementById('btn-game-menu');
15776
if (btn)
15777
{ btn.hidden = !show; }
15778
}
15779
15780
/** The menu can open during a running solo / offline field only. */
15781
function canOpenGameMenu ()
15782
{
15783
return app.mode === 'playing' && !!app.core && !app.online && !app.spectating
15784
&& app.core.state === 'playing' && !app.rewardActive && !app.quitting
15785
&& !(app.offline && app.battle && app.battle.state !== 'playing');
15786
}
15787
15788
function openGameMenu ()
15789
{
15790
if (!canOpenGameMenu())
15791
{ return false; }
15792
if (app.core.drag)
15793
{ finishDrag({ noLaunch: true }); }
15794
app.paused = true;
15795
showEl('game-menu');
15796
var resume = document.getElementById('btn-game-resume');
15797
if (resume && resume.focus)
15798
{ resume.focus(); }
15799
return true;
15800
}
15801
15802
function resumeFromGameMenu ()
15803
{
15804
hideEl('game-menu');
15805
if (!app.quitting)
15806
{ app.paused = false; }
15807
}
15808
15809
/**
15810
* "Back to main menu": ends the match now. Logged in, the points so far
15811
* go through the normal play_finish + reward screen first (the server
15812
* still applies its caps); logged out, straight to the menu. Offline
15813
* Strijd ends the whole battle (no next round).
15814
*/
15815
function quitToMainMenu ()
15816
{
15817
if (!app.core || app.quitting)
15818
{ return; }
15819
hideEl('game-menu');
15820
app.paused = true;
15821
app.quitting = true;
15822
app.gameOverShown = true;
15823
app.lastScore = app.core.score || 0;
15824
setGameMenuButton(false);
15825
var score = app.lastScore;
15826
var done = function ()
15827
{
15828
app.quitting = false;
15829
app.paused = false;
15830
returnToMenu();
15831
};
15832
if (rewardEnabled())
15833
{
15834
var title = (typeof I18n !== 'undefined') ? I18n.t('reward.ended') : 'Game ended';
15835
showReward(false, finishPlaySession(score), done, title);
15836
}
15837
else
15838
{
15839
finishPlaySession(score);
15840
done();
15841
}
15842
}
15843
15844
function bindGameMenu ()
15845
{
15846
var btn = document.getElementById('btn-game-menu');
15847
if (btn)
15848
{ btn.addEventListener('click', function () { openGameMenu(); }); }
15849
var resume = document.getElementById('btn-game-resume');
15850
if (resume)
15851
{ resume.addEventListener('click', resumeFromGameMenu); }
15852
var quit = document.getElementById('btn-game-quit');
15853
if (quit)
15854
{ quit.addEventListener('click', quitToMainMenu); }
15855
document.addEventListener('keydown', function (e)
15856
{
15857
if (e.key !== 'Escape')
15858
{ return; }
15859
var menu = document.getElementById('game-menu');
15860
if (menu && !menu.hidden)
15861
{ resumeFromGameMenu(); }
15862
else
15863
{ openGameMenu(); }
15864
});
15865
}
15866
15636
15867
function beginPlaySession (mode)
15637
15868
{
15638
15869
if (app.playToken)
@@ -15688,7 +15919,7 @@ function rewardEnabled ()
15688
15919
* next() — the same destination the mode used before (menu, next
15689
15920
* offline round, offline result, or the online lobby/podium).
15690
15921
*/
15691
function showReward (won, resultPromise, next)
15922
function showReward (won, resultPromise, next, title)
15692
15923
{
15693
15924
app.rewardActive = true;
15694
15925
hideEl('game-over');
@@ -15696,6 +15927,7 @@ function showReward (won, resultPromise, next)
15696
15927
hideEl('podium');
15697
15928
var handle = Reward.play({
15698
15929
won: won,
15930
title: title || null,
15699
15931
planet: app.planet,
15700
15932
result: resultPromise,
15701
15933
onDone: function ()
@@ -15706,7 +15938,12 @@ function showReward (won, resultPromise, next)
15706
15938
}
15707
15939
});
15708
15940
if (!handle)
15709
{ app.rewardActive = false; }
15941
{
15942
app.rewardActive = false;
15943
// No reward overlay (e.g. missing DOM): still continue (t1193).
15944
if (title && next)
15945
{ next(); }
15946
}
15710
15947
}
15711
15948
15712
15949
function myOnlinePlace (lobby)
@@ -1023,7 +1023,6 @@ var BLOCK_REGISTRY = {1023
var I18N_CATALOG = {1023
var I18N_CATALOG = {1024
"locales": {1024
"locales": {1025
"en": {1025
"en": {1026
"menu.tagline": "Three in a row, and your blocks get rocket boosters.",1027
"menu.play": "Play",1026
"menu.play": "Play",1028
"menu.offline": "Offline Battle",1027
"menu.offline": "Offline Battle",1029
"menu.online": "Play online",1028
"menu.online": "Play online",@@ -1038,7 +1037,6 @@ var I18N_CATALOG = {1038
"menu.logout": "Log out",1037
"menu.logout": "Log out",1039
"menu.player": "player",1038
"menu.player": "player",1040
"planet.title": "Choose a field",1039
"planet.title": "Choose a field",1041
"planet.tagline": "Each field is a planet, with its own people, gravity, air and mass.",1042
"planet.back": "Back",1040
"planet.back": "Back",1043
"planet.customBadge": "Yours",1041
"planet.customBadge": "Yours",1044
"stats.powerLabel": "Power",1042
"stats.powerLabel": "Power",@@ -1073,7 +1071,7 @@ var I18N_CATALOG = {1073
"online.you": "you",1071
"online.you": "you",1074
"designer.title": "Planet Designer",1072
"designer.title": "Planet Designer",1075
"designer.taglineBefore": "Total:",1073
"designer.taglineBefore": "Total:",1076
"designer.taglineAfter": "points. You unlock blocks by earning points — you do not spend them.",1074
"designer.taglineAfter": "points.",1077
"designer.empty": "You don’t have any planets of your own yet. Create one.",1075
"designer.empty": "You don’t have any planets of your own yet. Create one.",1078
"designer.new": "New planet",1076
"designer.new": "New planet",1079
"designer.editTitle": "Edit planet",1077
"designer.editTitle": "Edit planet",@@ -1104,19 +1102,16 @@ var I18N_CATALOG = {1104
"designer.defaultPeople": "People",1102
"designer.defaultPeople": "People",1105
"hud.points": "Points",1103
"hud.points": "Points",1106
"hud.round": "Round {n}",1104
"hud.round": "Round {n}",1107
"hud.skill": "Skill {n}%",1108
"hud.out": "Out",1105
"hud.out": "Out",1109
"hud.miniPoints": "Points {n}",1106
"hud.miniPoints": "Points {n}",1110
"hud.opponent.one": "opponent",1107
"hud.opponent.one": "opponent",1111
"hud.opponent.few": "opponents",1108
"hud.opponent.few": "opponents",1112
"hud.opponent.many": "opponents",1109
"hud.opponent.many": "opponents",1113
"hud.opponent.other": "opponents",1110
"hud.opponent.other": "opponents",1114
"hud.opponentsLine": "{n} {word}",1115
"offline.resultTitle": "Offline Battle",1111
"offline.resultTitle": "Offline Battle",1116
"offline.reachedBefore": "You reached round",1112
"offline.reachedBefore": "You reached round",1117
"offline.reachedAfter": ".",1113
"offline.reachedAfter": ".",1118
"offline.reached": "You reached round {n}.",1114
"offline.reached": "You reached round {n}.",1119
"offline.detail": "You played against {n} {opponents} at skill {skill}%.",1120
"offline.backMenu": "Back to the menu",1115
"offline.backMenu": "Back to the menu",1121
"gameover.title": "You lost",1116
"gameover.title": "You lost",1122
"gameover.detail": "Every column is locked.",1117
"gameover.detail": "Every column is locked.",@@ -1305,10 +1300,18 @@ var I18N_CATALOG = {1305
"reward.won": "You won!",1300
"reward.won": "You won!",1306
"reward.lost": "You lost...",1301
"reward.lost": "You lost...",1307
"reward.total": "Total points",1302
"reward.total": "Total points",1308
"reward.continue": "Tap to continue"1303
"reward.continue": "Tap to continue",1304
"game.menu": "Menu",1305
"game.paused": "Paused",1306
"game.resume": "Resume",1307
"game.backToMenu": "Back to main menu",1308
"reward.ended": "Game ended",1309
"offline.defeated.one": "{n} opponent defeated",1310
"offline.defeated.few": "{n} opponents defeated",1311
"offline.defeated.many": "{n} opponents defeated",1312
"offline.defeated.other": "{n} opponents defeated"1309
},1313
},1310
"nl": {1314
"nl": {1311
"menu.tagline": "Drie op een rij, en je blokjes krijgen raketmotoren.",1312
"menu.play": "Spelen",1315
"menu.play": "Spelen",1313
"menu.offline": "Offline Strijd",1316
"menu.offline": "Offline Strijd",1314
"menu.online": "Online spelen",1317
"menu.online": "Online spelen",@@ -1323,7 +1326,6 @@ var I18N_CATALOG = {1323
"menu.logout": "Uitloggen",1326
"menu.logout": "Uitloggen",1324
"menu.player": "speler",1327
"menu.player": "speler",1325
"planet.title": "Kies een veld",1328
"planet.title": "Kies een veld",1326
"planet.tagline": "Elk veld is een planeet, met een eigen volk, zwaartekracht, lucht en massa.",1327
"planet.back": "Terug",1329
"planet.back": "Terug",1328
"planet.customBadge": "Eigen",1330
"planet.customBadge": "Eigen",1329
"stats.powerLabel": "Power",1331
"stats.powerLabel": "Power",@@ -1358,7 +1360,7 @@ var I18N_CATALOG = {1358
"online.you": "jij",1360
"online.you": "jij",1359
"designer.title": "Planeetontwerper",1361
"designer.title": "Planeetontwerper",1360
"designer.taglineBefore": "Totaal:",1362
"designer.taglineBefore": "Totaal:",1361
"designer.taglineAfter": "punten. Blokjes ontgrendel je door punten te verdienen — je geeft ze niet uit.",1363
"designer.taglineAfter": "punten.",1362
"designer.empty": "Je hebt nog geen eigen planeten. Maak er een aan.",1364
"designer.empty": "Je hebt nog geen eigen planeten. Maak er een aan.",1363
"designer.new": "Nieuwe planeet",1365
"designer.new": "Nieuwe planeet",1364
"designer.editTitle": "Planeet bewerken",1366
"designer.editTitle": "Planeet bewerken",@@ -1389,19 +1391,16 @@ var I18N_CATALOG = {1389
"designer.defaultPeople": "Volk",1391
"designer.defaultPeople": "Volk",1390
"hud.points": "Punten",1392
"hud.points": "Punten",1391
"hud.round": "Ronde {n}",1393
"hud.round": "Ronde {n}",1392
"hud.skill": "Skill {n}%",1393
"hud.out": "Uit",1394
"hud.out": "Uit",1394
"hud.miniPoints": "Punten {n}",1395
"hud.miniPoints": "Punten {n}",1395
"hud.opponent.one": "tegenstander",1396
"hud.opponent.one": "tegenstander",1396
"hud.opponent.few": "tegenstanders",1397
"hud.opponent.few": "tegenstanders",1397
"hud.opponent.many": "tegenstanders",1398
"hud.opponent.many": "tegenstanders",1398
"hud.opponent.other": "tegenstanders",1399
"hud.opponent.other": "tegenstanders",1399
"hud.opponentsLine": "{n} {word}",1400
"offline.resultTitle": "Offline Strijd",1400
"offline.resultTitle": "Offline Strijd",1401
"offline.reachedBefore": "Je hebt ronde",1401
"offline.reachedBefore": "Je hebt ronde",1402
"offline.reachedAfter": " bereikt.",1402
"offline.reachedAfter": " bereikt.",1403
"offline.reached": "Je hebt ronde {n} bereikt.",1403
"offline.reached": "Je hebt ronde {n} bereikt.",1404
"offline.detail": "Je speelde tegen {n} {opponents} met skill {skill}%.",1405
"offline.backMenu": "Terug naar het menu",1404
"offline.backMenu": "Terug naar het menu",1406
"gameover.title": "Je hebt verloren",1405
"gameover.title": "Je hebt verloren",1407
"gameover.detail": "Alle kolommen zitten vast.",1406
"gameover.detail": "Alle kolommen zitten vast.",@@ -1590,10 +1589,18 @@ var I18N_CATALOG = {1590
"reward.won": "Gewonnen!",1589
"reward.won": "Gewonnen!",1591
"reward.lost": "Verloren...",1590
"reward.lost": "Verloren...",1592
"reward.total": "Totaal punten",1591
"reward.total": "Totaal punten",1593
"reward.continue": "Tik om verder te gaan"1592
"reward.continue": "Tik om verder te gaan",1593
"game.menu": "Menu",1594
"game.paused": "Gepauzeerd",1595
"game.resume": "Verder spelen",1596
"game.backToMenu": "Terug naar hoofdmenu",1597
"reward.ended": "Spel gestopt",1598
"offline.defeated.one": "{n} tegenstander verslagen",1599
"offline.defeated.few": "{n} tegenstanders verslagen",1600
"offline.defeated.many": "{n} tegenstanders verslagen",1601
"offline.defeated.other": "{n} tegenstanders verslagen"1594
},1602
},1595
"de": {1603
"de": {1596
"menu.tagline": "Drei in einer Reihe — und deine Blöcke bekommen Raketenantrieb.",1597
"menu.play": "Spielen",1604
"menu.play": "Spielen",1598
"menu.offline": "Offline-Kampf",1605
"menu.offline": "Offline-Kampf",1599
"menu.online": "Online spielen",1606
"menu.online": "Online spielen",@@ -1608,7 +1615,6 @@ var I18N_CATALOG = {1608
"menu.logout": "Abmelden",1615
"menu.logout": "Abmelden",1609
"menu.player": "Spieler",1616
"menu.player": "Spieler",1610
"planet.title": "Wähle ein Feld",1617
"planet.title": "Wähle ein Feld",1611
"planet.tagline": "Jedes Feld ist ein Planet mit eigenem Volk, eigener Schwerkraft, Luft und Masse.",1612
"planet.back": "Zurück",1618
"planet.back": "Zurück",1613
"planet.customBadge": "Eigene",1619
"planet.customBadge": "Eigene",1614
"stats.powerLabel": "Power",1620
"stats.powerLabel": "Power",@@ -1643,7 +1649,7 @@ var I18N_CATALOG = {1643
"online.you": "du",1649
"online.you": "du",1644
"designer.title": "Planeten-Designer",1650
"designer.title": "Planeten-Designer",1645
"designer.taglineBefore": "Gesamt:",1651
"designer.taglineBefore": "Gesamt:",1646
"designer.taglineAfter": "Punkte. Blöcke schaltest du frei, indem du Punkte verdienst — du gibst sie nicht aus.",1652
"designer.taglineAfter": "Punkte.",1647
"designer.empty": "Du hast noch keine eigenen Planeten. Erstelle einen.",1653
"designer.empty": "Du hast noch keine eigenen Planeten. Erstelle einen.",1648
"designer.new": "Neuer Planet",1654
"designer.new": "Neuer Planet",1649
"designer.editTitle": "Planet bearbeiten",1655
"designer.editTitle": "Planet bearbeiten",@@ -1674,19 +1680,16 @@ var I18N_CATALOG = {1674
"designer.defaultPeople": "Volk",1680
"designer.defaultPeople": "Volk",1675
"hud.points": "Punkte",1681
"hud.points": "Punkte",1676
"hud.round": "Runde {n}",1682
"hud.round": "Runde {n}",1677
"hud.skill": "Können {n} %",1678
"hud.out": "Raus",1683
"hud.out": "Raus",1679
"hud.miniPoints": "Punkte {n}",1684
"hud.miniPoints": "Punkte {n}",1680
"hud.opponent.one": "Gegner",1685
"hud.opponent.one": "Gegner",1681
"hud.opponent.few": "Gegner",1686
"hud.opponent.few": "Gegner",1682
"hud.opponent.many": "Gegner",1687
"hud.opponent.many": "Gegner",1683
"hud.opponent.other": "Gegner",1688
"hud.opponent.other": "Gegner",1684
"hud.opponentsLine": "{n} {word}",1685
"offline.resultTitle": "Offline-Kampf",1689
"offline.resultTitle": "Offline-Kampf",1686
"offline.reachedBefore": "Du hast Runde",1690
"offline.reachedBefore": "Du hast Runde",1687
"offline.reachedAfter": " erreicht.",1691
"offline.reachedAfter": " erreicht.",1688
"offline.reached": "Du hast Runde {n} erreicht.",1692
"offline.reached": "Du hast Runde {n} erreicht.",1689
"offline.detail": "Du hast gegen {n} {opponents} mit Können {skill} % gespielt.",1690
"offline.backMenu": "Zurück zum Menü",1693
"offline.backMenu": "Zurück zum Menü",1691
"gameover.title": "Du hast verloren",1694
"gameover.title": "Du hast verloren",1692
"gameover.detail": "Alle Spalten sind festgesetzt.",1695
"gameover.detail": "Alle Spalten sind festgesetzt.",@@ -1875,10 +1878,18 @@ var I18N_CATALOG = {1875
"reward.won": "Gewonnen!",1878
"reward.won": "Gewonnen!",1876
"reward.lost": "Verloren...",1879
"reward.lost": "Verloren...",1877
"reward.total": "Punkte gesamt",1880
"reward.total": "Punkte gesamt",1878
"reward.continue": "Tippen zum Fortfahren"1881
"reward.continue": "Tippen zum Fortfahren",1882
"game.menu": "Menü",1883
"game.paused": "Pausiert",1884
"game.resume": "Weiterspielen",1885
"game.backToMenu": "Zurück zum Hauptmenü",1886
"reward.ended": "Spiel beendet",1887
"offline.defeated.one": "{n} Gegner besiegt",1888
"offline.defeated.few": "{n} Gegner besiegt",1889
"offline.defeated.many": "{n} Gegner besiegt",1890
"offline.defeated.other": "{n} Gegner besiegt"1879
},1891
},1880
"fr": {1892
"fr": {1881
"menu.tagline": "Trois d’affilée, et tes blocs s’équipent de propulseurs.",1882
"menu.play": "Jouer",1893
"menu.play": "Jouer",1883
"menu.offline": "Combat hors ligne",1894
"menu.offline": "Combat hors ligne",1884
"menu.online": "Jouer en ligne",1895
"menu.online": "Jouer en ligne",@@ -1893,7 +1904,6 @@ var I18N_CATALOG = {1893
"menu.logout": "Déconnexion",1904
"menu.logout": "Déconnexion",1894
"menu.player": "joueur",1905
"menu.player": "joueur",1895
"planet.title": "Choisis un terrain",1906
"planet.title": "Choisis un terrain",1896
"planet.tagline": "Chaque terrain est une planète, avec son peuple, sa gravité, son air et sa masse.",1897
"planet.back": "Retour",1907
"planet.back": "Retour",1898
"planet.customBadge": "Perso",1908
"planet.customBadge": "Perso",1899
"stats.powerLabel": "Puissance",1909
"stats.powerLabel": "Puissance",@@ -1928,7 +1938,7 @@ var I18N_CATALOG = {1928
"online.you": "toi",1938
"online.you": "toi",1929
"designer.title": "Concepteur de planètes",1939
"designer.title": "Concepteur de planètes",1930
"designer.taglineBefore": "Total :",1940
"designer.taglineBefore": "Total :",1931
"designer.taglineAfter": "points. Tu débloques des blocs en gagnant des points — tu ne les dépenses pas.",1941
"designer.taglineAfter": "points.",1932
"designer.empty": "Tu n’as pas encore de planète à toi. Crées-en une.",1942
"designer.empty": "Tu n’as pas encore de planète à toi. Crées-en une.",1933
"designer.new": "Nouvelle planète",1943
"designer.new": "Nouvelle planète",1934
"designer.editTitle": "Modifier la planète",1944
"designer.editTitle": "Modifier la planète",@@ -1959,19 +1969,16 @@ var I18N_CATALOG = {1959
"designer.defaultPeople": "Peuple",1969
"designer.defaultPeople": "Peuple",1960
"hud.points": "Points",1970
"hud.points": "Points",1961
"hud.round": "Manche {n}",1971
"hud.round": "Manche {n}",1962
"hud.skill": "Niveau {n} %",1963
"hud.out": "Éliminé",1972
"hud.out": "Éliminé",1964
"hud.miniPoints": "Points {n}",1973
"hud.miniPoints": "Points {n}",1965
"hud.opponent.one": "adversaire",1974
"hud.opponent.one": "adversaire",1966
"hud.opponent.few": "adversaires",1975
"hud.opponent.few": "adversaires",1967
"hud.opponent.many": "adversaires",1976
"hud.opponent.many": "adversaires",1968
"hud.opponent.other": "adversaires",1977
"hud.opponent.other": "adversaires",1969
"hud.opponentsLine": "{n} {word}",1970
"offline.resultTitle": "Combat hors ligne",1978
"offline.resultTitle": "Combat hors ligne",1971
"offline.reachedBefore": "Tu as atteint la manche",1979
"offline.reachedBefore": "Tu as atteint la manche",1972
"offline.reachedAfter": ".",1980
"offline.reachedAfter": ".",1973
"offline.reached": "Tu as atteint la manche {n}.",1981
"offline.reached": "Tu as atteint la manche {n}.",1974
"offline.detail": "Tu as joué contre {n} {opponents} au niveau {skill} %.",1975
"offline.backMenu": "Retour au menu",1982
"offline.backMenu": "Retour au menu",1976
"gameover.title": "Tu as perdu",1983
"gameover.title": "Tu as perdu",1977
"gameover.detail": "Toutes les colonnes sont bloquées.",1984
"gameover.detail": "Toutes les colonnes sont bloquées.",@@ -2160,10 +2167,18 @@ var I18N_CATALOG = {2160
"reward.won": "Victoire !",2167
"reward.won": "Victoire !",2161
"reward.lost": "Perdu...",2168
"reward.lost": "Perdu...",2162
"reward.total": "Total des points",2169
"reward.total": "Total des points",2163
"reward.continue": "Touchez pour continuer"2170
"reward.continue": "Touchez pour continuer",2171
"game.menu": "Menu",2172
"game.paused": "En pause",2173
"game.resume": "Reprendre",2174
"game.backToMenu": "Retour au menu principal",2175
"reward.ended": "Partie terminée",2176
"offline.defeated.one": "{n} adversaire vaincu",2177
"offline.defeated.few": "{n} adversaires vaincus",2178
"offline.defeated.many": "{n} adversaires vaincus",2179
"offline.defeated.other": "{n} adversaires vaincus"2164
},2180
},2165
"ja": {2181
"ja": {2166
"menu.tagline": "三つ揃えると、ブロックにロケットが点火します。",2167
"menu.play": "プレイ",2182
"menu.play": "プレイ",2168
"menu.offline": "オフライン対戦",2183
"menu.offline": "オフライン対戦",2169
"menu.online": "オンラインで遊ぶ",2184
"menu.online": "オンラインで遊ぶ",@@ -2178,7 +2193,6 @@ var I18N_CATALOG = {2178
"menu.logout": "ログアウト",2193
"menu.logout": "ログアウト",2179
"menu.player": "プレイヤー",2194
"menu.player": "プレイヤー",2180
"planet.title": "フィールドを選ぶ",2195
"planet.title": "フィールドを選ぶ",2181
"planet.tagline": "各フィールドは惑星です。固有の民、重力、大気、質量を持ちます。",2182
"planet.back": "戻る",2196
"planet.back": "戻る",2183
"planet.customBadge": "自作",2197
"planet.customBadge": "自作",2184
"stats.powerLabel": "パワー",2198
"stats.powerLabel": "パワー",@@ -2213,7 +2227,7 @@ var I18N_CATALOG = {2213
"online.you": "あなた",2227
"online.you": "あなた",2214
"designer.title": "惑星デザイナー",2228
"designer.title": "惑星デザイナー",2215
"designer.taglineBefore": "合計:",2229
"designer.taglineBefore": "合計:",2216
"designer.taglineAfter": "ポイント。ポイントを獲得するとブロックが解放されます。消費はしません。",2230
"designer.taglineAfter": "ポイント。",2217
"designer.empty": "まだ自分の惑星がありません。新しく作ってみましょう。",2231
"designer.empty": "まだ自分の惑星がありません。新しく作ってみましょう。",2218
"designer.new": "新しい惑星",2232
"designer.new": "新しい惑星",2219
"designer.editTitle": "惑星を編集",2233
"designer.editTitle": "惑星を編集",@@ -2244,19 +2258,16 @@ var I18N_CATALOG = {2244
"designer.defaultPeople": "民",2258
"designer.defaultPeople": "民",2245
"hud.points": "ポイント",2259
"hud.points": "ポイント",2246
"hud.round": "ラウンド {n}",2260
"hud.round": "ラウンド {n}",2247
"hud.skill": "スキル {n}%",2248
"hud.out": "脱落",2261
"hud.out": "脱落",2249
"hud.miniPoints": "ポイント {n}",2262
"hud.miniPoints": "ポイント {n}",2250
"hud.opponent.one": "相手",2263
"hud.opponent.one": "相手",2251
"hud.opponent.few": "相手",2264
"hud.opponent.few": "相手",2252
"hud.opponent.many": "相手",2265
"hud.opponent.many": "相手",2253
"hud.opponent.other": "相手",2266
"hud.opponent.other": "相手",2254
"hud.opponentsLine": "{word} {n} 人",2255
"offline.resultTitle": "オフライン対戦",2267
"offline.resultTitle": "オフライン対戦",2256
"offline.reachedBefore": "到達ラウンド:",2268
"offline.reachedBefore": "到達ラウンド:",2257
"offline.reachedAfter": "。",2269
"offline.reachedAfter": "。",2258
"offline.reached": "ラウンド {n} まで到達しました。",2270
"offline.reached": "ラウンド {n} まで到達しました。",2259
"offline.detail": "スキル {skill}% の{opponents}{n}人と対戦しました。",2260
"offline.backMenu": "メニューに戻る",2271
"offline.backMenu": "メニューに戻る",2261
"gameover.title": "負けました",2272
"gameover.title": "負けました",2262
"gameover.detail": "すべての列がロックされました。",2273
"gameover.detail": "すべての列がロックされました。",@@ -2445,10 +2456,18 @@ var I18N_CATALOG = {2445
"reward.won": "勝利!",2456
"reward.won": "勝利!",2446
"reward.lost": "敗北...",2457
"reward.lost": "敗北...",2447
"reward.total": "合計ポイント",2458
"reward.total": "合計ポイント",2448
"reward.continue": "タップして続ける"2459
"reward.continue": "タップして続ける",2460
"game.menu": "メニュー",2461
"game.paused": "一時停止中",2462
"game.resume": "再開",2463
"game.backToMenu": "メインメニューに戻る",2464
"reward.ended": "ゲーム終了",2465
"offline.defeated.one": "{n}人の相手を倒した",2466
"offline.defeated.few": "{n}人の相手を倒した",2467
"offline.defeated.many": "{n}人の相手を倒した",2468
"offline.defeated.other": "{n}人の相手を倒した"2449
},2469
},2450
"zh": {2470
"zh": {2451
"menu.tagline": "三个一排,你的方块就会装上火箭。",2452
"menu.play": "开始游戏",2471
"menu.play": "开始游戏",2453
"menu.offline": "离线对战",2472
"menu.offline": "离线对战",2454
"menu.online": "在线游戏",2473
"menu.online": "在线游戏",@@ -2463,7 +2482,6 @@ var I18N_CATALOG = {2463
"menu.logout": "退出",2482
"menu.logout": "退出",2464
"menu.player": "玩家",2483
"menu.player": "玩家",2465
"planet.title": "选择场地",2484
"planet.title": "选择场地",2466
"planet.tagline": "每块场地都是一颗星球,有自己的居民、重力、空气和质量。",2467
"planet.back": "返回",2485
"planet.back": "返回",2468
"planet.customBadge": "自制",2486
"planet.customBadge": "自制",2469
"stats.powerLabel": "力量",2487
"stats.powerLabel": "力量",@@ -2498,7 +2516,7 @@ var I18N_CATALOG = {2498
"online.you": "你",2516
"online.you": "你",2499
"designer.title": "星球设计器",2517
"designer.title": "星球设计器",2500
"designer.taglineBefore": "总分:",2518
"designer.taglineBefore": "总分:",2501
"designer.taglineAfter": "分。通过得分解锁方块——分数不会被消耗。",2519
"designer.taglineAfter": "分。",2502
"designer.empty": "你还没有自己的星球。来创建一个吧。",2520
"designer.empty": "你还没有自己的星球。来创建一个吧。",2503
"designer.new": "新星球",2521
"designer.new": "新星球",2504
"designer.editTitle": "编辑星球",2522
"designer.editTitle": "编辑星球",@@ -2529,19 +2547,16 @@ var I18N_CATALOG = {2529
"designer.defaultPeople": "居民",2547
"designer.defaultPeople": "居民",2530
"hud.points": "分数",2548
"hud.points": "分数",2531
"hud.round": "第 {n} 轮",2549
"hud.round": "第 {n} 轮",2532
"hud.skill": "水平 {n}%",2533
"hud.out": "出局",2550
"hud.out": "出局",2534
"hud.miniPoints": "分数 {n}",2551
"hud.miniPoints": "分数 {n}",2535
"hud.opponent.one": "对手",2552
"hud.opponent.one": "对手",2536
"hud.opponent.few": "对手",2553
"hud.opponent.few": "对手",2537
"hud.opponent.many": "对手",2554
"hud.opponent.many": "对手",2538
"hud.opponent.other": "对手",2555
"hud.opponent.other": "对手",2539
"hud.opponentsLine": "{n} 名{word}",2540
"offline.resultTitle": "离线对战",2556
"offline.resultTitle": "离线对战",2541
"offline.reachedBefore": "你到达了第",2557
"offline.reachedBefore": "你到达了第",2542
"offline.reachedAfter": " 轮。",2558
"offline.reachedAfter": " 轮。",2543
"offline.reached": "你到达了第 {n} 轮。",2559
"offline.reached": "你到达了第 {n} 轮。",2544
"offline.detail": "你以 {skill}% 的水平对战了 {n} 名{opponents}。",2545
"offline.backMenu": "返回菜单",2560
"offline.backMenu": "返回菜单",2546
"gameover.title": "你输了",2561
"gameover.title": "你输了",2547
"gameover.detail": "所有列都已锁定。",2562
"gameover.detail": "所有列都已锁定。",@@ -2730,10 +2745,18 @@ var I18N_CATALOG = {2730
"reward.won": "你赢了!",2745
"reward.won": "你赢了!",2731
"reward.lost": "你输了...",2746
"reward.lost": "你输了...",2732
"reward.total": "总积分",2747
"reward.total": "总积分",2733
"reward.continue": "点击继续"2748
"reward.continue": "点击继续",2749
"game.menu": "菜单",2750
"game.paused": "已暂停",2751
"game.resume": "继续游戏",2752
"game.backToMenu": "返回主菜单",2753
"reward.ended": "游戏结束",2754
"offline.defeated.one": "击败了 {n} 名对手",2755
"offline.defeated.few": "击败了 {n} 名对手",2756
"offline.defeated.many": "击败了 {n} 名对手",2757
"offline.defeated.other": "击败了 {n} 名对手"2734
},2758
},2735
"ko": {2759
"ko": {2736
"menu.tagline": "세 개를 나란히 맞추면 블록에 로켓이 점화됩니다.",2737
"menu.play": "플레이",2760
"menu.play": "플레이",2738
"menu.offline": "오프라인 대결",2761
"menu.offline": "오프라인 대결",2739
"menu.online": "온라인 플레이",2762
"menu.online": "온라인 플레이",@@ -2748,7 +2771,6 @@ var I18N_CATALOG = {2748
"menu.logout": "로그아웃",2771
"menu.logout": "로그아웃",2749
"menu.player": "플레이어",2772
"menu.player": "플레이어",2750
"planet.title": "필드 선택",2773
"planet.title": "필드 선택",2751
"planet.tagline": "각 필드는 행성입니다. 고유한 주민, 중력, 공기, 질량을 가집니다.",2752
"planet.back": "뒤로",2774
"planet.back": "뒤로",2753
"planet.customBadge": "내 것",2775
"planet.customBadge": "내 것",2754
"stats.powerLabel": "파워",2776
"stats.powerLabel": "파워",@@ -2783,7 +2805,7 @@ var I18N_CATALOG = {2783
"online.you": "나",2805
"online.you": "나",2784
"designer.title": "행성 디자이너",2806
"designer.title": "행성 디자이너",2785
"designer.taglineBefore": "합계:",2807
"designer.taglineBefore": "합계:",2786
"designer.taglineAfter": "점. 점수를 모으면 블록이 해금됩니다. 점수를 쓰지는 않습니다.",2808
"designer.taglineAfter": "점.",2787
"designer.empty": "아직 내 행성이 없습니다. 하나 만들어 보세요.",2809
"designer.empty": "아직 내 행성이 없습니다. 하나 만들어 보세요.",2788
"designer.new": "새 행성",2810
"designer.new": "새 행성",2789
"designer.editTitle": "행성 편집",2811
"designer.editTitle": "행성 편집",@@ -2814,19 +2836,16 @@ var I18N_CATALOG = {2814
"designer.defaultPeople": "주민",2836
"designer.defaultPeople": "주민",2815
"hud.points": "점수",2837
"hud.points": "점수",2816
"hud.round": "{n}라운드",2838
"hud.round": "{n}라운드",2817
"hud.skill": "숙련도 {n}%",2818
"hud.out": "탈락",2839
"hud.out": "탈락",2819
"hud.miniPoints": "점수 {n}",2840
"hud.miniPoints": "점수 {n}",2820
"hud.opponent.one": "상대",2841
"hud.opponent.one": "상대",2821
"hud.opponent.few": "상대",2842
"hud.opponent.few": "상대",2822
"hud.opponent.many": "상대",2843
"hud.opponent.many": "상대",2823
"hud.opponent.other": "상대",2844
"hud.opponent.other": "상대",2824
"hud.opponentsLine": "{word} {n}명",2825
"offline.resultTitle": "오프라인 대결",2845
"offline.resultTitle": "오프라인 대결",2826
"offline.reachedBefore": "도달한 라운드:",2846
"offline.reachedBefore": "도달한 라운드:",2827
"offline.reachedAfter": ".",2847
"offline.reachedAfter": ".",2828
"offline.reached": "{n}라운드까지 도달했습니다.",2848
"offline.reached": "{n}라운드까지 도달했습니다.",2829
"offline.detail": "숙련도 {skill}%의 {opponents} {n}명과 대결했습니다.",2830
"offline.backMenu": "메뉴로 돌아가기",2849
"offline.backMenu": "메뉴로 돌아가기",2831
"gameover.title": "패배했습니다",2850
"gameover.title": "패배했습니다",2832
"gameover.detail": "모든 열이 잠겼습니다.",2851
"gameover.detail": "모든 열이 잠겼습니다.",@@ -3015,10 +3034,18 @@ var I18N_CATALOG = {3015
"reward.won": "승리!",3034
"reward.won": "승리!",3016
"reward.lost": "패배...",3035
"reward.lost": "패배...",3017
"reward.total": "총 포인트",3036
"reward.total": "총 포인트",3018
"reward.continue": "탭하여 계속"3037
"reward.continue": "탭하여 계속",3038
"game.menu": "메뉴",3039
"game.paused": "일시정지",3040
"game.resume": "계속하기",3041
"game.backToMenu": "메인 메뉴로 돌아가기",3042
"reward.ended": "게임 종료",3043
"offline.defeated.one": "상대 {n}명 격파",3044
"offline.defeated.few": "상대 {n}명 격파",3045
"offline.defeated.many": "상대 {n}명 격파",3046
"offline.defeated.other": "상대 {n}명 격파"3019
},3047
},3020
"pl": {3048
"pl": {3021
"menu.tagline": "Trzy w rzędzie, a twoje klocki dostają napęd rakietowy.",3022
"menu.play": "Graj",3049
"menu.play": "Graj",3023
"menu.offline": "Walka offline",3050
"menu.offline": "Walka offline",3024
"menu.online": "Graj online",3051
"menu.online": "Graj online",@@ -3033,7 +3060,6 @@ var I18N_CATALOG = {3033
"menu.logout": "Wyloguj się",3060
"menu.logout": "Wyloguj się",3034
"menu.player": "gracz",3061
"menu.player": "gracz",3035
"planet.title": "Wybierz pole",3062
"planet.title": "Wybierz pole",3036
"planet.tagline": "Każde pole to planeta, z własnym ludem, grawitacją, powietrzem i masą.",3037
"planet.back": "Wstecz",3063
"planet.back": "Wstecz",3038
"planet.customBadge": "Twoja",3064
"planet.customBadge": "Twoja",3039
"stats.powerLabel": "Moc",3065
"stats.powerLabel": "Moc",@@ -3068,7 +3094,7 @@ var I18N_CATALOG = {3068
"online.you": "ty",3094
"online.you": "ty",3069
"designer.title": "Kreator planet",3095
"designer.title": "Kreator planet",3070
"designer.taglineBefore": "Suma:",3096
"designer.taglineBefore": "Suma:",3071
"designer.taglineAfter": "pkt. Odblokowujesz klocki, zdobywając punkty — nie wydajesz ich.",3097
"designer.taglineAfter": "pkt.",3072
"designer.empty": "Nie masz jeszcze własnych planet. Utwórz jedną.",3098
"designer.empty": "Nie masz jeszcze własnych planet. Utwórz jedną.",3073
"designer.new": "Nowa planeta",3099
"designer.new": "Nowa planeta",3074
"designer.editTitle": "Edytuj planetę",3100
"designer.editTitle": "Edytuj planetę",@@ -3099,19 +3125,16 @@ var I18N_CATALOG = {3099
"designer.defaultPeople": "Lud",3125
"designer.defaultPeople": "Lud",3100
"hud.points": "Punkty",3126
"hud.points": "Punkty",3101
"hud.round": "Runda {n}",3127
"hud.round": "Runda {n}",3102
"hud.skill": "Umiejętność {n}%",3103
"hud.out": "Poza",3128
"hud.out": "Poza",3104
"hud.miniPoints": "Punkty {n}",3129
"hud.miniPoints": "Punkty {n}",3105
"hud.opponent.one": "przeciwnik",3130
"hud.opponent.one": "przeciwnik",3106
"hud.opponent.few": "przeciwników",3131
"hud.opponent.few": "przeciwników",3107
"hud.opponent.many": "przeciwników",3132
"hud.opponent.many": "przeciwników",3108
"hud.opponent.other": "przeciwników",3133
"hud.opponent.other": "przeciwników",3109
"hud.opponentsLine": "{n} {word}",3110
"offline.resultTitle": "Walka offline",3134
"offline.resultTitle": "Walka offline",3111
"offline.reachedBefore": "Dotarłeś do rundy",3135
"offline.reachedBefore": "Dotarłeś do rundy",3112
"offline.reachedAfter": ".",3136
"offline.reachedAfter": ".",3113
"offline.reached": "Dotarłeś do rundy {n}.",3137
"offline.reached": "Dotarłeś do rundy {n}.",3114
"offline.detail": "Grałeś przeciwko {n} {opponents} przy umiejętności {skill}%.",3115
"offline.backMenu": "Powrót do menu",3138
"offline.backMenu": "Powrót do menu",3116
"gameover.title": "Przegrałeś",3139
"gameover.title": "Przegrałeś",3117
"gameover.detail": "Wszystkie kolumny są zablokowane.",3140
"gameover.detail": "Wszystkie kolumny są zablokowane.",@@ -3300,10 +3323,18 @@ var I18N_CATALOG = {3300
"reward.won": "Wygrana!",3323
"reward.won": "Wygrana!",3301
"reward.lost": "Przegrana...",3324
"reward.lost": "Przegrana...",3302
"reward.total": "Suma punktów",3325
"reward.total": "Suma punktów",3303
"reward.continue": "Dotknij, aby kontynuować"3326
"reward.continue": "Dotknij, aby kontynuować",3327
"game.menu": "Menu",3328
"game.paused": "Pauza",3329
"game.resume": "Wznów",3330
"game.backToMenu": "Powrót do menu głównego",3331
"reward.ended": "Gra zakończona",3332
"offline.defeated.one": "{n} pokonany przeciwnik",3333
"offline.defeated.few": "{n} pokonanych przeciwników",3334
"offline.defeated.many": "{n} pokonanych przeciwników",3335
"offline.defeated.other": "{n} pokonanych przeciwników"3304
},3336
},3305
"ru": {3337
"ru": {3306
"menu.tagline": "Три в ряд — и твои блоки получают ракетные двигатели.",3307
"menu.play": "Играть",3338
"menu.play": "Играть",3308
"menu.offline": "Офлайн-бой",3339
"menu.offline": "Офлайн-бой",3309
"menu.online": "Играть онлайн",3340
"menu.online": "Играть онлайн",@@ -3318,7 +3349,6 @@ var I18N_CATALOG = {3318
"menu.logout": "Выйти",3349
"menu.logout": "Выйти",3319
"menu.player": "игрок",3350
"menu.player": "игрок",3320
"planet.title": "Выбери поле",3351
"planet.title": "Выбери поле",3321
"planet.tagline": "Каждое поле — это планета со своим народом, гравитацией, воздухом и массой.",3322
"planet.back": "Назад",3352
"planet.back": "Назад",3323
"planet.customBadge": "Своя",3353
"planet.customBadge": "Своя",3324
"stats.powerLabel": "Мощность",3354
"stats.powerLabel": "Мощность",@@ -3353,7 +3383,7 @@ var I18N_CATALOG = {3353
"online.you": "ты",3383
"online.you": "ты",3354
"designer.title": "Конструктор планет",3384
"designer.title": "Конструктор планет",3355
"designer.taglineBefore": "Всего:",3385
"designer.taglineBefore": "Всего:",3356
"designer.taglineAfter": "очков. Блоки открываются за заработанные очки — тратить их не нужно.",3386
"designer.taglineAfter": "очков.",3357
"designer.empty": "У тебя ещё нет своих планет. Создай одну.",3387
"designer.empty": "У тебя ещё нет своих планет. Создай одну.",3358
"designer.new": "Новая планета",3388
"designer.new": "Новая планета",3359
"designer.editTitle": "Изменить планету",3389
"designer.editTitle": "Изменить планету",@@ -3384,19 +3414,16 @@ var I18N_CATALOG = {3384
"designer.defaultPeople": "Народ",3414
"designer.defaultPeople": "Народ",3385
"hud.points": "Очки",3415
"hud.points": "Очки",3386
"hud.round": "Раунд {n}",3416
"hud.round": "Раунд {n}",3387
"hud.skill": "Мастерство {n} %",3388
"hud.out": "Вне",3417
"hud.out": "Вне",3389
"hud.miniPoints": "Очки {n}",3418
"hud.miniPoints": "Очки {n}",3390
"hud.opponent.one": "противник",3419
"hud.opponent.one": "противник",3391
"hud.opponent.few": "противника",3420
"hud.opponent.few": "противника",3392
"hud.opponent.many": "противников",3421
"hud.opponent.many": "противников",3393
"hud.opponent.other": "противников",3422
"hud.opponent.other": "противников",3394
"hud.opponentsLine": "{n} {word}",3395
"offline.resultTitle": "Офлайн-бой",3423
"offline.resultTitle": "Офлайн-бой",3396
"offline.reachedBefore": "Ты дошёл до раунда",3424
"offline.reachedBefore": "Ты дошёл до раунда",3397
"offline.reachedAfter": ".",3425
"offline.reachedAfter": ".",3398
"offline.reached": "Ты дошёл до раунда {n}.",3426
"offline.reached": "Ты дошёл до раунда {n}.",3399
"offline.detail": "Ты играл против {n} {opponents} с мастерством {skill} %.",3400
"offline.backMenu": "Вернуться в меню",3427
"offline.backMenu": "Вернуться в меню",3401
"gameover.title": "Ты проиграл",3428
"gameover.title": "Ты проиграл",3402
"gameover.detail": "Все столбцы заблокированы.",3429
"gameover.detail": "Все столбцы заблокированы.",@@ -3585,10 +3612,18 @@ var I18N_CATALOG = {3585
"reward.won": "Победа!",3612
"reward.won": "Победа!",3586
"reward.lost": "Поражение...",3613
"reward.lost": "Поражение...",3587
"reward.total": "Всего очков",3614
"reward.total": "Всего очков",3588
"reward.continue": "Нажмите, чтобы продолжить"3615
"reward.continue": "Нажмите, чтобы продолжить",3616
"game.menu": "Меню",3617
"game.paused": "Пауза",3618
"game.resume": "Продолжить",3619
"game.backToMenu": "В главное меню",3620
"reward.ended": "Игра окончена",3621
"offline.defeated.one": "{n} противник побеждён",3622
"offline.defeated.few": "{n} противника побеждено",3623
"offline.defeated.many": "{n} противников побеждено",3624
"offline.defeated.other": "{n} противников побеждено"3589
},3625
},3590
"es": {3626
"es": {3591
"menu.tagline": "Tres en raya, y tus bloques ganan motores cohete.",3592
"menu.play": "Jugar",3627
"menu.play": "Jugar",3593
"menu.offline": "Combate sin conexión",3628
"menu.offline": "Combate sin conexión",3594
"menu.online": "Jugar en línea",3629
"menu.online": "Jugar en línea",@@ -3603,7 +3638,6 @@ var I18N_CATALOG = {3603
"menu.logout": "Cerrar sesión",3638
"menu.logout": "Cerrar sesión",3604
"menu.player": "jugador",3639
"menu.player": "jugador",3605
"planet.title": "Elige un campo",3640
"planet.title": "Elige un campo",3606
"planet.tagline": "Cada campo es un planeta, con su pueblo, gravedad, aire y masa.",3607
"planet.back": "Volver",3641
"planet.back": "Volver",3608
"planet.customBadge": "Tuya",3642
"planet.customBadge": "Tuya",3609
"stats.powerLabel": "Potencia",3643
"stats.powerLabel": "Potencia",@@ -3638,7 +3672,7 @@ var I18N_CATALOG = {3638
"online.you": "tú",3672
"online.you": "tú",3639
"designer.title": "Diseñador de planetas",3673
"designer.title": "Diseñador de planetas",3640
"designer.taglineBefore": "Total:",3674
"designer.taglineBefore": "Total:",3641
"designer.taglineAfter": "puntos. Desbloqueas bloques al ganar puntos; no los gastas.",3675
"designer.taglineAfter": "puntos.",3642
"designer.empty": "Aún no tienes planetas propios. Crea uno.",3676
"designer.empty": "Aún no tienes planetas propios. Crea uno.",3643
"designer.new": "Nuevo planeta",3677
"designer.new": "Nuevo planeta",3644
"designer.editTitle": "Editar planeta",3678
"designer.editTitle": "Editar planeta",@@ -3669,19 +3703,16 @@ var I18N_CATALOG = {3669
"designer.defaultPeople": "Pueblo",3703
"designer.defaultPeople": "Pueblo",3670
"hud.points": "Puntos",3704
"hud.points": "Puntos",3671
"hud.round": "Ronda {n}",3705
"hud.round": "Ronda {n}",3672
"hud.skill": "Nivel {n} %",3673
"hud.out": "Fuera",3706
"hud.out": "Fuera",3674
"hud.miniPoints": "Puntos {n}",3707
"hud.miniPoints": "Puntos {n}",3675
"hud.opponent.one": "rival",3708
"hud.opponent.one": "rival",3676
"hud.opponent.few": "rivales",3709
"hud.opponent.few": "rivales",3677
"hud.opponent.many": "rivales",3710
"hud.opponent.many": "rivales",3678
"hud.opponent.other": "rivales",3711
"hud.opponent.other": "rivales",3679
"hud.opponentsLine": "{n} {word}",3680
"offline.resultTitle": "Combate sin conexión",3712
"offline.resultTitle": "Combate sin conexión",3681
"offline.reachedBefore": "Has llegado a la ronda",3713
"offline.reachedBefore": "Has llegado a la ronda",3682
"offline.reachedAfter": ".",3714
"offline.reachedAfter": ".",3683
"offline.reached": "Has llegado a la ronda {n}.",3715
"offline.reached": "Has llegado a la ronda {n}.",3684
"offline.detail": "Jugaste contra {n} {opponents} con un nivel del {skill} %.",3685
"offline.backMenu": "Volver al menú",3716
"offline.backMenu": "Volver al menú",3686
"gameover.title": "Has perdido",3717
"gameover.title": "Has perdido",3687
"gameover.detail": "Todas las columnas están bloqueadas.",3718
"gameover.detail": "Todas las columnas están bloqueadas.",@@ -3870,7 +3901,16 @@ var I18N_CATALOG = {3870
"reward.won": "¡Has ganado!",3901
"reward.won": "¡Has ganado!",3871
"reward.lost": "Has perdido...",3902
"reward.lost": "Has perdido...",3872
"reward.total": "Puntos totales",3903
"reward.total": "Puntos totales",3873
"reward.continue": "Toca para continuar"3904
"reward.continue": "Toca para continuar",3905
"game.menu": "Menú",3906
"game.paused": "En pausa",3907
"game.resume": "Continuar",3908
"game.backToMenu": "Volver al menú principal",3909
"reward.ended": "Partida terminada",3910
"offline.defeated.one": "{n} rival derrotado",3911
"offline.defeated.few": "{n} rivales derrotados",3912
"offline.defeated.many": "{n} rivales derrotados",3913
"offline.defeated.other": "{n} rivales derrotados"3874
}3914
}3875
},3915
},3876
"errors": {3916
"errors": {@@ -5173,6 +5213,9 @@ function GameCore (planet, rng)5173
this.spawnInterval = PlanetMod.SPAWN_INTERVAL;5213
this.spawnInterval = PlanetMod.SPAWN_INTERVAL;5174
/** Seconds of actual play in this match / round (t1189). */5214
/** Seconds of actual play in this match / round (t1189). */5175
this.playTime = 0;5215
this.playTime = 0;5216
/** t1197: matches in the current combo and seconds since the last one. */5217
this.combo = 0;5218
this.comboAge = 0;5176
this.settleTime = PlanetMod.SETTLE_TIME;5219
this.settleTime = PlanetMod.SETTLE_TIME;5177
this.score = 0;5220
this.score = 0;5178
this.state = 'playing';5221
this.state = 'playing';@@ -5211,6 +5254,10 @@ GameCore.SWAP_DISTANCE = SWAP_DISTANCE;5211
GameCore.SNAP_Y = SNAP_Y;5254
GameCore.SNAP_Y = SNAP_Y;5212
GameCore.HORIZONTAL_SLOP = HORIZONTAL_SLOP;5255
GameCore.HORIZONTAL_SLOP = HORIZONTAL_SLOP;5213
GameCore.LANDING_CHAIN_BONUS = LANDING_CHAIN_BONUS;5256
GameCore.LANDING_CHAIN_BONUS = LANDING_CHAIN_BONUS;5257
/** t1197: each match in a combo adds this much jump height (additive). */5258
GameCore.COMBO_STEP = 0.05;5259
/** t1197: the combo resets when no match is made for this long (s). */5260
GameCore.COMBO_RESET_S = 5;5214
GameCore.COLUMN_WARN_ROWS = COLUMN_WARN_ROWS;5261
GameCore.COLUMN_WARN_ROWS = COLUMN_WARN_ROWS;5215
GameCore.DEFAULT_MISS_CHANCE = 0.30;5262
GameCore.DEFAULT_MISS_CHANCE = 0.30;5216
GameCore.STATE_STILL = STATE_STILL;5263
GameCore.STATE_STILL = STATE_STILL;@@ -5688,6 +5735,14 @@ GameCore.prototype.tick = function (dt)5688
// t1192: waiting received blocks drop first, as soon as there is room.5735
// t1192: waiting received blocks drop first, as soon as there is room.5689
if (this.garbageQueue.length)5736
if (this.garbageQueue.length)5690
{ this.drainGarbageQueue(); }5737
{ this.drainGarbageQueue(); }5738
// t1197: combo expires after COMBO_RESET_S without a match.5739
this.comboAge += dt;5740
if (this.combo > 0 && this.comboAge >= GameCore.COMBO_RESET_S)5741
{5742
this.combo = 0;5743
if (!this.hasActiveLandingChain())5744
{ this.lastChainIndicator = null; }5745
}5691
this.spawnTimer += dt;5746
this.spawnTimer += dt;5692
var iv = this.currentSpawnInterval();5747
var iv = this.currentSpawnInterval();5693
while (this.spawnTimer >= iv)5748
while (this.spawnTimer >= iv)@@ -7723,15 +7778,21 @@ GameCore.prototype.resolveMatches = function ()7723
}7778
}7724
}7779
}7725
var chain = this.landingChainFor(group);7780
var chain = this.landingChainFor(group);7726
var bonusMul = 1 + LANDING_CHAIN_BONUS * chain;7781
// t1197: combo bonus = COMBO_STEP per earlier match in this combo,7782
// added to the landing-chain bonus (one shown "+x%").7783
var comboBonus = GameCore.COMBO_STEP * this.combo;7784
var bonusMul = 1 + LANDING_CHAIN_BONUS * chain + comboBonus;7727
height *= bonusMul;7785
height *= bonusMul;7728
this.launchCluster(group, height, { landingChain: chain });7786
this.launchCluster(group, height, { landingChain: chain });7729
launched.push({7787
launched.push({7730
blocks: group,7788
blocks: group,7731
jumpHeight: height,7789
jumpHeight: height,7732
landingChain: chain,7790
landingChain: chain,7791
comboBonus: comboBonus,7733
chainBonus: bonusMul7792
chainBonus: bonusMul7734
});7793
});7794
this.combo += 1;7795
this.comboAge = 0;7735
}7796
}7736
this.finishLandingChains(launched);7797
this.finishLandingChains(launched);7737
this.updateChainIndicator(launched);7798
this.updateChainIndicator(launched);@@ -8253,24 +8314,35 @@ GameCore.prototype.finishLandingChains = function (launched)8253
GameCore.prototype.updateChainIndicator = function (launched)8314
GameCore.prototype.updateChainIndicator = function (launched)8254
{8315
{8255
var maxChain = 0;8316
var maxChain = 0;8317
var maxPct = 0;8256
for (var i = 0; i < launched.length; i++)8318
for (var i = 0; i < launched.length; i++)8257
{8319
{8258
var ch = launched[i].landingChain || 0;8320
var ch = launched[i].landingChain || 0;8259
if (ch > maxChain)8321
if (ch > maxChain)8260
{ maxChain = ch; }8322
{ maxChain = ch; }8323
var pct = Math.round(((launched[i].chainBonus || 1) - 1) * 100);8324
if (pct > maxPct)8325
{ maxPct = pct; }8261
}8326
}8262
if (maxChain >= 1)8327
if (maxPct > 0)8263
{8328
{8264
this.lastChainIndicator = {8329
this.lastChainIndicator = {8265
chain: maxChain,8330
chain: maxChain,8266
bonusPct: Math.round(maxChain * LANDING_CHAIN_BONUS * 100)8331
combo: this.combo,8332
bonusPct: maxPct8267
};8333
};8268
return;8334
return;8269
}8335
}8270
if (!this.hasActiveLandingChain())8336
if (!this.hasActiveLandingChain() && !(launched.length && this.combo > 0))8271
{ this.lastChainIndicator = null; }8337
{ this.lastChainIndicator = null; }8272
};8338
};8273
8339
8340
/** Bonus (percent) the next match would get from the combo alone (t1197). */8341
GameCore.prototype.comboBonusPct = function ()8342
{8343
return Math.round(GameCore.COMBO_STEP * this.combo * 100);8344
};8345
8274
GameCore.prototype.hasActiveLandingChain = function ()8346
GameCore.prototype.hasActiveLandingChain = function ()8275
{8347
{8276
var ids = Object.keys(this.clusters);8348
var ids = Object.keys(this.clusters);@@ -9214,6 +9286,8 @@ Online._apply = function (data)9214
{ this.lifetimePoints = data.lifetime_points; }9286
{ this.lifetimePoints = data.lifetime_points; }9215
if (data.locale !== undefined)9287
if (data.locale !== undefined)9216
{ this.locale = data.locale; }9288
{ this.locale = data.locale; }9289
if (data.last_planet !== undefined)9290
{ this.lastPlanet = data.last_planet; }9217
if (data.blocks)9291
if (data.blocks)9218
{ this.blocks = data.blocks; }9292
{ this.blocks = data.blocks; }9219
if (data.planets)9293
if (data.planets)@@ -9321,6 +9395,13 @@ Online.deletePlanet = function (id)9321
return this.request('planet_delete', { id: id });9395
return this.request('planet_delete', { id: id });9322
};9396
};9323
9397
9398
/** Remember the last chosen planet on the profile (t1196). */9399
Online.setLastPlanet = function (planetId)9400
{9401
this.lastPlanet = planetId;9402
return this.request('set_last_planet', { planet_id: planetId });9403
};9404
9324
Online.setLocale = function (locale)9405
Online.setLocale = function (locale)9325
{9406
{9326
return this.request('set_locale', { locale: locale });9407
return this.request('set_locale', { locale: locale });@@ -9499,9 +9580,10 @@ Online.stopPolling = function ()9499
}9580
}9500
};9581
};9501
9582
9583
/** Login from the Online screen: come back to online play (t1193). */9502
Online.loginUrl = function ()9584
Online.loginUrl = function ()9503
{9585
{9504
return 'auth.php';9586
return 'auth.php?return=online';9505
};9587
};9506
9588
9507
Online.logoutUrl = function ()9589
Online.logoutUrl = function ()@@ -11795,9 +11877,21 @@ function OfflineBattle (opts)11795
this.shotLocals = [];11877
this.shotLocals = [];11796
this.bots = [];11878
this.bots = [];11797
this.playerId = 'player';11879
this.playerId = 'player';11880
/** Opponents knocked out over all rounds of this battle (t1198). */11881
this.defeated = 0;11798
this._initBots();11882
this._initBots();11799
}11883
}11800
11884
11885
/** Mark a bot as out once; counts towards `defeated` (t1198). */11886
OfflineBattle.prototype._eliminate = function (bot)11887
{11888
if (bot.eliminated)11889
{ return; }11890
bot.eliminated = true;11891
bot.score = bot.core ? bot.core.score : bot.score;11892
this.defeated += 1;11893
};11894
11801
OfflineBattle.prototype._initBots = function ()11895
OfflineBattle.prototype._initBots = function ()11802
{11896
{11803
var P = PlanetMod();11897
var P = PlanetMod();@@ -11955,8 +12049,7 @@ OfflineBattle.prototype.tick = function (dt, playerCore)11955
{ continue; }12049
{ continue; }11956
if (bot.core.state === 'gameover')12050
if (bot.core.state === 'gameover')11957
{12051
{11958
bot.eliminated = true;12052
this._eliminate(bot);11959
bot.score = bot.core.score;11960
continue;12053
continue;11961
}12054
}11962
bot.core.tick(dt);12055
bot.core.tick(dt);@@ -11983,10 +12076,7 @@ OfflineBattle.prototype.tick = function (dt, playerCore)11983
for (var i = 0; i < this.bots.length; i++)12076
for (var i = 0; i < this.bots.length; i++)11984
{12077
{11985
if (this.bots[i].core && this.bots[i].core.state === 'gameover')12078
if (this.bots[i].core && this.bots[i].core.state === 'gameover')11986
{12079
{ this._eliminate(this.bots[i]); }11987
this.bots[i].eliminated = true;11988
this.bots[i].score = this.bots[i].core.score;11989
}11990
}12080
}11991
12081
11992
if (playerCore && playerCore.state === 'gameover')12082
if (playerCore && playerCore.state === 'gameover')@@ -12077,10 +12167,15 @@ if (typeof module !== 'undefined' && module.exports && typeof Offline !== 'undef12077
* planet arc from the top of the screen into a counter at the bottom12167
* planet arc from the top of the screen into a counter at the bottom12078
* centre, one block per newly earned point. Each arrival adds 1.12168
* centre, one block per newly earned point. Each arrival adds 1.12079
*12169
*12080
* Spawn rate accelerates: rate(t) = RATE0 + ACCEL·t blocks/s, so the12170
* Spawn rate (t1194): starts at RATE0 = 3 blocks/s and accelerates12081
* number spawned after t seconds is N(t) = RATE0·t + ACCEL·t²/2, and12171
* linearly, rate(t) = RATE0 + a·t, with `a` chosen per reward so the last12082
* block i (0-based) leaves at T(i) = the t where N(t) = i.12172
* block always leaves at SPAWN_END = 4 s, whatever the point count.12083
* t1178: RATE0 = 15, ACCEL = 10 → 253 points ≈ 5.8 s, 800 ≈ 11.2 s, 2000 ≈ 18.6 s.12173
* Blocks spawned after t seconds: N(t) = RATE0·t + a·t²/2; block i12174
* (0-based) leaves at T(i) = the t where N(t) = i. The last block is12175
* i = n − 1, so N(4) = n − 1 → a = 2·((n − 1) − RATE0·T) / T².12176
* If n − 1 ≤ RATE0·T (n ≤ 13) a would be ≤ 0: then a constant rate12177
* (n − 1) / T is used (a = 0), so it still ends at 4 s (1 point: one12178
* block at t = 0).12084
*12179
*12085
* The pure timing / sequencing part (Reward.spawnTime, Reward.createSequence)12180
* The pure timing / sequencing part (Reward.spawnTime, Reward.createSequence)12086
* has no DOM and is unit-tested. Reward.play wires it to an overlay.12181
* has no DOM and is unit-tested. Reward.play wires it to an overlay.@@ -12089,10 +12184,10 @@ if (typeof module !== 'undefined' && module.exports && typeof Offline !== 'undef12089
{12184
{12090
'use strict';12185
'use strict';12091
12186
12092
/** Blocks per second at t = 0 (t1177: 10, t1178: 15). */12187
/** Blocks per second at t = 0 (t1177: 10, t1178: 15, t1194: 3). */12093
var RATE0 = 15;12188
var RATE0 = 3;12094
/** Rate increase in blocks/s per second (t1175: 3, t1177: 5, t1178: 10). */12189
/** Seconds after the first block when the last block leaves (t1194). */12095
var ACCEL = 10;12190
var SPAWN_END = 4;12096
var INTRO = 1.0; // centred title before it rises12191
var INTRO = 1.0; // centred title before it rises12097
var RISE = 0.6; // title tween to the top12192
var RISE = 0.6; // title tween to the top12098
var FLIGHT = 0.7; // one block's arc duration12193
var FLIGHT = 0.7; // one block's arc duration@@ -12100,14 +12195,28 @@ var HOLD = 1.5; // final total shown before continuing12100
var HOLD_ZERO = 1.5; // earned 0: show the number briefly12195
var HOLD_ZERO = 1.5; // earned 0: show the number briefly12101
var WAIT_MAX = 8; // give up waiting for the server after this12196
var WAIT_MAX = 8; // give up waiting for the server after this12102
12197
12103
/** Seconds after the start of counting when block i (0-based) leaves. */12198
/**12104
function spawnTime (i)12199
* Spawn parameters for a reward of n blocks (t1194): { r0, a } with12200
* rate(t) = r0 + a·t and the last block (i = n − 1) leaving at SPAWN_END.12201
*/12202
function spawnParams (n)12203
{12204
var T = SPAWN_END;12205
var last = Math.max(0, (n | 0) - 1);12206
if (last <= RATE0 * T)12207
{ return { r0: last / T, a: 0 }; }12208
return { r0: RATE0, a: 2 * (last - RATE0 * T) / (T * T) };12209
}12210
12211
/** Seconds after the start of counting when block i (0-based) of n leaves. */12212
function spawnTime (i, n)12105
{12213
{12106
if (!(i > 0))12214
if (!(i > 0))12107
{ return 0; }12215
{ return 0; }12108
if (ACCEL === 0)12216
var p = spawnParams(n == null ? i + 1 : n);12109
{ return i / RATE0; }12217
if (p.a === 0)12110
return (-RATE0 + Math.sqrt(RATE0 * RATE0 + 2 * ACCEL * i)) / ACCEL;12218
{ return p.r0 > 0 ? i / p.r0 : 0; }12219
return (-p.r0 + Math.sqrt(p.r0 * p.r0 + 2 * p.a * i)) / p.a;12111
}12220
}12112
12221
12113
/** Blocks spawned (left the top) by time t, capped at n. */12222
/** Blocks spawned (left the top) by time t, capped at n. */@@ -12115,8 +12224,9 @@ function spawnedBy (t, n)12115
{12224
{12116
if (!(t >= 0) || !(n > 0))12225
if (!(t >= 0) || !(n > 0))12117
{ return 0; }12226
{ return 0; }12227
var p = spawnParams(n);12118
// Block i has left when T(i) <= t, i.e. i <= N(t).12228
// Block i has left when T(i) <= t, i.e. i <= N(t).12119
var k = Math.floor(RATE0 * t + ACCEL * t * t / 2 + 1e-9) + 1;12229
var k = Math.floor(p.r0 * t + p.a * t * t / 2 + 1e-9) + 1;12120
return Math.min(n, Math.max(0, k));12230
return Math.min(n, Math.max(0, k));12121
}12231
}12122
12232
@@ -12133,7 +12243,7 @@ function countDuration (n, flight)12133
flight = flight == null ? FLIGHT : flight;12243
flight = flight == null ? FLIGHT : flight;12134
if (!(n > 0))12244
if (!(n > 0))12135
{ return 0; }12245
{ return 0; }12136
return spawnTime(n - 1) + flight;12246
return spawnTime(n - 1, n) + flight;12137
}12247
}12138
12248
12139
/**12249
/**@@ -12365,8 +12475,9 @@ function play (opts)12365
var W = 0;12475
var W = 0;12366
var H = 0;12476
var H = 0;12367
12477
12368
title.textContent = opts.won ? tr('reward.won', 'You won!') : tr('reward.lost', 'You lost...');12478
// t1193: quitting via the in-game menu shows a neutral title.12369
title.className = 'reward-title' + (opts.won ? ' won' : ' lost');12479
title.textContent = opts.title ? String(opts.title) : (opts.won ? tr('reward.won', 'You won!') : tr('reward.lost', 'You lost...'));12480
title.className = 'reward-title' + (opts.title ? ' ended' : (opts.won ? ' won' : ' lost'));12370
if (label)12481
if (label)12371
{ label.textContent = tr('reward.total', 'Total points'); }12482
{ label.textContent = tr('reward.total', 'Total points'); }12372
counter.textContent = '';12483
counter.textContent = '';@@ -12552,7 +12663,8 @@ function play (opts)12552
12663
12553
var Reward = {12664
var Reward = {12554
RATE0: RATE0,12665
RATE0: RATE0,12555
ACCEL: ACCEL,12666
SPAWN_END: SPAWN_END,12667
spawnParams: spawnParams,12556
INTRO: INTRO,12668
INTRO: INTRO,12557
RISE: RISE,12669
RISE: RISE,12558
FLIGHT: FLIGHT,12670
FLIGHT: FLIGHT,@@ -13236,6 +13348,7 @@ window.onload = function ()13236
app.debugPhysics = isPhysicsDebugEnabled();13348
app.debugPhysics = isPhysicsDebugEnabled();13237
var play = document.getElementById('btn-play');13349
var play = document.getElementById('btn-play');13238
play.addEventListener('click', onPlay);13350
play.addEventListener('click', onPlay);13351
bindGameMenu();13239
play.addEventListener('pointerup', function (e)13352
play.addEventListener('pointerup', function (e)13240
{13353
{13241
// A touch-friendly path: some mobile browsers swallow the click13354
// A touch-friendly path: some mobile browsers swallow the click@@ -13366,6 +13479,7 @@ function startPlay (opts)13366
{ bindPointer(app.scene.canvas); }13479
{ bindPointer(app.scene.canvas); }13367
refreshHud();13480
refreshHud();13368
showEl('hud');13481
showEl('hud');13482
setGameMenuButton(!app.online && !app.spectating);13369
}13483
}13370
catch (err)13484
catch (err)13371
{13485
{@@ -13465,6 +13579,10 @@ function teardownPlay ()13465
app.columnWarn = [];13579
app.columnWarn = [];13466
app.pointerId = null;13580
app.pointerId = null;13467
app.gameOverShown = false;13581
app.gameOverShown = false;13582
app.paused = false;13583
app.quitting = false;13584
hideEl('game-menu');13585
setGameMenuButton(false);13468
hideEl('hud');13586
hideEl('hud');13469
hideEl('game-over');13587
hideEl('game-over');13470
hideEl('spectator');13588
hideEl('spectator');@@ -14032,6 +14150,14 @@ function tickView (dt)14032
placeTile(app.cells[i], col, row);14150
placeTile(app.cells[i], col, row);14033
}14151
}14034
14152
14153
// t1193: in-game menu open (Spelen / Offline Strijd) or quitting:14154
// the field, bots and timers stand still; only the view is kept.14155
if (app.paused)14156
{14157
syncSprites(0);14158
return;14159
}14160
14035
app.core.tick(dt);14161
app.core.tick(dt);14036
if (app.offline && app.battle)14162
if (app.offline && app.battle)14037
{ tickOffline(dt); }14163
{ tickOffline(dt); }@@ -14233,7 +14359,16 @@ function fieldFromEvent (e)14233
14359
14234
function playingForDrag ()14360
function playingForDrag ()14235
{14361
{14236
return app.core && app.core.state === 'playing';14362
return app.core && app.core.state === 'playing' && !app.paused;14363
}14364
14365
/** Touches on HUD buttons / menus are UI taps, not field drags (t1193). */14366
function isUiTouchTarget (e)14367
{14368
var el = e && e.target;14369
if (!el || !el.closest)14370
{ return false; }14371
return !!el.closest('button, a, input, select, #game-menu, #reward');14237
}14372
}14238
14373
14239
function startDragFromEvent (e)14374
function startDragFromEvent (e)@@ -14383,6 +14518,8 @@ function onTouchStart (e)14383
{14518
{14384
if (!playingForDrag())14519
if (!playingForDrag())14385
{ return; }14520
{ return; }14521
if (app.activeTouchId == null && isUiTouchTarget(e))14522
{ return; }14386
if (app.activeTouchId != null)14523
if (app.activeTouchId != null)14387
{14524
{14388
if (e.preventDefault)14525
if (e.preventDefault)@@ -14708,31 +14845,20 @@ function showOfflineResult ()14708
app.offlineResultShown = true;14845
app.offlineResultShown = true;14709
var battle = app.battle;14846
var battle = app.battle;14710
var reached = document.getElementById('offline-reached');14847
var reached = document.getElementById('offline-reached');14711
var sch = battle.schedule;14712
var n = sch.opponents;14713
var skill = Math.round(sch.skill * 100);14714
var line = document.getElementById('offline-reached-line');14848
var line = document.getElementById('offline-reached-line');14715
if (line && typeof I18n !== 'undefined')14849
if (line && typeof I18n !== 'undefined')14716
{ line.textContent = I18n.t('offline.reached', { n: battle.round }); }14850
{ line.textContent = I18n.t('offline.reached', { n: battle.round }); }14717
else if (reached)14851
else if (reached)14718
{ reached.textContent = String(battle.round); }14852
{ reached.textContent = String(battle.round); }14853
// t1198: "X opponents defeated" over all rounds (replaces the14854
// opponents / skill line).14719
var detail = document.getElementById('offline-result-detail');14855
var detail = document.getElementById('offline-result-detail');14720
if (detail)14856
if (detail)14721
{14857
{14722
if (typeof I18n !== 'undefined')14858
var beaten = battle.defeated || 0;14723
{14859
detail.textContent = (typeof I18n !== 'undefined')14724
detail.textContent = I18n.t('offline.detail', {14860
? I18n.plural('offline.defeated', beaten, { n: beaten })14725
n: n,14861
: beaten + (beaten === 1 ? ' opponent defeated' : ' opponents defeated');14726
opponents: I18n.plural('hud.opponent', n),14727
skill: skill14728
});14729
}14730
else14731
{14732
var noun = n === 1 ? 'opponent' : 'opponents';14733
detail.textContent = 'You played against ' + n + ' ' + noun14734
+ ' at skill ' + skill + '%.';14735
}14736
}14862
}14737
hideEl('game-over');14863
hideEl('game-over');14738
showEl('offline-result');14864
showEl('offline-result');@@ -14750,34 +14876,11 @@ function refreshOfflineHud ()14750
return;14876
return;14751
}14877
}14752
el.hidden = false;14878
el.hidden = false;14879
// t1195: the Offline Strijd HUD shows only "Round N".14753
var sch = app.battle.schedule;14880
var sch = app.battle.schedule;14754
var n = sch.opponents;14755
var r = document.getElementById('offline-round');14881
var r = document.getElementById('offline-round');14756
var o = document.getElementById('offline-opponents');14882
if (r)14757
var s = document.getElementById('offline-skill');14883
{ r.textContent = (typeof I18n !== 'undefined') ? I18n.t('hud.round', { n: sch.round }) : 'Round ' + sch.round; }14758
if (typeof I18n !== 'undefined')14759
{14760
if (r)14761
{ r.textContent = I18n.t('hud.round', { n: sch.round }); }14762
if (o)14763
{14764
o.textContent = I18n.t('hud.opponentsLine', {14765
n: n, word: I18n.plural('hud.opponent', n)14766
});14767
}14768
if (s)14769
{ s.textContent = I18n.t('hud.skill', { n: Math.round(sch.skill * 100) }); }14770
}14771
else14772
{14773
var noun = n === 1 ? 'opponent' : 'opponents';14774
if (r)14775
{ r.textContent = 'Round ' + sch.round; }14776
if (o)14777
{ o.textContent = n + ' ' + noun; }14778
if (s)14779
{ s.textContent = 'Skill ' + Math.round(sch.skill * 100) + '%'; }14780
}14781
}14884
}14782
14885
14783
function hideOfflineHud ()14886
function hideOfflineHud ()@@ -14795,14 +14898,16 @@ function refreshChainIndicator ()14795
var info = app.core && app.core.lastChainIndicator;14898
var info = app.core && app.core.lastChainIndicator;14796
var active = app.core && app.core.hasActiveLandingChain14899
var active = app.core && app.core.hasActiveLandingChain14797
&& app.core.hasActiveLandingChain();14900
&& app.core.hasActiveLandingChain();14798
// Show only while a chained cluster is still in the air.14901
var comboOn = app.core && app.core.combo > 0;14799
if (!info || info.chain < 1 || app.mode !== 'playing' || !active)14902
// t1197: just "+x%" (landing chain + combo bonus of the last launch),14903
// while a boosted cluster flies or the combo is still alive.14904
if (!info || !(info.bonusPct > 0) || app.mode !== 'playing' || !(active || comboOn))14800
{14905
{14801
el.hidden = true;14906
el.hidden = true;14802
return;14907
return;14803
}14908
}14804
el.hidden = false;14909
el.hidden = false;14805
el.textContent = 'x' + info.chain + ' +' + info.bonusPct + '%';14910
el.textContent = '+' + info.bonusPct + '%';14806
}14911
}14807
14912
14808
function hideChainIndicator ()14913
function hideChainIndicator ()@@ -15281,7 +15386,17 @@ function bindOnlineUi ()15281
15386
15282
var params = new URLSearchParams(window.location.search);15387
var params = new URLSearchParams(window.location.search);15283
if (params.get('online') === '1' || params.get('auth') === 'unconfigured')15388
if (params.get('online') === '1' || params.get('auth') === 'unconfigured')15284
{ openOnlinePanel(); }15389
{15390
openOnlinePanel();15391
// t1193: one-shot; a reload must not jump to online play again.15392
try15393
{15394
params.delete('online');15395
var rest = params.toString();15396
window.history.replaceState(null, '', window.location.pathname + (rest ? '?' + rest : '') + window.location.hash);15397
}15398
catch (e) { /* ignore */ }15399
}15285
}15400
}15286
15401
15287
function openOnlinePanel ()15402
function openOnlinePanel ()@@ -15447,13 +15562,32 @@ function selectedPlanetId ()15447
return 'terra';15562
return 'terra';15448
}15563
}15449
15564
15565
/**15566
* Pre-select the last chosen planet (t1196): logged in the profile value15567
* (server), otherwise / as fallback localStorage, otherwise Terra. A15568
* deleted custom planet falls back to the default (setSelectedPlanet).15569
*/15450
function restoreSelectedPlanet ()15570
function restoreSelectedPlanet ()15451
{15571
{15452
var id = 'terra';15572
var id = null;15453
try15573
if (typeof Online !== 'undefined' && Online.me && Online.lastPlanet)15454
{ id = localStorage.getItem('meteors-planet') || 'terra'; }15574
{ id = Online.lastPlanet; }15455
catch (e) {}15575
if (!id)15456
setSelectedPlanet(id, true);15576
{15577
try15578
{ id = localStorage.getItem('meteors-planet'); }15579
catch (e) {}15580
}15581
setSelectedPlanet(id || 'terra', true);15582
}15583
15584
function rememberPlanetChoice (id)15585
{15586
if (typeof Online === 'undefined' || !Online.me || !Online.setLastPlanet)15587
{ return; }15588
if (Online.lastPlanet === id)15589
{ return; }15590
Promise.resolve(Online.setLastPlanet(id)).then(null, function () {});15457
}15591
}15458
15592
15459
function setSelectedPlanet (id, silent)15593
function setSelectedPlanet (id, silent)@@ -15473,6 +15607,7 @@ function setSelectedPlanet (id, silent)15473
catch (e) {}15607
catch (e) {}15474
if (!silent)15608
if (!silent)15475
{15609
{15610
rememberPlanetChoice(found.id);15476
var grid = document.getElementById('planet-grid');15611
var grid = document.getElementById('planet-grid');15477
if (grid && !grid.hidden && grid.children.length)15612
if (grid && !grid.hidden && grid.children.length)15478
{ renderPlanetGrid('planet-grid', false); }15613
{ renderPlanetGrid('planet-grid', false); }@@ -15633,6 +15768,102 @@ function refreshMenuAccount ()15633
{ localLogin.hidden = !(typeof Online !== 'undefined' && Online.local); }15768
{ localLogin.hidden = !(typeof Online !== 'undefined' && Online.local); }15634
}15769
}15635
15770
15771
/* ---------- t1193 in-game menu (Spelen / Offline Strijd) ----------- */15772
15773
function setGameMenuButton (show)15774
{15775
var btn = document.getElementById('btn-game-menu');15776
if (btn)15777
{ btn.hidden = !show; }15778
}15779
15780
/** The menu can open during a running solo / offline field only. */15781
function canOpenGameMenu ()15782
{15783
return app.mode === 'playing' && !!app.core && !app.online && !app.spectating15784
&& app.core.state === 'playing' && !app.rewardActive && !app.quitting15785
&& !(app.offline && app.battle && app.battle.state !== 'playing');15786
}15787
15788
function openGameMenu ()15789
{15790
if (!canOpenGameMenu())15791
{ return false; }15792
if (app.core.drag)15793
{ finishDrag({ noLaunch: true }); }15794
app.paused = true;15795
showEl('game-menu');15796
var resume = document.getElementById('btn-game-resume');15797
if (resume && resume.focus)15798
{ resume.focus(); }15799
return true;15800
}15801
15802
function resumeFromGameMenu ()15803
{15804
hideEl('game-menu');15805
if (!app.quitting)15806
{ app.paused = false; }15807
}15808
15809
/**15810
* "Back to main menu": ends the match now. Logged in, the points so far15811
* go through the normal play_finish + reward screen first (the server15812
* still applies its caps); logged out, straight to the menu. Offline15813
* Strijd ends the whole battle (no next round).15814
*/15815
function quitToMainMenu ()15816
{15817
if (!app.core || app.quitting)15818
{ return; }15819
hideEl('game-menu');15820
app.paused = true;15821
app.quitting = true;15822
app.gameOverShown = true;15823
app.lastScore = app.core.score || 0;15824
setGameMenuButton(false);15825
var score = app.lastScore;15826
var done = function ()15827
{15828
app.quitting = false;15829
app.paused = false;15830
returnToMenu();15831
};15832
if (rewardEnabled())15833
{15834
var title = (typeof I18n !== 'undefined') ? I18n.t('reward.ended') : 'Game ended';15835
showReward(false, finishPlaySession(score), done, title);15836
}15837
else15838
{15839
finishPlaySession(score);15840
done();15841
}15842
}15843
15844
function bindGameMenu ()15845
{15846
var btn = document.getElementById('btn-game-menu');15847
if (btn)15848
{ btn.addEventListener('click', function () { openGameMenu(); }); }15849
var resume = document.getElementById('btn-game-resume');15850
if (resume)15851
{ resume.addEventListener('click', resumeFromGameMenu); }15852
var quit = document.getElementById('btn-game-quit');15853
if (quit)15854
{ quit.addEventListener('click', quitToMainMenu); }15855
document.addEventListener('keydown', function (e)15856
{15857
if (e.key !== 'Escape')15858
{ return; }15859
var menu = document.getElementById('game-menu');15860
if (menu && !menu.hidden)15861
{ resumeFromGameMenu(); }15862
else15863
{ openGameMenu(); }15864
});15865
}15866
15636
function beginPlaySession (mode)15867
function beginPlaySession (mode)15637
{15868
{15638
if (app.playToken)15869
if (app.playToken)@@ -15688,7 +15919,7 @@ function rewardEnabled ()15688
* next() — the same destination the mode used before (menu, next15919
* next() — the same destination the mode used before (menu, next15689
* offline round, offline result, or the online lobby/podium).15920
* offline round, offline result, or the online lobby/podium).15690
*/15921
*/15691
function showReward (won, resultPromise, next)15922
function showReward (won, resultPromise, next, title)15692
{15923
{15693
app.rewardActive = true;15924
app.rewardActive = true;15694
hideEl('game-over');15925
hideEl('game-over');@@ -15696,6 +15927,7 @@ function showReward (won, resultPromise, next)15696
hideEl('podium');15927
hideEl('podium');15697
var handle = Reward.play({15928
var handle = Reward.play({15698
won: won,15929
won: won,15930
title: title || null,15699
planet: app.planet,15931
planet: app.planet,15700
result: resultPromise,15932
result: resultPromise,15701
onDone: function ()15933
onDone: function ()@@ -15706,7 +15938,12 @@ function showReward (won, resultPromise, next)15706
}15938
}15707
});15939
});15708
if (!handle)15940
if (!handle)15709
{ app.rewardActive = false; }15941
{15942
app.rewardActive = false;15943
// No reward overlay (e.g. missing DOM): still continue (t1193).15944
if (title && next)15945
{ next(); }15946
}15710
}15947
}15711
15948
15712
function myOnlinePlace (lobby)15949
function myOnlinePlace (lobby)@@ -608,10 +608,15 @@ a.button:is(:hover, :focus-visible) {
608
608
transform: translateX(-50%);
609
609
top: 100%;
610
610
margin-top: 4px;
611
color: #ffe27a;
612
font-weight: 700;
613
font-size: 14px;
614
text-shadow: 0 1px 4px #000;
611
/* t1197: plain "+x%", yellow with an orange stroke. */
612
color: #ffe600;
613
font-weight: 900;
614
font-size: 20px;
615
line-height: 1;
616
-webkit-text-stroke: 3px #ff7a00;
617
paint-order: stroke fill;
618
text-shadow: 0 2px 3px rgba(0, 0, 0, 0.45);
619
white-space: nowrap;
615
620
pointer-events: none;
616
621
z-index: 5;
617
622
}
@@ -608,10 +608,15 @@ a.button:is(:hover, :focus-visible) {608
transform: translateX(-50%);608
transform: translateX(-50%);609
top: 100%;609
top: 100%;610
margin-top: 4px;610
margin-top: 4px;611
color: #ffe27a;611
/* t1197: plain "+x%", yellow with an orange stroke. */612
font-weight: 700;612
color: #ffe600;613
font-size: 14px;613
font-weight: 900;614
text-shadow: 0 1px 4px #000;614
font-size: 20px;615
line-height: 1;616
-webkit-text-stroke: 3px #ff7a00;617
paint-order: stroke fill;618
text-shadow: 0 2px 3px rgba(0, 0, 0, 0.45);619
white-space: nowrap;615
pointer-events: none;620
pointer-events: none;616
z-index: 5;621
z-index: 5;617
}622
}@@ -1155,3 +1155,87 @@ Tests: `test/garbage-queue.test.js` (o.a. exact scenario: 5 tegelijk, 2
1155
1155
open kolommen → alle 5 landen; ook via offline bots);
1156
1156
`test/t1192-garbage-queue-playwright.py ROOT TAG` (twee browsers lokaal).
1157
1157
1158
1159
## t1193 — Menu tijdens het spel en login-redirect
1160
1161
**Login-redirect (oorzaak).** `callback.php` stuurde na elke geslaagde
1162
login hard naar `index.html?online=1`, en `main.js` opende bij
1163
`?online=1` altijd het online-paneel. Daardoor belandde je ook na
1164
inloggen vanaf het hoofdmenu in online spelen. **Oplossing:** `auth.php`
1165
onthoudt `?return=` (alleen de whitelist-waarde `online`, via
1166
`loginReturnTarget`) in de sessie; `callback.php` stuurt alleen dan naar
1167
`index.html?online=1`, anders naar `index.html` (hoofdmenu, ingelogd).
1168
De inlogknop in het online-paneel gebruikt `auth.php?return=online`,
1169
de menuknop gewoon `auth.php`. `main.js` haalt `?online=1` na gebruik
1170
uit de URL (`history.replaceState`), zodat herladen niet opnieuw naar
1171
online springt. Aan auth.timfalken.com is niets veranderd.
1172
1173
**Menuknop.** Alleen in Spelen en Offline Strijd (niet online/toeschouwen),
1174
rechtsboven naast de HUD (eigen flex-container, overlapt niet; ook op
1175
mobiel getest). Aanname: **het spel pauzeert** zolang het menu open is
1176
(`app.paused`: geen `GameCore`-tick, geen bots, geen vluchten) — dat is
1177
offline eerlijk en verwacht. Online is er geen knop (pauzeren kan daar niet).
1178
1179
**Stoppen.** “Terug naar hoofdmenu” beëindigt de wedstrijd. Ingelogd:
1180
eerst het puntenscherm met neutrale titel “Spel beëindigd” via de
1181
bestaande `play_finish`/reward-flow, daarna het hoofdmenu (in Offline
1182
Strijd dus **geen** volgende ronde of resultaatscherm). Uitgelogd: direct
1183
naar het hoofdmenu (de laatste score staat daar, zoals na game over).
1184
Misbruik: stoppen gaat door dezelfde server-check als een normaal einde
1185
(punten begrensd op speelduur sinds `play_start`, één finish per sessie),
1186
dus snel stoppen levert niets extra op.
1187
1188
## t1194 — Tempo van het puntenscherm
1189
1190
Blokje *i* (0-gebaseerd) van *n* vertrekt op het moment *t* waarop
1191
`3t + a·t²/2 = i`, met tempo r(t) = 3 + a·t blokjes/s en T = 4 s.
1192
De versnelling volgt uit “het laatste blokje (i = n−1) vertrekt op T”:
1193
`a = 2·((n−1) − 3T) / T²`. Aanname: is `n − 1 ≤ 3T` (≤ 13 punten), dan
1194
zou *a* ≤ 0 worden; dan gebruiken we een **vast tempo** `(n−1)/T`
1195
(a = 0), zodat ook dan het laatste blokje op ~4 s vertrekt. Bij 1 punt
1196
vertrekt het ene blokje meteen. Vluchtduur, de tik-regel van de laatste
1197
1,5 s, 0 punten en het foutpad zijn ongewijzigd.
1198
1199
## t1195 — Weggehaalde teksten
1200
1201
Verwijderd in alle talen (sleutels weg): de tagline onder “Meteors”,
1202
de uitleg na het totaal in de Planeetontwerper (alleen “Totaal: N
1203
punten.” blijft), de ondertitel van de planeetkeuze, en in de HUD van
1204
Offline Strijd “· N tegenstander(s) · Skill X%” (alleen “Ronde N”).
1205
1206
## t1196 — Laatst gekozen planeet
1207
1208
De planeet die je in een planeetkeuzescherm bevestigt (of in de lobby
1209
kiest) wordt onthouden. Ingelogd: kolom `last_planet` in `profiles`,
1210
via `api.php?action=set_last_planet`, terug in `me`/`poll` (zoals de
1211
taal). De server accepteert alleen bekende standaardplaneten of een
1212
eigen planeet van díe gebruiker. Uitgelogd (en als terugval):
1213
`localStorage` (`meteors-planet`). Bij elk planeetkeuzescherm (Spelen,
1214
Offline Strijd, Online) staat die planeet vooraan geselecteerd. Is een
1215
eigen planeet intussen verwijderd, dan geeft de server `null` en kiest
1216
de client Terra (geen fout).
1217
1218
## t1197 — Combo en “+x%”
1219
1220
- Elke match (elk lanceerd cluster) telt in de lopende combo. De sprong
1221
van een match krijgt **+5 % per eerdere match in de combo**
1222
(`GameCore.COMBO_STEP` = 0,05): 1e +0 %, 2e +5 %, 3e +10 %, …
1223
Aanname: de eerste match zelf krijgt nog niets — de combo beloont
1224
doorgaan.
1225
- Geen match gedurende 5 s (`GameCore.COMBO_RESET_S`, speeltijd; telt
1226
niet door tijdens pauze) → combo terug naar 0.
1227
- Combinatie met de landingsketting (t1120, +25 % per stap): **additief**,
1228
`factor = 1 + 0,25·ketting + 0,05·combo`. De HUD toont het totaal van
1229
de laatste lancering als simpel “+x%” (geel, oranje rand), zolang de
1230
geboosterde cluster vliegt of de combo nog loopt.
1231
- Zit in de gedeelde `GameCore`, dus spelers en bots (offline, online)
1232
doen precies hetzelfde. Tests: `test/combo.test.js`.
1233
1234
## t1198 — Resultaatscherm Offline Strijd
1235
1236
“Je speelde tegen N tegenstander(s) met skill X%.” is vervangen door
1237
“X tegenstander(s) verslagen” (enkelvoud/meervoud per taal, incl. pl/ru
1238
few/many). X = alle bots die over alle gespeelde rondes uitgeschakeld
1239
zijn (`OfflineBattle.defeated`, één keer per bot). Aanname: in de
1240
verloren ronde tellen bots die al vóór jou uit waren mee; de rest niet.
1241
“Je hebt ronde N bereikt.” blijft.
@@ -1155,3 +1155,87 @@ Tests: `test/garbage-queue.test.js` (o.a. exact scenario: 5 tegelijk, 21155
open kolommen → alle 5 landen; ook via offline bots);1155
open kolommen → alle 5 landen; ook via offline bots);1156
`test/t1192-garbage-queue-playwright.py ROOT TAG` (twee browsers lokaal).1156
`test/t1192-garbage-queue-playwright.py ROOT TAG` (twee browsers lokaal).1157
1157
1158
1159
## t1193 — Menu tijdens het spel en login-redirect1160
1161
**Login-redirect (oorzaak).** `callback.php` stuurde na elke geslaagde1162
login hard naar `index.html?online=1`, en `main.js` opende bij1163
`?online=1` altijd het online-paneel. Daardoor belandde je ook na1164
inloggen vanaf het hoofdmenu in online spelen. **Oplossing:** `auth.php`1165
onthoudt `?return=` (alleen de whitelist-waarde `online`, via1166
`loginReturnTarget`) in de sessie; `callback.php` stuurt alleen dan naar1167
`index.html?online=1`, anders naar `index.html` (hoofdmenu, ingelogd).1168
De inlogknop in het online-paneel gebruikt `auth.php?return=online`,1169
de menuknop gewoon `auth.php`. `main.js` haalt `?online=1` na gebruik1170
uit de URL (`history.replaceState`), zodat herladen niet opnieuw naar1171
online springt. Aan auth.timfalken.com is niets veranderd.1172
1173
**Menuknop.** Alleen in Spelen en Offline Strijd (niet online/toeschouwen),1174
rechtsboven naast de HUD (eigen flex-container, overlapt niet; ook op1175
mobiel getest). Aanname: **het spel pauzeert** zolang het menu open is1176
(`app.paused`: geen `GameCore`-tick, geen bots, geen vluchten) — dat is1177
offline eerlijk en verwacht. Online is er geen knop (pauzeren kan daar niet).1178
1179
**Stoppen.** “Terug naar hoofdmenu” beëindigt de wedstrijd. Ingelogd:1180
eerst het puntenscherm met neutrale titel “Spel beëindigd” via de1181
bestaande `play_finish`/reward-flow, daarna het hoofdmenu (in Offline1182
Strijd dus **geen** volgende ronde of resultaatscherm). Uitgelogd: direct1183
naar het hoofdmenu (de laatste score staat daar, zoals na game over).1184
Misbruik: stoppen gaat door dezelfde server-check als een normaal einde1185
(punten begrensd op speelduur sinds `play_start`, één finish per sessie),1186
dus snel stoppen levert niets extra op.1187
1188
## t1194 — Tempo van het puntenscherm1189
1190
Blokje *i* (0-gebaseerd) van *n* vertrekt op het moment *t* waarop1191
`3t + a·t²/2 = i`, met tempo r(t) = 3 + a·t blokjes/s en T = 4 s.1192
De versnelling volgt uit “het laatste blokje (i = n−1) vertrekt op T”:1193
`a = 2·((n−1) − 3T) / T²`. Aanname: is `n − 1 ≤ 3T` (≤ 13 punten), dan1194
zou *a* ≤ 0 worden; dan gebruiken we een **vast tempo** `(n−1)/T`1195
(a = 0), zodat ook dan het laatste blokje op ~4 s vertrekt. Bij 1 punt1196
vertrekt het ene blokje meteen. Vluchtduur, de tik-regel van de laatste1197
1,5 s, 0 punten en het foutpad zijn ongewijzigd.1198
1199
## t1195 — Weggehaalde teksten1200
1201
Verwijderd in alle talen (sleutels weg): de tagline onder “Meteors”,1202
de uitleg na het totaal in de Planeetontwerper (alleen “Totaal: N1203
punten.” blijft), de ondertitel van de planeetkeuze, en in de HUD van1204
Offline Strijd “· N tegenstander(s) · Skill X%” (alleen “Ronde N”).1205
1206
## t1196 — Laatst gekozen planeet1207
1208
De planeet die je in een planeetkeuzescherm bevestigt (of in de lobby1209
kiest) wordt onthouden. Ingelogd: kolom `last_planet` in `profiles`,1210
via `api.php?action=set_last_planet`, terug in `me`/`poll` (zoals de1211
taal). De server accepteert alleen bekende standaardplaneten of een1212
eigen planeet van díe gebruiker. Uitgelogd (en als terugval):1213
`localStorage` (`meteors-planet`). Bij elk planeetkeuzescherm (Spelen,1214
Offline Strijd, Online) staat die planeet vooraan geselecteerd. Is een1215
eigen planeet intussen verwijderd, dan geeft de server `null` en kiest1216
de client Terra (geen fout).1217
1218
## t1197 — Combo en “+x%”1219
1220
- Elke match (elk lanceerd cluster) telt in de lopende combo. De sprong1221
van een match krijgt **+5 % per eerdere match in de combo**1222
(`GameCore.COMBO_STEP` = 0,05): 1e +0 %, 2e +5 %, 3e +10 %, …1223
Aanname: de eerste match zelf krijgt nog niets — de combo beloont1224
doorgaan.1225
- Geen match gedurende 5 s (`GameCore.COMBO_RESET_S`, speeltijd; telt1226
niet door tijdens pauze) → combo terug naar 0.1227
- Combinatie met de landingsketting (t1120, +25 % per stap): **additief**,1228
`factor = 1 + 0,25·ketting + 0,05·combo`. De HUD toont het totaal van1229
de laatste lancering als simpel “+x%” (geel, oranje rand), zolang de1230
geboosterde cluster vliegt of de combo nog loopt.1231
- Zit in de gedeelde `GameCore`, dus spelers en bots (offline, online)1232
doen precies hetzelfde. Tests: `test/combo.test.js`.1233
1234
## t1198 — Resultaatscherm Offline Strijd1235
1236
“Je speelde tegen N tegenstander(s) met skill X%.” is vervangen door1237
“X tegenstander(s) verslagen” (enkelvoud/meervoud per taal, incl. pl/ru1238
few/many). X = alle bots die over alle gespeelde rondes uitgeschakeld1239
zijn (`OfflineBattle.defeated`, één keer per bot). Aanname: in de1240
verloren ronde tellen bots die al vóór jou uit waren mee; de rest niet.1241
“Je hebt ronde N bereikt.” blijft.@@ -81,6 +81,9 @@ function GameCore (planet, rng)
81
81
this.spawnInterval = PlanetMod.SPAWN_INTERVAL;
82
82
/** Seconds of actual play in this match / round (t1189). */
83
83
this.playTime = 0;
84
/** t1197: matches in the current combo and seconds since the last one. */
85
this.combo = 0;
86
this.comboAge = 0;
84
87
this.settleTime = PlanetMod.SETTLE_TIME;
85
88
this.score = 0;
86
89
this.state = 'playing';
@@ -119,6 +122,10 @@ GameCore.SWAP_DISTANCE = SWAP_DISTANCE;
119
122
GameCore.SNAP_Y = SNAP_Y;
120
123
GameCore.HORIZONTAL_SLOP = HORIZONTAL_SLOP;
121
124
GameCore.LANDING_CHAIN_BONUS = LANDING_CHAIN_BONUS;
125
/** t1197: each match in a combo adds this much jump height (additive). */
126
GameCore.COMBO_STEP = 0.05;
127
/** t1197: the combo resets when no match is made for this long (s). */
128
GameCore.COMBO_RESET_S = 5;
122
129
GameCore.COLUMN_WARN_ROWS = COLUMN_WARN_ROWS;
123
130
GameCore.DEFAULT_MISS_CHANCE = 0.30;
124
131
GameCore.STATE_STILL = STATE_STILL;
@@ -596,6 +603,14 @@ GameCore.prototype.tick = function (dt)
596
603
// t1192: waiting received blocks drop first, as soon as there is room.
597
604
if (this.garbageQueue.length)
598
605
{ this.drainGarbageQueue(); }
606
// t1197: combo expires after COMBO_RESET_S without a match.
607
this.comboAge += dt;
608
if (this.combo > 0 && this.comboAge >= GameCore.COMBO_RESET_S)
609
{
610
this.combo = 0;
611
if (!this.hasActiveLandingChain())
612
{ this.lastChainIndicator = null; }
613
}
599
614
this.spawnTimer += dt;
600
615
var iv = this.currentSpawnInterval();
601
616
while (this.spawnTimer >= iv)
@@ -2631,15 +2646,21 @@ GameCore.prototype.resolveMatches = function ()
2631
2646
}
2632
2647
}
2633
2648
var chain = this.landingChainFor(group);
2634
var bonusMul = 1 + LANDING_CHAIN_BONUS * chain;
2649
// t1197: combo bonus = COMBO_STEP per earlier match in this combo,
2650
// added to the landing-chain bonus (one shown "+x%").
2651
var comboBonus = GameCore.COMBO_STEP * this.combo;
2652
var bonusMul = 1 + LANDING_CHAIN_BONUS * chain + comboBonus;
2635
2653
height *= bonusMul;
2636
2654
this.launchCluster(group, height, { landingChain: chain });
2637
2655
launched.push({
2638
2656
blocks: group,
2639
2657
jumpHeight: height,
2640
2658
landingChain: chain,
2659
comboBonus: comboBonus,
2641
2660
chainBonus: bonusMul
2642
2661
});
2662
this.combo += 1;
2663
this.comboAge = 0;
2643
2664
}
2644
2665
this.finishLandingChains(launched);
2645
2666
this.updateChainIndicator(launched);
@@ -3161,24 +3182,35 @@ GameCore.prototype.finishLandingChains = function (launched)
3161
3182
GameCore.prototype.updateChainIndicator = function (launched)
3162
3183
{
3163
3184
var maxChain = 0;
3185
var maxPct = 0;
3164
3186
for (var i = 0; i < launched.length; i++)
3165
3187
{
3166
3188
var ch = launched[i].landingChain || 0;
3167
3189
if (ch > maxChain)
3168
3190
{ maxChain = ch; }
3191
var pct = Math.round(((launched[i].chainBonus || 1) - 1) * 100);
3192
if (pct > maxPct)
3193
{ maxPct = pct; }
3169
3194
}
3170
if (maxChain >= 1)
3195
if (maxPct > 0)
3171
3196
{
3172
3197
this.lastChainIndicator = {
3173
3198
chain: maxChain,
3174
bonusPct: Math.round(maxChain * LANDING_CHAIN_BONUS * 100)
3199
combo: this.combo,
3200
bonusPct: maxPct
3175
3201
};
3176
3202
return;
3177
3203
}
3178
if (!this.hasActiveLandingChain())
3204
if (!this.hasActiveLandingChain() && !(launched.length && this.combo > 0))
3179
3205
{ this.lastChainIndicator = null; }
3180
3206
};
3181
3207
3208
/** Bonus (percent) the next match would get from the combo alone (t1197). */
3209
GameCore.prototype.comboBonusPct = function ()
3210
{
3211
return Math.round(GameCore.COMBO_STEP * this.combo * 100);
3212
};
3213
3182
3214
GameCore.prototype.hasActiveLandingChain = function ()
3183
3215
{
3184
3216
var ids = Object.keys(this.clusters);
@@ -81,6 +81,9 @@ function GameCore (planet, rng)81
this.spawnInterval = PlanetMod.SPAWN_INTERVAL;81
this.spawnInterval = PlanetMod.SPAWN_INTERVAL;82
/** Seconds of actual play in this match / round (t1189). */82
/** Seconds of actual play in this match / round (t1189). */83
this.playTime = 0;83
this.playTime = 0;84
/** t1197: matches in the current combo and seconds since the last one. */85
this.combo = 0;86
this.comboAge = 0;84
this.settleTime = PlanetMod.SETTLE_TIME;87
this.settleTime = PlanetMod.SETTLE_TIME;85
this.score = 0;88
this.score = 0;86
this.state = 'playing';89
this.state = 'playing';@@ -119,6 +122,10 @@ GameCore.SWAP_DISTANCE = SWAP_DISTANCE;119
GameCore.SNAP_Y = SNAP_Y;122
GameCore.SNAP_Y = SNAP_Y;120
GameCore.HORIZONTAL_SLOP = HORIZONTAL_SLOP;123
GameCore.HORIZONTAL_SLOP = HORIZONTAL_SLOP;121
GameCore.LANDING_CHAIN_BONUS = LANDING_CHAIN_BONUS;124
GameCore.LANDING_CHAIN_BONUS = LANDING_CHAIN_BONUS;125
/** t1197: each match in a combo adds this much jump height (additive). */126
GameCore.COMBO_STEP = 0.05;127
/** t1197: the combo resets when no match is made for this long (s). */128
GameCore.COMBO_RESET_S = 5;122
GameCore.COLUMN_WARN_ROWS = COLUMN_WARN_ROWS;129
GameCore.COLUMN_WARN_ROWS = COLUMN_WARN_ROWS;123
GameCore.DEFAULT_MISS_CHANCE = 0.30;130
GameCore.DEFAULT_MISS_CHANCE = 0.30;124
GameCore.STATE_STILL = STATE_STILL;131
GameCore.STATE_STILL = STATE_STILL;@@ -596,6 +603,14 @@ GameCore.prototype.tick = function (dt)596
// t1192: waiting received blocks drop first, as soon as there is room.603
// t1192: waiting received blocks drop first, as soon as there is room.597
if (this.garbageQueue.length)604
if (this.garbageQueue.length)598
{ this.drainGarbageQueue(); }605
{ this.drainGarbageQueue(); }606
// t1197: combo expires after COMBO_RESET_S without a match.607
this.comboAge += dt;608
if (this.combo > 0 && this.comboAge >= GameCore.COMBO_RESET_S)609
{610
this.combo = 0;611
if (!this.hasActiveLandingChain())612
{ this.lastChainIndicator = null; }613
}599
this.spawnTimer += dt;614
this.spawnTimer += dt;600
var iv = this.currentSpawnInterval();615
var iv = this.currentSpawnInterval();601
while (this.spawnTimer >= iv)616
while (this.spawnTimer >= iv)@@ -2631,15 +2646,21 @@ GameCore.prototype.resolveMatches = function ()2631
}2646
}2632
}2647
}2633
var chain = this.landingChainFor(group);2648
var chain = this.landingChainFor(group);2634
var bonusMul = 1 + LANDING_CHAIN_BONUS * chain;2649
// t1197: combo bonus = COMBO_STEP per earlier match in this combo,2650
// added to the landing-chain bonus (one shown "+x%").2651
var comboBonus = GameCore.COMBO_STEP * this.combo;2652
var bonusMul = 1 + LANDING_CHAIN_BONUS * chain + comboBonus;2635
height *= bonusMul;2653
height *= bonusMul;2636
this.launchCluster(group, height, { landingChain: chain });2654
this.launchCluster(group, height, { landingChain: chain });2637
launched.push({2655
launched.push({2638
blocks: group,2656
blocks: group,2639
jumpHeight: height,2657
jumpHeight: height,2640
landingChain: chain,2658
landingChain: chain,2659
comboBonus: comboBonus,2641
chainBonus: bonusMul2660
chainBonus: bonusMul2642
});2661
});2662
this.combo += 1;2663
this.comboAge = 0;2643
}2664
}2644
this.finishLandingChains(launched);2665
this.finishLandingChains(launched);2645
this.updateChainIndicator(launched);2666
this.updateChainIndicator(launched);@@ -3161,24 +3182,35 @@ GameCore.prototype.finishLandingChains = function (launched)3161
GameCore.prototype.updateChainIndicator = function (launched)3182
GameCore.prototype.updateChainIndicator = function (launched)3162
{3183
{3163
var maxChain = 0;3184
var maxChain = 0;3185
var maxPct = 0;3164
for (var i = 0; i < launched.length; i++)3186
for (var i = 0; i < launched.length; i++)3165
{3187
{3166
var ch = launched[i].landingChain || 0;3188
var ch = launched[i].landingChain || 0;3167
if (ch > maxChain)3189
if (ch > maxChain)3168
{ maxChain = ch; }3190
{ maxChain = ch; }3191
var pct = Math.round(((launched[i].chainBonus || 1) - 1) * 100);3192
if (pct > maxPct)3193
{ maxPct = pct; }3169
}3194
}3170
if (maxChain >= 1)3195
if (maxPct > 0)3171
{3196
{3172
this.lastChainIndicator = {3197
this.lastChainIndicator = {3173
chain: maxChain,3198
chain: maxChain,3174
bonusPct: Math.round(maxChain * LANDING_CHAIN_BONUS * 100)3199
combo: this.combo,3200
bonusPct: maxPct3175
};3201
};3176
return;3202
return;3177
}3203
}3178
if (!this.hasActiveLandingChain())3204
if (!this.hasActiveLandingChain() && !(launched.length && this.combo > 0))3179
{ this.lastChainIndicator = null; }3205
{ this.lastChainIndicator = null; }3180
};3206
};3181
3207
3208
/** Bonus (percent) the next match would get from the combo alone (t1197). */3209
GameCore.prototype.comboBonusPct = function ()3210
{3211
return Math.round(GameCore.COMBO_STEP * this.combo * 100);3212
};3213
3182
GameCore.prototype.hasActiveLandingChain = function ()3214
GameCore.prototype.hasActiveLandingChain = function ()3183
{3215
{3184
var ids = Object.keys(this.clusters);3216
var ids = Object.keys(this.clusters);@@ -1648,14 +1648,16 @@ function refreshChainIndicator ()
1648
1648
var info = app.core && app.core.lastChainIndicator;
1649
1649
var active = app.core && app.core.hasActiveLandingChain
1650
1650
&& app.core.hasActiveLandingChain();
1651
// Show only while a chained cluster is still in the air.
1652
if (!info || info.chain < 1 || app.mode !== 'playing' || !active)
1651
var comboOn = app.core && app.core.combo > 0;
1652
// t1197: just "+x%" (landing chain + combo bonus of the last launch),
1653
// while a boosted cluster flies or the combo is still alive.
1654
if (!info || !(info.bonusPct > 0) || app.mode !== 'playing' || !(active || comboOn))
1653
1655
{
1654
1656
el.hidden = true;
1655
1657
return;
1656
1658
}
1657
1659
el.hidden = false;
1658
el.textContent = 'x' + info.chain + ' +' + info.bonusPct + '%';
1660
el.textContent = '+' + info.bonusPct + '%';
1659
1661
}
1660
1662
1661
1663
function hideChainIndicator ()
@@ -1648,14 +1648,16 @@ function refreshChainIndicator ()1648
var info = app.core && app.core.lastChainIndicator;1648
var info = app.core && app.core.lastChainIndicator;1649
var active = app.core && app.core.hasActiveLandingChain1649
var active = app.core && app.core.hasActiveLandingChain1650
&& app.core.hasActiveLandingChain();1650
&& app.core.hasActiveLandingChain();1651
// Show only while a chained cluster is still in the air.1651
var comboOn = app.core && app.core.combo > 0;1652
if (!info || info.chain < 1 || app.mode !== 'playing' || !active)1652
// t1197: just "+x%" (landing chain + combo bonus of the last launch),1653
// while a boosted cluster flies or the combo is still alive.1654
if (!info || !(info.bonusPct > 0) || app.mode !== 'playing' || !(active || comboOn))1653
{1655
{1654
el.hidden = true;1656
el.hidden = true;1655
return;1657
return;1656
}1658
}1657
el.hidden = false;1659
el.hidden = false;1658
el.textContent = 'x' + info.chain + ' +' + info.bonusPct + '%';1660
el.textContent = '+' + info.bonusPct + '%';1659
}1661
}1660
1662
1661
function hideChainIndicator ()1663
function hideChainIndicator ()@@ -0,0 +1,97 @@
1
'use strict';
2
3
// t1197: combo — each match adds +5% jump height (additive with the
4
// landing-chain bonus); resets after 5 s without a match.
5
6
const { describe, it } = require('node:test');
7
const assert = require('node:assert/strict');
8
const { makeGame, almost, GameCore, Planet } = require('./helpers.js');
9
10
11
function run (g, secs)
12
{
13
for (let t = 0; t < secs - 1e-9; t += 0.05) g.tick(0.05);
14
}
15
16
function freshMatch (g, color)
17
{
18
const h = makeGame({ noSpawn: true });
19
h.combo = g.combo;
20
h.comboAge = g.comboAge;
21
h.place(0, 0, color);
22
h.place(1, 0, color);
23
h.place(2, 0, color);
24
const l = h.resolveMatches();
25
g.combo = h.combo;
26
g.comboAge = h.comboAge;
27
g.lastChainIndicator = h.lastChainIndicator;
28
return l[0];
29
}
30
31
describe('Match combo (t1197)', () =>
32
{
33
const base = () => Planet.jumpHeight(makeGame({ noSpawn: true }).planet, 3, false);
34
35
it('constants', () =>
36
{
37
assert.equal(GameCore.COMBO_STEP, 0.05);
38
assert.equal(GameCore.COMBO_RESET_S, 5);
39
});
40
41
it('first match +0%, then +5%, +10%, ... per earlier match in the combo', () =>
42
{
43
const g = makeGame({ noSpawn: true });
44
for (let k = 0; k < 4; k++)
45
{
46
const l = freshMatch(g, 1 + (k % 3));
47
assert.ok(almost(l.comboBonus, 0.05 * k, 1e-12), 'k=' + k);
48
assert.ok(almost(l.jumpHeight, base() * (1 + 0.05 * k), 1e-9));
49
assert.equal(g.combo, k + 1);
50
}
51
assert.equal(g.lastChainIndicator.bonusPct, 15);
52
assert.equal(g.comboBonusPct(), 20);
53
});
54
55
it('adds to the landing-chain bonus (chain 1 + 2 combo matches = +35%)', () =>
56
{
57
const g = makeGame({ noSpawn: true });
58
g.combo = 2;
59
g.place(0, 0, 2);
60
g.place(1, 0, 2);
61
const cluster = { id: g.nextClusterId++, jumpHeight: 3, vy: 0, decel: 0, phase: 'down', landingChain: 0 };
62
g.clusters[cluster.id] = cluster;
63
const b = g.createBlock(2, 0, 2, 'flying');
64
b.clusterId = cluster.id;
65
g.landCluster(cluster, [b]);
66
const l = g.resolveMatches()[0];
67
assert.ok(almost(l.chainBonus, 1.35, 1e-12));
68
assert.equal(g.lastChainIndicator.bonusPct, 35);
69
});
70
71
it('resets after 5 s without a match, not before', () =>
72
{
73
const g = makeGame({ noSpawn: true });
74
freshMatch(g, 1);
75
freshMatch(g, 2);
76
assert.equal(g.combo, 2);
77
run(g, 4.9);
78
assert.equal(g.combo, 2, 'still alive at 4.9 s');
79
freshMatch(g, 3); // a match restarts the 5 s window
80
assert.equal(g.combo, 3);
81
run(g, 4.0);
82
assert.equal(g.combo, 3);
83
run(g, 1.1);
84
assert.equal(g.combo, 0, 'gone after 5 s without a match');
85
const l = freshMatch(g, 1);
86
assert.equal(l.comboBonus, 0);
87
});
88
89
it('bots share it: an offline bot core is a GameCore with the same combo', () =>
90
{
91
const Offline = require('../src/offline.js');
92
const battle = Offline.createBattle({ playerPlanet: Planet.defaultPlanet(), rng: () => 0.5 });
93
const bot = battle.bots[0].core;
94
assert.equal(bot.combo, 0);
95
assert.equal(typeof bot.comboBonusPct, 'function');
96
});
97
});
@@ -0,0 +1,97 @@1
'use strict';2
3
// t1197: combo — each match adds +5% jump height (additive with the4
// landing-chain bonus); resets after 5 s without a match.5
6
const { describe, it } = require('node:test');7
const assert = require('node:assert/strict');8
const { makeGame, almost, GameCore, Planet } = require('./helpers.js');9
10
11
function run (g, secs)12
{13
for (let t = 0; t < secs - 1e-9; t += 0.05) g.tick(0.05);14
}15
16
function freshMatch (g, color)17
{18
const h = makeGame({ noSpawn: true });19
h.combo = g.combo;20
h.comboAge = g.comboAge;21
h.place(0, 0, color);22
h.place(1, 0, color);23
h.place(2, 0, color);24
const l = h.resolveMatches();25
g.combo = h.combo;26
g.comboAge = h.comboAge;27
g.lastChainIndicator = h.lastChainIndicator;28
return l[0];29
}30
31
describe('Match combo (t1197)', () =>32
{33
const base = () => Planet.jumpHeight(makeGame({ noSpawn: true }).planet, 3, false);34
35
it('constants', () =>36
{37
assert.equal(GameCore.COMBO_STEP, 0.05);38
assert.equal(GameCore.COMBO_RESET_S, 5);39
});40
41
it('first match +0%, then +5%, +10%, ... per earlier match in the combo', () =>42
{43
const g = makeGame({ noSpawn: true });44
for (let k = 0; k < 4; k++)45
{46
const l = freshMatch(g, 1 + (k % 3));47
assert.ok(almost(l.comboBonus, 0.05 * k, 1e-12), 'k=' + k);48
assert.ok(almost(l.jumpHeight, base() * (1 + 0.05 * k), 1e-9));49
assert.equal(g.combo, k + 1);50
}51
assert.equal(g.lastChainIndicator.bonusPct, 15);52
assert.equal(g.comboBonusPct(), 20);53
});54
55
it('adds to the landing-chain bonus (chain 1 + 2 combo matches = +35%)', () =>56
{57
const g = makeGame({ noSpawn: true });58
g.combo = 2;59
g.place(0, 0, 2);60
g.place(1, 0, 2);61
const cluster = { id: g.nextClusterId++, jumpHeight: 3, vy: 0, decel: 0, phase: 'down', landingChain: 0 };62
g.clusters[cluster.id] = cluster;63
const b = g.createBlock(2, 0, 2, 'flying');64
b.clusterId = cluster.id;65
g.landCluster(cluster, [b]);66
const l = g.resolveMatches()[0];67
assert.ok(almost(l.chainBonus, 1.35, 1e-12));68
assert.equal(g.lastChainIndicator.bonusPct, 35);69
});70
71
it('resets after 5 s without a match, not before', () =>72
{73
const g = makeGame({ noSpawn: true });74
freshMatch(g, 1);75
freshMatch(g, 2);76
assert.equal(g.combo, 2);77
run(g, 4.9);78
assert.equal(g.combo, 2, 'still alive at 4.9 s');79
freshMatch(g, 3); // a match restarts the 5 s window80
assert.equal(g.combo, 3);81
run(g, 4.0);82
assert.equal(g.combo, 3);83
run(g, 1.1);84
assert.equal(g.combo, 0, 'gone after 5 s without a match');85
const l = freshMatch(g, 1);86
assert.equal(l.comboBonus, 0);87
});88
89
it('bots share it: an offline bot core is a GameCore with the same combo', () =>90
{91
const Offline = require('../src/offline.js');92
const battle = Offline.createBattle({ playerPlanet: Planet.defaultPlanet(), rng: () => 0.5 });93
const bot = battle.bots[0].core;94
assert.equal(bot.combo, 0);95
assert.equal(typeof bot.comboBonusPct, 'function');96
});97
});