diff --git a/app.zip b/app.zip index 33d8ed4..9d32cfa 100644 Binary files a/app.zip and b/app.zip differ diff --git a/app/js/elements.js b/app/js/elements.js index ceef8b7..b37fe4d 100644 --- a/app/js/elements.js +++ b/app/js/elements.js @@ -45,7 +45,6 @@ var ElementalSkill = function(types, charge){ } m.lock = function(element){ m.locks[element] = 1; - console.log(m.locks); } m.updateCurrentQ = function(){ m.currentQ = m.charges[m.current]; diff --git a/app/js/initializers.js b/app/js/initializers.js index 18e7543..3ccba4d 100644 --- a/app/js/initializers.js +++ b/app/js/initializers.js @@ -13,6 +13,10 @@ var black = '#000'; var white = '#fff'; var xlevel; +var xAxis=0; +var yAxis=0; + +var currentLevel = 'level1'; var zoomFactor =(innerHeight-100)/dimensions.h; //var zoomFactor =1; diff --git a/app/js/levelGenerator.js b/app/js/levelGenerator.js index f78ff4e..179fc6b 100644 --- a/app/js/levelGenerator.js +++ b/app/js/levelGenerator.js @@ -17,10 +17,38 @@ var LevelGenerator = function(level){ m.currentColor = elementColors[m.skills.current]; m.sprite.color = 'hsl('+m.currentColor+',100%, 50%)'; } - return new Level(level.width, monsters, level.factor, platformFunctions, level.pendiente, level.title); + return new Level(level.width, monsters, level.factor, platformFunctions, level.pendiente, level.title, level.backG); } -var currentLevel = 'level1'; +var snowBack = function(){ + randomParticles(); +} +var blackBack = function(){ + ctx.fillStyle='#002'; + ctx.fillRect(-viewport.x,yAxis+viewport.y,dimensions.w,dimensions.h); + snowBack(); +} +var greenBack = function(){ + ctx.fillStyle='#121'; + ctx.fillRect(-viewport.x,yAxis+viewport.y,dimensions.w,dimensions.h); + particles.push(new Particle(-viewport.x+Math.random()*1024,viewport.y+Math.random()*720,4,0,1,Math.random()*360)); +} +var blueBack = function(){ + ctx.fillStyle='#202'; + ctx.fillRect(-viewport.x,yAxis+viewport.y,dimensions.w,dimensions.h); + particles.push(new Particle(-viewport.x+Math.random()*1024,viewport.y+Math.random()*720,9,-10,2,30)); +} +var stormLoop = 0; +var stormBack = function(){ + stormLoop++; + ctx.fillStyle='#000'; + if(stormLoop%220==0||stormLoop%221==0||stormLoop%224==0||stormLoop%225==0||stormLoop%228==0||stormLoop%229==0||stormLoop%230==0||stormLoop%231==0){ + ctx.fillStyle='#555'; + + } + ctx.fillRect(-viewport.x,yAxis+viewport.y,dimensions.w,dimensions.h); + particles.push(new Particle(-viewport.x+Math.random()*1024,viewport.y+Math.random()*720,0,0,2,Math.random()*180)); +} var levels = { level1: { codeMonsters: ['a3b4','a3b9','a3b12', 'a3b15', 'a1b24', 'a1b27', 'a1b30', 'a1b35'], @@ -31,7 +59,20 @@ var levels = { title: 'The Beginning', nextl:'boss1', locks:[0,2], - skill:1 + skill:1, + backG: function(){ + ctx.ft(' S ',xAxis+200, yAxis-300); + ctx.ft(' -> ',xAxis+600, yAxis-200); + ctx.ft(' SPACE ',xAxis+1800, yAxis-300); + ctx.ft(' D ', xAxis+2600, yAxis-220); + ctx.ft(' ALL ', xAxis+3400, yAxis-320); + ctx.fillStyle=white; + ctx.ft('press to shoot',xAxis+200, yAxis-300); + ctx.ft('press to move forward',xAxis+600, yAxis-200); + ctx.ft('Press to change element', xAxis+2600, yAxis-220); + ctx.ft('press to jump',xAxis+1800, yAxis-300); + ctx.ft('You must to destroy enemies', xAxis+3400, yAxis-320); + } }, boss1: { codeMonsters:['x1n4'], @@ -42,7 +83,12 @@ var levels = { title: 'Fire Skeleton', nextl:'level2', locks:[0,2], - skill:1 + skill:1, + backG:function(){ + ctx.ft(' BOSS!', xAxis+400, yAxis-350); + ctx.fillStyle=white; + ctx.ft('Destroy the ', xAxis+400, yAxis-350); + } }, level2: { codeMonsters: ['a0b4','a2b9','a2b12', 'a0b15', 'a2b18', 'a0b27', 'a2c30', 'a0c35', 'a2c40', 'a0c45'], @@ -53,7 +99,18 @@ var levels = { title: 'The Gate', nextl:'boss2', locks:[1,3], - skill:2 + skill:2, + backG:function(){ + ctx.ft(' VIER ', xAxis+400, yAxis-350); + ctx.ft(' D ', xAxis+1600, yAxis-240); + ctx.ft(' SPACE ', xAxis+2600, yAxis-380); + ctx.ft(' charges ', xAxis+4200, yAxis-240); + ctx.fillStyle=white; + ctx.ft('With the stone you can control the elements ', xAxis+400, yAxis-350); + ctx.ft('Press to change to the previous element', xAxis+1600, yAxis-240); + ctx.ft('Press two times to make a double jump', xAxis+2600, yAxis-380); + ctx.ft('Enemies drop for element energy', xAxis+4200, yAxis-240); + } }, boss2: { codeMonsters:['x2m4'], @@ -64,16 +121,51 @@ var levels = { title: 'Fire Dragon', nextl:'level3', locks:[1,3], - skill:2 + skill:2, + backG:function(){ + ctx.ft(' up flying ', xAxis+400, yAxis-350); + ctx.fillStyle=white; + ctx.ft('Press arrow to shoot enemies', xAxis+400, yAxis-350); + } }, level3: { - codeMonsters: ['b1b4','b1a9','b2a12', 'b3m15', 'b1a20', 'b2a30', 'b3m40', 'b0m45', 'c1a47', 'c2a55', 'b2a70', 'c3b80'], + codeMonsters: ['b1b4','b1a9','b2a12', 'b2a15', 'b3m20', 'b3m25', 'b0m35', 'b0m40', 'c1a47', 'c2a55', 'b2a70', 'c3b80'], plats: ['a', 6,'f', 6,'a', 5, 'b', 5,'a', 5,'b',5,'x',8, 'c',9,'a',9], width: 8400, factor: 149, pendiente: -0.5, title: 'Air Palace', - nextl:'boss3' + nextl:'boss3', + backG:function(){ + ctx.ft(' Enter ', xAxis+7650, yAxis-1000); + ctx.ft(' Masters!', xAxis+8650, yAxis-1100); + ctx.fillStyle=white; + ctx.ft('Elements are balanced', xAxis+400, yAxis-350); + ctx.ft(' makes double damage to ', xAxis+700, yAxis-250); + ctx.ft(' makes double damage to ', xAxis+1250, yAxis-350); + ctx.ft(' makes double damage to ', xAxis+1950, yAxis-200); + ctx.ft(' makes double damage to ', xAxis+3650, yAxis-300); + ctx.ft('Press to pause the game', xAxis+7650, yAxis-1000); + ctx.ft('I\'m ready to destroy the ', xAxis+8650, yAxis-1100); + + ctx.fillStyle= basicColors[0]; + ctx.ft('Air ', xAxis+700, yAxis-250); + ctx.ft(' Air', xAxis+3650, yAxis-300); + ctx.fillStyle= basicColors[1]; + ctx.ft(' Water', xAxis+700, yAxis-250); + ctx.ft('Water ', xAxis+1250, yAxis-350); + + + ctx.fillStyle= basicColors[2]; + ctx.ft(' Earth', xAxis+1250, yAxis-350); + ctx.ft('Earth ', xAxis+1950, yAxis-200); + + ctx.fillStyle= basicColors[3]; + + ctx.ft(' Fire', xAxis+1950, yAxis-200); + ctx.ft('Fire ', xAxis+3650, yAxis-300); + + } }, boss3: { codeMonsters:['x3m4'], @@ -82,7 +174,8 @@ var levels = { factor: 50, pendiente: -0.1, title: 'Air Master', - nextl:'level4' + nextl:'level4', + backG:blackBack }, level4:{ codeMonsters:['d3m4','d2m12','d2m20','d0m22', 'b2a28','b2a31','b2a32', 'b0m44', 'b3m50','a1c58','a3c60','a1c62','a3c64','c2b70', 'c2a75', 'd3d91', 'd1d95', 'd3d99'], @@ -91,7 +184,8 @@ var levels = { factor: 27, pendiente: -0.55, title: 'Earth Palace', - nextl:'boss4' + nextl:'boss4', + backG:greenBack }, boss4: { codeMonsters:['x4o4'], @@ -100,7 +194,8 @@ var levels = { factor: 50, pendiente: -0.01, title: 'Earth Master', - nextl:'level5' + nextl:'level5', + backG:greenBack }, level5:{ codeMonsters:['b1b4','e1e19','e3e24', 'f1b30','f3b32', 'd3m40', 'd1m44', 'd0m48', 'd2m56', 'e0a67', 'e3a70', 'e1a73'], @@ -109,7 +204,8 @@ var levels = { factor: 170, pendiente: -0.5, title: 'Water & Fire Montains', - nextl:'boss5' + nextl:'boss5', + backG:blueBack }, boss5: { codeMonsters:['x5p5', 'x6q7'], @@ -118,7 +214,8 @@ var levels = { factor: 35, pendiente: -0.1, title: 'Water & Fire Masters', - nextl:'level6' + nextl:'level6', + backG:blueBack }, level6:{ codeMonsters:['b2a10', 'b2a12','b2a14','a0f25','a2f26','a2f27','a0f28','b1b38','b3e40','c0b68','c2b70','d1a106','d3m108','f0f110','f2f11','d3m113','d1a115'], @@ -127,7 +224,8 @@ var levels = { factor: 16, pendiente: -0.8, title: 'Grand Master Palace', - nextl:'boss6a' + nextl:'boss6a', + backG:stormBack }, boss6a:{ codeMonsters:['x7z4'], @@ -136,7 +234,8 @@ var levels = { factor: 700, pendiente: 1, title: 'Grand Master', - nextl:'boss6b' + nextl:'boss6b', + backG:stormBack }, boss6b:{ codeMonsters:['z1r6','z2r6','z3r6','z4r6'], @@ -145,16 +244,25 @@ var levels = { factor: 700, pendiente: 1, title: 'Element\'s Avatar challenge', - nextl:'ends' + nextl:'ends', + backG:stormBack }, ends:{ codeMonsters:[], width: 1800, - plats:['a',2], + plats:['a',3], factor: 700, pendiente: 1, title: 'Grand master mode', - nextl:'ends' + nextl:'ends', + backG:function(){ + ctx.ft('Congratulations! you beat the Game!', xAxis+400, yAxis-350); + ctx.ft('==Thanks for playing==', xAxis+600, yAxis-150); + ctx.ft('made by @agar3s', xAxis+1400, yAxis-150); + ctx.ft(' F5 ', xAxis+1600, yAxis+150); + ctx.fillStyle = white; + ctx.ft('press to start the game again', xAxis+1600, yAxis+150); + } } } @@ -174,11 +282,12 @@ function restartLevel(wy){ currentEnemy= undefined; xlevel = LevelGenerator(level); + xAxis=0; + yAxis=0; } function nextLevel(){ currentLevel = levels[currentLevel].nextl; - console.log(viewport.y); //ctx.translate(-viewport.x, viewport.y+720); //viewport restartLevel(viewport.y); diff --git a/app/js/levels.js b/app/js/levels.js index fb2a9a1..927aae6 100644 --- a/app/js/levels.js +++ b/app/js/levels.js @@ -44,7 +44,7 @@ var platformFunctions = { } -var Level = function(width, enemiesVector, factor, platforms, pendiente, title){ +var Level = function(width, enemiesVector, factor, platforms, pendiente, title, backG){ xf = 0; yf=0; var m = this; @@ -83,9 +83,10 @@ var Level = function(width, enemiesVector, factor, platforms, pendiente, title){ }; } m.generateLevel(platforms, pendiente); - + m.backG = backG; m.draw = function(vx, vy){ m.count++; + backG(); var index = ~~(vx/m.factor); if(index<0){index=0;} var limit = index + 1+~~(dimensions.w/m.factor); diff --git a/app/js/main.js b/app/js/main.js index a76eb90..633298d 100644 --- a/app/js/main.js +++ b/app/js/main.js @@ -20,6 +20,11 @@ var yOld = myhero.sprite.y; //ctx.transform(1, 0, 0, 1, 0, 0); var currentScreen = 'i'; +var updateBackground = function(xxs){ + xAxis+=xxs*0.1; +} + + function gameLoop() { var wx = -viewport.x; var wy = viewport.y; @@ -134,6 +139,7 @@ function gameLoop() { viewport.y-=yyy; yOld = myhero.sprite.y; ctx.translate(xxx, yyy); + updateBackground(xxx); //draw user interface information } diff --git a/dist/a.js b/dist/a.js index e170d3d..35c41d6 100644 --- a/dist/a.js +++ b/dist/a.js @@ -1 +1 @@ -!function(){function setFont(a){Ap.font=a?"normal lighter 12px":"normal lighter 20px monospace"}function Ah(a,t){return!(t.l>a.h||t.ha.AJ||t.AJ>4)*a.e,((a.aa?o:15-o)-8)*t+e,((a.D[r]>>4)-8)*t+n-2,a.e,i))}}function randomAds(){aq.push(new Ad(-at.x+1024*Math.random(),at.y+720*Math.random(),0,.1,2,360*Math.random()))}function Ae(a,t,e,n){ar.push(new Af(a,t,e,n))}function restartAK(a){var t=levels[currentAK];Ag=[],ap=[],an=[],ar=[],Ap.translate(-at.x,-a+at.y),at.x=0,at.y=a,Am.reset(),aw.reset(),ax=void 0,xlevel=AKGenerator(t)}function amAK(){currentAK=levels[currentAK].aml,console.log(at.y),restartAK(at.y)}function bl(vx,vy){Ap.fillStyle="rgba(0,0,0,0.1)",Ap.fillRect(vx,vy,1024,720),randomAds(),Ap.fillStyle=Ab[1],Ap.strokeStyle="hsl("+ ++hue%720+",50%,50%)",Ap.font="normal lighter 242px fantasy",Ap.strokeText("VIER",vx+512,vy+216),Ap.font="normal lighter 30px fantasy",Ap.lineWidth=1,Ap.strokeText("W i z a r d W a r s",vx+512,vy+360),Ap.font="normal lighter 20px monospace",Ap.fillText("Press to Start",vx+512,vy+432),Ap.fillText("made by @agar3s",vx+512,vy+648),Ap.fillStyle=as%16==0?Ab[1]:Ab[0],Ap.fillText(" ",vx+512,vy+432);for(var i=aq.length-1;i>=0;i--)with(aq[i])ag(),d()&&aq.splice(i,1)}function bm(a,t){Ap.fillStyle="rgba(0,0,0,0.1)",Ap.fillRect(a,t,au.w,720),Ap.fillStyle=wbae,setFont(0),Ap.ft("PAUSE",a+512,t+144),Ap.ft("Controls",a+512,t+216),Ap.ft(": Shoot",a+.5*au.w,t+288),Ap.ft("<- : move to l ",a+.2*au.w,t+720*.48),Ap.ft("-> : move to h",a+.2*au.w,t+381.6),Ap.ft(" : ak ",a+.5*au.w,t+720*.48),Ap.ft("2X : double ak",a+.5*au.w,t+381.6),Ap.ft(" : am Au ",a+.8*au.w,t+720*.48),Ap.ft(" : previous Au",a+.8*au.w,t+381.6),Ap.ft("ASs",a+512,t+453.6),Ap.ft(" beats ",a+512,t+720*.7),Ap.ft(" beats ",a+.7*au.w,t+576),Ap.ft(" beats ",a+512,t+648),Ap.ft(" beats ",a+.3*au.w,t+576),Ap.fillStyle=Ab[1],Ap.ft("Water ",a+512,t+720*.7),Ap.ft(" Water",a+.3*au.w,t+576),Ap.fillStyle=Ab[2],Ap.ft("Earth ",a+.7*au.w,t+576),Ap.ft(" Earth",a+512,t+720*.7),Ap.fillStyle=Ab[3],Ap.ft("Fire ",a+512,t+648),Ap.ft(" Fire",a+.7*au.w,t+576),Ap.fillStyle=Ab[0],Ap.fillText("Air ",a+.3*au.w,t+576),Ap.fillText(" Air",a+512,t+648)}function bn(a,t){Ap.fillStyle="rgba(0,0,0,0.6)",Ap.fillRect(a,t,au.w,720),Ap.fillStyle=wbae,setFont(0),Ap.fillText("DEAD",a+512,t+216),setFont(1),Ap.fillText("enter to restart level",a+512,t+360)}function Al(){var wx=-at.x,wy=at.y;Ap.clearRect(wx,wy,au.w,au.h),xlevel.ag(wx,wy),Am.b(.8),xlevel.Av(Am),aw.del||aw.d(),xlevel.onPlayerX(Am.x);for(var j=ap.length-1;j>=0;j--)with(ap[j])d(),S.ag(),as%4==0&&ah(),as%2==0&&Av(),(ai||del)&&ap.splice(j,1);for(var j=Ag.length-1;j>=0;j--)with(Ag[j]){if(del){Ag.splice(j,1),xlevel.onAWDied();continue}S.ag(),S.b(.8),xlevel.Av(S),d(),as%2==0&&S.ah()}for(var j=an.length-1;j>=0;j--)with(an[j])d(),S.ag(),as%4==0&&ah(),as%2==0&&v(Am.Aq()),(ai||del)&&an.splice(j,1);for(var i=aq.length-1;i>=0;i--)with(aq[i])ag(),d()&&aq.splice(i,1);for(var i=ar.length-1;i>=0;i--)with(ar[i])d(),xlevel.Av(S),S.ag(),as%2==0&&v(Am.Aq()),del&&ar.splice(i,1);as%8==0&&firexx.u(),firexx.c(),as%2==0&&Am.ah(),aw.del?bo="d":(Am.ag(),aw.aj(),aw.ag(wx,wy)),aw.S.x>450-wx&&aw.S.xwy+au.h&&aw.S.vy>0?yyy=-aw.S.vy:aw.S.y-at.oY0){var i=new AS(e.current,2,1,t,n,Am.aa?13:-13,a);ap.push(i),e.za()}else e.As[e.current]=0,e.za()},e.lock=function(a){e.locks[a]=1,console.log(e.locks)},e.za=function(){e.bq=e.As[e.current]},e.amElement=function(){e.current++,e.current>3&&(e.current=0)},e.ag=function(a,t){for(var n=0;4>n;n++)e.locks[n]||(Ap.fillStyle=n==e.current&&as%8==0?"#000":Ab[n],Ap.fillText(""+e.As[n],a+40+(n%2==0?35:1==n?69:0),t-40-(n%2==1?30:0==n?60:0)));firexx.x=a+50,firexx.y=t-95,firexx.ag()}},fire="{f{g{h{i{u!$%056?@ABFORV`bcefostu~,",air="{({){*{+{6{7{<{B{D{E{M{V{W{X{^{i{o%*5;FKV[eku~%~/~5~<~=~>~D~H~J~K~S~\\~]~b~n~o~p~q",water='{j{k{l{u"#$(369>@ABEIUY^`abeis~!~$~+~-~.~/~3~@~A~B',AX='{H{I{X{Y"#$134ACEQSVacdsu~.~1~=~@~M~P~]~^~`~a',Ar='{I{J{Y{Z"#$134ACERSVcdsu~.~0~=~?~M~O~]~^~_~`',AXrun='{Y{Z{i{j"#$134ACDESVWbcdqru~)~*~+~0~9~A~Q~a~b',AXak="{Z{[{g{h{i{j{k!#$134ACESTcesu~-~0~=~?~L~O~\\~_",AZ="ABCDEQSUabcdequ~,~0~<~@~L~P~\\~]~^~_~`",ab=["",'~A~>~0tqfUD2{i{h~@~=~1udVE1$#"{I{H',"B65VREA","~@~>tD2('&%{m{j{i~?~=udB651\"{J{I","~_~P~O~J~;~:~,tUB~b~a~Q~9~+~*~)uqWEA",'~`~M~?~>~=~/T2{k{[~P~J~A~;~:~0~,rdbVB1"{i{Y',"~k~j~Lo_N>~i~Y~Im]M=.","~p~n~m~l~`~]~~P~M~=~0~$pi`YOG?92({m{g{^{U{N{J{E{9{4{%~t~s~k~j~b~[~Z~R~K~J~;~%njb^[NKA>;/+!{p{k{`{[{O{K{H{;{8{*","~o~_~O~N~?~>~#hXPA@8'{l{]{M~a~Q~L~A~<~$oi_ZYOJ?:*{o{_{N","~/~.~-uqecaTR","~?~>~=~0~,usqdb","~O~N~M~@~<~0~.~,tr","~`~_~^~]~P~O~N~M~b~a~Z~Y~R~Q~J~I~B~A~2~1","~^~N~>~.s{j{i{[{X~a~]~~Q~M~L~<~0~,uTR{J{I{;{8","~o~n~m~^~~O~M~>~=~.~-pF6{3~q~p~k~`~[~P~L~?~<~/~,soVG{U","~]~Na`5%{2~o~l~^~~O~M~.p_UF6{V","~Y~X~:~+X9(~k~j~i~h~$~#8","~d~c~B~1N-{s~t~s~r~q~@nm.",".{r2{u{d{c{b","{>{3{.{#","{Y{X{J{G{l{e{9{8{*{'","{{U","{9{8{*{'{Y{X{M{J{G{D","{>{3","{Y{X{J{G{-{${9{8{.{*{'{#","{<{5","{{U{9{8{*{'{Y{X{J{G","{l{e{M{D{<{5{-{$"],defaultAnimations={i:{kf:"",f:[0]}},bw={i:{kf:AX,f:[0,0,0,0,0,0,0,0,0,1]},p:{kf:Ar,f:[2,3,3,2,0,-1]},r:{kf:AXrun,f:[0,4,0,5,0,5,0,4,0]},j:{kf:AXak,f:[0]}},Ay=function(a){for(var t=new Int16Array(ppp),e=0;e>4]|=1<i;i++)for(var r=t[i]&e[i],o=0;ppp>o;o++)1<t;t++)for(var e=0;ppp>e;e++)n.w[t]&1<=n.ab.length&&(n.ad=0),"string"==typeof n.ab[n.ad])return n.o(n.ab[n.ad]);for(var a=[],t=0;ppp>t;t++){n.w[t]=n.w[t]^n.ab[n.ad][t];for(var e=0;ppp>e;e++)1<3*n.e&&(n.vy=3*n.e)},n.AH=function(a){n.p||n.o("i"),n.vy=0,n.p=1,n.z=1,n.downed=0,n.y=a-15*n.e},n.l=function(){n.vx>0&&(n.vx=0),n.vx-=n.n,n.p&&n.o("r"),n.vx<-n.AD&&(n.vx=-n.AD),n.aa=0},n.h=function(){n.vx<0&&(n.vx=0),n.vx+=n.n,n.p&&n.o("r"),n.vx>n.AD&&(n.vx=n.AD),n.aa=1},n.AI=function(){n.aa?n.x+17*e+n.vx0?n.l():n.g()},n.turn=function(){n.aa=!n.aa},n.g=function(){0!=n.vx&&(n.vx=0,n.o("i"))},n.ak=function(){(n.p||n.z)&&(n.vy=3*-n.e,n.vy<-20&&(n.vy=-20),n.p||(n.z=0),n.p=0,n.o("j"))},n.d=function(){n.AC(),n.x+=n.vx},n.c=function(){n.x+=n.vx},n.dY=function(){n.y+=n.vy},n.ag=function(){Ap.fillStyle=n.ac;for(var a=0;a>4)*n.e,n.e,n.e)}},n.agFace=function(a,t){Ap.fillStyle=n.ac;for(var e=0;e>4),9,9)}},n.o=function(a){if(n.t!=a&&n.At[a]){n.t=a,n.ab=[];var t=n.At[a].f;for(n.w=Ay(Az(n.At[a].kf)),j=0;jn.x&&a.xi()n.x&&a.xf()n.x+n.width)&&n.y>a.yil()&&n.y+5=0?(n.AG=1,a.AH(t)):n.AG=0},n.ag=function(){Ap.fillRect(n.x,n.y,n.width,5)}},AS=function(a,t,e,n,i,r,o){var l=this;l.type=a,0==l.type&&(l.D=air),1==l.type&&(l.D=water),2==l.type&&(l.D=fire),3==l.type&&(l.D=fire),l.S=new AM(l.D),l.ai=0,l.ac=Aj[a],l.S.ac=Ab[a],l.S.x=n,l.S.y=i,l.S.AA(t),l.S.vx=r,l.S.vy=o,l.S.aa=r>0,l.bc=e,l.del=0,l.Av=function(){for(var a=Ag.length-1;a>=0;a--){var t=Ag[a].S;Ah(t.Aq(),l.S.Aq())&&(Ag[a].ba(l.type,l.bc,l.S.aa),l.del=1,Ac(l.S,2,l.S.vx/2,-3,l.ac))}},l.v=function(a){Ah(a,l.S.Aq())&&(aw.ba(l.type,l.bc,l.S.aa),l.del=1,Ac(l.S,2,l.S.vx/2,-3,l.ac))},l.d=function(){l.S.c(),l.S.dY(),l.ai=l.S.x>xlevel.w||l.S.x<-10},l.ah=function(){0==l.type&&l.S.u(),2==l.type&&l.S.u(),3==l.type&&l.S.u()}},Af=function(a,t,e,n){var i=this;i.type=a,i.AP=t,i.S=new AM(AZ),i.ac=Aj[a],i.S.ac=Ab[a],i.S.x=e,i.S.y=n,i.S.vy=.5,i.S.p=0,i.AR=256,i.del=0,i.d=function(){var t=as%32==0;i.S.p?(i.del=0==i.AR--,t=as%~~(i.AR/16)==0):i.S.dY(),i.S.ac=t?wbae:Ab[a]},i.v=function(a){Ah(a,i.S.Aq())&&(aw.AL(i.type,i.AP),i.del=1,Ac(i.S,0,0,-4,i.ac))}},monster0="{'{({){*{7{8{9{:{G{H{I{J{W{X{Y{Z{e{f{g{h{i{j{u!\"#$%./2367>?BCFGHRSbcrs~-~.~/~0~1~2~=~>~?~@~A~B~I~J~K~L~Q~R~Y~Z~[~\\~a~b",monster1="{3{4{8{9{B{C{D{E{H{I{J{K{S{T{U{V{X{Y{[{\\{d{e{f{h{i{l{u!$%&'1267BCQRSTUabcflpqrst~\"~'~*~+~,~.~8~9~:~;~I~J",monster2="{&{'{({){*{5{6{7{8{:{;{F{G{H{K{O{V{W{X{Y{Z{[{_{`{h{i{j{k{n{o{p!\"#$%)*+./013567:;=ABCDEHIJKMSZ[]^abcdejmnqsu~%~-~.~/~;~<~@~A~I~J~K~Q~R~Y~Z~[~a~b~i~q~r~s~t",monster3='{4{5{6{7{8{G{H{I{U{V{W{X{Y{g{h"123@BCDGORUV_bors~,~/~<~?~L~P~[~`~k~l~p~q',boss1="{D{L{S{T{V{W{X{Y{Z{\\{]{c{d{e{f{g{h{i{j{k{l{m{t{u#&'0123456@ABCDEFQRSTUabcderst",boss4="{&{'{({){*{5{6{7{8{9{:{;{E{H{K{U{X{[{e{f{j{k{u!%&./012345678=ABCDEIMRSTY]^bcdhimnrst~#~$~,~-~.~/~0~;~<~@~A~J~K~Q~R~Z~[~a~b~h~i~j~k~q~r~s~t",boss5='{6{:{E{F{I{J{K{V{W{X{Y{Z{[{b{c{d{g{h{i{k{s{t{u#$%&/012345@ABCDEFGOQRSTUX_cdimostu~"~$~)~-~.~/~0~3~>~?~M~N~]',boss6="{'{*{4{7{8{9{:{={D{E{H{I{L{M{U{V{[{\\{e{f{g{h{i{j{k{l{s!\"#$%&).13469?@CDGHSTbcderu~,~-~0~1~<~A~K~L~Q~R~[~\\~a~b",Aual0='{8{;{H{I{J{K{Y{Z{g{k"#$%&123456@CEPRSTVW`bdru~,~0~<~?~L~M~O~P~Q~\\~]~_~`~a',by={A0:monster0,A1:monster1,A2:monster2,A3:monster3,A4:boss1,A5:boss6,A6:AX,W0:monster0,W1:Aual0,W2:monster2,W3:monster3,W4:boss1,W5:AX,W6:AX,E0:monster0,E1:Aual0,E2:monster2,E3:monster3,E4:boss4,E5:AX,E6:AX,F0:monster0,F1:monster1,F2:monster2,F3:monster3,F4:boss1,F5:AX,F6:AX},bx={B0:{i:{kf:monster0,f:[0,0,0,12,0,12]}},B1:bw,B2:{i:{kf:monster2,f:[0,6,7,8,8,7,6,0]}},B3:{i:{kf:monster3,f:[0,14,0,0,0,14]}},B4:{i:{kf:boss1,f:[9,0,10,11,0,0,11,10,9,0]}},B5:{i:{kf:boss6,f:[19,0,0,20,21,22,23,0,0,0,24,25,26,27,0,0,0]}},B6:bw},i=0;7>i;i++)bx["A"+i]=bx["B"+i],bx["W"+i]=bx["B"+i],bx["E"+i]=bx["B"+i],bx["F"+i]=bx["B"+i];bx.A1={i:{kf:monster1,f:[0]}},bx.F1=bx.A1,bx.E1={i:{kf:Aual0,f:[0,0,0,0,13]}},bx.W1=bx.E1,bx.E4={i:{kf:boss4,f:[0,0,16,0,0,16,0,0,17,0,0,17]}},bx.F4={i:{kf:boss5,f:[0,0,18]}},bx.W4=bx.F4;var Ba={a:"ljlw90taw90",b:"lf80sw30asw30t",c:"lg60asw5aw5r20s",d:"ljdsw60ajdw30at",e:"ltja30w20",f:"ltg30a30w20",m:"w20hk20f9w9m20tas",n:"ljw20tg60stf30asw20",o:"lja10lf30jla10t",p:"w15hk30af15am30tw15am30af15k30at",q:"w15thk30af15am30tw15am30f15k30a",r:"ljda3jsw40hk20a5tf30sxa3"};Ba.z=Ba.m+"zx"+Ba.e+"z"+Ba.c+"z"+Ba.d+"jw20z";var Bc={minion:"2060F0",Aual:"3102E2",monster:"3153C1",wizard:"415291",Bf:"304361",boss1:"310490",boss2:"420490",boss3:"430590",boss4:"330730",boss5:"420551",boss6:"750621",boss7:"820811"},Bb={a0:"00"+Bc.minion,a1:"01"+Bc.minion,a2:"02"+Bc.minion,a3:"03"+Bc.minion,b0:"10"+Bc.Aual,b1:"11"+Bc.Aual,b2:"12"+Bc.Aual,b3:"13"+Bc.Aual,c0:"20"+Bc.monster,c1:"21"+Bc.monster,c2:"22"+Bc.monster,c3:"23"+Bc.monster,d0:"30"+Bc.wizard,d1:"31"+Bc.wizard,d2:"32"+Bc.wizard,d3:"33"+Bc.wizard,e0:"10"+Bc.Bf,e1:"11"+Bc.Bf,e2:"12"+Bc.Bf,e3:"13"+Bc.Bf,f0:"20"+Bc.Bf,f1:"21"+Bc.Bf,f2:"22"+Bc.Bf,f3:"23"+Bc.Bf,x1:"23"+Bc.boss1,x2:"10"+Bc.boss2,x3:"40"+Bc.boss3,x4:"42"+Bc.boss4,x5:"41"+Bc.boss5,x6:"43"+Bc.boss5,x7:"50"+Bc.boss6,z1:"60"+Bc.boss7,z2:"61"+Bc.boss7,z3:"62"+Bc.boss7,z4:"63"+Bc.boss7},generateMonster=function(a,t,e){var n=a[0],i=a[1],r=parseInt(a[2],16),o=parseInt(a[3]+a[4],16),l=parseInt(a[5])+4,A=3*parseInt(a[6],16),f=a[7];return new AW(n,i,100*t,r,e,o,l,A,f)},bt=["Minion","Elemental","Monster","Wizard","Master","Grand Master","Gran Elemental"],AW=function(a,t,e,n,i,r,o,l,A){var f=this;f.name=AualNames[t]+" "+bt[a],f.bc=parseInt(a)+1,f.ac=Aj[t],f.monsterCode=AualNames[t][0]+a,f.S=new AM(by[f.monsterCode],bx[f.monsterCode]),f.S.ac="hsl("+f.ac+",100%, 50%)",f.S.o("i"),f.S.AA(o),f.S.AD=n||2.2*f.e,f.S.x=e,f.S.y=-720,f.AN=new Ak([t]),f.AO=r,f.S.hp=r,f.q=l,f.maxColdown=l,f.triggerType=A||2,f.AV=100,f.del=0,f.AU=function(a){for(var t="",e=0;er;r++)t+=n}else t+=n}f.AQ=t},f.AU(i||"f60taw20"),f.AY=0,f.attack1=function(){if(f.q<=0){f.S.o("p");var a=-(f.S.x-Am.x),t=-(f.S.y-Am.y),e=Math.sqrt(a*a+t*t);a/=e,t/=e;var n=new AS(f.AN.current,f.S.e/3,f.bc,f.S.x+24,f.S.y,3*a,3*t);an.push(n),f.q=f.maxColdown}},f.bb=function(){f.S.aa=f.S.xAm.x,f.S.AI()},f.actions={f:f.S.AI,t:f.S.turn,j:f.S.ak,m:function(){},a:f.attack1,b:f.attack2,c:f.attack3,s:f.S.g,w:function(){},l:function(){f.S.p||f.AY--},d:function(){f.S.p?f.S.g():(f.AY--,f.S.AI())},g:f.bb,r:f.be,h:function(){f.S.AC=function(){}},x:function(){f.S.AC=function(){f.S.y+=f.S.vy,f.S.vy<0&&(f.S.p=0)}},u:function(){f.S.y-=3},n:function(){f.S.y+=3},k:function(){f.actions.u(),f.S.AI()},m:function(){f.actions.n(),f.S.AI()},z:function(){f.AN.amElement(),console.log("nx",f.AN.current),f.ac=Aj[f.AN.current],f.S.ac="hsl("+f.ac+",100%, 50%)"}},f.ao=function(){var a=f.AQ[f.AY];f.actions[a](),++f.AY>=f.AQ.length&&(f.AY=0)},f.d=function(){f.ao(),f.S.d(),--f.q<0&&(f.q=0),f.S.y>400&&(f.del=1)},f.triggers=[function(){Ae(f.AN.current,f.AO,f.S.x,f.S.y)},function(){Ae(4,f.AO,f.S.x,f.S.y)},function(){0==~~(10*Math.random())?f.triggers[1]():f.triggers[0]()},function(){console.log("otra cosa")}],f.trigger=function(){f.triggers[f.triggerType]()},f.ba=function(a,t,e){var n=Ai(a,f.AN.current,t);f.S.x+=(e?1:-1)*n*(10-f.bc),f.S.ba(n)&&!f.del&&(f.del=1,Ac(f.S,t,0,0,f.ac),f.trigger("death")),ax=f},f.agAvatar=function(a,t){Ap.fillStyle=wbae,Ap.fillText(f.name,a-120,t+20),Ap.fillStyle=as%16==0?bs:"yellow",Ap.fillRect(a-335,t+35,300,8),Ap.fillStyle="#300",Ap.fillRect(a-334,t+36,300*(1-f.S.hp/f.AO)-2,6),f.del&&as%8!=0||f.S.agFace(a-135,t+50)}},xf=0,yf=0,platformFunctions={a:function(a,t){return-t+yf},b:function(a,t,e){return-t+yf+e*(a-xf)},c:function(a,t,e,n){var i=(a/n-xf)%(2*Math.PI);return-t+yf+200*e*Math.cos(i)},d:function(a,t,e){var n=(a-xf)%(2*Math.PI);return-t+yf+200*e*Math.tan(n)},e:function(a,t,e){return-t+yf-e*(a-xf)},f:function(a,t,e){var n=(a-xf)%(2*Math.PI);return-t+yf+200*e*Math.sin(n*n)},g:function(a,t,e,n){return.005*platformFunctions.b(a,t,e,n)*platformFunctions.c(a,t,e,n)},h:function(a,t,e){return-t+yf+.005*e*(a-xf-650)*(a-xf-650)},i:function(a,t,e){return-t+yf+800+.005*e*(a-xf-400)*(a-xf-400)},v:function(a,t,e,n){return platformFunctions.a(a,t,e,n)*((a-xf)/n%3==0?1:1e3)},w:function(a,t,e,n){return platformFunctions.c(a,t,e,n)*((a-xf)/n%3==0?1:1e3)},x:function(a,t,e,n){return platformFunctions.c(a,t,e,n)*((a-xf)/n%2==1?1e3:1)}},AK=function(a,t,e,n,r,o){xf=0,yf=0;var l=this;l.w=a,l.h=0,l.title=o,l.AgVector=t,l.totalEnemies=l.AgVector.length,l.remainingEnemies=0,l.count=0,l.Bi=e,l.AE=function(a,t){var e=0,i=0,r=a[0];n=[];for(var o=0;o<=l.w;o+=l.Bi){var A=platformFunctions[r](o,0,t,l.Bi);l.h=Ae&&(e=0);var r=e+1+~~(au.w/l.Bi);for(r>=n.length&&(r=n.length-1),Ap.fillStyle="#A4A",i=e;r>=i;i++)n[i].ag();Ap.fillStyle=wbae,Ap.fillText(l.remainingEnemies+"/"+l.totalEnemies,a+900,t+650)},l.onAWDied=function(){++l.remainingEnemies==l.totalEnemies&&setTimeout(amAK,2e3)},l.onPlayerX=function(a){if(!(l.count<60||0==l.AgVector.length)){var t=l.AgVector[0];a+au.w-300>t.S.x&&(t.S.y=at.y,Ag.push(t),l.AgVector.splice(0,1))}},l.Av=function(a){var t=~~(a.xi()/l.Bi)-1;0>t&&(t=0);var e=~~(a.xf()/l.Bi)+1;for(e>=n.length&&(e=n.length-1),i=t;e>=i;i++)n[i].Av(a)}},AKGenerator=function(a){for(var t=a.Bg,e=a.Bh,n=[],i=0;i3?a=t-1:0>a+t?a=3+t+1:a+=t,m.AN.locks[a]?m.amSkill(a,t):a},m.selectSkill=function(a){m.AN.current=a,m.AN.za(),firexx.ac=Ab[m.AN.current]},m.am=function(){m.selectSkill(m.amSkill(m.AN.current,1)),m.r=5,az-=64},m.prev=function(){m.selectSkill(m.amSkill(m.AN.current,-1)),az-=16,m.r=-5},m.bd=function(){if(m.q<=0){m.S.o("p");var a=0;m.down&&(a=7),m.up&&(a=-7),m.AN.bd(a,Am.x+24,Am.y),m.q=16}m.S.ac="hsl("+m.s+","+m.AN.bq+"%, 50%)"},m.d=function(){m.S.d(),m.s+=m.r,m.s<0&&(m.s=355),m.s>355&&(m.s=5),m.s!=Aj[m.AN.current]?m.S.ac="hsl("+m.s+","+m.AN.bq+"%, 50%)":m.r=0,--m.q<0&&(m.q=0),m.S.y>400&&(m.del=1)},m.aj=function(){64&az&&m.am(),16&az&&m.prev(),m.down=8&az?1:0,m.up=2&az?1:0,128&az&&(m.S.ak(),az^=128),32&az&&m.bd(),1&az&&m.S.x>-16?m.S.l():4&az&&m.S.x+16*em.AO&&(m.S.hp=m.AO)):(m.AN.As[a]+=t,m.AN.As[a]>99&&(m.AN.As[a]=99))},m.ag=function(vx,vy){with(Ap)fillStyle=wbae,fillText("Agtaske",vx+73,vy+20),strokeStyle="yellow",fillStyle="#300",strokeRect(vx+35,vy+35,300,8),fillRect(vx+35,vy+35,300,8),fillStyle="yellow",fillRect(vx+35,vy+35,300*(m.S.hp/m.AO),8),fillText("- "+xlevel.title+" -",vx+au.w/2,vy+35);if(m.AN.ag(vx,vy+au.h),ax)with(ax)agAvatar(vx+au.w,vy),del&&0==--AV&&(ax=null);m.S.agFace(vx-35,vy+50)}},hue=0;Ap.ft=Ap.fillText;var aw=new AT(Am),firexx=new AM(fire);firexx.ac=Ab[0],firexx.e=3;var as=0,yOld=aw.S.y,bo="i",bp={g:Al,i:bl,p:bm,d:function(a,t){Al(),bn(a,t)}},actionsScreen={g:function(){bo="p"},i:function(){restartAK(-720),bo="g"},p:function(){bo="g"},d:function(){console.log("restart level"),restartAK(-720),bo="g"}};ra(bj)}(); \ No newline at end of file +!function(){function setFont(a){Ap.font=a?"normal lighter 12px":"normal lighter 20px monospace"}function Ah(a,t){return!(t.l>a.h||t.ha.AJ||t.AJ>4)*a.e,((a.aa?r:15-r)-8)*t+e,((a.D[A]>>4)-8)*t+n-2,a.e,i))}}function randomAds(){aq.push(new Ad(-at.x+1024*Math.random(),at.y+720*Math.random(),0,.1,2,360*Math.random()))}function Ae(a,t,e,n){ar.push(new Af(a,t,e,n))}function restartAK(a){var t=levels[currentAK];Ag=[],ap=[],an=[],ar=[],Ap.translate(-at.x,-a+at.y),at.x=0,at.y=a,Am.reset(),aw.reset(),ax=void 0,xlevel=AKGenerator(t),xAxis=0,yAxis=0}function amAK(){currentAK=levels[currentAK].aml,restartAK(at.y)}function bl(vx,vy){Ap.fillStyle="rgba(0,0,0,0.1)",Ap.fillRect(vx,vy,1024,720),randomAds(),Ap.fillStyle=Ab[1],Ap.strokeStyle="hsl("+ ++hue%720+",50%,50%)",Ap.font="normal lighter 242px fantasy",Ap.strokeText("VIER",vx+512,vy+216),Ap.font="normal lighter 30px fantasy",Ap.lineWidth=1,Ap.strokeText("W i z a r d W a r s",vx+512,vy+360),Ap.font="normal lighter 20px monospace",Ap.fillText("Press to Start",vx+512,vy+432),Ap.fillText("made by @agar3s",vx+512,vy+648),Ap.fillStyle=as%16==0?Ab[1]:Ab[0],Ap.fillText(" ",vx+512,vy+432);for(var i=aq.length-1;i>=0;i--)with(aq[i])ag(),d()&&aq.splice(i,1)}function bm(a,t){Ap.fillStyle="rgba(0,0,0,0.1)",Ap.fillRect(a,t,au.w,720),Ap.fillStyle=wbae,setFont(0),Ap.ft("PAUSE",a+512,t+144),Ap.ft("Controls",a+512,t+216),Ap.ft(": Shoot",a+.5*au.w,t+288),Ap.ft("<- : move to l ",a+.2*au.w,t+720*.48),Ap.ft("-> : move to h",a+.2*au.w,t+381.6),Ap.ft(" : ak ",a+.5*au.w,t+720*.48),Ap.ft("2X : double ak",a+.5*au.w,t+381.6),Ap.ft(" : am Au ",a+.8*au.w,t+720*.48),Ap.ft(" : previous Au",a+.8*au.w,t+381.6),Ap.ft("ASs",a+512,t+453.6),Ap.ft(" beats ",a+512,t+720*.7),Ap.ft(" beats ",a+.7*au.w,t+576),Ap.ft(" beats ",a+512,t+648),Ap.ft(" beats ",a+.3*au.w,t+576),Ap.fillStyle=Ab[1],Ap.ft("Water ",a+512,t+720*.7),Ap.ft(" Water",a+.3*au.w,t+576),Ap.fillStyle=Ab[2],Ap.ft("Earth ",a+.7*au.w,t+576),Ap.ft(" Earth",a+512,t+720*.7),Ap.fillStyle=Ab[3],Ap.ft("Fire ",a+512,t+648),Ap.ft(" Fire",a+.7*au.w,t+576),Ap.fillStyle=Ab[0],Ap.fillText("Air ",a+.3*au.w,t+576),Ap.fillText(" Air",a+512,t+648)}function bn(a,t){Ap.fillStyle="rgba(0,0,0,0.6)",Ap.fillRect(a,t,au.w,720),Ap.fillStyle=wbae,setFont(0),Ap.fillText("DEAD",a+512,t+216),setFont(1),Ap.fillText("enter to restart level",a+512,t+360)}function Al(){var wx=-at.x,wy=at.y;Ap.clearRect(wx,wy,au.w,au.h),xlevel.ag(wx,wy),Am.b(.8),xlevel.Av(Am),aw.del||aw.d(),xlevel.onPlayerX(Am.x);for(var j=ap.length-1;j>=0;j--)with(ap[j])d(),S.ag(),as%4==0&&ah(),as%2==0&&Av(),(ai||del)&&ap.splice(j,1);for(var j=Ag.length-1;j>=0;j--)with(Ag[j]){if(del){Ag.splice(j,1),xlevel.onAWDied();continue}S.ag(),S.b(.8),xlevel.Av(S),d(),as%2==0&&S.ah()}for(var j=an.length-1;j>=0;j--)with(an[j])d(),S.ag(),as%4==0&&ah(),as%2==0&&v(Am.Aq()),(ai||del)&&an.splice(j,1);for(var i=aq.length-1;i>=0;i--)with(aq[i])ag(),d()&&aq.splice(i,1);for(var i=ar.length-1;i>=0;i--)with(ar[i])d(),xlevel.Av(S),S.ag(),as%2==0&&v(Am.Aq()),del&&ar.splice(i,1);as%8==0&&firexx.u(),firexx.c(),as%2==0&&Am.ah(),aw.del?bo="d":(Am.ag(),aw.aj(),aw.ag(wx,wy)),aw.S.x>450-wx&&aw.S.xwy+au.h&&aw.S.vy>0?yyy=-aw.S.vy:aw.S.y-at.oY0){var i=new AS(e.current,2,1,t,n,Am.aa?13:-13,a);ap.push(i),e.za()}else e.As[e.current]=0,e.za()},e.lock=function(a){e.locks[a]=1},e.za=function(){e.bq=e.As[e.current]},e.amElement=function(){e.current++,e.current>3&&(e.current=0)},e.ag=function(a,t){for(var n=0;4>n;n++)e.locks[n]||(Ap.fillStyle=n==e.current&&as%8==0?"#000":Ab[n],Ap.fillText(""+e.As[n],a+40+(n%2==0?35:1==n?69:0),t-40-(n%2==1?30:0==n?60:0)));firexx.x=a+50,firexx.y=t-95,firexx.ag()}},fire="{f{g{h{i{u!$%056?@ABFORV`bcefostu~,",AX='{H{I{X{Y"#$134ACEQSVacdsu~.~1~=~@~M~P~]~^~`~a',Ar='{I{J{Y{Z"#$134ACERSVcdsu~.~0~=~?~M~O~]~^~_~`',AXrun='{Y{Z{i{j"#$134ACDESVWbcdqru~)~*~+~0~9~A~Q~a~b',AXak="{Z{[{g{h{i{j{k!#$134ACESTcesu~-~0~=~?~L~O~\\~_",AZ="ABCDEQSUabcdequ~,~0~<~@~L~P~\\~]~^~_~`",ab=["",'~A~>~0tqfUD2{i{h~@~=~1udVE1$#"{I{H',"B65VREA","~@~>tD2('&%{m{j{i~?~=udB651\"{J{I","~_~P~O~J~;~:~,tUB~b~a~Q~9~+~*~)uqWEA",'~`~M~?~>~=~/T2{k{[~P~J~A~;~:~0~,rdbVB1"{i{Y',"~k~j~Lo_N>~i~Y~Im]M=.","~p~n~m~l~`~]~~P~M~=~0~$pi`YOG?92({m{g{^{U{N{J{E{9{4{%~t~s~k~j~b~[~Z~R~K~J~;~%njb^[NKA>;/+!{p{k{`{[{O{K{H{;{8{*","~o~_~O~N~?~>~#hXPA@8'{l{]{M~a~Q~L~A~<~$oi_ZYOJ?:*{o{_{N","~/~.~-uqecaTR","~?~>~=~0~,usqdb","~O~N~M~@~<~0~.~,tr","~`~_~^~]~P~O~N~M~b~a~Z~Y~R~Q~J~I~B~A~2~1","~^~N~>~.s{j{i{[{X~a~]~~Q~M~L~<~0~,uTR{J{I{;{8","~o~n~m~^~~O~M~>~=~.~-pF6{3~q~p~k~`~[~P~L~?~<~/~,soVG{U","~]~Na`5%{2~o~l~^~~O~M~.p_UF6{V","~Y~X~:~+X9(~k~j~i~h~$~#8","~d~c~B~1N-{s~t~s~r~q~@nm.",".{r2{u{d{c{b","{>{3{.{#","{Y{X{J{G{l{e{9{8{*{'","{{U","{9{8{*{'{Y{X{M{J{G{D","{>{3","{Y{X{J{G{-{${9{8{.{*{'{#","{<{5","{{U{9{8{*{'{Y{X{J{G","{l{e{M{D{<{5{-{$"],defaultAnimations={i:{kf:"",f:[0]}},bw={i:{kf:AX,f:[0,0,0,0,0,0,0,0,0,1]},p:{kf:Ar,f:[2,3,3,2,0,-1]},r:{kf:AXrun,f:[0,4,0,5,0,5,0,4,0]},j:{kf:AXak,f:[0]}},Ay=function(a){for(var t=new Int16Array(ppp),e=0;e>4]|=1<i;i++)for(var A=t[i]&e[i],r=0;ppp>r;r++)1<t;t++)for(var e=0;ppp>e;e++)n.w[t]&1<=n.ab.length&&(n.ad=0),"string"==typeof n.ab[n.ad])return n.o(n.ab[n.ad]);for(var a=[],t=0;ppp>t;t++){n.w[t]=n.w[t]^n.ab[n.ad][t];for(var e=0;ppp>e;e++)1<3*n.e&&(n.vy=3*n.e)},n.AH=function(a){n.p||n.o("i"),n.vy=0,n.p=1,n.z=1,n.downed=0,n.y=a-15*n.e},n.l=function(){n.vx>0&&(n.vx=0),n.vx-=n.n,n.p&&n.o("r"),n.vx<-n.AD&&(n.vx=-n.AD),n.aa=0},n.h=function(){n.vx<0&&(n.vx=0),n.vx+=n.n,n.p&&n.o("r"),n.vx>n.AD&&(n.vx=n.AD),n.aa=1},n.AI=function(){n.aa?n.x+17*e+n.vx0?n.l():n.g()},n.turn=function(){n.aa=!n.aa},n.g=function(){0!=n.vx&&(n.vx=0,n.o("i"))},n.ak=function(){(n.p||n.z)&&(n.vy=3*-n.e,n.vy<-20&&(n.vy=-20),n.p||(n.z=0),n.p=0,n.o("j"))},n.d=function(){n.AC(),n.x+=n.vx},n.c=function(){n.x+=n.vx},n.dY=function(){n.y+=n.vy},n.ag=function(){Ap.fillStyle=n.ac;for(var a=0;a>4)*n.e,n.e,n.e)}},n.agFace=function(a,t){Ap.fillStyle=n.ac;for(var e=0;e>4),9,9)}},n.o=function(a){if(n.t!=a&&n.At[a]){n.t=a,n.ab=[];var t=n.At[a].f;for(n.w=Ay(Az(n.At[a].kf)),j=0;jn.x&&a.xi()n.x&&a.xf()n.x+n.width)&&n.y>a.yil()&&n.y+5=0?(n.AG=1,a.AH(t)):n.AG=0},n.ag=function(){Ap.fillRect(n.x,n.y,n.width,5)}},AS=function(a,t,e,n,i,A,r){var o=this;o.type=a,o.D=fire,o.S=new AM(o.D),o.ai=0,o.ac=Aj[a],o.S.ac=Ab[a],o.S.x=n,o.S.y=i,o.S.AA(t),o.S.vx=A,o.S.vy=r,o.S.aa=A>0,o.bc=e,o.del=0,o.Av=function(){for(var a=Ag.length-1;a>=0;a--){var t=Ag[a].S;Ah(t.Aq(),o.S.Aq())&&(Ag[a].ba(o.type,o.bc,o.S.aa),o.del=1,Ac(o.S,2,o.S.vx/2,-3,o.ac))}},o.v=function(a){Ah(a,o.S.Aq())&&(aw.ba(o.type,o.bc,o.S.aa),o.del=1,Ac(o.S,2,o.S.vx/2,-3,o.ac))},o.d=function(){o.S.c(),o.S.dY(),o.ai=o.S.x>xlevel.w||o.S.x<-10},o.ah=function(){o.S.u()}},Af=function(a,t,e,n){var i=this;i.type=a,i.AP=t,i.S=new AM(AZ),i.ac=Aj[a],i.S.ac=Ab[a],i.S.x=e,i.S.y=n,i.S.vy=.5,i.S.p=0,i.AR=256,i.del=0,i.d=function(){var t=as%32==0;i.S.p?(i.del=0==i.AR--,t=as%~~(i.AR/16)==0):i.S.dY(),i.S.ac=t?wbae:Ab[a]},i.v=function(a){Ah(a,i.S.Aq())&&(aw.AL(i.type,i.AP),i.del=1,Ac(i.S,0,0,-4,i.ac))}},monster0="{'{({){*{7{8{9{:{G{H{I{J{W{X{Y{Z{e{f{g{h{i{j{u!\"#$%./2367>?BCFGHRSbcrs~-~.~/~0~1~2~=~>~?~@~A~B~I~J~K~L~Q~R~Y~Z~[~\\~a~b",monster1="{3{4{8{9{B{C{D{E{H{I{J{K{S{T{U{V{X{Y{[{\\{d{e{f{h{i{l{u!$%&'1267BCQRSTUabcflpqrst~\"~'~*~+~,~.~8~9~:~;~I~J",monster2="{&{'{({){*{5{6{7{8{:{;{F{G{H{K{O{V{W{X{Y{Z{[{_{`{h{i{j{k{n{o{p!\"#$%)*+./013567:;=ABCDEHIJKMSZ[]^abcdejmnqsu~%~-~.~/~;~<~@~A~I~J~K~Q~R~Y~Z~[~a~b~i~q~r~s~t",monster3='{4{5{6{7{8{G{H{I{U{V{W{X{Y{g{h"123@BCDGORUV_bors~,~/~<~?~L~P~[~`~k~l~p~q',boss1="{D{L{S{T{V{W{X{Y{Z{\\{]{c{d{e{f{g{h{i{j{k{l{m{t{u#&'0123456@ABCDEFQRSTUabcderst",boss4="{&{'{({){*{5{6{7{8{9{:{;{E{H{K{U{X{[{e{f{j{k{u!%&./012345678=ABCDEIMRSTY]^bcdhimnrst~#~$~,~-~.~/~0~;~<~@~A~J~K~Q~R~Z~[~a~b~h~i~j~k~q~r~s~t",boss5='{6{:{E{F{I{J{K{V{W{X{Y{Z{[{b{c{d{g{h{i{k{s{t{u#$%&/012345@ABCDEFGOQRSTUX_cdimostu~"~$~)~-~.~/~0~3~>~?~M~N~]',boss6="{'{*{4{7{8{9{:{={D{E{H{I{L{M{U{V{[{\\{e{f{g{h{i{j{k{l{s!\"#$%&).13469?@CDGHSTbcderu~,~-~0~1~<~A~K~L~Q~R~[~\\~a~b",Aual0='{8{;{H{I{J{K{Y{Z{g{k"#$%&123456@CEPRSTVW`bdru~,~0~<~?~L~M~O~P~Q~\\~]~_~`~a',by={A0:monster0,A1:monster1,A2:monster2,A3:monster3,A4:boss1,A5:boss6,A6:AX,W0:monster0,W1:Aual0,W2:monster2,W3:monster3,W4:boss1,W5:AX,W6:AX,E0:monster0,E1:Aual0,E2:monster2,E3:monster3,E4:boss4,E5:AX,E6:AX,F0:monster0,F1:monster1,F2:monster2,F3:monster3,F4:boss1,F5:AX,F6:AX},bx={B0:{i:{kf:monster0,f:[0,0,0,12,0,12]}},B1:bw,B2:{i:{kf:monster2,f:[0,6,7,8,8,7,6,0]}},B3:{i:{kf:monster3,f:[0,14,0,0,0,14]}},B4:{i:{kf:boss1,f:[9,0,10,11,0,0,11,10,9,0]}},B5:{i:{kf:boss6,f:[19,0,0,20,21,22,23,0,0,0,24,25,26,27,0,0,0]}},B6:bw},i=0;7>i;i++)bx["A"+i]=bx["B"+i],bx["W"+i]=bx["B"+i],bx["E"+i]=bx["B"+i],bx["F"+i]=bx["B"+i];bx.A1={i:{kf:monster1,f:[0]}},bx.F1=bx.A1,bx.E1={i:{kf:Aual0,f:[0,0,0,0,13]}},bx.W1=bx.E1,bx.E4={i:{kf:boss4,f:[0,0,16,0,0,16,0,0,17,0,0,17]}},bx.F4={i:{kf:boss5,f:[0,0,18]}},bx.W4=bx.F4;var Ba={a:"ljlw90taw90",b:"lf80sw30asw30t",c:"lg60asw5aw5r20s",d:"ljdsw60ajdw30at",e:"ltja30w20",f:"ltg30a30w20",m:"w20hk20f9w9m20tas",n:"ljw20tg60stf30asw20",o:"lja10lf30jla10t",p:"w15hk30af15am30tw15am30af15k30at",q:"w15thk30af15am30tw15am30f15k30a",r:"ljda3jsw40hk20a5tf30sxa3"};Ba.z=Ba.m+"zx"+Ba.e+"z"+Ba.c+"z"+Ba.d+"jw20z";var Bc={minion:"2060F0",Aual:"3102E2",monster:"3153C1",wizard:"415291",Bf:"304361",boss1:"310490",boss2:"420490",boss3:"430590",boss4:"330730",boss5:"420551",boss6:"750621",boss7:"820811"},Bb={a0:"00"+Bc.minion,a1:"01"+Bc.minion,a2:"02"+Bc.minion,a3:"03"+Bc.minion,b0:"10"+Bc.Aual,b1:"11"+Bc.Aual,b2:"12"+Bc.Aual,b3:"13"+Bc.Aual,c0:"20"+Bc.monster,c1:"21"+Bc.monster,c2:"22"+Bc.monster,c3:"23"+Bc.monster,d0:"30"+Bc.wizard,d1:"31"+Bc.wizard,d2:"32"+Bc.wizard,d3:"33"+Bc.wizard,e0:"10"+Bc.Bf,e1:"11"+Bc.Bf,e2:"12"+Bc.Bf,e3:"13"+Bc.Bf,f0:"20"+Bc.Bf,f1:"21"+Bc.Bf,f2:"22"+Bc.Bf,f3:"23"+Bc.Bf,x1:"23"+Bc.boss1,x2:"10"+Bc.boss2,x3:"40"+Bc.boss3,x4:"42"+Bc.boss4,x5:"41"+Bc.boss5,x6:"43"+Bc.boss5,x7:"50"+Bc.boss6,z1:"60"+Bc.boss7,z2:"61"+Bc.boss7,z3:"62"+Bc.boss7,z4:"63"+Bc.boss7},generateMonster=function(a,t,e){var n=a[0],i=a[1],A=parseInt(a[2],16),r=parseInt(a[3]+a[4],16),o=parseInt(a[5])+4,s=3*parseInt(a[6],16),l=a[7];return new AW(n,i,100*t,A,e,r,o,s,l)},bt=["Minion","Elemental","Monster","Wizard","Master","Grand Master","Gran Elemental"],AW=function(a,t,e,n,i,A,r,o,s){var l=this;l.name=AualNames[t]+" "+bt[a],l.bc=parseInt(a)+1,l.ac=Aj[t],l.monsterCode=AualNames[t][0]+a,l.S=new AM(by[l.monsterCode],bx[l.monsterCode]),l.S.ac="hsl("+l.ac+",100%, 50%)",l.S.o("i"),l.S.AA(r),l.S.AD=n||2.2*l.e,l.S.x=e,l.S.y=-720,l.AN=new Ak([t]),l.AO=A,l.S.hp=A,l.q=o,l.maxColdown=o,l.triggerType=s||2,l.AV=100,l.del=0,l.AU=function(a){for(var t="",e=0;eA;A++)t+=n}else t+=n}l.AQ=t},l.AU(i||"f60taw20"),l.AY=0,l.attack1=function(){if(l.q<=0){l.S.o("p");var a=-(l.S.x-Am.x),t=-(l.S.y-Am.y),e=Math.sqrt(a*a+t*t);a/=e,t/=e;var n=new AS(l.AN.current,l.S.e/3,l.bc,l.S.x+24,l.S.y,3*a,3*t);an.push(n),l.q=l.maxColdown}},l.bb=function(){l.S.aa=l.S.xAm.x,l.S.AI()},l.actions={f:l.S.AI,t:l.S.turn,j:l.S.ak,m:function(){},a:l.attack1,b:l.attack2,c:l.attack3,s:l.S.g,w:function(){},l:function(){l.S.p||l.AY--},d:function(){l.S.p?l.S.g():(l.AY--,l.S.AI())},g:l.bb,r:l.be,h:function(){l.S.AC=function(){}},x:function(){l.S.AC=function(){l.S.y+=l.S.vy,l.S.vy<0&&(l.S.p=0)}},u:function(){l.S.y-=3},n:function(){l.S.y+=3},k:function(){l.actions.u(),l.S.AI()},m:function(){l.actions.n(),l.S.AI()},z:function(){l.AN.amElement(),console.log("nx",l.AN.current),l.ac=Aj[l.AN.current],l.S.ac="hsl("+l.ac+",100%, 50%)"}},l.ao=function(){var a=l.AQ[l.AY];l.actions[a](),++l.AY>=l.AQ.length&&(l.AY=0)},l.d=function(){l.ao(),l.S.d(),--l.q<0&&(l.q=0),l.S.y>400&&(l.del=1)},l.triggers=[function(){Ae(l.AN.current,l.AO,l.S.x,l.S.y)},function(){Ae(4,l.AO,l.S.x,l.S.y)},function(){0==~~(10*Math.random())?l.triggers[1]():l.triggers[0]()},function(){console.log("otra cosa")}],l.trigger=function(){l.triggers[l.triggerType]()},l.ba=function(a,t,e){var n=Ai(a,l.AN.current,t);l.S.x+=(e?1:-1)*n*(10-l.bc),l.S.ba(n)&&!l.del&&(l.del=1,Ac(l.S,t,0,0,l.ac),l.trigger("death")),ax=l},l.agAvatar=function(a,t){Ap.fillStyle=wbae,Ap.fillText(l.name,a-120,t+20),Ap.fillStyle=as%16==0?bs:"yellow",Ap.fillRect(a-335,t+35,300,8),Ap.fillStyle="#300",Ap.fillRect(a-334,t+36,300*(1-l.S.hp/l.AO)-2,6),l.del&&as%8!=0||l.S.agFace(a-135,t+50)}},xf=0,yf=0,platformFunctions={a:function(a,t){return-t+yf},b:function(a,t,e){return-t+yf+e*(a-xf)},c:function(a,t,e,n){var i=(a/n-xf)%(2*Math.PI);return-t+yf+200*e*Math.cos(i)},d:function(a,t,e){var n=(a-xf)%(2*Math.PI);return-t+yf+200*e*Math.tan(n)},e:function(a,t,e){return-t+yf-e*(a-xf)},f:function(a,t,e){var n=(a-xf)%(2*Math.PI);return-t+yf+200*e*Math.sin(n*n)},g:function(a,t,e,n){return.005*platformFunctions.b(a,t,e,n)*platformFunctions.c(a,t,e,n)},h:function(a,t,e){return-t+yf+.005*e*(a-xf-650)*(a-xf-650)},i:function(a,t,e){return-t+yf+800+.005*e*(a-xf-400)*(a-xf-400)},v:function(a,t,e,n){return platformFunctions.a(a,t,e,n)*((a-xf)/n%3==0?1:1e3)},w:function(a,t,e,n){return platformFunctions.c(a,t,e,n)*((a-xf)/n%3==0?1:1e3)},x:function(a,t,e,n){return platformFunctions.c(a,t,e,n)*((a-xf)/n%2==1?1e3:1)}},AK=function(a,t,e,n,A,r,o){xf=0,yf=0;var s=this;s.w=a,s.h=0,s.title=r,s.AgVector=t,s.totalEnemies=s.AgVector.length,s.remainingEnemies=0,s.count=0,s.Bi=e,s.AE=function(a,t){var e=0,i=0,A=a[0];n=[];for(var r=0;r<=s.w;r+=s.Bi){var o=platformFunctions[A](r,0,t,s.Bi);s.h=oe&&(e=0);var A=e+1+~~(au.w/s.Bi);for(A>=n.length&&(A=n.length-1),Ap.fillStyle="#A4A",i=e;A>=i;i++)n[i].ag();Ap.fillStyle=wbae,Ap.fillText(s.remainingEnemies+"/"+s.totalEnemies,a+900,t+650)},s.onAWDied=function(){++s.remainingEnemies==s.totalEnemies&&setTimeout(amAK,2e3)},s.onPlayerX=function(a){if(!(s.count<60||0==s.AgVector.length)){var t=s.AgVector[0];a+au.w-300>t.S.x&&(t.S.y=at.y,Ag.push(t),s.AgVector.splice(0,1))}},s.Av=function(a){var t=~~(a.xi()/s.Bi)-1;0>t&&(t=0);var e=~~(a.xf()/s.Bi)+1;for(e>=n.length&&(e=n.length-1),i=t;e>=i;i++)n[i].Av(a)}},AKGenerator=function(a){for(var t=a.Bg,e=a.Bh,n=[],i=0;i ",xAxis+600,yAxis-200),Ap.ft(" SPACE ",xAxis+1800,yAxis-300),Ap.ft(" D ",xAxis+2600,yAxis-220),Ap.ft(" ALL ",xAxis+3400,yAxis-320),Ap.fillStyle=wbae,Ap.ft("press to shoot",xAxis+200,yAxis-300),Ap.ft("press to move AI",xAxis+600,yAxis-200),Ap.ft("Press to change Au",xAxis+2600,yAxis-220),Ap.ft("press to ak",xAxis+1800,yAxis-300),Ap.ft("You must to destroy Ag",xAxis+3400,yAxis-320)}},boss1:{Bg:["x1n4"],Bh:["c",70],width:1024,Bi:20,Bj:-.05,title:"Fire Skeleton",aml:"level2",locks:[0,2],skill:1,backG:function(){Ap.ft(" BOSS!",xAxis+400,yAxis-350),Ap.fillStyle=wbae,Ap.ft("Destroy the ",xAxis+400,yAxis-350)}},level2:{Bg:["a0b4","a2b9","a2b12","a0b15","a2b18","a0b27","a2c30","a0c35","a2c40","a0c45"],Bh:["a",20,"b",15,"a",20,"b",15,"a",7,"v",21,"a",10,"b",22,"a",100],width:4800,Bi:27,Bj:-.3,title:"The Gate",aml:"boss2",locks:[1,3],skill:2,backG:function(){Ap.ft(" VIER ",xAxis+400,yAxis-350),Ap.ft(" D ",xAxis+1600,yAxis-240),Ap.ft(" SPACE ",xAxis+2600,yAxis-380),Ap.ft(" As ",xAxis+4200,yAxis-240),Ap.fillStyle=wbae,Ap.ft("With the stone you can control the Aus ",xAxis+400,yAxis-350),Ap.ft("Press to change to the previous Au",xAxis+1600,yAxis-240),Ap.ft("Press two AR to make a double ak",xAxis+2600,yAxis-380),Ap.ft("Enemies drop for Au energy",xAxis+4200,yAxis-240)}},boss2:{Bg:["x2m4"],Bh:["c",30],width:1024,Bi:37,Bj:-.05,title:"Fire Dragon",aml:"level3",locks:[1,3],skill:2,backG:function(){Ap.ft(" up flying ",xAxis+400,yAxis-350),Ap.fillStyle=wbae,Ap.ft("Press arrow to shoot Ag",xAxis+400,yAxis-350)}},level3:{Bg:["b1b4","b1a9","b2a12","b2a15","b3m20","b3m25","b0m35","b0m40","c1a47","c2a55","b2a70","c3b80"],Bh:["a",6,"f",6,"a",5,"b",5,"a",5,"b",5,"x",8,"c",9,"a",9],width:8400,Bi:149,Bj:-.5,title:"Air Palace",aml:"boss3",backG:function(){Ap.ft(" Enter ",xAxis+7650,yAxis-1e3),Ap.ft(" Masters!",xAxis+8650,yAxis-1100),Ap.fillStyle=wbae,Ap.ft("Elements are balanced",xAxis+400,yAxis-350),Ap.ft(" makes double bc to ",xAxis+700,yAxis-250),Ap.ft(" makes double bc to ",xAxis+1250,yAxis-350),Ap.ft(" makes double bc to ",xAxis+1950,yAxis-200),Ap.ft(" makes double bc to ",xAxis+3650,yAxis-300),Ap.ft("Press to pause the game",xAxis+7650,yAxis-1e3),Ap.ft("I'm ready to destroy the ",xAxis+8650,yAxis-1100),Ap.fillStyle=Ab[0],Ap.ft("Air ",xAxis+700,yAxis-250),Ap.ft(" Air",xAxis+3650,yAxis-300),Ap.fillStyle=Ab[1],Ap.ft(" Water",xAxis+700,yAxis-250),Ap.ft("Water ",xAxis+1250,yAxis-350),Ap.fillStyle=Ab[2],Ap.ft(" Earth",xAxis+1250,yAxis-350),Ap.ft("Earth ",xAxis+1950,yAxis-200),Ap.fillStyle=Ab[3],Ap.ft(" Fire",xAxis+1950,yAxis-200),Ap.ft("Fire ",xAxis+3650,yAxis-300)}},boss3:{Bg:["x3m4"],Bh:["c",2,"x",24,"c",2],width:1024,Bi:50,Bj:-.1,title:"Air Master",aml:"level4",backG:bsBack},level4:{Bg:["d3m4","d2m12","d2m20","d0m22","b2a28","b2a31","b2a32","b0m44","b3m50","a1c58","a3c60","a1c62","a3c64","c2b70","c2a75","d3d91","d1d95","d3d99"],Bh:["a",4,"g",30,"a",15,"b",25,"a",15,"b",20,"w",18,"a",20,"e",20,"x",10,"d",20,"a",50,"v",18,"e",10,"a",20,"e",30,"a",49],width:10024,Bi:27,Bj:-.55,title:"Earth Palace",aml:"boss4",backG:greenBack},boss4:{Bg:["x4o4"],Bh:["h",100],width:1350,Bi:50,Bj:-.01,title:"Earth Master",aml:"level5",backG:greenBack},level5:{Bg:["b1b4","e1e19","e3e24","f1b30","f3b32","d3m40","d1m44","d0m48","d2m56","e0a67","e3a70","e1a73"],Bh:["a",4,"f",5,"v",9,"a",3,"b",3,"h",3,"e",3,"a",4,"v",6,"a",6],width:7650,Bi:170,Bj:-.5,title:"Water & Fire Montains",aml:"boss5",backG:blueBack},boss5:{Bg:["x5p5","x6q7"],Bh:["b",14,"a",12,"e",14],width:1330,Bi:35,Bj:-.1,title:"Water & Fire Masters",aml:"level6",backG:blueBack},level6:{Bg:["b2a10","b2a12","b2a14","a0f25","a2f26","a2f27","a0f28","b1b38","b3e40","c0b68","c2b70","d1a106","d3m108","f0f110","f2f11","d3m113","d1a115"],Bh:["a",60,"b",60,"a",60,"c",30,"a",60,"d",20,"a",60,"f",60,"a",60,"b",20,"i",30,"a",20,"v",60,"a",60,"v",33,"a",99],width:12e3,Bi:16,Bj:-.8,title:"Grand Master Palace",aml:"boss6a",backG:stormBack},boss6a:{Bg:["x7z4"],width:1200,Bh:["a",2],Bi:700,Bj:1,title:"Grand Master",aml:"boss6b",backG:stormBack},boss6b:{Bg:["z1r6","z2r6","z3r6","z4r6"],width:1800,Bh:["a",3],Bi:700,Bj:1,title:"Element's Avatar challenge",aml:"ends",backG:stormBack},ends:{Bg:[],width:1800,Bh:["a",3],Bi:700,Bj:1,title:"Grand master mode",aml:"ends",backG:function(){Ap.ft("Congratulations! you beat the Game!",xAxis+400,yAxis-350),Ap.ft("==Thanks for playing==",xAxis+600,yAxis-150),Ap.ft("made by @agar3s",xAxis+1400,yAxis-150),Ap.ft(" F5 ",xAxis+1600,yAxis+150),Ap.fillStyle=wbae,Ap.ft("press to start the game again",xAxis+1600,yAxis+150)}}},Am=new AM(AX,bw);Am.o("i");var AT=function(S){var m=this;m.S=S,m.S.AA(5),m.r=0,m.down=0,m.up=0,m.reset=function(){m.del=0,m.S.hp=31,m.AO=31,m.AN=new Ak([0,1,2,3],99),m.q=16,m.s=Aj[m.AN.current],m.S.ac="hsl("+m.s+",100%, 50%)"},m.reset(),m.lock=function(a){for(var t=0;t3?a=t-1:0>a+t?a=3+t+1:a+=t,m.AN.locks[a]?m.amSkill(a,t):a},m.selectSkill=function(a){m.AN.current=a,m.AN.za(),firexx.ac=Ab[m.AN.current]},m.am=function(){m.selectSkill(m.amSkill(m.AN.current,1)),m.r=5,az-=64},m.prev=function(){m.selectSkill(m.amSkill(m.AN.current,-1)),az-=16,m.r=-5},m.bd=function(){if(m.q<=0){m.S.o("p");var a=0;m.down&&(a=7),m.up&&(a=-7),m.AN.bd(a,Am.x+24,Am.y),m.q=16}m.S.ac="hsl("+m.s+","+m.AN.bq+"%, 50%)"},m.d=function(){m.S.d(),m.s+=m.r,m.s<0&&(m.s=355),m.s>355&&(m.s=5),m.s!=Aj[m.AN.current]?m.S.ac="hsl("+m.s+","+m.AN.bq+"%, 50%)":m.r=0,--m.q<0&&(m.q=0),m.S.y>400&&(m.del=1)},m.aj=function(){64&az&&m.am(),16&az&&m.prev(),m.down=8&az?1:0,m.up=2&az?1:0,128&az&&(m.S.ak(),az^=128),32&az&&m.bd(),1&az&&m.S.x>-16?m.S.l():4&az&&m.S.x+16*em.AO&&(m.S.hp=m.AO)):(m.AN.As[a]+=t,m.AN.As[a]>99&&(m.AN.As[a]=99))},m.ag=function(vx,vy){with(Ap)fillStyle=wbae,fillText("Agtaske",vx+73,vy+20),strokeStyle="yellow",fillStyle="#300",strokeRect(vx+35,vy+35,300,8),fillRect(vx+35,vy+35,300,8),fillStyle="yellow",fillRect(vx+35,vy+35,300*(m.S.hp/m.AO),8),fillText("- "+xlevel.title+" -",vx+au.w/2,vy+35);if(m.AN.ag(vx,vy+au.h),ax)with(ax)agAvatar(vx+au.w,vy),del&&0==--AV&&(ax=null);m.S.agFace(vx-35,vy+50)}},hue=0;Ap.ft=Ap.fillText;var aw=new AT(Am),firexx=new AM(fire);firexx.ac=Ab[0],firexx.e=3;var as=0,yOld=aw.S.y,bo="i",dBackground=function(a){xAxis+=.1*a},bp={g:Al,i:bl,p:bm,d:function(a,t){Al(),bn(a,t)}},actionsScreen={g:function(){bo="p"},i:function(){restartAK(-720),bo="g"},p:function(){bo="g"},d:function(){console.log("restart level"),restartAK(-720),bo="g"}};ra(bj)}(); \ No newline at end of file diff --git a/tasks.todo b/tasks.todo index a8dbd28..44ee841 100644 --- a/tasks.todo +++ b/tasks.todo @@ -16,8 +16,8 @@ +-- platforms -- messages - -- title -- backgrounds + +-- title --- upgrounds -- color ---- music @@ -27,10 +27,13 @@ -- events +-- on player X +-- on enemy died - -- on level start - -- on level ends - -- on last enemy died - -- on message ends + --- on level start + -- mostrar title + -- tres segundos despues + -- ejecutar msj de bienvenida + --- on level ends + ----- on last enemy died + --- on message ends +-- restart +-- start +-- ends @@ -71,7 +74,7 @@ !-- if a monster fall remove... - viewport x again ----- enemies with simple AI ++---- enemies with simple AI ---- implements textures for the backgrounds ---- implements sound management