breakout71/dist/index.html

118 lines
181 KiB
HTML
Raw Normal View History

2025-03-07 20:53:39 +01:00
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Breakout 71</title><meta name="description" content="A breakout game with roguelite mechanics. Break bricks, catch coins, pick upgrades, repeat. Play for free on mobile and desktop."><style>*{box-sizing:border-box;font-family:Courier New,Courier,Lucida Sans Typewriter,Lucida Typewriter,monospace}body{width:100vw;height:100vh;height:calc(var(--vh,1vh)*100);color:#fff;background-size:120px 120px;background-color:var(--background1);--background1:#030c23;--background2:#03112a;margin:0;padding:0;overflow:hidden}#game{height:100vh;height:calc(var(--vh,1vh)*100);width:100vw;position:absolute;top:0;left:0}#score,#menu{z-index:1;appearance:none;font:inherit;color:#fff;background:0 0;border:none;min-width:40px;min-height:40px;padding:10px;line-height:20px;position:absolute;top:0}#score:hover,#score:focus,#menu:hover,#menu:focus{cursor:pointer;background:#0000004d}#score{right:0}#menu{left:0}@media screen and (orientation:portrait){#menu>span{display:none}}.popup{z-index:10;background:#000000e6;display:flex;position:fixed;inset:0;overflow:auto}.popup>div{transform-origin:50%;flex-direction:column;align-items:stretch;width:100%;max-width:450px;margin:auto;padding:20px 10px;display:flex}.popup.actionsAsGrid>div{max-width:800px;& section{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));display:grid}}.popup>div>*{margin:0;padding:0}.popup>div>h2,.popup>div>p{margin-bottom:20px}.popup>div>section{flex-direction:column;align-items:stretch;margin-top:20px;display:flex;& button{font:inherit;color:#fff;cursor:pointer;text-align:left;background:#000c;border:1px solid #fff;gap:10px;margin-top:-1px;padding:10px;display:flex;&:not([disabled]):hover,&:not([disabled]):focus{z-index:1;border-color:#f1d33b;position:relative}&[disabled]{opacity:.5;filter:saturate(0);pointer-events:none}&>div{flex-grow:1}&>div>em{opacity:.8;display:block}&.grey-out-unless-hovered{&:not(:hover){opacity:.6;& img{filter:saturate(0)}}}}}.popup button.close-modale{color:#fff;cursor:pointer;background:0 0;border:none;width:60px;height:60px;position:absolute;top:0;right:0;overflow:hidden;&:before{content:"+";font-size:80px;display:inline-block;position:absolute;top:34px;left:26px;transform:translate(-50%,-50%)rotate(45deg)}&:hover{background:#000;font-weight:700}}.popup .textAfterButtons{color:#ffffff94}.popup a[href]{color:inherit}.popup a[href]:hover,.popup a[href]:focus{color:#fff}.progress{color:#fff;text-align:center;background:#1c1c2f;border-radius:5px;padding:5px 10px;display:block;position:relative;overflow:hidden;box-shadow:inset 3px 3px 5px #00000080}.progress>.progress_bar_part{transform-origin:0 0;z-index:1;background:#4049ca;animation:1s ease-out both grow;display:block;position:absolute;inset:0;box-shadow:inset 3px 3px 5px #00000080}.progress>span{z-index:2;display:block;position:relative}@keyframes grow{0%{transform:scaleX(0)}}#level-recording-container{text-align:center;max-width:400px;margin:40px}#level-recording-container img,#level-recording-container video{max-width:100%;height:auto}#level-recording-container a{display:block}#level-recording-container a video{border-radius:10px;outline:1px solid #fff;margin:20px auto;display:block;box-shadow:2px 2px 5px #000}@media (width>=1200px){#level-recording-container{max-width:calc(50vw - 305px);position:absolute;top:40px;left:40px}}.histogram{align-items:stretch;gap:10px;margin:10px 0 40px;display:flex}.histogram>span{flex-direction:column;flex-grow:1;justify-content:flex-end;width:10px;display:flex;position:relative}.histogram>span.active>span{background:#4049ca}.histogram>span>span{background:#1c1c2f;border-radius:5px;width:100%;min-height:1px;display:block}.histogram>span>span>span{pointer-events:none;white-space:nowrap;transform-origin:0 100%;text-align:center;font-size:13px;display:block;position:absolute;bottom:-20px;left:50%;transform:translate(-50%)}.histogram>span:not(:hove
With this perk, you can survive dropping the ball once. A heart in the top right corner will remind you of how many extra lives you have. `},{requires:"",threshold:0,id:"streak_shots",giftable:!0,name:"Single puck hit streak",max:1,help:_=>"More coins if you break many bricks at once",fullHelp:`Every time you break a brick, your combo (number of coins per bricks) increases by one. However, as soon as the ball touches your puck,
2025-03-05 22:10:17 +01:00
the combo is reset to its default value, and you'll just get one coin per brick. So you should try to hit many bricks in one go for more score.
Once your combo rises above the base value, your puck will become red to remind you that it will destroy your combo to touch it with the ball.
2025-03-07 20:53:39 +01:00
This can stack with other combo related perks, the combo will rise faster but reset more easily as any of the conditions is enough to reset it. `},{requires:"",threshold:0,id:"base_combo",giftable:!0,name:"+3 base combo",max:7,help:_=>`Every brick drops at least ${1+3*_} coins.`,fullHelp:`Your combo (number of coins per bricks) normally starts at 1 at the beginning of the level, and resets to one when you bounce around without hitting anything.
2025-03-05 22:10:17 +01:00
With this perk, the combo starts 3 points higher, so you'll always get at least 4 coins per brick. Whenever your combo reset, it will go back to 4 and not 1.
2025-03-07 20:53:39 +01:00
Your ball will glitter a bit to indicate that its combo is higher than one.`},{requires:"",threshold:0,giftable:!1,id:"slow_down",name:"Slower ball",max:2,help:_=>`Ball moves ${_>1?"even":""} more slowly.`,fullHelp:`The ball starts relatively slow, but every level of your run it will start a bit faster, and it will also accelerate if you spend a lot of time in one level. This perk makes it
more manageable. You can get it at the start every time by enabling kid mode in the menu.`},{requires:"",threshold:0,giftable:!1,id:"bigger_puck",name:"Bigger puck",max:2,help:_=>`Easily catch ${_>1?"even":""} more coins.`,fullHelp:`A bigger puck makes it easier to never miss the ball and to catch more coins, and also to precisely angle the bounces (the ball's angle only depends on where it hits the puck).
However, a large puck is harder to use around the sides of the level, and will make it sometimes unavoidable to miss (not hit anything) which comes with downsides. `},{requires:"",threshold:0,giftable:!1,id:"viscosity",name:"Viscosity",max:3,help:_=>`${_>1?"Even slower":"Slower"} coins fall.`,fullHelp:`Coins normally accelerate with gravity and explosions to pretty high speeds. This perk constantly makes them slow down, as if they were in some sort of viscous liquid.
This makes catching them easier, and combines nicely with perks that influence the coin's movement. `},{requires:"",threshold:0,id:"left_is_lava",giftable:!0,name:"Avoid left side",max:1,help:_=>"More coins if you don't touch the left side.",fullHelp:`Whenever you break a brick, your combo will increase by one, so you'll get one more coin from all the next bricks you break.
2025-03-07 20:18:18 +01:00
However, your combo will reset as soon as your ball hits the left side .
As soon as your combo rises, the left side becomes red to remind you that you should avoid hitting them.
The effect stacks with other combo perks, combo rises faster with more upgrades but will also reset if any
2025-03-07 20:53:39 +01:00
of the reset conditions are met.`},{requires:"",threshold:0,id:"right_is_lava",giftable:!0,name:"Avoid right side",max:1,help:_=>"More coins if you don't touch the right side.",fullHelp:`Whenever you break a brick, your combo will increase by one, so you'll get one more coin from all the next bricks you break.
2025-03-07 20:18:18 +01:00
However, your combo will reset as soon as your ball hits the right side .
As soon as your combo rises, the right side becomes red to remind you that you should avoid hitting them.
The effect stacks with other combo perks, combo rises faster with more upgrades but will also reset if any
2025-03-07 20:53:39 +01:00
of the reset conditions are met.`},{requires:"",threshold:0,id:"top_is_lava",giftable:!0,name:"Sky is the limit",max:1,help:_=>"More coins if you don't touch the top.",fullHelp:`Whenever you break a brick, your combo will increase by one. However, your combo will reset as soon as your ball hit the top of the screen.
2025-03-05 22:10:17 +01:00
When your combo is above the minimum, a red bar will appear at the top to remind you that you should avoid hitting it.
2025-03-07 20:53:39 +01:00
The effect stacks with other combo perks.`},{requires:"",threshold:0,giftable:!1,id:"skip_last",name:"Easy Cleanup",max:7,help:_=>`The last ${_>1?_+" bricks":"brick"} left will self-destruct.`,fullHelp:`You need to break all bricks to go to the next level. However, it can be hard to get the last ones.
2025-03-05 22:10:17 +01:00
Clearing a level early brings extra choices when upgrading. Never missing the bricks is also very beneficial.
2025-03-07 20:53:39 +01:00
So if you find it difficult to break the last bricks, getting this perk a few time can help.`},{requires:"",threshold:500,id:"telekinesis",giftable:!0,name:"Puck controls ball",max:2,help:_=>1==_?"Control the ball's trajectory.":"Stronger effect on the ball",fullHelp:`Right after the ball hits your puck, you'll be able to direct it left and right by moving your puck.
The effect stops when the ball hits a brick and resets the next time it touches the puck. It also does nothing when the ball is going downward after bouncing at the top. `},{requires:"",threshold:1e3,giftable:!1,id:"coin_magnet",name:"Coins magnet",max:3,help:_=>1==_?"Puck attracts coins.":"Stronger effect on the coins",fullHelp:`Directs the coins to the puck. The effect is stronger if the coin is close to it already. Catching 90% or 100% of coins bring special bonuses in the game.
Another way to catch more coins is to hit bricks from the bottom. The ball's speed and direction impacts the spawned coin's velocity. `},{requires:"",threshold:1500,id:"multiball",giftable:!0,name:"+1 ball",max:6,help:_=>`Start every levels with ${_+1} balls.`,fullHelp:`As soon as you drop the ball in Breakout 71, you loose. With this perk, you get two balls, and so you can afford to lose one.
2025-03-05 22:10:17 +01:00
The lost balls come back on the next level or whenever you use one of your extra lives, if you picked that perk. Having more than one balls makes
2025-03-07 20:53:39 +01:00
some further perks available, and of course clears the level faster.`},{requires:"",threshold:2e3,giftable:!1,id:"smaller_puck",name:"Smaller puck",max:2,help:_=>1==_?"Also gives +5 base combo.":"Even smaller puck and higher base combo",fullHelp:`This makes the puck smaller, which in theory makes some corner shots easier, but really just raises the difficulty.
That's why you also get a nice bonus of +5 coins per brick for all bricks you'll break after picking this. `},{requires:"",threshold:3e3,id:"pierce",giftable:!0,name:"Piercing",max:3,help:_=>`Ball pierces ${3*_} bricks after a puck bounce.`,fullHelp:`The ball normally bounces as soon as it touches something. With this perk, it will continue its trajectory for up to 3 bricks broken.
After that, it will bounce on the 4th brick, and you'll need to touch the puck to reset the counter. This combines particularly well with Sapper. `},{requires:"",threshold:4e3,id:"picky_eater",giftable:!0,name:"Picky eater",max:1,help:_=>"More coins if you break bricks color by color.",fullHelp:`Whenever you break a brick the same color as your ball, your combo increases by one.
2025-03-05 22:10:17 +01:00
If it's a different color, the ball takes that new color, but the combo resets.
The bricks with the right color will get a white border.
Once you get a combo higher than your minimum, the bricks of the wrong color will get a red halo.
If you have more than one ball, they all change color whenever one of them hits a brick.
2025-03-07 20:53:39 +01:00
`},{requires:"",threshold:5e3,giftable:!1,id:"metamorphosis",name:"Stain",max:1,help:_=>"Coins color the bricks they touch.",fullHelp:`With this perk, coins will be of the color of the brick they come from, and will color the first brick they touch in the same color. Coins spawn with the speed
2025-03-05 22:10:17 +01:00
of the ball that broke them, which means you can aim a bit in the direction of the bricks you want to "paint".
2025-03-07 20:53:39 +01:00
`},{requires:"",threshold:6e3,id:"compound_interest",giftable:!0,name:"Compound interest",max:1,help:()=>"+1 combo per brick broken, resets on coin lost",fullHelp:`Your combo will grow by one every time you break a brick, spawning more and more coin with every brick you break. Be sure however to catch every one of those coins
2025-03-05 22:10:17 +01:00
with your puck, as any lost coin will decrease your combo by one point. One your combo is above the minimum, the bottom of the play area will
have a red line to remind you that coins should not go there. This perk combines with other combo perks, the combo will rise faster but reset more easily.
2025-03-07 20:53:39 +01:00
`},{requires:"",threshold:7e3,id:"hot_start",giftable:!0,name:"Hot start",max:3,help:_=>`Start at combo ${15*_+1}, -${_} combo per second`,fullHelp:`At the start of every level, your combo will start at +15 points, but then every second it will be decreased by one. This means the first 15 seconds in a level will spawn
2025-03-05 22:10:17 +01:00
many more coins than the following ones, and you should make sure that you clear the level quickly. The effect stacks with other combo related perks, so you might be able to raise
the combo after the 15s timeout, but it will keep ticking down. Every time you take the perk again, the effect will be more dramatic.
2025-03-07 20:53:39 +01:00
`},{requires:"",threshold:9e3,id:"sapper",giftable:!0,name:"Sapper",max:7,help:_=>1===_?"The first brick broken becomes a bomb.":`The first ${_} bricks broken become bombs.`,fullHelp:`Instead of just disappearing, the first brick you break will be replaced by a bomb brick. Bouncing the ball on the puck re-arms the effect. "Piercing" will instantly
2025-03-05 22:10:17 +01:00
detonate the bomb that was just placed. Leveling-up this perk will allow you to place more bombs. Remember that bombs impact the velocity of nearby coins, so too many explosions
could make it hard to catch the fruits of your hard work.
2025-03-07 20:53:39 +01:00
`},{requires:"",threshold:11e3,id:"bigger_explosions",name:"Kaboom",max:1,giftable:!1,help:_=>"Bigger explosions",fullHelp:"The default explosion clears a 3x3 square, with this it becomes a 5x5 square, and the blowback on the coins is also significantly stronger. "},{requires:"",threshold:13e3,giftable:!1,id:"extra_levels",name:"+1 level",max:3,help:_=>`Play ${_+7} levels instead of 7`,fullHelp:`The default run can last a max of 7 levels, after which the game is over and whatever score you reached is your run score.
Each level of this perk lets you go one level higher. The last levels are often the ones where you make the most score, so the difference can be dramatic.`},{requires:"",threshold:15e3,giftable:!1,id:"pierce_color",name:"Color pierce",max:1,help:_=>"Balls pierce bricks of their color.",fullHelp:`Whenever a ball hits a brick of the same color, it will just go through unimpeded.
Once it reaches a brick of a different color, it will break it, take its color and bounce.`},{requires:"",threshold:18e3,giftable:!1,id:"soft_reset",name:"Soft reset",max:2,help:_=>`Combo grows ${_>1?"even":""} slower but resets less.`,fullHelp:"The combo normally climbs every time you break a brick. This will sometimes cancel that climb, but also limit the impact of a combo reset."},{requires:"multiball",threshold:21e3,giftable:!1,id:"ball_repulse_ball",name:"Personal space",max:3,help:_=>1===_?"Balls repulse balls.":"Stronger repulsion force",fullHelp:`Balls that are less than half a screen width away will start repulsing each other. The repulsion force is stronger if they are close to each other.
Particles will jet out to symbolize this force being applied. This perk is only offered if you have more than one ball already.`},{requires:"multiball",threshold:25e3,giftable:!1,id:"ball_attract_ball",name:"Gravity",max:3,help:_=>1===_?"Balls attract balls.":"Stronger attraction force",fullHelp:`Balls that are more than half a screen width away will start attracting each other. The attraction force is stronger when they are furthest away from each other.
Rainbow particles will fly to symbolize the attraction force. This perk is only offered if you have more than one ball already.`},{requires:"",threshold:3e4,giftable:!1,id:"puck_repulse_ball",name:"Soft landing",max:2,help:_=>1===_?"Puck repulses balls.":"Stronger repulsion force",fullHelp:"When a ball gets close to the puck, it will start slowing down, and even potentially bouncing without touching the puck."},{requires:"",threshold:35e3,giftable:!1,id:"wind",name:"Wind",max:3,help:_=>1===_?"Puck position creates wind.":"Stronger wind force",fullHelp:`The wind depends on where your puck is, if it's in the center of the screen nothing happens, if it's on the left it will blow leftwise, if it's on the right of the screen
then it will blow rightwise. The wind affects both the balls and coins.`},{requires:"",threshold:4e4,giftable:!1,id:"sturdy_bricks",name:"Sturdy bricks",max:4,help:_=>1===_?"Bricks sometimes resist hits but drop more coins.":"Bricks resist more and drop more coins",fullHelp:`With level one of this perk, the ball has a 20% chance to bounce harmlessly on bricks,
2025-03-05 22:10:17 +01:00
but generates 10% more coins when it does break one.
2025-03-07 20:53:39 +01:00
This +10% is not shown in the combo number. At level 4 the ball has 80% chance of bouncing and brings 40% more coins.`},{requires:"",threshold:45e3,giftable:!1,id:"respawn",name:"Respawn",max:4,help:_=>1===_?"The first brick hit of two+ will respawn.":"More bricks can respawn",fullHelp:`After breaking two or more bricks, when the ball hits the puck, the first brick will be put back in place, provided that space is free and the brick wasn't a bomb.
2025-03-05 22:10:17 +01:00
Some particle effect will let you know where bricks will appear. Levelling this up lets you respawn up to 4 bricks at a time, but there should always be at least one destroyed.
2025-03-07 20:53:39 +01:00
`},{requires:"",threshold:5e4,giftable:!1,id:"one_more_choice",name:"+1 choice until run end",max:3,help:_=>1===_?"Further level ups will offer one more option in the list.":"Even more options",fullHelp:`Every upgrade menu will have one more option.
2025-03-05 22:10:17 +01:00
Doesn't increase the number of upgrades you can pick.
2025-03-07 20:53:39 +01:00
`},{requires:"",threshold:55e3,giftable:!1,id:"instant_upgrade",name:"+2 upgrades now",max:2,help:_=>1===_?"-1 choice until run end.":"Even fewer options",fullHelp:"Immediately pick two upgrades, so that you get one free one and one to repay the one used to get this perk. Every further menu to pick upgrades will have fewer options to choose from."}],b=i(c),y=i(n),g=i(h),d=["<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><path d='M3.25 10h13.5M10 3.25v13.5' stroke-width='1' stroke='white' fill='none'/></svg>","<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M11 6a5 5 0 01-5 5 5 5 0 01-5-5 5 5 0 015-5 5 5 0 015 5' stroke='none' fill='white'/></svg>","<svg xmlns='http://www.w3.org/2000/svg' width='29' height='50.115'><path d='M14.498 16.858L0 8.488.002-8.257l14.5-8.374L29-8.26l-.002 16.745zm0 50.06L0 58.548l.002-16.745 14.5-8.373L29 41.8l-.002 16.744zM28.996 41.8l-14.498-8.37.002-16.744L29 8.312l14.498 8.37-.002 16.745zm-29 0l-14.498-8.37.002-16.744L0 8.312l14.498 8.37-.002 16.745z' stroke-width='1' stroke='white' fill='none'/></svg>","<svg xmlns='http://www.w3.org/2000/svg' width='29' height='33.487'><path d='M29 20.928v14.813M14.5 12.56v16.745M29-2.559v6.744l-14.5 8.374L0 4.189v-6.745m29 6.742l14.5 8.37m0 16.745L29 20.928l-14.5 8.376L0 20.931l-14.5 8.376m0-16.744L0 4.189m0 31.487V20.931' stroke-width='1' stroke='white' fill='none'/></svg>","<svg xmlns='http://www.w3.org/2000/svg' width='70' height='8'><path d='M-.02 22c8.373 0 11.938-4.695 16.32-9.662C20.785 7.258 25.728 2 35 2c9.272 0 14.215 5.258 18.7 10.338C58.082 17.305 61.647 22 70.02 22M-.02 14.002C8.353 14 11.918 9.306 16.3 4.339 20.785-.742 25.728-6 35-6 44.272-6 49.215-.742 53.7 4.339c4.382 4.967 7.947 9.661 16.32 9.664M70 6.004c-8.373-.001-11.918-4.698-16.3-9.665C49.215-8.742 44.272-14 35-14c-9.272 0-14.215 5.258-18.7 10.339C11.918 1.306 8.353 6-.02 6.002' stroke-width='1' stroke='white' fill='none'/></svg>","<svg xmlns='http://www.w3.org/2000/svg' width='40' height='59.428'><path d='M0 70.975V47.881m20-1.692L8.535 52.808v13.239L20 72.667l11.465-6.62V52.808zm0-32.95l11.465-6.62V-6.619L20-13.24 8.535-6.619V6.619L20 13.24m8.535 4.927v13.238L40 38.024l11.465-6.62V18.166L40 11.546zM20 36.333L0 47.88m0 0v23.094m0 0l20 11.548 20-11.548V47.88m0 0L20 36.333m0 0l20 11.549M0 11.547l-11.465 6.619v13.239L0 38.025l11.465-6.62v-13.24L0 11.548v-23.094l20-11.547 20 11.547v23.094M20 36.333V13.24' stroke-width='1' stroke='white' fill='none'/></svg>","<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M27.26 5.415c-.55 0-.9.55-.65 1l2.45 4.75c.2.5.85.5 1.15.1l3.15-4.5c.3-.4 0-1.05-.55-1.1zM10.689 8.068c-.406-.051-.822.31-.778.748l.5 5.3c.05.5.6.8 1.05.5l4.55-3.05c.45-.3.4-.95-.05-1.15l-5.1-2.3a.605.605 0 0 0-.172-.048zM2.406 24.584a.635.635 0 0 0-.345.081l-4.75 2.4c-.45.2-.5.85-.1 1.15l4.45 3.15c.4.3 1 0 1.1-.5l.3-5.55c0-.412-.31-.712-.655-.73zm40 0a.635.635 0 0 0-.345.081l-4.75 2.4c-.45.2-.5.85-.1 1.15l4.45 3.15c.4.3 1 0 1.1-.5l.3-5.55c0-.412-.31-.712-.655-.73zm-22.17 3.108a.744.744 0 0 0-.675.723l.4 5.55c.05.5.6.8 1.05.5l4.45-2.95c.45-.25.4-.9-.05-1.15l-4.8-2.6a.702.702 0 0 0-.376-.073z' stroke='none' fill='white'/></svg>","<svg xmlns='http://www.w3.org/2000/svg' width='50' height='33.333'><path d='M25 .806v2.79h.8V.806Zm0 4.465v2.791h.8v-2.79Zm-2.043 3.902-2.32 1.55.444.665 2.32-1.55-.443-.665zm4.885 0-.444.665 2.32 1.55.445-.665zM-.4 10.61v2.79h.8v-2.79zm50 0v2.79h.8v-2.79zm-30.356 1.042-2.32 1.55.443.666 2.322-1.55-.444-.666zm12.311 0-.444.665 2.32 1.55.445-.664zm3.783 2.566-.444.666 2.321 1.55.444-.666zm-19.852.025-2.32 1.55.444.665 2.32-1.55zm-15.886.77v2.79h.8v-2.79Zm50 0v2.79h.8v-2.79Zm-50 4.465v2.79h.8v-2.79h-.8Zm50 0v2.79h.8v-2.79h-.8zM2.442 23.379l-.444.665 2.32 1.55.445-.665zm45.115 0-2.32 1.55.443.666 2.322-1.55-.444-.666zM6.155 25.86l-.444.665 2.32 1.55.445-.665zm37.69 0-2.322 1.55.444.665 2.321-1.55-.444-.666zM9.937 28.424l-.444.665 2.32 1.55.445-.665-2.321-1.55zm30.11.003-2.321 1.55.444.666 2.321-1.55zM25 29.737v2.79h.8v-2.79z' stroke='none' fill='white'/></svg>","<svg xmlns='http://www.w3.org/2
<path d="m6.1528 26.516c-2.6992-3.4942-2.9332-8.281-.58305-11.981a10.454 10.454 0 017.3701-4.7582c1.962-.27726 4.1646.05953 5.8835.90027l.45013.22017.89782-.87417c.83748-.81464.91169-.87499 1.0992-.90271.40528-.058713.58876.03425 1.1971.6116l.55451.52679 1.0821-1.0821c1.1963-1.1963 1.383-1.3357 2.1039-1.5877.57898-.20223 1.5681-.19816 2.1691.00897 1.4613.50314 2.3673 1.7622 2.3567 3.2773-.0058.95654-.24464 1.5795-.90924 2.3746-.40936.48928-.55533.81057-.57898 1.2737-.02039.41018.1109.77714.42322 1.1792.30172.38816.3694.61323.2797.93044-.12803.45666-.56674.71598-1.0242.60507-.601-.14597-1.3031-1.3088-1.3969-2.3126-.09459-1.0161.19245-1.8682.92392-2.7432.42567-.50885.5643-.82851.5643-1.3031 0-.50151-.14026-.83177-.51211-1.2028-.50966-.50966-1.0968-.64829-1.781-.41996l-.37348.12477-2.1006 2.1006.52597.55696c.45421.48194.5325.58876.57898.78855.09622.41588.07502.45014-.88396 1.4548l-.87173.9125.26339.57979a10.193 10.193 0 01.9231 4.1001c.03996 2.046-.41996 3.8082-1.4442 5.537-.55044.928-1.0185 1.5013-1.8968 2.3241-.83503.78284-1.5526 1.2827-2.4904 1.7361-3.4266 1.657-7.4721 1.3422-10.549-.82035-.73473-.51782-1.7312-1.4621-2.2515-2.1357zm21.869-4.5584c-.0579-.19734-.05871-2.2662 0-2.4545.11906-.39142.57898-.63361 1.0038-.53005.23812.05708.54147.32455.6116.5382.06279.19163.06769 2.1805.0065 2.3811-.12558.40773-.61649.67602-1.0462.57164-.234-.05708-.51615-.30498-.57568-.50722m3.0417-2.6013c-.12313-.6222.37837-1.1049 1.0479-1.0079.18348.0261.25279.08399 1.0071.83911.75838.75838.81301.82362.84074 1.0112.10193.68499-.40365 1.1938-1.034 1.0405-.1949-.0473-.28786-.12558-1.0144-.85216-.7649-.76409-.80241-.81057-.84645-1.0316m.61323-3.0629a.85623.85623 0 01.59284-.99975c.28949-.09214 2.1814-.08318 2.3917.01141.38734.17369.6279.61078.53984.98181-.06035.25606-.35391.57327-.60181.64992-.25279.07747-2.2278.053-2.4097-.03017-.26013-.11906-.46318-.36125-.51374-.61323" fill="#fff" opacity="0.3"/>
</svg>`);let L=200;const A={};let C=12,O=1;function T(){return 1+3*A.base_combo+5*A.smaller_puck}function P(_,e){let t=O;O=T(),_5||(O+=15*A.hot_start),t>O&&A.soft_reset&&(O+=Math.floor((t-O)/(1+A.soft_reset)));let r=Math.max(0,t-O);if(r){for(let _=0;_<r&&_<8;_++)setTimeout(()=>_0.comboDecrease(),100*_);void 0!==_&&void 0!==e&&_b.push({type:"text",text:"-"+r,time:_5,color:"red",x:_,y:e,duration:150,size:20})}return r}let E=12,H=!1,$=400,V=null;function q(){H||(H=!0,_&&_.resume().then(),et("record")&&r?.state==="paused"&&r.resume(),document.body.className=H?" running ":" paused ")}function Z(e){H&&!V&&(V=setTimeout(()=>{H=!1,Y=!0,_&&setTimeout(()=>{H||_.suspend().then()},1e3),ec(),V=null,document.body.className=H?" running ":" paused "},Math.min(50*Math.max(0,_B-5),500)),e&&_B++,document.exitPointerLock&&document.exitPointerLock())}let I,F,D,N,j,U,Y=!0;const J=document.createElement("img"),K=document.createElement("canvas");J.addEventListener("load",()=>{Y=!0});const X=()=>{let{width:_,height:e}=z.getBoundingClientRect();z.width=_,z.height=e,x.fillStyle=_k()?.color||"black",x.globalAlpha=1,x.fillRect(0,0,_,e),K.width=_,K.height=e,j=et("mobile-mode")?80*e/100:e,D=(U=2*Math.floor(Math.round(Math.min(z.width,.73*j))/E/2))*E,F=I=Math.floor((z.width-D)/2),I<20&&(F=0),N=_-2*F,K.title="resized",_L($),_y=[],_b=[],Z(!0),_h(),document.documentElement.style.setProperty("--vh",`${.01*window.innerHeight}px`)};function Q(){C=Math.max(3,D/12/10+G/3+_5/3e4-2*A.slow_down)}function __(_){return I+(_%E+.5)*U}function _e(_){return(Math.floor(_/E)+.5)*U}function _t(_,e){return _<0||e<0||_>=E||e>=E?-1:_*E+e}function _r(_,e,t,r,a=150,l=S){if(!et("basic")){_b.length>600&&(_=1);for(let o=0;o<_;o++)_b.push({type:"particle",time:_5,size:l,x:e+(Math.random()-.5)*U/2,y:t+(Math.random()-.5)*U/2,vx:(Math.random()-.5)*30,vy:(Math.random()-.5)*30,color:r,duration:a})}}window.addEventListener("resize",X),window.addEventListener("fullscreenchange",X);let _a=0,_l=0,_o=parseFloat(localStorage.getItem("breakout-3-hs")||"0"),_s=0,_i=[],_c="white";function _n(){let _=1+(A?.multiball||0),e=L/(_+1);_i=[],_c="#FFF",(A.picky_eater||A.pierce_color)&&(_c=function(_){var e;let t={};_.forEach(_=>t[_]=(t[_]||0)+1);let r=Math.max(...Object.keys(t).map(_=>t[_]));return(e=Object.keys(t).filter(_=>t[_]==r))[Math.floor(e.length*Math.random())]}(_m.filter(_=>_))||"#FFF");for(let t=0;t<_;t++){let _=$-L/2+e*(t+1);_i.push({x:_,previousx:_,y:j-30,previousy:j-30,vx:Math.random()>.5?C:-C,vy:-C,sx:0,sy:0,sparks:0,piercedSinceBounce:0,hitSinceBounce:0,hitItem:[],sapperUses:0})}}function _h(){let _=_i.length,e=L/(_+1);_i.forEach((_,t)=>{let r=$-L/2+e*(t+1);_.x=r,_.previousx=r,_.y=j-30,_.previousy=_.y,_.vx=Math.random()>.5?C:-C,_.vy=-C,_.sx=0,_.sy=0,_.hitItem=[],_.hitSinceBounce=0,_.piercedSinceBounce=0})}_n();let _m=[],_b=[],_y=[],_g=0,_d=0,_u=0;function _p(){let _="";for(let e of f)for(let t=0;t<A[e.id];t++)_+=W["icon:"+e.id]+" ";return _}async function _v(){let _=(_a-_g)/(_u||1),e=1,t=3,r="",a="",l="";for(_5<3e4?(e++,t++,r=" (+1 upgrade and choice)"):_5<6e4&&(t++,r=" (+1 choice)"),1===_?(e++,t++,a=" (+1 upgrade and choice)"):_>.9&&(t++,a=" (+1 choice)"),0===_d?(e++,t++,l=" (+1 upgrade and choice)"):_d<=3&&(t++,l=" (+1 choice)");e--;){let _=function(_){let e=_w().map(_=>({..._,score:Math.random()+(_z[_.id]||0)})).sort((_,e)=>_.score-e.score).filter(_=>A[_.id]<_.max).slice(0,_).sort((_,e)=>_.id>e.id?1:-1);return e.forEach(_=>{_x(_.id)}),e.map(_=>({text:_.name+(A[_.id]?" lvl "+(A[_.id]+1):""),icon:W["icon:"+_.id],value:_.id,help:_.help(A[_.id]+1)}))}(t+A.one_more_choice-A.instant_upgrade);if(!_.length)break;let o=`
<p>You just finished level ${G+1}/${_F()} and picked those upgrades so far : </p><p>${_p()}</p>
<div id="level-recording-container"></div>
`,s=await e_({title:"Pick an upgrade "+(e?"("+(e+1)+")":""),actions:_,text:`<p>
You caught ${_a-_g} coins ${a} out of ${_u} in ${Math.round(_5/1e3)} seconds${r}.
You missed ${_d} times ${l}.
${r&&a&&l&&"Impressive, keep it up !"||(r||a||l)&&"Well done !"||"Try to catch all coins, never miss the bricks or clear the level under 30s to gain additional choices and upgrades."}
</p>`,allowClose:!1,textAfterButtons:o});A[s]++,"instant_upgrade"===s&&(e+=2),_V.upgrades_picked++}P(void 0,void 0),_n()}function _W(_){Z(!1),_>0&&_v().then(),G=_,_6=0,_E=_5=0,_g=_a,_u=0,_d=0,_V.levelsPlayed++,P(void 0,void 0),Q(),_n();let t=_k();t.size!==E&&(E=t.size,X()),_y=[],_m=[...t.bricks],_b=[],J.src="data:image/svg+xml;UTF8,"+t.svg,en(),function(){if(!et("record"))return;!o&&(s=(o=document.createElement("canvas")).getContext("2d",{antialias:!1,alpha:!1}),l=(a=o.captureStream(0)).getVideoTracks()[0],et("sound")&&_3()&&e&&a.addTrack(e.stream.getAudioTracks()[0])),o.width=N,o.height=j;let _=[],t=new MediaRecorder(a,{videoBitsPerSecond:35e5});r=t,t.start(),r.pause(),t.ondataavailable=function(e){_.push(e.data)},t.onstop=async function(){let e;let t=new Blob(_,{type:"video/webm"});if(t.size<2e5)return;for(;!(e=document.getElementById("level-recording-container"));)await new Promise(_=>setTimeout(_,200));let r=document.createElement("video");r.autoplay=!0,r.controls=!1,r.disablePictureInPicture=!0,r.disableRemotePlayback=!0,r.width=o.width,r.height=o.height,r.loop=!0,r.muted=!0,r.playsInline=!0,r.src=URL.createObjectURL(t);let a=document.createElement("a");a.download=function(_="webm"){return"breakout-71-capture-"+new Date().toISOString().replace(/[^0-9\-]+/gi,"-")+"."+_}("webm"),a.target="_blank",a.href=r.src,a.textContent=`Download video (${(t.size/1e6).toFixed(2)}MB)`,e.appendChild(r),e.appendChild(a)}}()}function _k(){return B[G%B.length]}let _f=_q();function _w(){return f.filter(_=>_f>=_.threshold).filter(_=>!_?.requires||A[_?.requires])}let _z={};function _x(_){_z[_]=Math.round(Date.now()/1e3)}let _M={},_S=!1,_B=0;function _G(_){for(let _ of(_f=_q(),!function(_=null){let e=_M?.level,t=_M?.level?k.filter(_=>_.name===e):[],r=k.filter(_=>_f>=_.threshold).filter(_=>_.name!==_M?.level).filter(e=>e.name!==_||1===k.length).sort(()=>Math.random()-.5);B=t.concat(r.slice(0,10).sort((_,e)=>_.sortKey-e.sortKey))}(_5||_a?_k().name:null),_V=_$(),_a=0,_B=0,f))A[_.id]=0;if(_)Object.assign(A,_),_S=!0;else{_S=!1;let _=_w().filter(_=>_.giftable),e=_M?.perk||et("easy")&&"slow_down"||_[Math.floor(Math.random()*_.length)].id;A[e]=1,delete _M.perk,_x(e)}_W(0),ec()}let _R=0;function _L(_){Y=!0,($=_)<F+L/2&&($=F+L/2),$>F+N-L/2&&($=F+N-L/2),H||_5||_h()}z.addEventListener("mouseup",_=>{0===_.button&&(H?Z(!0):(q(),et("pointerLock")&&z.requestPointerLock()))}),z.addEventListener("mousemove",_=>{document.pointerLockElement===z?_L($+_.movementX):_L(_.x)}),z.addEventListener("touchstart",_=>{_.preventDefault(),_.touches?.length&&(_L(_.touches[0].pageX),q())}),z.addEventListener("touchend",_=>{_.preventDefault(),Z(!0)}),z.addEventListener("touchcancel",_=>{_.preventDefault(),Z(!0),Y=!0}),z.addEventListener("touchmove",_=>{_.touches?.length&&_L(_.touches[0].pageX)});let _A=performance.now();function _C(_,e){return _t(Math.floor(e/U),Math.floor((_-I)/U))}function _O(_){if(_m[_])return _}function _T(_,e,t){return _O(_C(_-t,e-t))??_O(_C(_+t,e-t))??_O(_C(_+t,e+t))??_O(_C(_-t,e+t))}function _P(_,e,t){if(_.destroyed)return;_.previousx=_.x,_.previousy=_.y,_.x+=_.vx*t,_.y+=_.vy*t,_.sx||=0,_.sy||=0,_.sx+=_.previousx-_.x,_.sy+=_.previousy-_.y,_.sx*=.9,_.sy*=.9,A.wind&&(_.vx+=($-(I+D/2))/D*A.wind*.5);let r=0,a=0;return _.x<F+e&&(_.x=F+e,_.vx*=-1,a=1),_.y<e&&(_.y=e,_.vy*=-1,r=1),_.x>z.width-F-e&&(_.x=z.width-F-e,_.vx*=-1,a=1),a+2*r}let _E=0;function _H(_){return A.telekinesis&&!_.hitSinceBounce&&_.vy<0}const _$=()=>({started:Date.now(),levelsPlayed:0,runTime:0,coins_spawned:0,score:0,bricks_broken:0,misses:0,balls_lost:0,puck_bounces:0,upgrades_picked:1,max_combo:1,max_level:0});let _V=_$();function _q(){try{return JSON.parse(localStorage.getItem("breakout_71_total_score")||"0")}catch(_){return 0}}function _Z(_,e){let t;if(!H)return;Z(!0),en(),function(_){try{localStorage.setItem("breakout_71_total_play_time",JSON.stringify(JSON.parse(localStorage.getItem("breakout_71_total_play_time")||"0")+_))}catch(_){}}(_V.runTime),_V.max_level=G+1;let r=-300,a=()=>"animation-delay:"+(r+=800)+"ms;",l="",o=_q(),s=o-_a,i=(t=[],f.forEach(_=>{_.threshold&&t.push({th
<p class="progress" >
<span>${_.title}</span>
<span class="progress_bar_part" style="${a()}"></span>
</p>
`});let c=function(_,e){let t=_.length;for(;--t;)if(e(_[t],t,_))return _[t]}(i,_=>_.threshold<=o)?.threshold||0,n=i.find(_=>_.threshold>o);if(n){let _=n?.threshold-c;e+=`Score ${n.threshold-o} more points to reach the next unlock.`;let t=((o-c)/_).toFixed(2);l+=`
<p class="progress" >
<span>${n.title}</span>
<span style="transform: scale(${t},1);${a()}" class="progress_bar_part"></span>
</p>
2025-03-06 14:06:02 +01:00
2025-03-07 20:53:39 +01:00
`,i.slice(i.indexOf(n)+1).slice(0,3).forEach(_=>{l+=`
<p class="progress" >
<span>${_.title}</span>
</p>
`})}O=1,e_({allowClose:!0,title:_,text:`
${_S?"<p>This test run and its score are not being recorded</p>":""}
<p>${e}</p>
${l}
`,actions:[{value:null,text:"Start a new run",help:""}],textAfterButtons:`<div id="level-recording-container"></div>
${function(){let _="";try{let e=JSON.parse(localStorage.getItem("breakout_71_runs_history")||"[]");e.sort((_,e)=>_.score-e.score).reverse(),(e=e.slice(0,100)).push({..._V,perks:A,appVersion:g}),_S||localStorage.setItem("breakout_71_runs_history",JSON.stringify(e,null,2));let t=(_,t,r)=>{let a=e.map(_=>t(_)||0),l=Math.min(...a),o=Math.max(...a);if(l===o)return"";o-l<10&&(l=Math.max(0,o-10),o=Math.max(o,l+10));let s=Math.min(a.length,10);if(s<3)return"";let i=[],c=[];for(let _=0;_<s;_++)i.push(0),c.push(0);let n=(o-l)/i.length,h=_=>Math.min(i.length-1,Math.floor((_-l)/n));if(a.forEach(_=>{if(isNaN(_))return;let e=h(_);i[e]++,c[e]+=_}),i.filter(_=>_).length<3)return"";let m=Math.max(...i),b=a[a.length-1],y=h(b),g=i.map((_,e)=>{let t=`height: ${_/m*80}px`;return`<span class="${e===y?"active":""}"><span style="${t}" title="${_} run${_>1?"s":""} between ${Math.floor(l+e*n)} and ${Math.floor(l+(e+1)*n)}${r}"
><span>${!_&&" "||e==y&&b+r||Math.round(c[e]/_)+r}</span></span></span>`}).join("");return`<h2 class="histogram-title">${_} : <strong>${b}${r}</strong></h2>
<div class="histogram">${g}</div>
`};_+=t("Total score",_=>_.score,""),_+=t("Catch rate",_=>Math.round(_.score/_.coins_spawned*100),"%"),_+=t("Bricks broken",_=>_.bricks_broken,""),_+=t("Bricks broken per minute",_=>Math.round(_.bricks_broken/_.runTime*6e4)," bpm"),_+=t("Hit rate",_=>Math.round((1-_.misses/_.puck_bounces)*100),"%"),_+=t("Duration per level",_=>Math.round(_.runTime/1e3/_.levelsPlayed),"s"),_+=t("Level reached",_=>_.levelsPlayed,""),_+=t("Upgrades applied",_=>_.upgrades_picked,""),_+=t("Balls lost",_=>_.balls_lost,""),_+=t("Average combo",_=>Math.round(_.coins_spawned/_.bricks_broken),""),(_+=t("Max combo",_=>_.max_combo,""))&&(_=`<p>Find below your run statistics compared to your ${e.length-1} best runs.</p>`+_)}catch(_){console.warn(_)}return _}()}
`}).then(()=>_G())}function _I(_,e,t){let r=_m[_];if(r){if("black"===r){delete _m[_];let t=__(_),r=_e(_);_0.explode(e.x);let a=_%E,l=Math.floor(_/E),o=1+A.bigger_explosions;for(let _=-o;_<=o;_++)for(let t=-o;t<=o;t++){let r=_t(l+t,a+_);_m[r]&&-1!==r&&_I(r,e,!0)}_y.forEach(_=>{let e=_.x-t,a=_.y-r,l=Math.max(U,Math.abs(e)+Math.abs(a));_.vx+=e/l*10*o/_.weight,_.vy+=a/l*10*o/_.weight}),_l=Date.now(),_b.push({type:"ball",duration:150,time:_5,size:2*U,color:"white",x:t,y:r}),_r(7*(1+A.bigger_explosions),t,r,"white",150,S),e.hitSinceBounce++,_V.bricks_broken++}else if(r){if(e.hitSinceBounce++,A.sturdy_bricks&&A.sturdy_bricks>5*Math.random()){_0.coinBounce(e.x,1);return}let a=__(_),l=_e(_);_m[_]="";let o=O;A.sturdy_bricks&&(o+=Math.ceil((10+A.sturdy_bricks)/10*o)),_u+=o,_V.coins_spawned+=o,_V.bricks_broken++;let s=400*(et("basic")?.5:1),i=Math.max(1,Math.ceil(o/(_y.length>400?1:Math.floor(s-_y.length)/3)));for(;o>0;){let _=Math.min(i,o);(_<0||isNaN(_))&&console.error({points:_}),o-=_;let t=a+(Math.random()-.5)*(U-S),s=l+(Math.random()-.5)*(U-S);_y.push({points:_,color:A.metamorphosis?r:"gold",x:t,y:s,previousx:t,previousy:s,vx:e.previousvx*(.5+Math.random()),vy:e.previousvy*(.5+Math.random()),sx:0,sy:0,a:Math.random()*Math.PI*2,sa:Math.random()-.5,weight:.8+.2*Math.random()})}O+=Math.max(0,A.streak_shots+A.compound_interest+A.left_is_lava+A.right_is_lava+A.top_is_lava+A.picky_eater-Math.round(Math.random()*A.soft_reset)),t||((A.picky_eater||A.pierce_color)&&r!==_c&&r?(A.picky_eater&&P(e.x,e.y),_c=r):_0.comboIncreaseMaybe(e.x,1)),_b.push({type:"ball",duration:40,time:_5,size:U,color:r,x:a,y:l}),_r(5+Math.min(O,30),a,l,r,150,S/2)}_m[_]||"black"===r||e.hitItem?.push({index:_,color:r})}}function _F(){return 7+A.extra_levels}let _D=document.createElement("canvas"),_N=null,_j={};function _U(_,e,t,r,a=0){let l="puck"+e+"_"+t+"_"+r;if(!_j[l]){let _=document.createElement("canvas");_.width=t,_.height=2*r;let a=_.getContext("2d");a.fillStyle=e,a.beginPath(),a.moveTo(0,2*r),a.lineTo(0,1.25*r),a.bezierCurveTo(0,.75*r,t,.75*r,t,1.25*r),a.lineTo(t,2*r),a.fill(),_j[l]=_}_.drawImage(_j[l],Math.round($-t/2),j-2*r+a)}function _Y(_,e,t,r,a,l=""){let o="ball"+e+"_"+t+"_"+l,s=Math.round(t);if(!_j[o]){let _=document.createElement("canvas");_.width=s,_.height=s;let t=_.getContext("2d");t.beginPath(),t.arc(s/2,s/2,Math.round(s/2)-1,0,2*Math.PI),t.fillStyle=e,t.fill(),l&&(t.lineWidth=2,t.strokeStyle=l,t.stroke()),_j[o]=_}_.drawImage(_j[o],Math.round(r-s/2),Math.round(a-s/2))}function _J(_,e,t,r,a,l,o){let s=(Math.round(o/Math.PI*64)%32+32)%32,i="coin with halo_"+e+"_"+t+"_"+l+"_"+("gold"===e?s:"whatever");if(!_j[i]){let _=document.createElement("canvas");_.width=t,_.height=t;let r=_.getContext("2d");r.beginPath(),r.arc(t/2,t/2,t/2,0,2*Math.PI),r.fillStyle=e,r.fill(),"gold"===e&&(r.strokeStyle=l,r.stroke(),r.beginPath(),r.arc(t/2,t/2,t/2*.6,0,2*Math.PI),r.fillStyle="rgba(255,255,255,0.5)",r.fill(),r.translate(t/2,t/2),r.rotate(s/16),r.translate(-t/2,-t/2),r.globalCompositeOperation="multiply",_X(r,"$",e,t-2,t/2,t/2+1),_X(r,"$",e,t-2,t/2,t/2+1)),_j[i]=_}_.drawImage(_j[i],Math.round(r-t/2),Math.round(a-t/2))}function _K(_,e,t,r,a){let l="fuzzy-circle"+e+"_"+t,o=Math.round(3*t);if(!_j[l]){let _=document.createElement("canvas");_.width=o,_.height=o;let t=_.getContext("2d"),r=t.createRadialGradient(o/2,o/2,0,o/2,o/2,o/2);r.addColorStop(0,e),r.addColorStop(1,"transparent"),t.fillStyle=r,t.fillRect(0,0,o,o),_j[l]=_}_.drawImage(_j[l],Math.round(r-o/2),Math.round(a-o/2))}function _X(_,e,t,r,a,l,o=!1){let s="text"+e+"_"+t+"_"+r+"_"+o;if(!_j[s]){let _=document.createElement("canvas");_.width=r*e.length,_.height=r;let a=_.getContext("2d");a.fillStyle=t,a.textAlign=o?"left":"center",a.textBaseline="middle",a.font=r+"px monospace",a.fillText(e,o?0:_.width/2,_.height/2,_.width),_j[s]=_}_.drawImage(_j[s],o?a:Math.round(a-_j[s].width/2),Math.round(l-_j[s].height/2))}let _Q=NaN,_1=6;function _2(_,e,t){(_1+=_)>11&&(_1=0),_1<0&&(_1=11);let r=_=>{let r=392*Math.pow(1.05945594920268,_),a=Math.abs(_-5.5),l=Math.max(0,t*(1-a/16.5));return _4(r,e,l),r.toFixed(2)+" at "+
${l}
<div>
<strong>${_}</strong>
<em>${t||""}</em>
</div>`,r?o.setAttribute("disabled","disabled"):o.addEventListener("click",_=>{_.preventDefault(),i(e)}),o.className=a,n.appendChild(o)}),a){let _=document.createElement("div");_.className="textAfterButtons",_.innerHTML=a,c.appendChild(_)}s.appendChild(c),c.querySelector("button:not([disabled])")?.focus()}).then(_=>(_8--,_9=null,_),()=>{_9=null,_8--})}let ee={};function et(_){if(void 0===ee[_])try{ee[_]=JSON.parse(localStorage.getItem("breakout-settings-enable-"+_))}catch(_){console.warn(_)}return ee[_]??w[_]?.default??!1}async function er(){Z(!0);let _=await e_({title:` ${_a} points at level ${G+1} / ${_F()}`,text:`
${_S?"<p>This is a test run, score is not recorded permanently</p>":""}
<p>Upgrades picked so far : </p>
<p>${_p()}</p>
`,allowClose:!0,actions:[{text:"Resume",help:"Return to your run",value:()=>{}},{text:"Restart",help:"Start a brand new run.",value:()=>{_G()}}]});_&&_()}async function ea(){Z(!0);let _=[];for(let e in w)w[e]&&_.push({disabled:w[e].disabled(),icon:et(e)?W["icon:checkmark_checked"]:W["icon:checkmark_unchecked"],text:w[e].name,help:w[e].help,value:()=>{!function(_){ee[_]=!et(_);try{localStorage.setItem("breakout-settings-enable-"+_,JSON.stringify(ee[_]))}catch(_){console.warn(_)}w[_].afterChange&&w[_].afterChange()}(e),ea()}});let e=Math.max(...f.map(_=>_.threshold)),t=await e_({title:"Breakout 71",text:`
`,allowClose:!0,actions:[{text:"Resume",help:"Return to your run",value(){}},{text:"Starting perk",help:"Try perks and levels you unlocked",value(){el()}},..._,(document.fullscreenEnabled||document.webkitFullscreenEnabled)&&(null!==document.fullscreenElement?{text:"Exit Fullscreen",icon:W["icon:exit_fullscreen"],help:"Might not work on some machines",value(){eh()}}:{icon:W["icon:fullscreen"],text:"Fullscreen",help:"Might not work on some machines",value(){eh()}}),{text:"Creative mode",help:_q()<e?"Unlocks at total score $"+e:"Test runs with custom perks",disabled:_q()<e,async value(){let _={},e;for(;e=await e_({title:"Select perks",text:'Select perks below and press "start run" to try them out in a test run. Scores and stats are not recorded.',actionsAsGrid:!0,actions:[...f.map(e=>({icon:e.icon,text:e.name,help:(_[e.id]||0)+"/"+e.max,value:e,className:_[e.id]?"":"grey-out-unless-hovered"})),{text:"Start run",value:"start"}]});){if("start"===e){_G(_);break}e&&(_[e.id]=((_[e.id]||0)+1)%(e.max+1))}}},{text:"Reset Game",help:"Erase high score and statistics",async value(){await e_({title:"Reset",actions:[{text:"Yes",value:!0},{text:"No",value:!1}],allowClose:!0})&&(localStorage.clear(),window.location.reload())}}],textAfterButtons:`
<p>
<span>Made in France by <a href="https://lecaro.me">Renan LE CARO</a>.</span>
<a href="https://breakout.lecaro.me/privacy.html" target="_blank">Privacy Policy</a>
<a href="https://f-droid.org/en/packages/me.lecaro.breakout/" target="_blank">F-Droid</a>
<a href="https://play.google.com/store/apps/details?id=me.lecaro.breakout" target="_blank">Google Play</a>
<a href="https://renanlecaro.itch.io/breakout71" target="_blank">itch.io</a>
<a href="https://gitlab.com/lecarore/breakout71" target="_blank">Gitlab</a>
<a href="https://breakout.lecaro.me/" target="_blank">Web version</a>
<a href="https://news.ycombinator.com/item?id=43183131" target="_blank">HackerNews</a>
<span>v.${g}</span>
</p>
`});t&&t()}async function el(){let _=_q(),e=[...f.sort((_,e)=>_.threshold-e.threshold).map(({name:e,id:t,threshold:r,icon:a,fullHelp:l})=>({text:e,help:_>=r?l:`Unlocks at total score ${r}.`,disabled:_<r,value:{perk:t},icon:a})),...k.sort((_,e)=>_.threshold-e.threshold).map(e=>{let t=_>=e.threshold;return{text:e.name,help:t?`A ${e.size}x${e.size} level with ${e.bricks.filter(_=>_).length} bricks`:`Unlocks at total score ${e.threshold}.`,disabled:!t,value:{level:e.name},icon:W[e.name]}})],t=Math.round(e.filter(_=>!_.disabled).length/e.length*100),r=await e_({title:`You unlocked ${t}% of the game.`,text:`
<p> Your total score is ${_}. Below are all the upgrades and levels the games has to offer.
${t<100?"The greyed out ones can be unlocked by increasing your total score. The total score increases every time you score in game.":""}</p>
`,textAfterButtons:`<p>
Your high score is ${_o}.
Click an item above to start a run with it.
</p>`,actions:e,allowClose:!0});r&&(!G||await e_({title:"Restart run to try this item?",text:"You're about to start a new run with the selected unlocked item, is that really what you wanted ? ",actions:[{value:!0,text:"Restart game to test item"},{value:!1,text:"Cancel"}]}))&&(_M=r,_G())}function eo(_,e){return Math.sqrt(Math.pow(_.x-e.x,2)+Math.pow(_.y-e.y,2))}function es(){return`hsl(${2*Math.round(_5/4)%360},100%,70%)`}function ei(_,e,t,r){let a=eo(_,e),l=D/2;if(a>l)return;let o=(_.x-e.x)/a,s=(_.y-e.y)/a,i=-t*(l-a)/(1.2*l)/3*Math.min(500,_5)/500;r&&(e.vx+=o*i,e.vy+=s*i),_.vx-=o*i,_.vy-=s*i,_b.push({type:"particle",duration:100,time:_5,size:S/2,color:es(),ethereal:!0,x:_.x,y:_.y,vx:-(10*o)+_.vx+(Math.random()-.5)*2,vy:-(10*s)+_.vy+(Math.random()-.5)*2}),r&&_b.push({type:"particle",duration:100,time:_5,size:S/2,color:es(),ethereal:!0,x:e.x,y:e.y,vx:10*o+e.vx+(Math.random()-.5)*2,vy:10*s+e.vy+(Math.random()-.5)*2})}function ec(){et("record")&&r?.state==="recording"&&r?.pause()}function en(){et("record")&&r&&(r?.stop(),r=null)}function eh(){try{if(null!==document.fullscreenElement)document.exitFullscreen?document.exitFullscreen().then():document.webkitCancelFullScreen&&document.webkitCancelFullScreen();else{let _=document.documentElement;_.requestFullscreen?_.requestFullscreen().then():_.webkitRequestFullscreen&&_.webkitRequestFullscreen()}}catch(_){console.warn(_)}}_7.addEventListener("click",_=>{_.preventDefault(),er().then()}),document.getElementById("menu").addEventListener("click",_=>{_.preventDefault(),ea().then()});const em={ArrowLeft:0,ArrowRight:0,Shift:0};function eb(_,e){em[_]=e,_R=(em.ArrowRight-em.ArrowLeft)*(1+2*em.Shift)*D/50}document.addEventListener("keydown",_=>{"f"!==_.key.toLowerCase()||_.ctrlKey||_.metaKey?_.key in em&&eb(_.key,1):eh()," "===_.key&&!_8&&(H?Z(!0):q(),_.preventDefault())}),document.addEventListener("keyup",_=>{let e=document.querySelector("button:focus");if(_.key in em)eb(_.key,0);else if("ArrowDown"===_.key&&e?.nextElementSibling?.tagName==="BUTTON")e?.nextElementSibling?.focus();else if("ArrowUp"===_.key&&e?.previousElementSibling?.tagName==="BUTTON")e?.previousElementSibling?.focus();else if("Escape"===_.key&&_9)_9();else if("Escape"===_.key&&H)Z(!0);else if("m"!==_.key.toLowerCase()||_8){if("s"!==_.key.toLowerCase()||_8)return;er().then()}else ea().then();_.preventDefault()}),X(),_G(),function _(){Q();let e=performance.now();if(L=D/12*(3-A.smaller_puck+A.bigger_puck),_R&&_L($+_R),H){_5+=e-_A,_V.runTime+=e-_A,_V.max_combo=Math.max(_V.max_combo,O);let _=Math.min(4,(e-_A)/(1e3/60));_*=+!!H,_y=_y.filter(_=>!_.destroyed),_i=_i.filter(_=>!_.destroyed);let t=_m.filter(_=>_&&"black"!==_).length;if(_5>_E+1e3&&A.hot_start&&(_E=_5,function(_,e,t){let r=Math.max(0,O-(O=Math.max(T(),O-_)));r&&(_0.comboDecrease(),void 0!==e&&void 0!==t&&_b.push({type:"text",text:"-"+r,time:_5,color:"red",x:e,y:t,duration:300,size:20}))}(A.hot_start,$,j-40)),t<=A.skip_last&&!_6&&(_m.forEach((_,e)=>{_&&_I(e,_i[0],!0)}),_6++),t||_y.length){if(H||_5){let e=!1,t=Math.round(S/2);if(_y.forEach(r=>{if(r.destroyed)return;A.coin_magnet&&(r.vx+=_*($-r.x)/(100+Math.pow(r.y-j,2)+Math.pow(r.x-$,2))*A.coin_magnet*100);let a=1-(.03*A.viscosity+.005)*_;r.vy*=a,r.vx*=a,r.vx>7*C&&(r.vx=7*C),r.vx<-7*C&&(r.vx=-7*C),r.vy>7*C&&(r.vy=7*C),r.vy<-7*C&&(r.vy=-7*C),r.a+=r.sa,r.vy+=_*r.weight*.8;let l=Math.abs(r.sx)+Math.abs(r.sx),o=_P(r,t,_);if(r.y>j-t-20&&r.y<j+20+r.vy&&Math.abs(r.x-$)<t+L/2+20)r.destroyed=!0,_a+=r.points,function(_){if(!_S)try{localStorage.setItem("breakout_71_total_score",JSON.stringify(_q()+_))}catch(_){}}(r.points),_a>_o&&!_S&&(_o=_a,localStorage.setItem("breakout-3-hs",_a.toString())),et("basic")||_b.push({type:"particle",duration:100+50*Math.random(),time:_5,size:S/2,color:r.color,x:r.previousx,y:r.previousy,vx:(z.width-r.x)/100,vy:-r.y/100,ethereal:!0}),Date.now()-_s>16&&(_s=Date.now(),_0.coinCatch(r.x)),_V.score+=r.points;else r.y>z.height+t&&(r.destroyed=!0,A.compound_interest&&P(r.x,r.y));let s=function(_){let e=S/2,{x:t,y:r,previousx:a,previousy:l}=_,o=_T(a,r,e),s=_T(t,l,e),i=void 0===o&&void 0=