var _0x18b3 = ['RklSRUJBTEwgUFJPSkVDVElMRQ==', 'REVBRF9BTklNX0xFTkdUSA==', 'Qk9VTkNFX1NQRUVE', 'REVBRDA=', 'REVBRDE=', 'REVBRDI=', 'bGlmZQ==', 'TElGRV9NQVg=', 'RklSRSBCUkVBVEggUFJPSkVDVElMRQ==', 'dGhyb3dUaW1lcg==', 'VEhST1dfREVMQVk=', 'SEFNTUVSIFBST0pFQ1RJTEU=', 'VEhST1c=', 'dGhyb3c=', 'cmlzZQ==', 'UklTRV9SQVRF', 'TVVTSFJPT00=', 'RklSRSBGTE9XRVI=', 'U1RBUg==', 'T05FVVA=', 'dXNlZA==', 'QVhF', 'UE9JU09OIE1VU0hST09N', 'Q09JTg==', 'Q0hFQ0tNQVJL', 'b2Zmc2V0', 'Y29sb3I=', 'dGV4dA==', 'VEVYVA==', 'Yml0cw==', 'RkFMTF9TUEVFRA==', 'dmVs', 'YW5n', 'bWFw', 'VVBfVElNRQ==', 'RE9XTl9USU1F', 'TU9WRV9TUEVFRA==', 'Y29udGFpbmVy', 'b25tb3VzZW1vdmU=', 'bW91c2U=', 'ZXZlbnQ=', 'b25tb3VzZWRvd24=', 'b25tb3VzZXVw', 'YWRkRXZlbnRMaXN0ZW5lcg==', 'bW91c2V3aGVlbA==', 'd2hlZWw=', 'RE9NTW91c2VTY3JvbGw=', 'b25rZXl1cA==', 'a2V5Ym9hcmQ=', 'b25rZXlkb3du', 'dG91Y2hFdnQ=', 'dG91Y2g=', 'dG91Y2hzdGFydA==', 'dG91Y2htb3Zl', 'dG91Y2hlbmQ=', 'SU5QVVRT', 'dXAgZG93biBsZWZ0IHJpZ2h0IGEgYg==', 'c3BsaXQ=', 'S19ERUZBVUxU', 'R19ERUZBVUxU', 'YXNzaWduSw==', 'YXNzaWduRw==', 'cGFk', 'Z2V0R2FtZXBhZHM=', 'YW5hbG9n', 'YXhlcw==', 'YnV0dG9u', 'YnV0dG9ucw==', 'cHJlc3NlZA==', 'aW5wdXRz', 'bW92', 'c3Bpbg==', 'bnh0TW92', 'bnh0U3Bpbg==', 'bG1i', 'cm1i', 'bW1i', 'd2hlZWxEZWx0YQ==', 'ZGV0YWls', 'a2V5cw==', 'a2V5Q29kZQ==', 'a2V5', 'dG91Y2hlcw==', 'aWRlbnRpZmllcg==', 'Y2xpZW50WA==', 'Y2xpZW50WQ==', 'cG9w', 'cmVtb3ZlRXZlbnRMaXN0ZW5lcg==', 'dGV4dHVyZQ==', 'Y2FjaGU=', 'c3Jj', 'dG9Mb3dlckNhc2U=', 'cG5n', 'bG9hZFRleHR1cmU=', 'Z2lm', 'RmFpbGVkIHRvIGxvYWQgcmVzb3VyY2Ugd2l0aCB1bmtub3duIGV4dGVuc2lvbjog', 'b25sb2Fk', 'Z2V0VGV4dHVyZQ==', 'TU9WRV9NVUxU', 'Wk9PTV9NVUxU', 'Wk9PTV9NQVg=', 'Wk9PTV9NSU4=', 'bW92ZQ==', 'em9vbQ==', 'dW5wcm9qZWN0', 'Y2FudmFz', 'cGF0aA==', 'YXVkaW8v', 'cmVzcG9uc2VUeXBl', 'ZGVjb2RlQXVkaW9EYXRh', 'cmVzcG9uc2U=', 'b25FcnJvcg==', 'Y29udGV4dA==', 'cGxheWluZw==', 'cGxheWVk', 'QXR0ZW1wdGVkIHRvIGluc3RhbmNlIHBhcnRpYWxseSBsb2FkZWQgc291bmQgZGF0YTogJw==', 'c291cmNl', 'Y3JlYXRlQnVmZmVyU291cmNl', 'b25lbmRlZA==', 'cGxheWJhY2tSYXRl', 'Z2Fpbg==', 'Y3JlYXRlR2Fpbg==', 'dm9sdW1l', 'QXR0ZW1wdGVkIHRvIHJlcGxheSBzb3VuZCBpbnN0YW5jZTogJw==', 'cGFubmVy', 'Y3JlYXRlUGFubmVy', 'cGFubmluZ01vZGVs', 'SFJURg==', 'ZGlzdGFuY2VNb2RlbA==', 'bGluZWFy', 'cmVmRGlzdGFuY2U=', 'RkFMTE9GRl9NSU4=', 'bWF4RGlzdGFuY2U=', 'RkFMTE9GRl9NQVg=', 'cm9sbG9mZkZhY3Rvcg==', 'Y29uZUlubmVyQW5nbGU=', 'Y29uZU91dGVyQW5nbGU=', 'Y29uZU91dGVyR2Fpbg==', 'c2V0UG9zaXRpb24=', 'c2V0T3JpZW50YXRpb24=', 'cG9zaXRpb25Y', 'cG9zaXRpb25Z', 'cG9zaXRpb25a', 'aW5pdFdlYkF1ZGlv', 'aW5pdEZhbGxiYWNr', 'bXV0ZU11c2lj', 'bXVzaWM=', 'bXV0ZVNvdW5k', 'QXVkaW9Db250ZXh0', 'd2Via2l0QXVkaW9Db250ZXh0', 'V2ViQXVkaW8gbm90IHN1cHBvcnRlZC4gSW50aWFsaXppbmcgZmFsbGJhY2sgbW9kZS4uLg==', 'c2Z4L2FsZXJ0LndhdiBzZngvYnJlYWsud2F2IHNmeC9icmVhdGgud2F2IHNmeC9idW1wLndhdiBzZngvY29pbi53YXYgc2Z4L2ZpcmViYWxsLndhdiBzZngvZmlyZXdvcmsud2F2IHNmeC9mbGFncG9sZS53YXYgc2Z4L2l0ZW0ud2F2IHNmeC9qdW1wMC53YXYgc2Z4L2p1bXAxLndhdiBzZngva2ljay53YXYgc2Z4L2xpZmUud2F2IHNmeC9waXBlLndhdiBzZngvcG93ZXJ1cC53YXYgc2Z4L3N0b21wLndhdiBzZngvdmluZS53YXYgbXVzaWMvbWFpbjAubXAzIG11c2ljL21haW4xLm1wMyBtdXNpYy9tYWluMi5tcDMgbXVzaWMvbWFpbjMubXAzIG11c2ljL2xldmVsLm1wMyBtdXNpYy9jYXN0bGUubXAzIG11c2ljL3ZpY3RvcnkubXAzIG11c2ljL3N0YXIubXAzIG11c2ljL2RlYWQubXAzIG11c2ljL2dhbWVvdmVyLm1wMw==', 'Y3JlYXRlQXVkaW8=', 'bWFzdGVyVm9sdW1l', 'ZGVzdGluYXRpb24=', 'ZWZmZWN0Vm9sdW1l', 'bXVzaWNWb2x1bWU=', 'bGlzdGVuZXI=', 'dXBkYXRlVm9sdW1l', 'Y2FtZXJh', 'Zm9yd2FyZFg=', 'Zm9yd2FyZFk=', 'Zm9yd2FyZFo=', 'dXBY', 'dXBZ', 'dXBa', 'ZW1hbnJ1b3k=', 'c2F2ZVNldHRpbmdz', 'c2V0TXVzaWM=', 'Z2V0QXVkaW8=', 'c3RvcE11c2lj', 'Y3JlYXRlQ3VzdG9tQXVkaW8=', 'RmFpbGVkIHRvIGxvYWQgc291bmQ6ICc=', 'ZGVmYXVsdC53YXY=', 'bXVsdGkvZGVmYXVsdC53YXY=', 'Y2F0Y2g=', 'RXJyb3IgY2xvc2luZyBhdWRpbyBjb250ZXh0Lg==', 'Y29sbGlkZVRlc3Q=', 'cmV5YWxQdGVn', 'ZGVlcFNldm9t', 'Z25pcG11ag==', 'c2V2aWw=', 'cmVtaVRlZ2FtYWQ=', 'cmVtaVRyYXRz', 'cmV3b3A=', 'ZXRhcg==', 'b25IaXQ=', 'c2Npc3locA==', 'b25Db2xsaWRl', 'Z2V0Q29udGV4dA==', 'cmVzb3VyY2U=', 'Y2xlYXI=', 'Y2xpZW50V2lkdGg=', 'Y2xpZW50SGVpZ2h0', 'Y2xlYXJSZWN0', 'bW96SW1hZ2VTbW9vdGhpbmdFbmFibGVk', 'd2Via2l0SW1hZ2VTbW9vdGhpbmdFbmFibGVk', 'bXNJbWFnZVNtb290aGluZ0VuYWJsZWQ=', 'aW1hZ2VTbW9vdGhpbmdFbmFibGVk', 'ZmlsbFN0eWxl', 'ZmlsbFJlY3Q=', 'c2F2ZQ==', 'dHJhbnNsYXRl', 'ZHJhd01hcA==', 'ZHJhd09iamVjdA==', 'ZHJhd0VmZmVjdA==', 'cmVzdG9yZQ==', 'ZHJhd1RvdWNo', 'ZHJhd1VJ', 'ZHJhd0xvYWQ=', 'ZGVwdGg=', 'aW5kZXg=', 'ZHJhd0ltYWdl', 'bW9kZQ==', 'Z2xvYmFsQWxwaGE=', 'ZnJhbWU=', 'Z2xvYmFsQ29tcG9zaXRlT3BlcmF0aW9u', 'bGlnaHRlcg==', 'Zm9udA==', 'cHggU21iV2Vi', 'dGV4dEFsaWdu', 'Y2VudGVy', 'ZmlsbFRleHQ=', 'Z2V0RWZmZWN0cw==', 'dGV4', 'aW5k', 'cm90YXRl', 'Z2V0UGxheWVySW5mbw==', 'bGV2ZWxXYXJwSWQ=', 'c3RhcnREZWx0YQ==', 'Z2V0SW5pdGlhbExldmVs', 'Z2FtZU92ZXI=', 'YmxhY2s=', 'd2hpdGU=', 'MzJweCBTbWJXZWI=', 'R0FNRSBPVkVS', 'c3RhcnRUaW1lcg==', 'MjRweCBTbWJXZWI=', 'R0FNRSBTVEFSVFMgSU46IA==', 'dmljdG9yeQ==', 'VklDVE9SWSBST1lBTEUgIw==', 'VE9PIEJBRCAj', 'bGVmdA==', 'SU5GUklOR0lP', 'Y29pbnM=', 'bWVhc3VyZVRleHQ=', 'bGl2ZXM=', 'cmVtYWlu', 'IFBMQVlFUlMgUkVNQUlO', 'cGxheWVycw==', 'dG91Y2hNb2Rl', 'IC8gNzUgUExBWUVSUw==', 'dGh1bWJPcmlnaW4=', 'cmdiYSgwLDAsMCwwLjUp', 'cmdiYSgyNTUsMjU1LDI1NSwxLjAp', 'dGh1bWJQb3M=', 'dG91Y2hSdW4=', 'NjVweCBTbWJXZWI=', 'TG9hZGluZyBSZXNvdXJjZXMuLi4=', 'aW5pdGlhbA==', 'bGV2ZWxz', 'Z2V0SW5pdGlhbFpvbmU=', 'em9uZXM=', 'Z2V0SW5pdGlhbA==', 'YnVtcGVk', 'ZWZmZWN0cw==', 'dmluZXM=', 'c2Z4L2J1bXAud2F2', 'c2Z4L2JyZWFrLndhdg==', 'Y2VpbA==', 'Z2FtZS1jYW52YXM=', 'bGFzdERyYXc=', 'dG91Y2hGdWxs', 'dGh1bWJJZA==', 'dmljdG9yeU11c2lj', 'Z2FtZU92ZXJUaW1lcg==', 'bGV2ZWxXYXJwVGltZXI=', 'ZnJhbWVSZXE=', 'bG9vcFJlcQ==', 'VElDS19SQVRF', 'RkRMQ19UQVJHRVQ=', 'RkRMQ19NQVg=', 'TEVWRUxfV0FSUF9USU1F', 'R0FNRV9PVkVSX1RJTUU=', 'Q09JTlNfVE9fTElGRQ==', 'cGFyYW0=', 'ZzEy', 'dXBkYXRlUGxheWVyTGlzdA==', 'ZzEz', 'Z2FtZVN0YXJ0VGltZXI=', 'dXBkYXRlVGVhbQ==', 'c2Z4L2FsZXJ0Lndhdg==', 'ZG9TdGFydA==', 'Z2V0R2hvc3Q=', 'dXBkYXRlUGFja2V0', 'ZG9VcGRhdGU=', 'c2hpZnQ=', 'ZGVzaWduYXRpb24=', 'ZG9ORVQwMDE=', 'ZG9ORVQwMTA=', 'ZG9ORVQwMTE=', 'ZG9ORVQwMTI=', 'ZG9ORVQwMTM=', 'ZG9ORVQwMTc=', 'ZG9ORVQwMTg=', 'ZG9ORVQwMjA=', 'ZG9ORVQwMzA=', 'Z2V0UmVtYWlu', 'cmVzdWx0', 'ZXh0cmE=', 'Z2V0T2JqZWN0', 'ZG9TcGF3bg==', 'ZG9EZXRlcm1pbmU=', 'ZG9Ub3VjaA==', 'ZG9JbnB1dA==', 'ZG9jdW1lbnRFbGVtZW50', 'cmVxdWVzdEZ1bGxzY3JlZW4=', 'bW96UmVxdWVzdEZ1bGxTY3JlZW4=', 'd2Via2l0UmVxdWVzdEZ1bGxzY3JlZW4=', 'bXNSZXF1ZXN0RnVsbHNjcmVlbg==', 'cHJlc3M=', 'Y2xpY2s=', 'aW54Mjc=', 'ZG93bg==', 'cmlnaHQ=', 'YnRu', 'ZG9TdGVw', 'ZG9NdXNpYw==', 'bXVzaWMvZ2FtZW92ZXIubXAz', 'bXVzaWMvZGVhZC5tcDM=', 'bXVzaWMvbGV2ZWwubXAz', 'bXVzaWMvY2FzdGxlLm1wMw==', 'bXVzaWMvdmljdG9yeS5tcDM=', 'ZG9QdXNo', 'YmluZA==', 'YXBwbHk=', 'bGFzdFpvbmU=', 'c2Z4L2NvaW4ud2F2', 'c2Z4L2xpZmUud2F2', 'bG9iYnlUaW1lcg==', 'aW5pdA==', 'L3JveWFsZS9zdGF0dXM=', 'YWN0aXZl', 'QW4gdW5rbm93biBlcnJvciBvY2N1cmVkIHdoaWxlIGNvbm5lY3RpbmcgdG8gdGhlIGdhbWUgc2VydmVyLi4u', 'U3RhdGUgZXJyb3IuIEdhbWUgYWxyZWFkeSBsb2FkZWQu', 'bG9iYnk=', 'amFpbA==', 'Q3JpdGljYWwgZXJyb3IhIEdhbWUgZmlsZSBtaXNzaW5nIHR5cGUh', 'QW4gZXJyb3Igb2NjdXJlZCB3aGlsZSBzdGFydGluZyBnYW1lLi4u', 'cmVsb2Fk', 'bm9ybWFsaXpl', 'cmFuZG9t', 'c3FydA==', 'bWFnbml0dWRl', 'c3VidHJhY3Q=', 'YWRk', 'c2NhbGU=', 'Y29z', 'c2lu', 'ZG90', 'YWNvcw==', 'Y3JlYXRl', 'bGVuZ3Ro', 'bWFrZQ==', 'Y29weQ==', 'bXVsdGlwbHk=', 'bGVycA==', 'dG9BcnJheQ==', 'bGluZTI=', 'aW50ZXJzZWN0aW9u', 'dGltZQ==', 'c3ByaXRl', 'bm9ybWFs', 'cG9pbnRSZWN0YW5nbGU=', 'cG9pbnRQb2x5', 'bGluZUxpbmU=', 'ZGlzdGFuY2U=', 'bGluZUNpcmNsZQ==', 'bGluZU5lYXJlc3RQb2ludA==', 'ZXF1YWxz', 'cG9seWdvbkxpbmU=', 'cHVzaA==', 'cG9seWdvbkNpcmNsZQ==', 'bm93', 'Z2V0U3ByaXRl', 'd2lkdGg=', 'aGVpZ2h0', 'VEVYUkVT', 'Zmxvb3I=', 'cmVxdWVzdEFuaW1hdGlvbkZyYW1l', 'd2Via2l0UmVxdWVzdEFuaW1hdGlvbkZyYW1l', 'bW96UmVxdWVzdEFuaW1hdGlvbkZyYW1l', 'b1JlcXVlc3RBbmltYXRpb25GcmFtZQ==', 'bXNSZXF1ZXN0QW5pbWF0aW9uRnJhbWU=', 'c2V0VGltZW91dA==', 'Y2FuY2VsQW5pbWF0aW9uRnJhbWU=', 'd2Via2l0Q2FuY2VsUmVxdWVzdEFuaW1hdGlvbkZyYW1l', 'bW96Q2FuY2VsUmVxdWVzdEFuaW1hdGlvbkZyYW1l', 'b0NhbmNlbFJlcXVlc3RBbmltYXRpb25GcmFtZQ==', 'bXNDYW5jZWxSZXF1ZXN0QW5pbWF0aW9uRnJhbWU=', 'dXNlIHN0cmljdA==', 'ZW5jb2Rl', 'ZGVjb2RlMTY=', 'ZGVjb2Rl', 'YnVtcA==', 'ZGF0YQ==', 'YXNBcnJheQ==', 'VFJJR0dFUg==', 'R0VOX0ZVTkM=', 'VFlQRQ==', 'VE9VQ0g=', 'RE9XTg==', 'UFVTSA==', 'U01BTExfQlVNUA==', 'QklHX0JVTVA=', 'QlVNUA==', 'd29ybGQ=', 'Z2V0Wm9uZQ==', 'b2JqZWN0cw==', 'ZGVhZA==', 'bGV2ZWw=', 'em9uZQ==', 'ZGlt', 'cG9z', 'Ym91bmNl', 'Ym9uaw==', 'cGlk', 'cGxheWVyQ29sbGlkZQ==', 'Z2V0UGxheWVy', 'Y29pbg==', 'QlJFQUs=', 'YnJlYWs=', 'VElMRV9QUk9QRVJUSUVT', 'QUlS', 'U09MSUQgU1RBTkRBUkQ=', 'U09MSUQgQlVNUEFCTEU=', 'b3V0', 'U09MSUQgQlJFQUtBQkxFIE5PUk1BTA==', 'SVRFTSBCTE9DSyBTVEFOREFSRA==', 'cmVwbGFjZQ==', 'Y3JlYXRlT2JqZWN0', 'cGxheQ==', 'c2Z4L2l0ZW0ud2F2', 'Q09JTiBCTE9DSyBTVEFOREFSRA==', 'Y29pbmFnZQ==', 'Q09JTiBCTE9DSyBNVUxUSQ==', 'dGlsZQ==', 'VklORSBCTE9DSw==', 'Z3Jvdw==', 'c2Z4L3ZpbmUud2F2', 'SVRFTSBCTE9DSyBJTlZJU0lCTEU=', 'Q09JTiBCTE9DSyBJTlZJU0lCTEU=', 'V0FSUCBUSUxF', 'd2FycA==', 'V0FSUCBQSVBFIFNMT1c=', 'Z2V0VGlsZQ==', 'ZGVmaW5pdGlvbg==', 'YWJz', 'cGlwZQ==', 'V0FSUCBQSVBFIFJJR0hUIFNMT1c=', 'V0FSUCBQSVBFIEZBU1Q=', 'V0FSUCBQSVBFIFJJR0hUIEZBU1Q=', 'TEVWRUwgRU5EIFdBUlA=', 'bGV2ZWxXYXJw', 'RkxBR1BPTEU=', 'cG9sZQ==', 'VklORQ==', 'dmluZQ==', 'Vk9URSBCTE9DSw==', 'c2VuZA==', 'ZzUw', 'REVTSUdOQVRJT04=', 'YnVmZmVy', 'Z2V0RmxvYXQzMg==', 'RXJyb3IgZGVjb2RpbmcgYmluYXJ5IGRhdGEh', 'aW5zaWRl', 'Ym9keQ==', 'Z2V0RWxlbWVudEJ5SWQ=', 'aGlzdG9yeQ==', 'cHVzaFN0YXRl', 'aW5kZXguaHRtbA==', 'SW5mcmluZ2UgUm95YWxl', 'd2Fybg==', 'ZXJyb3I=', 'bG9hZA==', 'ZGlzY2xhaW0=', 'bWFpbg==', 'bmFtZQ==', 'Z2FtZQ==', 'bWVudXM=', 'b2Jq', 'bGFzdE5hdg==', 'b25wb3BzdGF0ZQ==', 'b25CYWNr', 'c3RhdGU=', 'cGFnZVRpdGxl', 'Y29udGVudA==', 'aW5uZXJIVE1M', 'aHRtbA==', 'dGl0bGU=', 'YmFjaw==', 'aGlkZUFsbA==', 'YmFja2dyb3VuZA==', 'c3R5bGU=', 'ZGlzcGxheQ==', 'YmxvY2s=', 'cHJvdG90eXBl', 'aGlkZQ==', 'Ymlk', 'YmFja2dyb3VuZC1i', 'YmFja2dyb3VuZC1j', 'YmFja2dyb3VuZC1h', 'Y2xhc3NMaXN0', 'cmVtb3Zl', 'bmF2aWdhdGlvbg==', 'cmVwbGFjZVN0YXRl', 'ZWxlbWVudA==', 'dGltZW91dA==', 'c2hvdw==', 'PGltZyBzcmM9J2ltZy9ob21lL3dhcm4ucG5nJyBjbGFzcz0nd2Fybi1pY28nLz4g', 'IyNXQVJOIyMg', 'bm9uZQ==', 'ZXJyb3ItbWVzc2FnZQ==', 'bmV0', 'Y2xvc2U=', 'bWVudQ==', 'IyNFUlJPUiMjIA==', 'IyNUUkFDRSMjIA==', 'bGlua0VsZW1lbnQ=', 'bGluaw==', 'd2luRWxlbWVudA==', 'd2lu', 'bGF1bmNoQnRu', 'bWFpbi1sYXVuY2g=', 'bnVtYmVy', 'bWFpbi1udW1iZXI=', 'b25jbGljaw==', 'bGF1bmNo', 'Z2V0', 'ZXBpY19nYW1lcl9tb21lbnRz', 'aGVhdGVkX2dhbWVyX21vbWVudHM=', 'V2luczog', 'IDxzcGFuIGNsYXNzPSdraWxsJz5LaWxsczog', 'PC9zcGFuPg==', 'bmFtZUlucHV0', 'bmFtZS1pbnB1dA==', 'dGVhbUlucHV0', 'dGVhbS1pbnB1dA==', 'bmFtZS1sYXVuY2g=', 'c2V0', 'dmFsdWU=', 'dGVhbQ==', 'am9pbg==', 'Y29ubmVjdGVk', 'd2ViU29ja2V0', 'cmVhZHlTdGF0ZQ==', 'Q0xPU0VE', 'Y29ubmVjdA==', 'bG9jYXRpb24=', 'aG9zdA==', 'cHJlZk5hbWU=', 'cHJlZlRlYW0=', 'Q29ubmVjdGlvbiBhbHJlYWR5IG9wZW4uIFN0YXRlIGVycm9yLg==', 'd3M6Ly8=', 'L3JveWFsZS93cw==', 'YmluYXJ5VHlwZQ==', 'YXJyYXlidWZmZXI=', 'b25vcGVu', 'b3Blbg==', 'dHlwZQ==', 'RXJyb3IuIFdTIG9wZW4gZXZlbnQgaGFzIHVuZXhwZWN0ZWQgcmVzdWx0Lg==', 'b25tZXNzYWdl', 'aGFuZGxlQmluYXJ5', 'aGFuZGxlUGFja2V0', 'cGFyc2U=', 'b25jbG9zZQ==', 'Q29ubmVjdGlvbiBJbnRlcnJ1cHRlZA==', 'czAw', 'c2V0U3RhdGU=', 'czAx', 'aGFuZGxlQmxvYg==', 'cGFja2V0cw==', 'czAy', 'eDAw', 'U2VydmVyIEV4Y2VwdGlvbg==', 'bWVzc2FnZQ==', 'eDAx', 'dHJhY2U=', 'UmVjaWV2ZWQgaW52YWxpZCBwYWNrZXQgdHlwZTog', 'c3RyaW5naWZ5', 'ZGVzdHJveQ==', 'UmVjZWl2ZWQgaW52YWxpZCBzdGF0ZSBJRDog', 'cmVhZHk=', 'c2VuZEJpbmFyeQ==', 'aW5nYW1l', 'bDAx', 'bG9nZ2VkSW4=', 'UmVjaWV2ZWQgdW5leHBlY3RlZCBiaW5hcnkgZGF0YSE=', 'bDAw', 'c2lk', 'bG9n', 'TG9nZ2VkIGluOiA=', 'IDo6IA==', 'IC8vIA==', 'cGluZ091dA==', 'cGluZ0xhc3Q=', 'cGluZ0ZyYW1l', 'ZzAx', 'ZzA2', 'Z2xvYmFsV2Fybg==', 'ZzIx', 'cmVjaWV2ZVBpbmc=', 'ZzAw', 'YWpheA==', 'aHR0cDovLw==', 'L3JveWFsZS9nYW1lLw==', 'R0VU', 'ZzAz', 'U2VydmVyIHJldHVybmVkIEZORig0MDQpIGZvciBnYW1lIGZpbGU6IA==', 'c2VuZFBpbmc=', 'cGluZw==', 'ZGVsdGE=', 'Z2FyYmFnZQ==', 'cmV2ZXJzZQ==', 'c291bmRz', 'QVNZTkM=', 'dXBkYXRl', 'c3RlcA==', 'c291bmQ=', 'ZG9uZQ==', 'c3BsaWNl', 'cG9zaXRpb24=', 'a2lsbA==', 'aXNUYW5naWJsZQ==', 'ZGlzYWJsZWQ=', 'ZHJhdw==', 'YXVkaW8=', 'Z2V0U3BhdGlhbEF1ZGlv', 'ZWZmZWN0', 'T0JKRUNUX0xJU1Q=', 'UkVHSVNURVJfT0JKRUNU', 'T0JKRUNU', 'SW52YWxpZCBPYmplY3QgQ2xhc3MgSUQ6IA==', 'Y2FsbA==', 'YW5pbQ==', 'ZGVhZFRpbWVy', 'ZGVhZEZyZWV6ZVRpbWVy', 'YXJyb3dGYWRl', 'bGFzdFBvcw==', 'ZmFsbFNwZWVk', 'bW92ZVNwZWVk', 'anVtcGluZw==', 'Z3JvdW5kZWQ=', 'aXNTcHJpbmc=', 'aXNCb3VuY2U=', 'c3RhclRpbWVy', 'cG93ZXI=', 'c3Rhck11c2lj', 'dGZtVGltZXI=', 'ZGFtYWdlVGltZXI=', 'dGZtVGFyZ2V0', 'cGlwZVdhcnA=', 'cGlwZVRpbWVy', 'cGlwZUV4dA==', 'cGlwZURpcg==', 'cG9sZVRpbWVy', 'cGlwZURlbGF5TGVuZ3Ro', 'cGlwZURlbGF5', 'cG9sZVNvdW5k', 'cG9sZVdhaXQ=', 'dmluZVdhcnA=', 'YXR0YWNrQ2hhcmdl', 'TUFYX0NIQVJHRQ==', 'YXR0YWNrVGltZXI=', 'YXV0b1RhcmdldA==', 'YnRuRA==', 'YnRuQmRl', 'YnRuQmc=', 'YnRuQg==', 'YnRuQQ==', 'U05BTUU=', 'U1RBTkQ=', 'TkFNRQ==', 'UExBWUVS', 'QU5JTUFUSU9OX1JBVEU=', 'RElNX09GRlNFVA==', 'REVBRF9GUkVFWkVfVElNRQ==', 'REVBRF9USU1F', 'REVBRF9VUF9GT1JDRQ==', 'UlVOX1NQRUVEX01BWA==', 'TU9WRV9TUEVFRF9NQVg=', 'TU9WRV9TUEVFRF9BQ0NFTA==', 'TU9WRV9TUEVFRF9ERUNFTA==', 'TU9WRV9TUEVFRF9BQ0NFTF9BSVI=', 'U1RVQ0tfU0xJREVfU1BFRUQ=', 'RkFMTF9TUEVFRF9NQVg=', 'RkFMTF9TUEVFRF9BQ0NFTA==', 'Qk9VTkNFX0xFTkdUSF9NSU4=', 'U1BSSU5HX0xFTkdUSF9NSU4=', 'U1BSSU5HX0xFTkdUSF9NQVg=', 'SlVNUF9MRU5HVEhfTUlO', 'SlVNUF9MRU5HVEhfTUFY', 'SlVNUF9TUEVFRF9JTkNfVEhSRVNIT0xE', 'SlVNUF9ERUNFTA==', 'QkxPQ0tfQlVNUF9USFJFU0hPTEQ=', 'UE9XRVJfSU5ERVhfU0laRQ==', 'R0VORVJJQ19JTkRFWA==', 'REFNQUdFX1RJTUU=', 'VFJBTlNGT1JNX1RJTUU=', 'VFJBTlNGT1JNX0FOSU1BVElPTl9SQVRF', 'U1RBUl9MRU5HVEg=', 'UFJPSl9PRkZTRVQ=', 'QVRUQUNLX0RFTEFZ', 'QVRUQUNLX0NIQVJHRQ==', 'QVRUQUNLX0FOSU1fTEVOR1RI', 'UElQRV9USU1F', 'UElQRV9TUEVFRA==', 'UElQRV9FWFRfT0ZGU0VU', 'V0VFRF9FQVRfUkFESVVT', 'UE9MRV9ERUxBWQ==', 'UE9MRV9TTElERV9TUEVFRA==', 'TEVWRUxfRU5EX01PVkVfT0ZG', 'Q0xJTUJfU1BFRUQ=', 'UExBVEZPUk1fU05BUF9ESVNU', 'QVJST1dfU1BSSVRF', 'QVJST1dfVEVYVA==', 'WU9V', 'QVJST1dfT0ZGU0VU', 'VEVYVF9PRkZTRVQ=', 'VEVYVF9TSVpF', 'VEVYVF9DT0xPUg==', 'I0ZGRkZGRg==', 'QVJST1dfUkFEX0lO', 'QVJST1dfUkFEX09VVA==', 'QVJST1dfVEhSRVNIT0xEX01JTg==', 'QVJST1dfVEhSRVNIT0xEX01BWA==', 'VEVBTV9PRkZTRVQ=', 'VEVBTV9TSVpF', 'VEVBTV9DT0xPUg==', 'cmdiYSgyNTUsMjU1LDI1NSwwLjc1KQ==', 'U1BSSVRF', 'U1BSSVRFX0xJU1Q=', 'U19TVEFORA==', 'U19SVU4w', 'U19SVU4x', 'U19SVU4y', 'U19TTElERQ==', 'U19GQUxM', 'U19DTElNQjA=', 'U19DTElNQjE=', 'Ql9TVEFORA==', 'Ql9ET1dO', 'Ql9SVU4w', 'Ql9SVU4x', 'Ql9SVU4y', 'Ql9TTElERQ==', 'Ql9GQUxM', 'Ql9DTElNQjA=', 'Ql9DTElNQjE=', 'Ql9UUkFOU0ZPUk0=', 'Rl9TVEFORA==', 'Rl9ET1dO', 'Rl9SVU4w', 'Rl9SVU4x', 'Rl9SVU4y', 'Rl9TTElERQ==', 'Rl9GQUxM', 'Rl9DTElNQjA=', 'Rl9DTElNQjE=', 'Rl9BVFRBQ0s=', 'Rl9UUkFOU0ZPUk0=', 'R19ERUFE', 'R19ISURF', 'UlVO', 'U0xJREU=', 'RkFMTA==', 'UE9MRQ==', 'Q0xJTUI=', 'QVRUQUNL', 'VFJBTlNGT1JN', 'REVBRA==', 'SElERQ==', 'R0hPU1Q=', 'REVBREdIT1NU', 'U1RBVEU=', 'dHJpZ2dlcg==', 'YXR0YWNr', 'c3Rhcg==', 'c3RvcA==', 'aXNTdGF0ZQ==', 'c2Z4L2ZsYWdwb2xlLndhdg==', 'Z2V0VGlsZXM=', 'Q09MTElERQ==', 'Z2V0RmxhZw==', 'bWF4', 'ZGltZW5zaW9ucw==', 'Z2V0U3RhdGVCeVBvd2VySW5kZXg=', 'Y29sbGlzaW9uVGVzdA==', 'c2Z4L3BpcGUud2F2', 'd2VlZGVhdA==', 'YXV0b01vdmU=', 'Y29udHJvbA==', 'cGh5c2ljcw==', 'aW50ZXJhY3Rpb24=', 'YXJyb3c=', 'aW5wdXQ=', 'RElN', 'c2lnbg==', 'bWlu', 'c2Z4L2p1bXAxLndhdg==', 'c2Z4L2p1bXAwLndhdg==', 'Z2V0UGxhdGZvcm1z', 'SElEREVO', 'cmlkaW5n', 'b2lk', 'ZGFtYWdl', 'cGxheWVyU3RvbXA=', 'cGxheWVyQnVtcA==', 'c2Z4L2ZpcmViYWxsLndhdg==', 'dGZt', 'aW52dWxu', 'cG93ZXJ1cA==', 'cmF0ZQ==', 'bGlmZWFnZQ==', 'YXhl', 'Z2V0VGV4dA==', 'dG9TdHJpbmc=', 'dG9vIGJhZA==', 'bXVzaWMvc3Rhci5tcDM=', 'bG9vcA==', 'c2Z4L3Bvd2VydXAud2F2', 'Z2V0TGV2ZWw=', 'Z2V0V2FycA==', 'SU5ERVg=', 'd3JpdGU=', 'cmdiYSgyNTUsMjU1LDI1NSw=', 'dmFyaWFudA==', 'Ym9ua1RpbWVy', 'ZGlzYWJsZWRUaW1lcg==', 'cHJveEhpdA==', 'ZGly', 'ZGlzYWJsZQ==', 'R09PTUJB', 'VkFSSUFOVF9PRkZTRVQ=', 'RU5BQkxFX0ZBREVfVElNRQ==', 'RU5BQkxFX0RJU1Q=', 'Qk9OS19USU1F', 'Qk9OS19JTVA=', 'Qk9OS19ERUNFTA==', 'Qk9OS19GQUxMX1NQRUVE', 'UlVOMA==', 'UlVOMQ==', 'U1RBVEVfTElTVA==', 'Qk9OSw==', 'ZW5hYmxl', 'cHJveGltaXR5', 'c2Z4L2tpY2sud2F2', 'c2Z4L3N0b21wLndhdg==', 'RkxZ', 'anVtcA==', 'aW1tdW5lVGltZXI=', 'S09PUEE=', 'UExBWUVSX0lNTVVORV9USU1F', 'U0hFTExfTU9WRV9TUEVFRF9NQVg=', 'VFJBTlNGT1JNX1RIUkVTSE9MRA==', 'RkxZMA==', 'RkxZMQ==', 'U0hFTEw=', 'U1BJTg==', 'c3RvbXBlZA==', 'dHJhbnNmb3JtVGltZXI=', 'bG9j', 'RkxZX0RJU1RBTkNF', 'cmV2', 'S09PUEEgVFJPT1BB', 'RkxZX0FDQ0VM', 'RkxZX1NQRUVEX01BWA==', 'Q0hFQ0tfRElTVA==', 'Y2hlY2tHcm91bmQ=', 'SURMRQ==', 'VU5TUEVMTEFCTEUgUExBTlQ=', 'U09GRlNFVA==', 'V0FJVF9USU1F', 'VFJBVkVMX1NQRUVE', 'SURMRTA=', 'SURMRTE=', 'd2FpdFRpbWVy', 'ZGVsYXk=', 'REVMQVlfREVGQVVMVA==', 'aW1wdWxzZQ==', 'ZGVsYXlUaW1lcg==', 'RkxZSU5HIEZJU0g=', 'Qk9OS19GQUxMX0FDQ0VM', 'SU1QVUxTRQ==', 'RFJBRw==', 'aGFtbWVy', 'TU9WRV9BUkVB', 'Z3JvdW5kVGltZXI=', 'ZG91Ymxl', 'YXR0YWNrQW5pbVRpbWVy', 'anVtcFRpbWVy', 'SEFNTUVSIEJSTw==', 'SlVNUF9ERUxBWQ==', 'SlVNUF9MRU5HVEg=', 'RE9VQkxFX1JBVEU=', 'ZmFjZQ==', 'YXR0YWNo', 'aGVhbHRo', 'SEVBTFRI', 'Qk9XU0VS', 'QVRUQUNLMA==', 'QVRUQUNLMQ==', 'c2Z4L2JyZWF0aC53YXY=', 'c3BlZWQ=', 'cmlkZXJz', 'UExBVEZPUk0=', 'QlVTIFBMQVRGT1JN', 'c3RhcnQ=', 'RVhURU5E', 'U1BSSU5H', 'VEhSRVNIT0xE', 'UE9XRVI=', 'U1RBR0Uw', 'U1RBR0Ux', 'U1RBR0Uy', 'SEFMRg==', 'Q09NUFJFU1M=', 'cG93', 'RkxBRw==', 'T0ZGU0VU', 'U1BJTl9SQVRF', 'c2l6ZQ==', 'UEFSVFM=', 'RklSRSBUUkFQ', 'U1BBQ0lORw==', 'SURMRTI=', 'SURMRTM=', 'cm90', 'RklSRSBCTEFTVA==', 'Ymxhc3Q=', 'ZmlyZVRpbWVy', 'RklSRV9ERUxBWV9ERUZBVUxU', 'TEFVTkNIRVI=', 'ZmlyZQ==', 'c2Z4L2ZpcmV3b3JrLndhdg==', 'QlVMTEVU', 'U1BFRUQ=', 'b3duZXI=']; (function(_0x1fb84b, _0x4097d9) { var _0x455352 = function(_0x5671b3) { while (--_0x5671b3) { _0x1fb84b['push'](_0x1fb84b['shift']()); } }; var _0x1faba7 = function() { var _0x165091 = { 'data': { 'key': 'cookie', 'value': 'timeout' }, 'setCookie': function(_0x49cd97, _0x1874c7, _0x27cc62, _0x4037d0) { _0x4037d0 = _0x4037d0 || {}; var _0x1edd0b = _0x1874c7 + '=' + _0x27cc62; var _0x4fab65 = 0; for (var _0x4fab65 = 0, _0x26349e = _0x49cd97['length']; _0x4fab65 < _0x26349e; _0x4fab65++) { var _0x1644df = _0x49cd97[_0x4fab65]; _0x1edd0b += ';\x20' + _0x1644df; var _0x428458 = _0x49cd97[_0x1644df]; _0x49cd97['push'](_0x428458); _0x26349e = _0x49cd97['length']; if (_0x428458 !== !![]) { _0x1edd0b += '=' + _0x428458; } } _0x4037d0['cookie'] = _0x1edd0b; }, 'removeCookie': function() { return 'dev'; }, 'getCookie': function(_0x1c3295, _0x4ef71c) { _0x1c3295 = _0x1c3295 || function(_0x4cb227) { return _0x4cb227; }; var _0x2b5f2d = _0x1c3295(new RegExp('(?:^|;\x20)' + _0x4ef71c['replace'](/([.$?*|{}()[]\/+^])/g, '$1') + '=([^;]*)')); var _0x53493e = function(_0x3e1d20, _0x31c9c2) { _0x3e1d20(++_0x31c9c2); }; _0x53493e(_0x455352, _0x4097d9); return _0x2b5f2d ? decodeURIComponent(_0x2b5f2d[1]) : undefined; } }; var _0x38dc14 = function() { var _0x1928e8 = new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}'); return _0x1928e8['test'](_0x165091['removeCookie']['toString']()); }; _0x165091['updateCookie'] = _0x38dc14; var _0x2d84a9 = ''; var _0x4eea55 = _0x165091['updateCookie'](); if (!_0x4eea55) { _0x165091['setCookie'](['*'], 'counter', 1); } else if (_0x4eea55) { _0x2d84a9 = _0x165091['getCookie'](null, 'counter'); } else { _0x165091['removeCookie'](); } }; _0x1faba7(); }(_0x18b3, 350)); var _0x2e74 = function(_0xa982d6, _0x583701) { _0xa982d6 = _0xa982d6 - 0; var _0x4daf0b = _0x18b3[_0xa982d6]; if (_0x2e74['BPVPLT'] === undefined) { (function() { var _0x72c03c; try { var _0x39c88c = Function('return\x20(function()\x20' + '{}.constructor(\x22return\x20this\x22)(\x20)' + ');'); _0x72c03c = _0x39c88c(); } catch (_0x5e3706) { _0x72c03c = window; } var _0x590c66 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; _0x72c03c['atob'] || (_0x72c03c['atob'] = function(_0x43dc44) { var _0x552971 = String(_0x43dc44)['replace'](/=+$/, ''); for (var _0x1f9954 = 0, _0x14c8a3, _0x208a61, _0x4b8583 = 0, _0x1c26eb = ''; _0x208a61 = _0x552971['charAt'](_0x4b8583++); ~_0x208a61 && (_0x14c8a3 = _0x1f9954 % 4 ? _0x14c8a3 * 64 + _0x208a61 : _0x208a61, _0x1f9954++ % 4) ? _0x1c26eb += String['fromCharCode'](255 & _0x14c8a3 >> (-2 * _0x1f9954 & 6)) : 0) { _0x208a61 = _0x590c66['indexOf'](_0x208a61); } return _0x1c26eb; }); }()); _0x2e74['QzZvHf'] = function(_0x1e0fcb) { var _0x4458bd = atob(_0x1e0fcb); var _0x3a3ed0 = []; for (var _0x434ad1 = 0, _0x550f09 = _0x4458bd['length']; _0x434ad1 < _0x550f09; _0x434ad1++) { _0x3a3ed0 += '%' + ('00' + _0x4458bd['charCodeAt'](_0x434ad1)['toString'](16))['slice'](-2); } return decodeURIComponent(_0x3a3ed0); }; _0x2e74['iQdeEV'] = {}; _0x2e74['BPVPLT'] = !![]; } var _0xdd2663 = _0x2e74['iQdeEV'][_0xa982d6]; if (_0xdd2663 === undefined) { var _0x23c15d = function(_0x4eef10) { this['ToHhbO'] = _0x4eef10; this['cgEQay'] = [1, 0x0, 0]; this['mAeMJI'] = function() { return 'newState'; }; this['VtdJtj'] = '\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*'; this['KmJkMm'] = '[\x27|\x22].+[\x27|\x22];?\x20*}'; }; _0x23c15d['prototype']['GgrFWr'] = function() { var _0x402236 = new RegExp(this['VtdJtj'] + this['KmJkMm']); var _0x1bba4a = _0x402236['test'](this['mAeMJI']['toString']()) ? --this['cgEQay'][1] : --this['cgEQay'][0]; return this['ucKotl'](_0x1bba4a); }; _0x23c15d['prototype']['ucKotl'] = function(_0x2e3198) { if (!Boolean(~_0x2e3198)) { return _0x2e3198; } return this['TqWmar'](this['ToHhbO']); }; _0x23c15d['prototype']['TqWmar'] = function(_0x63254b) { for (var _0x4cfd98 = 0, _0x994edc = this['cgEQay']['length']; _0x4cfd98 < _0x994edc; _0x4cfd98++) { this['cgEQay']['push'](Math['round'](Math['random']())); _0x994edc = this['cgEQay']['length']; } return _0x63254b(this['cgEQay'][0]); }; new _0x23c15d(_0x2e74)['GgrFWr'](); _0x4daf0b = _0x2e74['QzZvHf'](_0x4daf0b); _0x2e74['iQdeEV'][_0xa982d6] = _0x4daf0b; } else { _0x4daf0b = _0xdd2663; } return _0x4daf0b; }; var _0x35d3bd = {}, _0x4628a4 = { 'make': function(_0x161b6d, _0xaa6515) { return { 'x': _0x161b6d, 'y': _0xaa6515 }; }, 'random': function() { return _0x4628a4.normalize({ 'x': 2 * Math.random() - 1, 'y': 2 * Math.random() - 1 }); }, 'copy': function(_0x3eff59) { return { 'x': _0x3eff59['x'], 'y': _0x3eff59['y'] }; }, 'add': function(_0x359113, _0xf8a09c) { return { 'x': _0x359113['x'] + _0xf8a09c['x'], 'y': _0x359113['y'] + _0xf8a09c['y'] }; }, 'subtract': function(_0x389a44, _0x5d80b6) { return { 'x': _0x389a44['x'] - _0x5d80b6['x'], 'y': _0x389a44['y'] - _0x5d80b6['y'] }; }, 'scale': function(_0x11f44f, _0x57fab5) { return { 'x': _0x11f44f['x'] * _0x57fab5, 'y': _0x11f44f['y'] * _0x57fab5 }; }, 'multiply': function(_0x42374a, _0x1d7a5b) { return { 'x': _0x42374a['x'] * _0x1d7a5b['x'], 'y': _0x42374a['y'] * _0x1d7a5b['y'] }; }, 'divide': function(_0x325883, _0x358d3a) { return { 'x': _0x325883['x'] / _0x358d3a['x'], 'y': _0x325883['y'] / _0x358d3a['y'] }; }, 'magnitude': function(_0x2826d4) { return Math.sqrt(_0x2826d4['x'] * _0x2826d4['x'] + _0x2826d4['y'] * _0x2826d4['y']); }, 'normalize': function(_0x11dbe3) { var _0x495946 = _0x4628a4.magnitude(_0x11dbe3); return 0 !== _0x495946 ? { 'x': _0x11dbe3['x'] / _0x495946, 'y': _0x11dbe3['y'] / _0x495946 } : { 'x': 0, 'y': 1 }; }, 'distance': function(_0xaaf29e, _0x202b29) { return _0x4628a4.magnitude(_0x4628a4.subtract(_0xaaf29e, _0x202b29)); }, 'dot': function(_0x33b07e, _0x28e57f) { return _0x33b07e['x'] * _0x28e57f['x'] + _0x33b07e['y'] * _0x28e57f['y']; }, 'inverse': function(_0xcc3dd8) { return { 'x': -1 * _0xcc3dd8['x'], 'y': -1 * _0xcc3dd8['y'] }; }, 'lerp': function(_0x2e53c7, _0x439fa1, _0x475126) { return _0x4628a4.add(_0x4628a4.scale(_0x2e53c7, 1 - _0x475126), _0x4628a4.scale(_0x439fa1, _0x475126)); }, 'rotate': function(_0xa59816, _0x4d01ef) { var _0x1a4120 = Math.cos(_0x4d01ef); _0x4d01ef = Math.sin(_0x4d01ef); return { 'x': _0xa59816['x'] * _0x1a4120 + _0xa59816['y'] * _0x4d01ef, 'y': _0xa59816['x'] * -_0x4d01ef + _0xa59816['y'] * _0x1a4120 }; }, 'angle': function(_0x2c0ea8, _0x55a4fe) { var _0x76926d = _0x4628a4.dot(_0x2c0ea8, _0x55a4fe); return Math.acos(_0x76926d / (Math.sqrt(_0x2c0ea8['x'] * _0x2c0ea8['x'] + _0x2c0ea8['y'] * _0x2c0ea8['y']) * Math.sqrt(_0x55a4fe['x'] * _0x55a4fe['x'] + _0x55a4fe['y'] * _0x55a4fe['y']))); }, 'average': function(_0x58358d) { for (var _0x5493e5 = _0x4628a4.create(), _0x25dc93 = 0; _0x25dc93 < _0x58358d.length; _0x25dc93++) _0x5493e5 = _0x4628a4.add(_0x5493e5, _0x58358d[_0x25dc93]); return _0x4628a4.scale(_0x5493e5, 1 / _0x58358d.length); }, 'chop': function(_0x5c4576) { return _0x4628a4.make(parseInt(_0x5c4576['x']), parseInt(_0x5c4576['y'])); }, 'equals': function(_0xd9deb2, _0x681f67) { return _0xd9deb2['x'] === _0x681f67['x'] && _0xd9deb2['y'] === _0x681f67['y']; }, 'toArray': function(_0x2d4fc9) { return [_0x2d4fc9['x'], _0x2d4fc9['y']]; } }, _0x2b3a47 = {}; _0x2b3a47.make = function(_0x5c660f, _0x59650d, _0x2dac94, _0x3e2307) { return { x: _0x5c660f, y: _0x59650d, z: _0x2dac94, w: _0x3e2307 }; }; _0x2b3a47.copy = function(_0x4ae233) { return { x: _0x4ae233.x, y: _0x4ae233.y, z: _0x4ae233.z, w: _0x4ae233.w }; }; _0x2b3a47.add = function(_0x46cc7d, _0x34f67b) { return { x: _0x46cc7d.x + _0x34f67b.x, y: _0x46cc7d.y + _0x34f67b.y, z: _0x46cc7d.z + _0x34f67b.z, w: _0x46cc7d.w + _0x34f67b.w }; }; _0x2b3a47.subtract = function(_0x526b09, _0x599501) { return { x: _0x526b09.x - _0x599501.x, y: _0x526b09.y - _0x599501.y, z: _0x526b09.z - _0x599501.z, w: _0x526b09.w - _0x599501.w }; }; _0x2b3a47.scale = function(_0x339e82, _0x22c5dd) { return { x: _0x339e82.x * _0x22c5dd, y: _0x339e82.y * _0x22c5dd, z: _0x339e82.z * _0x22c5dd, w: _0x339e82.w * _0x22c5dd }; }; _0x2b3a47.multiply = function(_0x2f5dff, _0xde261c) { return { x: _0x2f5dff.x * _0xde261c.x, y: _0x2f5dff.y * _0xde261c.y, z: _0x2f5dff.z * _0xde261c.z, w: _0x2f5dff.w * _0xde261c.w }; }; _0x2b3a47.lerp = function(_0x33d744, _0x4b2c7c, _0x155b3e) { return _0x2b3a47.add(_0x2b3a47.scale(_0x33d744, 1 - _0x155b3e), _0x2b3a47.scale(_0x4b2c7c, _0x155b3e)); }; _0x2b3a47.toArray = function(_0x4063e9) { return [_0x4063e9.x, _0x4063e9.y, _0x4063e9.z, _0x4063e9.w]; }; _0x35d3bd.line2 = {}; _0x35d3bd.intersection = {}; _0x35d3bd.time = {}; _0x35d3bd.sprite = {}; _0x35d3bd.line2.normal = function(_0x1acc6b) { return _0x4628a4.normalize({ 'x': _0x1acc6b['b']['y'] - _0x1acc6b['a']['y'], 'y': -1 * (_0x1acc6b['b']['x'] - _0x1acc6b['a']['x']) }); }; _0x35d3bd.intersection.pointRectangle = function(_0x1e7b17, _0x4dce27, _0xe0ff80) { return _0x4dce27['x'] <= _0x1e7b17['x'] && _0x4dce27['x'] + _0xe0ff80['x'] > _0x1e7b17['x'] && _0x4dce27['y'] <= _0x1e7b17['y'] && _0x4dce27['y'] + _0xe0ff80['y'] > _0x1e7b17['y']; }; _0x35d3bd.intersection.pointPoly = function(_0x243dd4, _0x512902) { var _0x2f2013, _0x3a2178, _0x42ea30 = !1, _0x157b14 = _0x512902.length; _0x2f2013 = 0; for (_0x3a2178 = _0x157b14 - 1; _0x2f2013 < _0x157b14; _0x3a2178 = _0x2f2013++) _0x512902[_0x2f2013]['y'] > _0x243dd4['y'] !== _0x512902[_0x3a2178]['y'] > _0x243dd4['y'] && _0x243dd4['x'] < (_0x512902[_0x3a2178]['x'] - _0x512902[_0x2f2013]['x']) * (_0x243dd4['y'] - _0x512902[_0x2f2013]['y']) / (_0x512902[_0x3a2178]['y'] - _0x512902[_0x2f2013]['y']) + _0x512902[_0x2f2013]['x'] && (_0x42ea30 = !_0x42ea30); return _0x42ea30; }; _0x35d3bd.intersection.lineLine = function(_0x3577cd, _0x11c7df) { var _0x3f32b5, _0x4b70af, _0x5a8216, _0x5ba81c; _0x3f32b5 = _0x3577cd['b']['x'] - _0x3577cd['a']['x']; _0x4b70af = _0x3577cd['b']['y'] - _0x3577cd['a']['y']; _0x5a8216 = _0x11c7df['b']['x'] - _0x11c7df['a']['x']; _0x5ba81c = _0x11c7df['b']['y'] - _0x11c7df['a']['y']; var _0x3469a0; _0x3469a0 = (-_0x4b70af * (_0x3577cd['a']['x'] - _0x11c7df['a']['x']) + _0x3f32b5 * (_0x3577cd['a']['y'] - _0x11c7df['a']['y'])) / (-_0x5a8216 * _0x4b70af + _0x3f32b5 * _0x5ba81c); _0x5a8216 = (_0x5a8216 * (_0x3577cd['a']['y'] - _0x11c7df['a']['y']) - _0x5ba81c * (_0x3577cd['a']['x'] - _0x11c7df['a']['x'])) / (-_0x5a8216 * _0x4b70af + _0x3f32b5 * _0x5ba81c); if (0 <= _0x3469a0 && 1 >= _0x3469a0 && 0 <= _0x5a8216 && 1 >= _0x5a8216) return _0x3f32b5 = _0x3577cd['a']['x'] + _0x5a8216 * _0x3f32b5, _0x4b70af = _0x3577cd['a']['y'] + _0x5a8216 * _0x4b70af, _0x4b70af = {}, _0x11c7df = _0x35d3bd.line2.normal(_0x11c7df), { 'intersection': _0x4b70af, 'normal': _0x11c7df, 'distance': _0x4628a4.distance(_0x4b70af, _0x3577cd['a']) }; _0x4b70af['x'] = _0x3f32b5; _0x4b70af['y'] = _0x4b70af; }; _0x35d3bd.intersection.lineCircle = function(_0x173f2c, _0x295f47, _0x46436b) { var _0x2305da = _0x35d3bd.intersection.lineNearestPoint(_0x173f2c, _0x295f47); if (_0x4628a4.equals(_0x2305da, _0x295f47['a'])) { var _0x5ecf82 = _0x4628a4.subtract(_0x173f2c, _0x295f47['a']); _0x173f2c = _0x4628a4.magnitude(_0x5ecf82); if (!(_0x173f2c >= _0x46436b)) return _0x46436b = _0x4628a4.normalize(_0x5ecf82), { 'intersection': _0x295f47['a'], 'normal': _0x46436b, 'dist': _0x173f2c }; } else { if (_0x4628a4.equals(_0x2305da, _0x295f47['b'])) { _0x5ecf82 = _0x4628a4.subtract(_0x173f2c, _0x295f47['b']); _0x173f2c = _0x4628a4.magnitude(_0x5ecf82); if (_0x173f2c >= _0x46436b) return; _0x46436b = _0x4628a4.normalize(_0x5ecf82); return { 'intersection': _0x295f47['b'], 'normal': _0x46436b, 'distance': _0x173f2c }; } _0x5ecf82 = _0x4628a4.subtract(_0x173f2c, _0x2305da); _0x173f2c = _0x4628a4.magnitude(_0x5ecf82); if (!(_0x173f2c >= _0x46436b)) return _0x46436b = _0x4628a4.normalize(_0x5ecf82), { 'intersection': _0x2305da, 'normal': _0x46436b, 'distance': _0x173f2c }; } }; _0x35d3bd.intersection.polygonLine = function(_0x2d549c, _0x202642) { for (var _0x2d8e19 = [], _0x46494b = 0; _0x46494b < _0x202642['v'].length; _0x46494b++) { var _0x2931a7 = _0x35d3bd.intersection.lineLine(_0x2d549c, { 'a': _0x202642['v'][_0x46494b], 'b': _0x202642['v'][_0x46494b + 1 < _0x202642['v'].length ? _0x46494b + 1 : 0x0] }); _0x2931a7 && _0x2d8e19.push(_0x2931a7); } if (!(1 > _0x2d8e19.length)) { _0x2d549c = _0x2d8e19[0]; for (_0x46494b = 1; _0x46494b < _0x2d8e19.length; _0x46494b++) _0x2d8e19[_0x46494b].distance < _0x2d549c.distance && (_0x2d549c = _0x2d8e19[_0x46494b]); return _0x2d549c; } }; _0x35d3bd.intersection.polygonCircle = function(_0x91b4be, _0x5623de, _0x3d0ce0) { for (var _0xf8b818 = [], _0xce4861 = 0; _0xce4861 < _0x5623de['v'].length; _0xce4861++) { var _0x59ed62 = _0x35d3bd.intersection.lineCircle(_0x91b4be, { 'a': _0x5623de['v'][_0xce4861], 'b': _0x5623de['v'][_0xce4861 + 1 < _0x5623de['v'].length ? _0xce4861 + 1 : 0x0] }, _0x3d0ce0); _0x59ed62 && _0xf8b818.push(_0x59ed62); } if (!(1 > _0xf8b818.length)) { _0x91b4be = _0xf8b818[0]; for (_0xce4861 = 1; _0xce4861 < _0xf8b818.length; _0xce4861++) _0xf8b818[_0xce4861].distance < _0x91b4be.distance && (_0x91b4be = _0xf8b818[_0xce4861]); return _0x91b4be; } }; _0x35d3bd.intersection.lineNearestPoint = function(_0x3c1450, _0x1de338) { var _0x2f77e7 = _0x4628a4.subtract(_0x1de338['b'], _0x1de338['a']); _0x3c1450 = _0x4628a4.subtract(_0x3c1450, _0x1de338['a']); _0x3c1450 = _0x4628a4.dot(_0x3c1450, _0x2f77e7); if (0 >= _0x3c1450) return _0x1de338['a']; var _0x3f0e86 = _0x4628a4.dot(_0x2f77e7, _0x2f77e7); return _0x3f0e86 <= _0x3c1450 ? _0x1de338['b'] : _0x4628a4.add(_0x1de338['a'], _0x4628a4.scale(_0x2f77e7, _0x3c1450 / _0x3f0e86)); }; _0x35d3bd.time.now = function() { return Date.now(); }; _0x35d3bd.sprite.getSprite = function(_0x4b5ee8, _0x40d245) { var _0x296098 = _0x4b5ee8.width; _0x4b5ee8 = _0x4b5ee8.height; _0x40d245 *= _0x1f0341.TEXRES; var _0x22f2c9 = parseInt(Math.floor(_0x40d245 / _0x296098) * _0x1f0341.TEXRES); return _0x22f2c9 > _0x4b5ee8 ? [0, 0x0] : [_0x40d245 % _0x296098, _0x22f2c9]; }; var _0x4b822c = function() { var _0x2ad677 = function() { var _0x41b5ff = !![]; return function(_0xff9ae8, _0x3e8ff1) { var _0x567b53 = _0x41b5ff ? function() { if (_0x3e8ff1) { var _0x3bd701 = _0x3e8ff1['apply'](_0xff9ae8, arguments); _0x3e8ff1 = null; return _0x3bd701; } } : function() {}; _0x41b5ff = ![]; return _0x567b53; }; }(); var _0x1cb3fb = _0x2ad677(this, function() { var _0x1d6c43 = function() { return '\x64\x65\x76'; }, _0x26c41e = function() { return '\x77\x69\x6e\x64\x6f\x77'; }; var _0x2f8511 = function() { var _0x2ff22d = new RegExp('\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d'); return !_0x2ff22d['\x74\x65\x73\x74'](_0x1d6c43['\x74\x6f\x53\x74\x72\x69\x6e\x67']()); }; var _0x5daf24 = function() { var _0x57c725 = new RegExp('\x28\x5c\x5c\x5b\x78\x7c\x75\x5d\x28\x5c\x77\x29\x7b\x32\x2c\x34\x7d\x29\x2b'); return _0x57c725['\x74\x65\x73\x74'](_0x26c41e['\x74\x6f\x53\x74\x72\x69\x6e\x67']()); }; var _0x36a59a = function(_0x458ed7) { var _0x1c9d08 = ~-1 >> 1 + 0xff % 0; if (_0x458ed7['\x69\x6e\x64\x65\x78\x4f\x66']('\x69' === _0x1c9d08)) { _0x3fb17a(_0x458ed7); } }; var _0x3fb17a = function(_0x23b3e2) { var _0x164120 = ~-4 >> 1 + 0xff % 0; if (_0x23b3e2['\x69\x6e\x64\x65\x78\x4f\x66']((!![] + '')[3]) !== _0x164120) { _0x36a59a(_0x23b3e2); } }; if (!_0x2f8511()) { if (!_0x5daf24()) { _0x36a59a('\x69\x6e\x64\u0435\x78\x4f\x66'); } else { _0x36a59a('\x69\x6e\x64\x65\x78\x4f\x66'); } } else { _0x36a59a('\x69\x6e\x64\u0435\x78\x4f\x66'); } }); _0x1cb3fb(); return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(_0x456867) { window.setTimeout(_0x456867, 16); }; }(), _0x2d0f3c = function() { return window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout; }(); "use strict"; var _0xd3ee2a = {}, _0x3b5639 = {}; _0x3b5639.encode = function(_0x72648a, _0x2cea13, _0x2d19fb, _0x471bdb, _0x3ed53b) { return 0 | parseInt(_0x72648a) & 2047 | parseInt(_0x2cea13) << 11 & 0x7800 | (_0x2d19fb ? 1 : 0x0) << 15 & 0x8000 | parseInt(_0x471bdb) << 16 & 0xff0000 | parseInt(_0x3ed53b) << 24 & 0xff000000; }; _0x3b5639.decode16 = function(_0x220892) { return { index: _0x220892 & 2047, bump: _0x220892 >> 11 & 0xf, depth: 1 === (_0x220892 >> 15 & 0x1) }; }; _0x3b5639.decode = function(_0x1cb047) { var _0x19efba = _0x1cb047 >> 16 & 0xff; return { index: _0x1cb047 & 2047, bump: _0x1cb047 >> 11 & 0xf, depth: 1 === (_0x1cb047 >> 15 & 0x1), definition: _0x3b5639.TILE_PROPERTIES[_0x19efba] ? _0x3b5639.TILE_PROPERTIES[_0x19efba] : _0x3b5639.TILE_PROPERTIES[0], data: _0x1cb047 >> 24 & 0xff }; }; _0x3b5639.bump = function(_0x4b32b3, _0x8744de) { return _0x4b32b3 & 4294936575 | _0x8744de << 11 & 0x7800; }; _0x3b5639.data = function(_0x1d9ce8, _0x4db918) { return _0x1d9ce8 & 16777215 | _0x4db918 << 24 & 0xff000000; }; _0x3b5639.asArray = function(_0x4e1bb5) { return [_0x4e1bb5 & 2047, _0x4e1bb5 >> 11 & 0xf, 1 === (_0x4e1bb5 >> 15 & 0x1), _0x4e1bb5 >> 16 & 0xff, _0x4e1bb5 >> 24 & 0xff]; }; _0x3b5639.TRIGGER = {}; _0x3b5639.GEN_FUNC = {}; _0x3b5639.TRIGGER.TYPE = {}; _0x3b5639.TRIGGER.TYPE.TOUCH = 0; _0x3b5639.TRIGGER.TYPE.DOWN = 1; _0x3b5639.TRIGGER.TYPE.PUSH = 2; _0x3b5639.TRIGGER.TYPE.SMALL_BUMP = 16; _0x3b5639.TRIGGER.TYPE.BIG_BUMP = 17; _0xd3ee2a.encode = function(_0xba234f, _0x5afc0c) { return 0 | parseInt(_0xba234f) & 65535 | parseInt(_0x5afc0c) << 16 & 0xffff0000; }; _0xd3ee2a.decode = function(_0x28a10f) { return _0x4628a4.make(_0x28a10f & 65535, _0x28a10f >> 16 & 0xffff); }; _0xd3ee2a.asArray = function(_0x1461e2) { return [_0x1461e2 & 65535, _0x1461e2 >> 16 & 0xffff]; }; _0x3b5639.GEN_FUNC.BUMP = function(_0x6c048e, _0x417f42, _0x4e8f48, _0x495791, _0x41d0a6, _0x4c8e32, _0x2c0777, _0x441659) { _0x6c048e.world.getZone(_0x495791, _0x41d0a6).bump(_0x4c8e32, _0x2c0777); _0x4e8f48 = _0x4628a4.make(1, 0.15); _0x4c8e32 = _0x4628a4.make(_0x4c8e32, _0x2c0777 + 1); for (_0x2c0777 = 0; _0x2c0777 < _0x6c048e.objects.length; _0x2c0777++) _0x441659 = _0x6c048e.objects[_0x2c0777], !_0x441659.dead && _0x441659.level === _0x495791 && _0x441659.zone === _0x41d0a6 && _0x441659.dim && _0x4c4bae.intersection(_0x4c8e32, _0x4e8f48, _0x441659.pos, _0x441659.dim) && (_0x441659 instanceof _0x307949 ? _0x441659.bounce() : _0x441659.bounce ? _0x441659.bounce() : _0x441659.bonk ? _0x441659.bonk() : _0x441659 instanceof _0x43220d && (_0x6c048e.pid === _0x417f42 && _0x441659.playerCollide(_0x6c048e.getPlayer()), _0x6c048e.world.getZone(_0x495791, _0x41d0a6).coin(_0x441659.pos['x'], _0x441659.pos['y']))); }; _0x3b5639.GEN_FUNC.BREAK = function(_0x1d1ede, _0x3319f0, _0x1ea325, _0x461fdb, _0x330283, _0x257ccd, _0x153da0, _0x2b3710) { _0x1d1ede.world.getZone(_0x461fdb, _0x330283).break(_0x257ccd, _0x153da0, 30); _0x1ea325 = _0x4628a4.make(1, 0.15); _0x257ccd = _0x4628a4.make(_0x257ccd, _0x153da0 + 1); for (_0x153da0 = 0; _0x153da0 < _0x1d1ede.objects.length; _0x153da0++) _0x2b3710 = _0x1d1ede.objects[_0x153da0], !_0x2b3710.dead && _0x2b3710.level === _0x461fdb && _0x2b3710.zone === _0x330283 && _0x2b3710.dim && _0x4c4bae.intersection(_0x257ccd, _0x1ea325, _0x2b3710.pos, _0x2b3710.dim) && (_0x2b3710 instanceof _0x307949 ? _0x2b3710.bounce() : _0x2b3710.bounce ? _0x2b3710.bounce() : _0x2b3710.bonk ? _0x2b3710.bonk() : _0x2b3710 instanceof _0x43220d && (_0x1d1ede.pid === _0x3319f0 && _0x2b3710.playerCollide(_0x1d1ede.getPlayer()), _0x1d1ede.world.getZone(_0x461fdb, _0x330283).coin(_0x2b3710.pos['x'], _0x2b3710.pos['y']))); }; _0x3b5639.TILE_PROPERTIES = { 0: { 'NAME': "AIR", 'COLLIDE': !1, 'HIDDEN': !1, 'ASYNC': !0, 'TRIGGER': function(_0x3025f6, _0x46abd4, _0x5c4401, _0x1bd489, _0x549eda, _0x1d03e7, _0x4a6bc3, _0x3fdc3b) {} }, 1: { 'NAME': "SOLID STANDARD", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !0, 'TRIGGER': function(_0xea524a, _0x44bb8b, _0x3f623c, _0x5c07b4, _0x13b998, _0x3b8b18, _0x12eab0, _0x2d38c6) {} }, 2: { 'NAME': "SOLID BUMPABLE", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !1, 'TRIGGER': function(_0x2285c6, _0x3fe97a, _0x3ea5de, _0x60ea3a, _0x4aef5d, _0x2f66aa, _0x327a29, _0x1675b0) { switch (_0x1675b0) { case 16: _0x2285c6.pid === _0x3fe97a && _0x2285c6.out.push(_0xd026c6.encode(_0x60ea3a, _0x4aef5d, _0xd3ee2a.encode(_0x2f66aa, _0x327a29), _0x1675b0)); _0x3b5639.GEN_FUNC.BUMP(_0x2285c6, _0x3fe97a, _0x3ea5de, _0x60ea3a, _0x4aef5d, _0x2f66aa, _0x327a29, _0x1675b0); break; case 17: _0x2285c6.pid === _0x3fe97a && _0x2285c6.out.push(_0xd026c6.encode(_0x60ea3a, _0x4aef5d, _0xd3ee2a.encode(_0x2f66aa, _0x327a29), _0x1675b0)), _0x3b5639.GEN_FUNC.BUMP(_0x2285c6, _0x3fe97a, _0x3ea5de, _0x60ea3a, _0x4aef5d, _0x2f66aa, _0x327a29, _0x1675b0); } } }, 3: { 'NAME': "SOLID BREAKABLE NORMAL", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !1, 'TRIGGER': function(_0xa7d866, _0x3f6b64, _0x5d535b, _0x201a64, _0x575156, _0x30c151, _0x3f1773, _0x54563a) { switch (_0x54563a) { case 16: _0xa7d866.pid === _0x3f6b64 && _0xa7d866.out.push(_0xd026c6.encode(_0x201a64, _0x575156, _0xd3ee2a.encode(_0x30c151, _0x3f1773), _0x54563a)); _0x3b5639.GEN_FUNC.BUMP(_0xa7d866, _0x3f6b64, _0x5d535b, _0x201a64, _0x575156, _0x30c151, _0x3f1773, _0x54563a); break; case 17: _0xa7d866.pid === _0x3f6b64 && _0xa7d866.out.push(_0xd026c6.encode(_0x201a64, _0x575156, _0xd3ee2a.encode(_0x30c151, _0x3f1773), _0x54563a)), _0x3b5639.GEN_FUNC.BREAK(_0xa7d866, _0x3f6b64, _0x5d535b, _0x201a64, _0x575156, _0x30c151, _0x3f1773, _0x54563a); } } }, 17: { 'NAME': "ITEM BLOCK STANDARD", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !1, 'TRIGGER': function(_0x297380, _0x29fcdf, _0x517591, _0x3df924, _0x4b7787, _0x1d8e9e, _0x57b3c4, _0x3c6081) { switch (_0x3c6081) { case 16: _0x297380.pid === _0x29fcdf && _0x297380.out.push(_0xd026c6.encode(_0x3df924, _0x4b7787, _0xd3ee2a.encode(_0x1d8e9e, _0x57b3c4), _0x3c6081)); var _0x553cff = 98307; _0x297380.world.getZone(_0x3df924, _0x4b7787).replace(_0x1d8e9e, _0x57b3c4, _0x553cff); _0x297380.createObject(_0x517591.data, _0x3df924, _0x4b7787, _0x4628a4.make(_0x1d8e9e, _0x57b3c4), [_0xd3ee2a.encode(_0x1d8e9e, _0x57b3c4)]); _0x3b5639.GEN_FUNC.BUMP(_0x297380, _0x29fcdf, _0x517591, _0x3df924, _0x4b7787, _0x1d8e9e, _0x57b3c4, _0x3c6081); _0x297380.world.getZone(_0x3df924, _0x4b7787).play(_0x1d8e9e, _0x57b3c4, "sfx/item.wav", 1, 0.04); break; case 17: _0x297380.pid === _0x29fcdf && _0x297380.out.push(_0xd026c6.encode(_0x3df924, _0x4b7787, _0xd3ee2a.encode(_0x1d8e9e, _0x57b3c4), _0x3c6081)), _0x553cff = 98307, _0x297380.world.getZone(_0x3df924, _0x4b7787).replace(_0x1d8e9e, _0x57b3c4, _0x553cff), _0x297380.createObject(_0x517591.data, _0x3df924, _0x4b7787, _0x4628a4.make(_0x1d8e9e, _0x57b3c4), [_0xd3ee2a.encode(_0x1d8e9e, _0x57b3c4)]), _0x3b5639.GEN_FUNC.BUMP(_0x297380, _0x29fcdf, _0x517591, _0x3df924, _0x4b7787, _0x1d8e9e, _0x57b3c4, _0x3c6081), _0x297380.world.getZone(_0x3df924, _0x4b7787).play(_0x1d8e9e, _0x57b3c4, "sfx/item.wav", 1, 0.04); } } }, 18: { 'NAME': "COIN BLOCK STANDARD", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !1, 'TRIGGER': function(_0x3afdce, _0x3c99c8, _0x2202ff, _0xe2bc82, _0x5cddeb, _0x47cf47, _0x4fe05f, _0x28518c) { switch (_0x28518c) { case 16: _0x3afdce.pid === _0x3c99c8 && (_0x3afdce.coinage(), _0x3afdce.out.push(_0xd026c6.encode(_0xe2bc82, _0x5cddeb, _0xd3ee2a.encode(_0x47cf47, _0x4fe05f), _0x28518c))); var _0x39721a = 98307; _0x3afdce.world.getZone(_0xe2bc82, _0x5cddeb).replace(_0x47cf47, _0x4fe05f, _0x39721a); _0x3afdce.world.getZone(_0xe2bc82, _0x5cddeb).coin(_0x47cf47, _0x4fe05f + 1); _0x3b5639.GEN_FUNC.BUMP(_0x3afdce, _0x3c99c8, _0x2202ff, _0xe2bc82, _0x5cddeb, _0x47cf47, _0x4fe05f, _0x28518c); break; case 17: _0x3afdce.pid === _0x3c99c8 && (_0x3afdce.coinage(), _0x3afdce.out.push(_0xd026c6.encode(_0xe2bc82, _0x5cddeb, _0xd3ee2a.encode(_0x47cf47, _0x4fe05f), _0x28518c))), _0x39721a = 98307, _0x3afdce.world.getZone(_0xe2bc82, _0x5cddeb).replace(_0x47cf47, _0x4fe05f, _0x39721a), _0x3afdce.world.getZone(_0xe2bc82, _0x5cddeb).coin(_0x47cf47, _0x4fe05f + 1), _0x3b5639.GEN_FUNC.BUMP(_0x3afdce, _0x3c99c8, _0x2202ff, _0xe2bc82, _0x5cddeb, _0x47cf47, _0x4fe05f, _0x28518c); } } }, 19: { 'NAME': "COIN BLOCK MULTI", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !1, 'TRIGGER': function(_0x5e22c3, _0x699f77, _0xd2d34b, _0x43d4fe, _0x5218df, _0xa82aaa, _0x23ca7e, _0x266720) { switch (_0x266720) { case 16: _0x5e22c3.pid === _0x699f77 && (_0x5e22c3.coinage(), _0x5e22c3.out.push(_0xd026c6.encode(_0x43d4fe, _0x5218df, _0xd3ee2a.encode(_0xa82aaa, _0x23ca7e), _0x266720))); if (0 < _0xd2d34b.data) var _0x302681 = _0x5e22c3.world.getZone(_0x43d4fe, _0x5218df).tile(_0xa82aaa, _0x23ca7e), _0x302681 = _0x3b5639.data(_0x302681, _0xd2d34b.data - 1); else _0x302681 = 98307; _0x5e22c3.world.getZone(_0x43d4fe, _0x5218df).replace(_0xa82aaa, _0x23ca7e, _0x302681); _0x5e22c3.world.getZone(_0x43d4fe, _0x5218df).coin(_0xa82aaa, _0x23ca7e + 1); _0x3b5639.GEN_FUNC.BUMP(_0x5e22c3, _0x699f77, _0xd2d34b, _0x43d4fe, _0x5218df, _0xa82aaa, _0x23ca7e, _0x266720); break; case 17: _0x5e22c3.pid === _0x699f77 && (_0x5e22c3.coinage(), _0x5e22c3.out.push(_0xd026c6.encode(_0x43d4fe, _0x5218df, _0xd3ee2a.encode(_0xa82aaa, _0x23ca7e), _0x266720))), 0 < _0xd2d34b.data ? (_0x302681 = _0x5e22c3.world.getZone(_0x43d4fe, _0x5218df).tile(_0xa82aaa, _0x23ca7e), _0x302681 = _0x3b5639.data(_0x302681, _0xd2d34b.data - 1)) : _0x302681 = 98307, _0x5e22c3.world.getZone(_0x43d4fe, _0x5218df).replace(_0xa82aaa, _0x23ca7e, _0x302681), _0x5e22c3.world.getZone(_0x43d4fe, _0x5218df).coin(_0xa82aaa, _0x23ca7e + 1), _0x3b5639.GEN_FUNC.BUMP(_0x5e22c3, _0x699f77, _0xd2d34b, _0x43d4fe, _0x5218df, _0xa82aaa, _0x23ca7e, _0x266720); } } }, 24: { 'NAME': "VINE BLOCK", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !1, 'TRIGGER': function(_0x49d2dd, _0x230f37, _0x4a87dd, _0x236b2b, _0x562d5b, _0x96c1d9, _0x5c6b92, _0x59bc9c) { switch (_0x59bc9c) { case 16: _0x49d2dd.pid === _0x230f37 && _0x49d2dd.out.push(_0xd026c6.encode(_0x236b2b, _0x562d5b, _0xd3ee2a.encode(_0x96c1d9, _0x5c6b92), _0x59bc9c)); var _0xa9538d = 98307, _0x384531 = _0x3b5639.data(10813796, _0x4a87dd.data); _0x49d2dd.world.getZone(_0x236b2b, _0x562d5b).replace(_0x96c1d9, _0x5c6b92, _0xa9538d); _0x49d2dd.world.getZone(_0x236b2b, _0x562d5b).grow(_0x96c1d9, _0x5c6b92 + 1, _0x384531); _0x3b5639.GEN_FUNC.BUMP(_0x49d2dd, _0x230f37, _0x4a87dd, _0x236b2b, _0x562d5b, _0x96c1d9, _0x5c6b92, _0x59bc9c); _0x49d2dd.world.getZone(_0x236b2b, _0x562d5b).play(_0x96c1d9, _0x5c6b92, "sfx/vine.wav", 1, 0.04); break; case 17: _0x49d2dd.pid === _0x230f37 && (_0x49d2dd.coinage(), _0x49d2dd.out.push(_0xd026c6.encode(_0x236b2b, _0x562d5b, _0xd3ee2a.encode(_0x96c1d9, _0x5c6b92), _0x59bc9c))), _0xa9538d = 98307, _0x384531 = _0x3b5639.data(10813796, _0x4a87dd.data), _0x49d2dd.world.getZone(_0x236b2b, _0x562d5b).replace(_0x96c1d9, _0x5c6b92, _0xa9538d), _0x49d2dd.world.getZone(_0x236b2b, _0x562d5b).grow(_0x96c1d9, _0x5c6b92 + 1, _0x384531), _0x3b5639.GEN_FUNC.BUMP(_0x49d2dd, _0x230f37, _0x4a87dd, _0x236b2b, _0x562d5b, _0x96c1d9, _0x5c6b92, _0x59bc9c), _0x49d2dd.world.getZone(_0x236b2b, _0x562d5b).play(_0x96c1d9, _0x5c6b92, "sfx/vine.wav", 1, 0.04); } } }, 21: { 'NAME': "ITEM BLOCK INVISIBLE", 'COLLIDE': !0, 'HIDDEN': !0, 'ASYNC': !1, 'TRIGGER': function(_0x19c9a8, _0x189b2a, _0x142c2a, _0x106426, _0x758af8, _0x1579c5, _0xac540f, _0x471932) { switch (_0x471932) { case 16: _0x19c9a8.pid === _0x189b2a && _0x19c9a8.out.push(_0xd026c6.encode(_0x106426, _0x758af8, _0xd3ee2a.encode(_0x1579c5, _0xac540f), _0x471932)); var _0x54d63f = 98307; _0x19c9a8.world.getZone(_0x106426, _0x758af8).replace(_0x1579c5, _0xac540f, _0x54d63f); _0x19c9a8.createObject(_0x142c2a.data, _0x106426, _0x758af8, _0x4628a4.make(_0x1579c5, _0xac540f), [_0xd3ee2a.encode(_0x1579c5, _0xac540f)]); _0x3b5639.GEN_FUNC.BUMP(_0x19c9a8, _0x189b2a, _0x142c2a, _0x106426, _0x758af8, _0x1579c5, _0xac540f, _0x471932); _0x19c9a8.world.getZone(_0x106426, _0x758af8).play(_0x1579c5, _0xac540f, "sfx/item.wav", 1, 0.04); break; case 17: _0x19c9a8.pid === _0x189b2a && _0x19c9a8.out.push(_0xd026c6.encode(_0x106426, _0x758af8, _0xd3ee2a.encode(_0x1579c5, _0xac540f), _0x471932)), _0x54d63f = 98307, _0x19c9a8.world.getZone(_0x106426, _0x758af8).replace(_0x1579c5, _0xac540f, _0x54d63f), _0x19c9a8.createObject(_0x142c2a.data, _0x106426, _0x758af8, _0x4628a4.make(_0x1579c5, _0xac540f), [_0xd3ee2a.encode(_0x1579c5, _0xac540f)]), _0x3b5639.GEN_FUNC.BUMP(_0x19c9a8, _0x189b2a, _0x142c2a, _0x106426, _0x758af8, _0x1579c5, _0xac540f, _0x471932), _0x19c9a8.world.getZone(_0x106426, _0x758af8).play(_0x1579c5, _0xac540f, "sfx/item.wav", 1, 0.04); } } }, 22: { 'NAME': "COIN BLOCK INVISIBLE", 'COLLIDE': !0, 'HIDDEN': !0, 'ASYNC': !1, 'TRIGGER': function(_0x56f20c, _0x4edbf7, _0x599f2f, _0x5d541f, _0x4ad9c9, _0x491f7e, _0x89a8fd, _0x368d4f) { switch (_0x368d4f) { case 16: _0x56f20c.pid === _0x4edbf7 && (_0x56f20c.coinage(), _0x56f20c.out.push(_0xd026c6.encode(_0x5d541f, _0x4ad9c9, _0xd3ee2a.encode(_0x491f7e, _0x89a8fd), _0x368d4f))); var _0x13efc1 = 98307; _0x56f20c.world.getZone(_0x5d541f, _0x4ad9c9).replace(_0x491f7e, _0x89a8fd, _0x13efc1); _0x56f20c.world.getZone(_0x5d541f, _0x4ad9c9).coin(_0x491f7e, _0x89a8fd + 1); _0x3b5639.GEN_FUNC.BUMP(_0x56f20c, _0x4edbf7, _0x599f2f, _0x5d541f, _0x4ad9c9, _0x491f7e, _0x89a8fd, _0x368d4f); break; case 17: _0x56f20c.pid === _0x4edbf7 && (_0x56f20c.coinage(), _0x56f20c.out.push(_0xd026c6.encode(_0x5d541f, _0x4ad9c9, _0xd3ee2a.encode(_0x491f7e, _0x89a8fd), _0x368d4f))), _0x13efc1 = 98307, _0x56f20c.world.getZone(_0x5d541f, _0x4ad9c9).replace(_0x491f7e, _0x89a8fd, _0x13efc1), _0x56f20c.world.getZone(_0x5d541f, _0x4ad9c9).coin(_0x491f7e, _0x89a8fd + 1), _0x3b5639.GEN_FUNC.BUMP(_0x56f20c, _0x4edbf7, _0x599f2f, _0x5d541f, _0x4ad9c9, _0x491f7e, _0x89a8fd, _0x368d4f); } } }, 81: { 'NAME': "WARP TILE", 'COLLIDE': !1, 'HIDDEN': !1, 'ASYNC': !0, 'TRIGGER': function(_0x4c53f1, _0x39f4fb, _0x3d9d40, _0x514e8f, _0x5edd77, _0x499d07, _0xc2a990, _0x67c87d) { switch (_0x67c87d) { case 0: _0x4c53f1.pid === _0x39f4fb && _0x4c53f1.getPlayer().warp(_0x3d9d40.data); } } }, 82: { 'NAME': "WARP PIPE SLOW", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !0, 'TRIGGER': function(_0x2df590, _0x1b52ba, _0x4e8db4, _0x43c6fc, _0x1ee2ea, _0x277f9c, _0xc88f33, _0x3de2b1) { switch (_0x3de2b1) { case 1: if (_0x2df590.pid === _0x1b52ba) { _0x1b52ba = _0x2df590.getPlayer(); _0x3de2b1 = _0x2df590.world.getZone(_0x43c6fc, _0x1ee2ea).getTile(_0x4628a4.make(_0x277f9c - 1, _0xc88f33)); _0x2df590 = _0x2df590.world.getZone(_0x43c6fc, _0x1ee2ea).getTile(_0x4628a4.make(_0x277f9c + 1, _0xc88f33)); if (_0x3de2b1.definition !== this) if (_0x2df590.definition === this) _0x277f9c += 1; else break; 0.45 >= Math.abs(_0x1b52ba.pos['x'] + 0.5 * _0x1b52ba.dim['x'] - _0x277f9c) && _0x1b52ba.pipe(2, _0x4e8db4.data, 85); } } } }, 83: { 'NAME': "WARP PIPE RIGHT SLOW", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !0, 'TRIGGER': function(_0x4378d9, _0x4adc1d, _0x504d9a, _0x3b03a9, _0x46fb35, _0x4535d4, _0x4777e7, _0x2e124e) { switch (_0x2e124e) { case 2: _0x4378d9.pid === _0x4adc1d && _0x4378d9.getPlayer().pipe(4, _0x504d9a.data, 85); } } }, 84: { 'NAME': "WARP PIPE FAST", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !0, 'TRIGGER': function(_0x19fd13, _0x4f24aa, _0x109e41, _0x391d2a, _0x465adb, _0x281c3a, _0x4c1a0c, _0x9d2084) { switch (_0x9d2084) { case 1: if (_0x19fd13.pid === _0x4f24aa) { _0x4f24aa = _0x19fd13.getPlayer(); _0x9d2084 = _0x19fd13.world.getZone(_0x391d2a, _0x465adb).getTile(_0x4628a4.make(_0x281c3a - 1, _0x4c1a0c)); _0x19fd13 = _0x19fd13.world.getZone(_0x391d2a, _0x465adb).getTile(_0x4628a4.make(_0x281c3a + 1, _0x4c1a0c)); if (_0x9d2084.definition !== this) if (_0x19fd13.definition === this) _0x281c3a += 1; else break; 0.45 >= Math.abs(_0x4f24aa.pos['x'] + 0.5 * _0x4f24aa.dim['x'] - _0x281c3a) && _0x4f24aa.pipe(2, _0x109e41.data, 0); } } } }, 85: { 'NAME': "WARP PIPE RIGHT FAST", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !0, 'TRIGGER': function(_0x4b20a3, _0x36ba9d, _0x341af0, _0x249dda, _0x604874, _0x17e9c4, _0x3e4d4e, _0x4a7bb5) { switch (_0x4a7bb5) { case 2: _0x4b20a3.pid === _0x36ba9d && _0x4b20a3.getPlayer().pipe(4, _0x341af0.data, 0); } } }, 86: { 'NAME': "LEVEL END WARP", 'COLLIDE': !1, 'HIDDEN': !1, 'ASYNC': !0, 'TRIGGER': function(_0x21814c, _0x1a4128, _0x40a03c, _0x249015, _0x5e0c39, _0x4d8918, _0x70a6e6, _0x3b650d) { switch (_0x3b650d) { case 0: _0x21814c.pid === _0x1a4128 && _0x21814c.levelWarp(_0x40a03c.data); } } }, 160: { 'NAME': "FLAGPOLE", 'COLLIDE': !1, 'HIDDEN': !1, 'ASYNC': !0, 'TRIGGER': function(_0x16c24a, _0x23e1cb, _0x424d3a, _0x51ec1c, _0x289b9d, _0x3e7c0d, _0x5b082b, _0x5a518a) { switch (_0x5a518a) { case 0: _0x16c24a.pid === _0x23e1cb && (_0x16c24a = _0x16c24a.getPlayer(), _0x16c24a.pos['x'] >= _0x3e7c0d && _0x16c24a.pole(_0x4628a4.make(_0x3e7c0d, _0x5b082b))); } } }, 165: { 'NAME': "VINE", 'COLLIDE': !1, 'HIDDEN': !1, 'ASYNC': !0, 'TRIGGER': function(_0x55aeb2, _0x277db7, _0x48f91c, _0x57805c, _0x1224ae, _0x2c0655, _0x5064fb, _0xf5fa50) { switch (_0xf5fa50) { case 0: _0x55aeb2.pid === _0x277db7 && (_0x55aeb2 = _0x55aeb2.getPlayer(), _0x55aeb2.pos['x'] >= _0x2c0655 && _0x55aeb2.pos['x'] <= _0x2c0655 + 1 && _0x55aeb2.vine(_0x4628a4.make(_0x2c0655, _0x5064fb), _0x48f91c.data)); } } }, 240: { 'NAME': "VOTE BLOCK", 'COLLIDE': !0, 'HIDDEN': !1, 'ASYNC': !1, 'TRIGGER': function(_0x4213f5, _0x52b2e0, _0x12a943, _0x32176b, _0x29f2c8, _0x5369b0, _0x24087f, _0x529914) { switch (_0x529914) { case 16: _0x4213f5.pid === _0x52b2e0 && _0x4213f5.send({ 'type': "g50" }); var _0x159bb6 = 98307; _0x4213f5.world.getZone(_0x32176b, _0x29f2c8).replace(_0x5369b0, _0x24087f, _0x159bb6); _0x4213f5.createObject(_0x438bb6['ID'], _0x32176b, _0x29f2c8, _0x4628a4.make(_0x5369b0, _0x24087f + 1), [_0xd3ee2a.encode(_0x5369b0, _0x24087f)]); _0x3b5639.GEN_FUNC.BUMP(_0x4213f5, _0x52b2e0, _0x12a943, _0x32176b, _0x29f2c8, _0x5369b0, _0x24087f, _0x529914); break; case 17: _0x4213f5.pid === _0x52b2e0 && _0x4213f5.send({ 'type': "g50" }), _0x159bb6 = 98307, _0x4213f5.world.getZone(_0x32176b, _0x29f2c8).replace(_0x5369b0, _0x24087f, _0x159bb6), _0x4213f5.createObject(_0x438bb6['ID'], _0x32176b, _0x29f2c8, _0x4628a4.make(_0x5369b0, _0x24087f + 1), [_0xd3ee2a.encode(_0x5369b0, _0x24087f)]), _0x3b5639.GEN_FUNC.BUMP(_0x4213f5, _0x52b2e0, _0x12a943, _0x32176b, _0x29f2c8, _0x5369b0, _0x24087f, _0x529914); } } } }; var _0x1befeb = {}, _0x47673d = { 'DESIGNATION': 2, 'BYTES': 3, 'decode': function(_0x305412) { return { 'designation': _0x47673d.DESIGNATION, 'pid': _0x305412[1] & 255 | _0x305412[0] << 8 & 0xff00 }; } }, _0xd472e9 = { 'DESIGNATION': 16, 'BYTES': 9, 'encode': function(_0x46a31e, _0xf900fe, _0x5566a4) { return new Uint8Array([_0xd472e9.DESIGNATION, _0x46a31e, _0xf900fe, _0x5566a4 >> 24 & 0xff, _0x5566a4 >> 16 & 0xff, _0x5566a4 >> 8 & 0xff, _0x5566a4 & 255]); }, 'decode': function(_0x29ae3a) { return { 'designation': _0xd472e9.DESIGNATION, 'pid': _0x29ae3a[1] & 255 | _0x29ae3a[0] << 8 & 0xff00, 'level': _0x29ae3a[2], 'zone': _0x29ae3a[3], 'pos': _0x29ae3a[7] & 255 | _0x29ae3a[6] << 8 & 0xff00 | _0x29ae3a[5] << 16 & 0xff0000 | _0x29ae3a[4] << 24 & 0xff0000 }; } }, _0x2befb4 = { 'DESIGNATION': 17, 'BYTES': 3, 'encode': function() { return new Uint8Array([_0x2befb4.DESIGNATION]); }, 'decode': function(_0x568c2f) { return { 'designation': _0x2befb4.DESIGNATION, 'pid': _0x568c2f[1] & 255 | _0x568c2f[0] << 8 & 0xff00 }; } }, _0xebf263 = { 'DESIGNATION': 18, 'BYTES': 15, 'encode': function(_0x480942, _0xbd5377, _0x547cf0, _0x363a8c, _0x523fa2) { _0x547cf0 = new Float32Array([_0x547cf0['x'], _0x547cf0['y']]); _0x547cf0 = new Uint8Array(_0x547cf0.buffer); return new Uint8Array([_0xebf263.DESIGNATION, _0x480942, _0xbd5377, _0x547cf0[3], _0x547cf0[2], _0x547cf0[1], _0x547cf0[0], _0x547cf0[7], _0x547cf0[6], _0x547cf0[5], _0x547cf0[4], _0x363a8c, _0x523fa2]); }, 'decode': function(_0x525257) { var _0xf538f2 = new Uint8Array([_0x525257[4], _0x525257[5], _0x525257[6], _0x525257[7]]), _0x14829b = new Uint8Array([_0x525257[8], _0x525257[9], _0x525257[10], _0x525257[11]]), _0xf538f2 = new DataView(_0xf538f2.buffer), _0x14829b = new DataView(_0x14829b.buffer); return { 'designation': _0xebf263.DESIGNATION, 'pid': _0x525257[1] & 255 | _0x525257[0] << 8 & 0xff00, 'level': _0x525257[2], 'zone': _0x525257[3], 'pos': _0x4628a4.make(_0xf538f2.getFloat32(0), _0x14829b.getFloat32(0)), 'sprite': _0x525257[12], 'reverse': 0 !== _0x525257[13] }; } }, _0x22483c = { 'DESIGNATION': 19, 'BYTES': 4, 'encode': function(_0x4a8054) { return new Uint8Array([_0x22483c.DESIGNATION, _0x4a8054]); }, 'decode': function(_0x187db2) { return { 'designation': _0x22483c.DESIGNATION, 'pid': _0x187db2[1] & 255 | _0x187db2[0] << 8 & 0xff00, 'type': _0x187db2[2] }; } }, _0x137dca = { 'DESIGNATION': 23, 'BYTES': 5, 'encode': function(_0x293a98) { return new Uint8Array([_0x137dca.DESIGNATION, _0x293a98 >> 8 & 0xff, _0x293a98 & 255]); }, 'decode': function(_0x399c76) { return { 'designation': _0x137dca.DESIGNATION, 'pid': _0x399c76[1] & 255 | _0x399c76[0] << 8 & 0xff00, 'killer': _0x399c76[3] & 255 | _0x399c76[2] << 8 & 0xff00 }; } }, _0x219ba8 = { 'DESIGNATION': 24, 'BYTES': 5, 'encode': function() { return new Uint8Array([_0x219ba8.DESIGNATION]); }, 'decode': function(_0x5e61f0) { return { 'designation': _0x219ba8.DESIGNATION, 'pid': _0x5e61f0[1] & 255 | _0x5e61f0[0] << 8 & 0xff00, 'result': _0x5e61f0[2], 'extra': _0x5e61f0[3] }; } }, _0x482c1d = { 'DESIGNATION': 25, 'BYTES': 3, 'encode': function() { return new Uint8Array([_0x482c1d.DESIGNATION]); } }, _0x217d86 = { 'DESIGNATION': 32, 'BYTES': 10, 'encode': function(_0x212298, _0x5ad080, _0xec07d0, _0x52c06d) { return new Uint8Array([_0x217d86.DESIGNATION, _0x212298, _0x5ad080, _0xec07d0 >> 24 & 0xff, _0xec07d0 >> 16 & 0xff, _0xec07d0 >> 8 & 0xff, _0xec07d0 & 255, _0x52c06d]); }, 'decode': function(_0x181a0e) { return { 'designation': _0x217d86.DESIGNATION, 'pid': _0x181a0e[1] & 255 | _0x181a0e[0] << 8 & 0xff00, 'level': _0x181a0e[2], 'zone': _0x181a0e[3], 'oid': _0x181a0e[7] & 255 | _0x181a0e[6] << 8 & 0xff00 | _0x181a0e[5] << 16 & 0xff0000 | _0x181a0e[4] << 24 & 0xff0000, 'type': _0x181a0e[8] }; } }, _0xd026c6 = { 'DESIGNATION': 48, 'BYTES': 10, 'encode': function(_0x5bf975, _0xbd3901, _0x5b4b84, _0x4aa955) { return new Uint8Array([_0xd026c6.DESIGNATION, _0x5bf975, _0xbd3901, _0x5b4b84 >> 24 & 0xff, _0x5b4b84 >> 16 & 0xff, _0x5b4b84 >> 8 & 0xff, _0x5b4b84 & 255, _0x4aa955]); }, 'decode': function(_0x4b27ec) { return { 'designation': _0xd026c6.DESIGNATION, 'pid': _0x4b27ec[1] & 255 | _0x4b27ec[0] << 8 & 0xff00, 'level': _0x4b27ec[2], 'zone': _0x4b27ec[3], 'pos': _0xd3ee2a.decode(_0x4b27ec[7] & 255 | _0x4b27ec[6] << 8 & 0xff00 | _0x4b27ec[5] << 16 & 0xff0000 | _0x4b27ec[4] << 24 & 0xff0000), 'type': _0x4b27ec[8] }; } }, _0x5b3c43 = function(_0x1ae564) { for (var _0x1cd96c = [], _0x1b12e7 = 0; _0x1b12e7 < _0x1ae564.length; _0x1b12e7++) for (var _0x546e07 = 0; _0x546e07 < _0x1ae564[_0x1b12e7].length; _0x546e07++) _0x1cd96c.push(_0x1ae564[_0x1b12e7][_0x546e07]); return new Uint8Array(_0x1cd96c); }; _0x1befeb.decode = function(_0x45cd70) { for (var _0x3e943d = [], _0x141cee = 0; _0x141cee < _0x45cd70.length;) switch (_0x45cd70.slice(_0x141cee++, _0x141cee)[0]) { case 2: _0x3e943d.push(_0x47673d.decode(_0x45cd70.slice(_0x141cee, _0x141cee += _0x47673d.BYTES - 1))); break; case 16: _0x3e943d.push(_0xd472e9.decode(_0x45cd70.slice(_0x141cee, _0x141cee += _0xd472e9.BYTES - 1))); break; case 17: _0x3e943d.push(_0x2befb4.decode(_0x45cd70.slice(_0x141cee, _0x141cee += _0x2befb4.BYTES - 1))); break; case 18: _0x3e943d.push(_0xebf263.decode(_0x45cd70.slice(_0x141cee, _0x141cee += _0xebf263.BYTES - 1))); break; case 19: _0x3e943d.push(_0x22483c.decode(_0x45cd70.slice(_0x141cee, _0x141cee += _0x22483c.BYTES - 1))); break; case 23: _0x3e943d.push(_0x137dca.decode(_0x45cd70.slice(_0x141cee, _0x141cee += _0x137dca.BYTES - 1))); break; case 24: _0x3e943d.push(_0x219ba8.decode(_0x45cd70.slice(_0x141cee, _0x141cee += _0x219ba8.BYTES - 1))); break; case 32: _0x3e943d.push(_0x217d86.decode(_0x45cd70.slice(_0x141cee, _0x141cee += _0x217d86.BYTES - 1))); break; case 48: _0x3e943d.push(_0xd026c6.decode(_0x45cd70.slice(_0x141cee, _0x141cee += _0xd026c6.BYTES - 1))); break; default: return _0x5c48db && _0x5c48db.menu.warn.show("Error decoding binary data!"), _0x3e943d; } return _0x3e943d; }; "use strict"; var _0x4c4bae = {}; _0x4c4bae.intersection = function(_0x3d1f76, _0xa10d77, _0x566a65, _0xf78482) { return _0x566a65.x < _0x3d1f76.x + _0xa10d77.x && _0x566a65.x + _0xf78482.x > _0x3d1f76.x && _0x566a65.y < _0x3d1f76.y + _0xa10d77.y && _0x566a65.y + _0xf78482.y > _0x3d1f76.y; }; _0x4c4bae.inside = function(_0x281185, _0x3a5b8e, _0x58830d) { return _0x3a5b8e.x < _0x281185.x && _0x3a5b8e.x + _0x58830d.x > _0x281185.x && _0x3a5b8e.y < _0x281185.y && _0x3a5b8e.y + _0x58830d.y > _0x281185.y; }; "use strict"; function Menu() { this.body = document.getElementById("body"); window.history.pushState({ 'html': "index.html", 'pageTitle': "Infringe Royale" }, '', '#'); var _0x127a01 = [{ 'id': "warn", 'obj': new _0x3bc03d() }, { 'id': "error", 'obj': new _0x22b51b() }, { 'id': "load", 'obj': new _0x19c420() }, { 'id': "disclaim", 'obj': new _0x324007() }, { 'id': "main", 'obj': new _0x453b9f() }, { 'id': "name", 'obj': new _0x27685a() }, { 'id': "game", 'obj': new _0x5748a6() }]; this.menus = []; for (var _0x4193f9 = 0; _0x4193f9 < _0x127a01.length; _0x4193f9++) this.menus[_0x4193f9] = _0x127a01[_0x4193f9].obj, this[_0x127a01[_0x4193f9]['id']] = _0x127a01[_0x4193f9].obj; this.lastNav = ''; var _0x48acbe = this; window.onpopstate = function(_0x127a01) { if (_0x48acbe[_0x48acbe.lastNav] && _0x48acbe[_0x48acbe.lastNav].onBack) _0x48acbe.onBack(); else _0x127a01.state && "Infringe Royale" !== _0x127a01.state.pageTitle ? (document.getElementById("content").innerHTML = _0x127a01.state.html, document.title = _0x127a01.state.pageTitle) : _0x127a01.state && "Infringe Royale" === _0x127a01.state.pageTitle && window.history.back(); }; this.hideAll(); this.background('c'); this.body.style.display = "block"; } Menu.prototype.hideAll = function() { for (var _0xde3f37 = 1; _0xde3f37 < this.menus.length; _0xde3f37++) this.menus[_0xde3f37].hide(); }; Menu.prototype.background = function(_0x1c2b65) { if (_0x1c2b65 !== this.bid) { switch (_0x1c2b65) { case 'b': _0x1c2b65 = "background-b"; break; case 'c': _0x1c2b65 = "background-c"; break; default: _0x1c2b65 = "background-a"; } this.body.classList.remove("background-a"); this.body.classList.remove("background-b"); this.body.classList.remove("background-c"); this.body.classList.add(_0x1c2b65); } }; Menu.prototype.navigation = function(_0x3ddd1e, _0x10cd49) { this.lastNav = _0x3ddd1e; window.history.replaceState({ 'html': "index.html", 'pageTitle': "Infringe Royale" }, _0x10cd49, '#' + _0x10cd49); }; Menu.prototype.onBack = function() { window.history.pushState({ 'html': "index.html", 'pageTitle': "Infringe Royale" }, '', '#'); this[this.lastNav].onBack(); }; "use strict"; function _0x3bc03d() { this.element = document.getElementById("warn"); this.hide(); this.timeout = void 0; } _0x3bc03d.prototype.show = function(_0xf4b076) { this.element.innerHTML = " " + _0xf4b076; console.warn("##WARN## " + _0xf4b076); this.timeout && clearTimeout(this.timeout); var _0x5c6f93 = this.element; this.timeout = setTimeout(function() { _0x5c6f93.style.display = "none"; }, 5000); this.element.style.display = "block"; }; _0x3bc03d.prototype.hide = function() { this.element.style.display = "none"; }; "use strict"; function _0x22b51b() { this.element = document.getElementById("error"); this.error = document.getElementById("error-message"); } _0x22b51b.prototype.show = function(_0x268c96, _0x41574c, _0xa9cdc9) { _0x5c48db.net.close(); _0x5c48db.menu.hideAll(); _0x5c48db.menu.navigation("error", "error"); _0x5c48db.menu.background('b'); this.error.innerHTML = _0x268c96; _0x41574c && console.warn("##ERROR## " + _0x41574c); _0xa9cdc9 && console.warn("##TRACE## " + _0xa9cdc9); this.element.style.display = "block"; }; _0x22b51b.prototype.hide = function() { this.element.style.display = "none"; }; "use strict"; function _0x19c420() { this.element = document.getElementById("load"); } _0x19c420.prototype.show = function() { _0x5c48db.menu.hideAll(); _0x5c48db.menu.background('a'); this.element.style.display = "block"; }; _0x19c420.prototype.hide = function() { this.element.style.display = "none"; }; "use strict"; function _0x324007() { this.element = document.getElementById("disclaim"); this.linkElement = document.getElementById("link"); } _0x324007.prototype.show = function(_0x3ca171) { _0x5c48db.menu.hideAll(); _0x5c48db.menu.background('c'); this.linkElement.style.display = "block"; this.element.style.display = "block"; }; _0x324007.prototype.hide = function() { this.linkElement.style.display = "none"; this.element.style.display = "none"; }; "use strict"; function _0x453b9f() { this.element = document.getElementById("main"); this.linkElement = document.getElementById("link"); this.winElement = document.getElementById("win"); this.launchBtn = document.getElementById("main-launch"); this.number = document.getElementById("main-number"); var _0x32f9e3 = this; this.launchBtn.onclick = function() { _0x32f9e3.launch(); }; } _0x453b9f.prototype.launch = function() { _0x5c48db.menu.name.show(); }; _0x453b9f.prototype.show = function(_0x220cca) { _0x5c48db.menu.hideAll(); _0x5c48db.menu.navigation("main", "main"); _0x5c48db.menu.background('a'); _0x220cca && (this.number.innerHTML = _0x220cca); _0x220cca = Cookies.get("epic_gamer_moments"); var _0x4a6dc1 = Cookies.get("heated_gamer_moments"); this.winElement.style.display = "block"; this.winElement.innerHTML = "Wins: " + (_0x220cca ? _0x220cca : '0') + " Kills: " + (_0x4a6dc1 ? _0x4a6dc1 : '0') + ""; this.linkElement.style.display = "block"; this.element.style.display = "block"; }; _0x453b9f.prototype.hide = function() { this.linkElement.style.display = "none"; this.element.style.display = "none"; }; "use strict"; function _0x27685a() { this.element = document.getElementById("name"); this.linkElement = document.getElementById("link"); this.nameInput = document.getElementById("name-input"); this.teamInput = document.getElementById("team-input"); this.launchBtn = document.getElementById("name-launch"); var _0x25533e = this; this.launchBtn.onclick = function() { _0x25533e.launch(); }; } _0x27685a.prototype.launch = function() { Cookies.set("name", this.nameInput.value, { 'expires': 30 }); Cookies.set("team", this.teamInput.value, { 'expires': 30 }); _0x5c48db.join(this.nameInput.value, this.teamInput.value); }; _0x27685a.prototype.show = function() { _0x5c48db.menu.hideAll(); _0x5c48db.menu.navigation("name", "name"); _0x5c48db.menu.background('a'); var _0x3c4f13 = Cookies.get("name"), _0x5b5426 = Cookies.get("team"); this.nameInput.value = _0x3c4f13 ? _0x3c4f13 : ''; this.teamInput.value = _0x5b5426 ? _0x5b5426 : ''; this.linkElement.style.display = "block"; this.element.style.display = "block"; }; _0x27685a.prototype.hide = function() { this.linkElement.style.display = "none"; this.element.style.display = "none"; }; _0x27685a.prototype.onBack = function() { _0x5c48db.menu.main.show(); }; "use strict"; function _0x5748a6() { this.element = document.getElementById("game"); } _0x5748a6.prototype.show = function() { _0x5c48db.menu.hideAll(); _0x5c48db.menu.navigation("game", "game"); _0x5c48db.menu.background('c'); this.element.style.display = "block"; }; _0x5748a6.prototype.hide = function() { this.element.style.display = "none"; }; _0x5748a6.prototype.onBack = function() { _0x5c48db.close(); }; "use strict"; function Net() {} Net.prototype.connected = function() { return void 0 !== this.webSocket && this.webSocket.readyState !== WebSocket.CLOSED; }; Net.prototype.connect = function(_0x38ae30, _0x5c2e1b) { var _0xe2d302 = window.location.host; this.prefName = _0x38ae30; this.prefTeam = _0x5c2e1b; var _0x5a21e0 = this; this.connected() ? _0x5c48db.menu.error.show("Connection already open. State error.") : (this.webSocket = new WebSocket("ws://" + _0xe2d302 + "/royale/ws"), this.webSocket.binaryType = "arraybuffer", this.webSocket.onopen = function(_0x38ae30) { "open" !== _0x38ae30.type && _0x5c48db.menu.error.show("Error. WS open event has unexpected result."); }, this.webSocket.onmessage = function(_0x38ae30) { _0x38ae30.data instanceof ArrayBuffer ? _0x5a21e0.handleBinary(new Uint8Array(_0x38ae30.data)) : _0x5a21e0.handlePacket(JSON.parse(_0x38ae30.data)); }, this.webSocket.onclose = function(_0x38ae30) { _0x5a21e0.webSocket = void 0; _0x5c48db.menu.error.show("Connection Interrupted"); }); }; Net.prototype.handlePacket = function(_0x40daaa) { if (void 0 === this.state || !this.state.handlePacket(_0x40daaa)) switch (_0x40daaa.type) { case "s00": this.setState(_0x40daaa.state); break; case "s01": this.handleBlob(_0x40daaa.packets); break; case "s02": break; case "x00": _0x5c48db.menu.error.show("Server Exception", _0x40daaa.message); break; case "x01": _0x5c48db.menu.error.show("Server Exception", _0x40daaa.message, _0x40daaa.trace); break; default: _0x5c48db.menu.error.show("Recieved invalid packet type: " + _0x40daaa.type, JSON.stringify(_0x40daaa)); } }; Net.prototype.handleBinary = function(_0x4ac1dc) { this.state.handleBinary(_0x4ac1dc); }; Net.prototype.handleBlob = function(_0xb95200) { for (var _0x308544 = 0; _0x308544 < _0xb95200.length; _0x308544++) this.handlePacket(_0xb95200[_0x308544]); }; Net.prototype.setState = function(_0x2c5cd1) { void 0 !== this.state && this.state.destroy(); switch (_0x2c5cd1) { case 'l': this.state = new _0x23dcc5(); break; case 'g': this.state = new _0x55a279(); break; default: _0x5c48db.menu.error.show("Received invalid state ID: " + _0x2c5cd1); return; } this.state.ready(); }; Net.prototype.send = function(_0x386ea2) { this.webSocket.send(JSON.stringify(_0x386ea2)); }; Net.prototype.sendBinary = function(_0x13f0a6) { this.webSocket.send(_0x13f0a6.buffer); }; Net.prototype.close = function() { void 0 !== this.webSocket && this.webSocket.close(); _0x5c48db.ingame() && _0x5c48db.game.destroy(); }; "use strict"; function _0x23dcc5() {} _0x23dcc5.prototype.handlePacket = function(_0x4789de) { switch (_0x4789de.type) { case "l01": return this.loggedIn(_0x4789de), !0; default: return !1; } }; _0x23dcc5.prototype.handleBinary = function(_0x4e8adf) { _0x5c48db.menu.warn.show("Recieved unexpected binary data!"); }; _0x23dcc5.prototype.ready = function() { this.send({ 'type': "l00", 'name': _0x5c48db.net.prefName, 'team': _0x5c48db.net.prefTeam }); }; _0x23dcc5.prototype.loggedIn = function(_0x4992d1) { _0x5c48db.net.name = _0x4992d1.name; _0x5c48db.net.sid = _0x4992d1.sid; console.log("Logged in: " + _0x4992d1.name + " :: " + _0x4992d1.team + " // " + _0x4992d1.sid); }; _0x23dcc5.prototype.send = function(_0x43fbbf) { _0x5c48db.net.send(_0x43fbbf); }; _0x23dcc5.prototype.type = function() { return 'l'; }; _0x23dcc5.prototype.destroy = function() {}; "use strict"; function _0x55a279() { this.pingOut = !1; this.pingLast = 0; this.pingFrame = 90; } _0x55a279.prototype.handlePacket = function(_0x5852f4) { switch (_0x5852f4.type) { case "g01": return this.load(_0x5852f4), !0; case "g06": return this.globalWarn(_0x5852f4), !0; case "g21": return this.recievePing(_0x5852f4), !0; default: return _0x5c48db.ingame() ? _0x5c48db.game.handlePacket(_0x5852f4) : !1; } }; _0x55a279.prototype.handleBinary = function(_0x1ae461) { _0x5c48db.ingame() && _0x5c48db.game.handleBinary(_0x1ae461); }; _0x55a279.prototype.ready = function() { this.send({ 'type': "g00" }); }; _0x55a279.prototype.load = function(_0x6240d9) { var _0x2485b5 = this; $.ajax({ 'url': "http://" + window.location.host + "/royale/game/" + _0x6240d9.game, 'type': "GET", 'timeout': 5000, 'success': function(_0x6240d9) { _0x5c48db.load(_0x6240d9); _0x2485b5.send({ 'type': "g03" }); }, 'error': function() { _0x5c48db.menu.error.show("Server returned FNF(404) for game file: " + _0x6240d9.game); } }); }; _0x55a279.prototype.globalWarn = function(_0x46a482) { _0x5c48db.menu.warn.show(_0x46a482.message); }; _0x55a279.prototype.sendPing = function() { var _0x4e85e9 = _0x35d3bd.time.now(); this.pingOut && 999 > this.pingLast - _0x4e85e9 || (this.pingOut && (_0x5c48db.net.ping = 999), this.send({ 'type': "g21", 'delta': _0x4e85e9 }), this.pingOut = !0); }; _0x55a279.prototype.recievePing = function(_0xaadb97) { var _0x134513 = _0x35d3bd.time.now(); _0x5c48db.net.ping = _0x134513 - _0xaadb97.delta; this.pingOut = !1; }; _0x55a279.prototype.send = function(_0x34b41a) { _0x5c48db.net.send(_0x34b41a); }; _0x55a279.prototype.type = function() { return 'g'; }; _0x55a279.prototype.destroy = function() {}; "use strict"; function _0x2b132(_0x1011dd, _0x2bc95a, _0x123d8d, _0xb0017c) { this.game = _0x1011dd; this.level = _0x2bc95a; this.zone = _0x123d8d; this.pos = _0xb0017c; this.sprite = this.state = void 0; this.garbage = this.dead = this.reverse = !1; this.sounds = []; } _0x2b132.ASYNC = !0; _0x2b132['ID'] = 0; _0x2b132.prototype.update = function(_0x34f8fc) {}; _0x2b132.prototype.step = function() {}; _0x2b132.prototype.sound = function() { for (var _0xe404a4 = 0; _0xe404a4 < this.sounds.length; _0xe404a4++) { var _0x29d0a1 = this.sounds[_0xe404a4]; _0x29d0a1.done() ? this.sounds.splice(_0xe404a4--, 1) : _0x29d0a1.position(this.pos); } }; _0x2b132.prototype.kill = function() { this.dead = !0; this.destroy(); }; _0x2b132.prototype.destroy = function() { this.garbage = this.dead = !0; }; _0x2b132.prototype.isTangible = function() { return !this.dead && !this.disabled && this.dim; }; _0x2b132.prototype.draw = function() {}; _0x2b132.prototype.play = function(_0x387076, _0x3ce43b, _0x307bee) { var _0x5a9966 = this.game.getZone(); if (this.zone === _0x5a9966['id'] && this.level === _0x5a9966.level) return _0x387076 = this.game.audio.getSpatialAudio(_0x387076, _0x3ce43b, _0x307bee, "effect"), _0x387076.play(this.pos), this.sounds.push(_0x387076), _0x387076; }; _0x2b132.OBJECT_LIST = []; _0x2b132.REGISTER_OBJECT = function(_0xe1c0e5) { _0x2b132.OBJECT_LIST.push(_0xe1c0e5); }; _0x2b132.OBJECT = function(_0x569450) { for (var _0xc3432b = 0; _0xc3432b < _0x2b132.OBJECT_LIST.length; _0xc3432b++) { var _0x2f3e0e = _0x2b132.OBJECT_LIST[_0xc3432b]; if (_0x2f3e0e['ID'] === _0x569450) return _0x2f3e0e; } _0x5c48db.menu.warn.show("Invalid Object Class ID: " + _0x569450); }; "use strict"; function _0x307949(_0x4d091b, _0x5602de, _0x93c981, _0x48ae31, _0x3fec2b) { _0x2b132.call(this, _0x4d091b, _0x5602de, _0x93c981, _0x48ae31); this.pid = _0x3fec2b; this.anim = 0; this.reverse = !1; this.deadTimer = this.deadFreezeTimer = this.arrowFade = 0; this.lastPos = this.pos; this.dim = _0x4628a4.make(1, 0x1); this.fallSpeed = this.moveSpeed = 0; this.jumping = -1; this.grounded = this.isSpring = this.isBounce = !1; this.name = void 0; this.starTimer = this.power = 0; this.starMusic = void 0; this.tfmTimer = this.damageTimer = 0; this.tfmTarget = -1; this.pipeWarp = void 0; this.pipeTimer = 0; this.pipeExt = this.pipeDir = -1; this.poleTimer = this.pipeDelayLength = this.pipeDelay = 0; this.poleSound = this.poleWait = !1; this.vineWarp = void 0; this.attackCharge = _0x307949.MAX_CHARGE; this.attackTimer = 0; this.autoTarget = void 0; this.btnD = [0, 0x0]; this.btnBde = this.btnBg = this.btnB = this.btnA = !1; this.setState(_0x307949.SNAME.STAND); } _0x307949.ASYNC = !1; _0x307949['ID'] = 1; _0x307949.NAME = "PLAYER"; _0x307949.ANIMATION_RATE = 3; _0x307949.DIM_OFFSET = _0x4628a4.make(-0.05, 0); _0x307949.DEAD_FREEZE_TIME = 7; _0x307949.DEAD_TIME = 70; _0x307949.DEAD_UP_FORCE = 0.65; _0x307949.RUN_SPEED_MAX = 0.315; _0x307949.MOVE_SPEED_MAX = 0.215; _0x307949.MOVE_SPEED_ACCEL = 0.0125; _0x307949.MOVE_SPEED_DECEL = 0.0225; _0x307949.MOVE_SPEED_ACCEL_AIR = 0.0025; _0x307949.STUCK_SLIDE_SPEED = 0.08; _0x307949.FALL_SPEED_MAX = 0.45; _0x307949.FALL_SPEED_ACCEL = 0.085; _0x307949.BOUNCE_LENGTH_MIN = 1; _0x307949.SPRING_LENGTH_MIN = 5; _0x307949.SPRING_LENGTH_MAX = 14; _0x307949.JUMP_LENGTH_MIN = 3; _0x307949.JUMP_LENGTH_MAX = 7; _0x307949.JUMP_SPEED_INC_THRESHOLD = [0.1, 0.2, 0.25]; _0x307949.JUMP_DECEL = 0.005; _0x307949.BLOCK_BUMP_THRESHOLD = 0.12; _0x307949.POWER_INDEX_SIZE = 32; _0x307949.GENERIC_INDEX = 96; _0x307949.DAMAGE_TIME = 45; _0x307949.TRANSFORM_TIME = 18; _0x307949.TRANSFORM_ANIMATION_RATE = 2; _0x307949.STAR_LENGTH = 360; _0x307949.PROJ_OFFSET = _0x4628a4.make(0.75, 1.5); _0x307949.MAX_CHARGE = 60; _0x307949.ATTACK_DELAY = 7; _0x307949.ATTACK_CHARGE = 25; _0x307949.ATTACK_ANIM_LENGTH = 3; _0x307949.PIPE_TIME = 30; _0x307949.PIPE_SPEED = 0.06; _0x307949.PIPE_EXT_OFFSET = _0x4628a4.make(0.5, 0); _0x307949.WEED_EAT_RADIUS = 3; _0x307949.POLE_DELAY = 15; _0x307949.POLE_SLIDE_SPEED = 0.15; _0x307949.LEVEL_END_MOVE_OFF = _0x4628a4.make(10, 0x0); _0x307949.CLIMB_SPEED = 0.125; _0x307949.PLATFORM_SNAP_DIST = 0.15; _0x307949.ARROW_SPRITE = 253; _0x307949.ARROW_TEXT = "YOU"; _0x307949.ARROW_OFFSET = _0x4628a4.make(0, 0.1); _0x307949.TEXT_OFFSET = _0x4628a4.make(0, 0.55); _0x307949.TEXT_SIZE = 0.65; _0x307949.TEXT_COLOR = "#FFFFFF"; _0x307949.ARROW_RAD_IN = 3; _0x307949.ARROW_RAD_OUT = 7; _0x307949.ARROW_THRESHOLD_MIN = 4; _0x307949.ARROW_THRESHOLD_MAX = 6; _0x307949.TEAM_OFFSET = _0x4628a4.make(0, 0x0); _0x307949.TEAM_SIZE = 0.3; _0x307949.TEAM_COLOR = "rgba(255,255,255,0.75)"; _0x307949.SPRITE = {}; _0x307949.SPRITE_LIST = [{ 'NAME': "S_STAND", 'ID': 0, 'INDEX': 13 }, { 'NAME': "S_RUN0", 'ID': 1, 'INDEX': 10 }, { 'NAME': "S_RUN1", 'ID': 2, 'INDEX': 11 }, { 'NAME': "S_RUN2", 'ID': 3, 'INDEX': 12 }, { 'NAME': "S_SLIDE", 'ID': 4, 'INDEX': 9 }, { 'NAME': "S_FALL", 'ID': 5, 'INDEX': 8 }, { 'NAME': "S_CLIMB0", 'ID': 6, 'INDEX': 6 }, { 'NAME': "S_CLIMB1", 'ID': 7, 'INDEX': 7 }, { 'NAME': "B_STAND", 'ID': 32, 'INDEX': [ [45], [29] ] }, { 'NAME': "B_DOWN", 'ID': 33, 'INDEX': [ [44], [28] ] }, { 'NAME': "B_RUN0", 'ID': 34, 'INDEX': [ [41], [25] ] }, { 'NAME': "B_RUN1", 'ID': 35, 'INDEX': [ [42], [26] ] }, { 'NAME': "B_RUN2", 'ID': 36, 'INDEX': [ [43], [27] ] }, { 'NAME': "B_SLIDE", 'ID': 37, 'INDEX': [ [40], [24] ] }, { 'NAME': "B_FALL", 'ID': 38, 'INDEX': [ [39], [23] ] }, { 'NAME': "B_CLIMB0", 'ID': 39, 'INDEX': [ [37], [21] ] }, { 'NAME': "B_CLIMB1", 'ID': 40, 'INDEX': [ [38], [22] ] }, { 'NAME': "B_TRANSFORM", 'ID': 41, 'INDEX': [ [46], [30] ] }, { 'NAME': "F_STAND", 'ID': 64, 'INDEX': [ [77], [61] ] }, { 'NAME': "F_DOWN", 'ID': 65, 'INDEX': [ [76], [60] ] }, { 'NAME': "F_RUN0", 'ID': 66, 'INDEX': [ [73], [57] ] }, { 'NAME': "F_RUN1", 'ID': 67, 'INDEX': [ [74], [58] ] }, { 'NAME': "F_RUN2", 'ID': 68, 'INDEX': [ [75], [59] ] }, { 'NAME': "F_SLIDE", 'ID': 69, 'INDEX': [ [72], [56] ] }, { 'NAME': "F_FALL", 'ID': 70, 'INDEX': [ [71], [55] ] }, { 'NAME': "F_CLIMB0", 'ID': 71, 'INDEX': [ [69], [53] ] }, { 'NAME': "F_CLIMB1", 'ID': 72, 'INDEX': [ [70], [54] ] }, { 'NAME': "F_ATTACK", 'ID': 73, 'INDEX': [ [79], [63] ] }, { 'NAME': "F_TRANSFORM", 'ID': 80, 'INDEX': [ [78], [62] ] }, { 'NAME': "G_DEAD", 'ID': 96, 'INDEX': 0 }, { 'NAME': "G_HIDE", 'ID': 112, 'INDEX': 14 }]; for (var _0x4f3eec = 0; _0x4f3eec < _0x307949.SPRITE_LIST.length; _0x4f3eec++) _0x307949.SPRITE[_0x307949.SPRITE_LIST[_0x4f3eec].NAME] = _0x307949.SPRITE_LIST[_0x4f3eec], _0x307949.SPRITE[_0x307949.SPRITE_LIST[_0x4f3eec]['ID']] = _0x307949.SPRITE_LIST[_0x4f3eec]; _0x307949.SNAME = {}; _0x307949.SNAME.STAND = "STAND"; _0x307949.SNAME.DOWN = "DOWN"; _0x307949.SNAME.RUN = "RUN"; _0x307949.SNAME.SLIDE = "SLIDE"; _0x307949.SNAME.FALL = "FALL"; _0x307949.SNAME.POLE = "POLE"; _0x307949.SNAME.CLIMB = "CLIMB"; _0x307949.SNAME.ATTACK = "ATTACK"; _0x307949.SNAME.TRANSFORM = "TRANSFORM"; _0x307949.SNAME.DEAD = "DEAD"; _0x307949.SNAME.HIDE = "HIDE"; _0x307949.SNAME.GHOST = "GHOST"; _0x307949.SNAME.DEADGHOST = "DEADGHOST"; var _0x1854f6 = _0x4628a4.make(0.9, 0.95), _0x5f13bd = _0x4628a4.make(0.9, 1.9); _0x307949.STATE = [{ 'NAME': _0x307949.SNAME.STAND, 'ID': 0, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.S_STAND] }, { 'NAME': _0x307949.SNAME.DOWN, 'ID': 1, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.S_STAND] }, { 'NAME': _0x307949.SNAME.RUN, 'ID': 2, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.S_RUN2, _0x307949.SPRITE.S_RUN1, _0x307949.SPRITE.S_RUN0] }, { 'NAME': _0x307949.SNAME.SLIDE, 'ID': 3, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.S_SLIDE] }, { 'NAME': _0x307949.SNAME.FALL, 'ID': 4, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.S_FALL] }, { 'NAME': _0x307949.SNAME.TRANSFORM, 'ID': 5, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.S_STAND] }, { 'NAME': _0x307949.SNAME.POLE, 'ID': 6, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.S_CLIMB1] }, { 'NAME': _0x307949.SNAME.CLIMB, 'ID': 7, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.S_CLIMB0, _0x307949.SPRITE.S_CLIMB1] }, { 'NAME': _0x307949.SNAME.STAND, 'ID': 32, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.B_STAND] }, { 'NAME': _0x307949.SNAME.DOWN, 'ID': 33, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.B_DOWN] }, { 'NAME': _0x307949.SNAME.RUN, 'ID': 34, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.B_RUN2, _0x307949.SPRITE.B_RUN1, _0x307949.SPRITE.B_RUN0] }, { 'NAME': _0x307949.SNAME.SLIDE, 'ID': 35, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.B_SLIDE] }, { 'NAME': _0x307949.SNAME.FALL, 'ID': 36, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.B_FALL] }, { 'NAME': _0x307949.SNAME.TRANSFORM, 'ID': 37, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.B_TRANSFORM] }, { 'NAME': _0x307949.SNAME.POLE, 'ID': 38, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.B_CLIMB0] }, { 'NAME': _0x307949.SNAME.CLIMB, 'ID': 39, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.B_CLIMB0, _0x307949.SPRITE.B_CLIMB1] }, { 'NAME': _0x307949.SNAME.STAND, 'ID': 64, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.F_STAND] }, { 'NAME': _0x307949.SNAME.DOWN, 'ID': 65, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.F_DOWN] }, { 'NAME': _0x307949.SNAME.RUN, 'ID': 66, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.F_RUN2, _0x307949.SPRITE.F_RUN1, _0x307949.SPRITE.F_RUN0] }, { 'NAME': _0x307949.SNAME.SLIDE, 'ID': 67, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.F_SLIDE] }, { 'NAME': _0x307949.SNAME.FALL, 'ID': 68, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.F_FALL] }, { 'NAME': _0x307949.SNAME.ATTACK, 'ID': 69, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.F_ATTACK] }, { 'NAME': _0x307949.SNAME.TRANSFORM, 'ID': 70, 'DIM': _0x1854f6, 'SPRITE': [_0x307949.SPRITE.F_TRANSFORM] }, { 'NAME': _0x307949.SNAME.POLE, 'ID': 71, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.F_CLIMB0] }, { 'NAME': _0x307949.SNAME.CLIMB, 'ID': 72, 'DIM': _0x5f13bd, 'SPRITE': [_0x307949.SPRITE.F_CLIMB0, _0x307949.SPRITE.F_CLIMB1] }, { 'NAME': _0x307949.SNAME.DEAD, 'DIM': _0x1854f6, 'ID': 96, 'SPRITE': [_0x307949.SPRITE.G_DEAD] }, { 'NAME': _0x307949.SNAME.HIDE, 'DIM': _0x1854f6, 'ID': 112, 'SPRITE': [_0x307949.SPRITE.G_HIDE] }, { 'NAME': _0x307949.SNAME.GHOST, 'DIM': _0x1854f6, 'ID': 255, 'SPRITE': [] }, { 'NAME': _0x307949.SNAME.DEADGHOST, 'DIM': _0x1854f6, 'ID': 254, 'SPRITE': [_0x307949.SPRITE.G_DEAD] }]; _0x307949.prototype.update = function(_0x438e58) { this.dead || this.garbage || (this.setState(_0x307949.SNAME.GHOST), this.level = _0x438e58.level, this.zone = _0x438e58.zone, this.pos = _0x438e58.pos, this.sprite = _0x307949.SPRITE[_0x438e58.sprite], this.reverse = _0x438e58.reverse); }; _0x307949.prototype.trigger = function(_0xc69ab0) { switch (_0xc69ab0) { case 1: this.attack(); break; case 2: this.star(); } }; _0x307949.prototype.step = function() { 0 < this.starTimer ? this.starTimer-- : this.starMusic && (this.starMusic.stop(), this.starMusic = void 0); if (this.isState(_0x307949.SNAME.GHOST)) this.sound(); else if (!this.isState(_0x307949.SNAME.HIDE)) if (this.isState(_0x307949.SNAME.POLE)) if (0 < this.poleTimer && !this.poleWait) this.poleTimer--; else { this.poleSound || (this.poleSound = !0, this.play("sfx/flagpole.wav", 1, 0x0)); if (!this.poleWait) if (0 >= this.poleTimer && this.autoTarget) this.setState(_0x307949.SNAME.STAND); else { for (var _0x204729 = _0x4628a4.add(this.pos, _0x4628a4.make(0, -0.15)), _0x4374b4 = _0x4628a4.make(this.pos['x'], this.pos['y'] - 0.15), _0x2571a4 = _0x4628a4.make(this.dim['x'], this.dim['y'] + 0.15), _0x4374b4 = this.game.world.getZone(this.level, this.zone).getTiles(_0x4374b4, _0x2571a4), _0x2571a4 = _0x4628a4.make(1, 0x1), _0x5b4e14 = !1, _0x5443e9 = 0; _0x5443e9 < _0x4374b4.length; _0x5443e9++) { var _0x2274e6 = _0x4374b4[_0x5443e9]; if (_0x4c4bae.intersection(_0x2274e6.pos, _0x2571a4, _0x204729, this.dim) && _0x2274e6.definition.COLLIDE) { _0x5b4e14 = !0; break; } } _0x5b4e14 ? (this.poleTimer = 15, this.autoTarget = _0x4628a4.add(_0x204729, _0x307949.LEVEL_END_MOVE_OFF), this.poleWait = !0) : this.pos = _0x204729; } _0x204729 = this.game.getFlag(this.level, this.zone); _0x204729.pos['y'] - 0.15 >= this.pos['y'] ? _0x204729.pos['y'] -= 0.15 : (_0x204729.pos['y'] = this.pos['y'], this.poleWait = !1); } else if (this.isState(_0x307949.SNAME.RUN) ? this.anim += Math.max(0.5, Math.abs(5 * this.moveSpeed)) : this.anim++, this.sprite = this.state.SPRITE[parseInt(parseInt(this.anim) / _0x307949.ANIMATION_RATE) % this.state.SPRITE.length], this.isState(_0x307949.SNAME.CLIMB)) this.pos['y'] += _0x307949.CLIMB_SPEED, this.pos['y'] >= this.game.world.getZone(this.level, this.zone).dimensions()['y'] && (this.warp(this.vineWarp), this.setState(_0x307949.SNAME.FALL)); else if (this.isState(_0x307949.SNAME.DEAD) || this.isState(_0x307949.SNAME.DEADGHOST)) 0 < this.deadFreezeTimer ? this.deadFreezeTimer-- : 0 < this.deadTimer ? (this.deadTimer--, this.pos['y'] += this.fallSpeed, this.fallSpeed = Math.max(this.fallSpeed - 0.085, -0.45)) : this.destroy(); else if (this.isState(_0x307949.SNAME.TRANSFORM)) if (0 < --this.tfmTimer) switch (_0x204729 = parseInt(this.anim / _0x307949.TRANSFORM_ANIMATION_RATE) % 3, _0x4374b4 = this.power > this.tfmTarget ? this.power : this.tfmTarget, _0x204729) { case 0: this.sprite = this.getStateByPowerIndex(_0x307949.SNAME.STAND, this.power).SPRITE[0]; break; case 1: this.sprite = this.getStateByPowerIndex(_0x307949.SNAME.TRANSFORM, _0x4374b4).SPRITE[0]; break; case 2: this.sprite = this.getStateByPowerIndex(_0x307949.SNAME.STAND, this.tfmTarget).SPRITE[0]; } else this.power = this.tfmTarget, this.tfmTarget = -1, this.setState(_0x307949.SNAME.STAND), this.collisionTest(this.pos, this.dim) && this.setState(_0x307949.SNAME.DOWN), this.damageTimer = _0x307949.DAMAGE_TIME; else if (0 < this.pipeDelay) this.pipeDelay--; else if (0 < this.pipeTimer && 0 >= this.pipeDelay) { 30 <= this.pipeTimer && this.play("sfx/pipe.wav", 1, 0.04); switch (this.pipeDir) { case 1: this.pos['y'] += 0.06; break; case 2: this.pos['y'] -= 0.06; break; case 3: this.pos['x'] -= 0.06; break; case 4: this.pos['x'] += 0.06; } 1 === --this.pipeTimer && this.pipeWarp && (this.pipeDelay = this.pipeDelayLength); if (0 >= this.pipeTimer && this.pipeWarp) { this.warp(this.pipeWarp); this.weedeat(); this.pipeWarp = void 0; switch (this.pipeExt) { case 1: this.pos['y'] -= 1.74; this.setState(_0x307949.SNAME.STAND); this.pos = _0x4628a4.add(this.pos, _0x307949.PIPE_EXT_OFFSET); break; case 2: this.pos['y'] += 1.74; this.setState(_0x307949.SNAME.STAND); this.pos = _0x4628a4.add(this.pos, _0x307949.PIPE_EXT_OFFSET); break; case 3: this.pos['x'] -= 1.74; this.setState(_0x307949.SNAME.RUN); break; case 4: this.pos['x'] += 1.74; this.setState(_0x307949.SNAME.RUN); break; default: return; } this.pipeTimer = 30; this.pipeDir = this.pipeExt; this.pipeDelay = this.pipeDelayLength; } } else this.lastPos = this.pos, 0 < this.damageTimer && this.damageTimer--, this.attackCharge < _0x307949.MAX_CHARGE && this.attackCharge++, 0 < this.attackTimer && this.attackTimer--, this.autoTarget && this.autoMove(), this.control(), this.physics(), this.interaction(), this.arrow(), this.sound(), 0 > this.pos['y'] && this.kill(); }; _0x307949.prototype.input = function(_0x3265cb, _0x2ea9a1, _0xff23c0) { this.btnD = _0x3265cb; this.btnA = _0x2ea9a1; this.btnB = _0xff23c0; }; _0x307949.prototype.autoMove = function() { this.btnD = [0, 0x0]; this.btnB = this.btnA = !1; 0.1 <= Math.abs(this.pos['x'] - this.autoTarget['x']) ? this.btnD = [0 >= this.pos['x'] - this.autoTarget['x'] ? 1 : -1, 0x0] : 0.01 > Math.abs(this.moveSpeed) && (this.btnA = -0.5 > this.pos['y'] - this.autoTarget['y']); }; _0x307949.prototype.control = function() { this.grounded && (this.btnBg = this.btnB); if (this.isState(_0x307949.SNAME.DOWN) && this.collisionTest(this.pos, this.getStateByPowerIndex(_0x307949.SNAME.STAND, this.power).DIM)) - 1 !== this.btnD[1] && (this.moveSpeed = 0.5 * (this.moveSpeed + _0x307949.STUCK_SLIDE_SPEED)), this.moveSpeed = Math.sign(this.moveSpeed) * Math.max(Math.abs(this.moveSpeed) - _0x307949.MOVE_SPEED_DECEL, 0); else { 0 !== this.btnD[0] ? (0.01 < Math.abs(this.moveSpeed) && !(0 <= this.btnD[0] ^ 0 > this.moveSpeed) ? (this.moveSpeed += _0x307949.MOVE_SPEED_DECEL * this.btnD[0], this.setState(_0x307949.SNAME.SLIDE)) : (this.moveSpeed = this.btnD[0] * Math.min(Math.abs(this.moveSpeed) + 0.0125, this.btnBg ? 0.315 : 0.215), this.setState(_0x307949.SNAME.RUN)), this.grounded && (this.reverse = 0 <= this.btnD[0])) : (0.01 < Math.abs(this.moveSpeed) ? (this.moveSpeed = Math.sign(this.moveSpeed) * Math.max(Math.abs(this.moveSpeed) - _0x307949.MOVE_SPEED_DECEL, 0), this.setState(_0x307949.SNAME.RUN)) : (this.moveSpeed = 0, this.setState(_0x307949.SNAME.STAND)), -1 === this.btnD[1] && this.setState(_0x307949.SNAME.DOWN)); for (var _0x348a95 = this.isSpring ? 14 : 0x7, _0x32b03a = this.isSpring ? _0x307949.SPRING_LENGTH_MIN : this.isBounce ? _0x307949.BOUNCE_LENGTH_MIN : _0x307949.JUMP_LENGTH_MIN, _0x1f372a = 0; _0x1f372a < _0x307949.JUMP_SPEED_INC_THRESHOLD.length && Math.abs(this.moveSpeed) >= _0x307949.JUMP_SPEED_INC_THRESHOLD[_0x1f372a]; _0x1f372a++) _0x348a95++; this.btnA ? (this.grounded && (this.jumping = 0, this.play(0 < this.power ? "sfx/jump1.wav" : "sfx/jump0.wav", 0.7, 0.04)), this.jumping > _0x348a95 && (this.jumping = -1)) : this.jumping > _0x32b03a && (this.jumping = -1); this.grounded || this.setState(_0x307949.SNAME.FALL); this.btnB && !this.btnBde && 2 === this.power && !this.isState(_0x307949.SNAME.DOWN) && !this.isState(_0x307949.SNAME.SLIDE) && 1 > this.attackTimer && this.attackCharge >= _0x307949.ATTACK_CHARGE && (this.attack(), this.game.out.push(_0x22483c.encode(1))); this.btnBde = this.btnB; 0 < this.attackTimer && 2 === this.power && (this.isState(_0x307949.SNAME.STAND) || this.isState(_0x307949.SNAME.RUN)) && this.setState(_0x307949.SNAME.ATTACK); } }; _0x307949.prototype.physics = function() { -1 !== this.jumping ? (this.fallSpeed = 0.45 - 0.005 * this.jumping, this.jumping++, this.grounded = !1) : (this.isSpring = this.isBounce = !1, this.grounded && (this.fallSpeed = 0), this.fallSpeed = Math.max(this.fallSpeed - 0.085, -0.45)); for (var _0x3557f3 = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), _0x1eb98f = _0x4628a4.make(this.pos['x'] + Math.min(0, this.moveSpeed), this.pos['y'] + Math.min(0, this.fallSpeed)), _0x4a868a = _0x4628a4.make(this.dim['x'] + Math.max(0, this.moveSpeed), this.dim['y'] + Math.max(0, this.fallSpeed)), _0x1eb98f = this.game.world.getZone(this.level, this.zone).getTiles(_0x1eb98f, _0x4a868a), _0x3ed246 = this.game.getPlatforms(), _0x4a868a = _0x4628a4.make(1, 0x1), _0x323cac = !1, _0x38bdf2 = [], _0x1c8b0f = [], _0x2ab9e0 = [], _0x320504 = [], _0x55b3d7 = [], _0x1544bb, _0x5593b0 = 0; _0x5593b0 < _0x1eb98f.length; _0x5593b0++) { var _0x1a0728 = _0x1eb98f[_0x5593b0]; if (_0x1a0728.definition.COLLIDE) if (_0x1a0728.definition.HIDDEN) _0x38bdf2.push(_0x1a0728); else if (_0x4c4bae.intersection(_0x1a0728.pos, _0x4a868a, _0x3557f3, this.dim) || _0x4c4bae.intersection(_0x1a0728.pos, _0x4a868a, this.pos, this.dim)) 0.01 < Math.abs(this.moveSpeed) && this.grounded && this.pos['y'] <= _0x1a0728.pos['y'] && _0x2ab9e0.push(_0x1a0728), _0x38bdf2.push(_0x1a0728); } for (_0x5593b0 = 0; _0x5593b0 < _0x3ed246.length; _0x5593b0++) _0x1a0728 = _0x3ed246[_0x5593b0], _0x4c4bae.intersection(_0x1a0728.pos, _0x1a0728.dim, _0x3557f3, this.dim) && _0x55b3d7.push(_0x1a0728); _0x3ed246 = _0x4628a4.make(_0x3557f3['x'], this.pos['y']); for (_0x5593b0 = 0; _0x5593b0 < _0x38bdf2.length; _0x5593b0++) _0x1a0728 = _0x38bdf2[_0x5593b0], !_0x1a0728.definition.HIDDEN && _0x4c4bae.intersection(_0x1a0728.pos, _0x4a868a, _0x3ed246, this.dim) && (_0x3ed246['x'] = _0x3ed246['x'] + 0.5 * this.dim['x'] < _0x1a0728.pos['x'] + 0.5 * _0x4a868a['x'] ? _0x1a0728.pos['x'] - this.dim['x'] : _0x1a0728.pos['x'] + _0x4a868a['x'], this.moveSpeed *= 0.33); _0x3557f3['x'] = _0x3ed246['x']; for (_0x5593b0 = 0; _0x5593b0 < _0x38bdf2.length; _0x5593b0++) _0x1a0728 = _0x38bdf2[_0x5593b0], _0x4c4bae.intersection(_0x1a0728.pos, _0x4a868a, _0x3557f3, this.dim) && (this.fallSpeed > _0x307949.BLOCK_BUMP_THRESHOLD && _0x320504.push(_0x1a0728), 0 > this.fallSpeed && this.pos['y'] >= _0x1a0728.pos['y'] && _0x1c8b0f.push(_0x1a0728)); for (_0x5593b0 = 0; _0x5593b0 < _0x38bdf2.length; _0x5593b0++) _0x1a0728 = _0x38bdf2[_0x5593b0], _0x4c4bae.intersection(_0x1a0728.pos, _0x4a868a, _0x3557f3, this.dim) && (this.pos['y'] >= _0x3557f3['y'] ? _0x1a0728.definition.HIDDEN || (_0x3557f3['y'] = _0x1a0728.pos['y'] + _0x4a868a['y'], this.fallSpeed = 0, _0x323cac = !0) : (_0x3557f3['y'] = _0x1a0728.pos['y'] - this.dim['y'], this.fallSpeed = 0)); for (_0x5593b0 = 0; _0x5593b0 < _0x55b3d7.length; _0x5593b0++) if (_0x1a0728 = _0x55b3d7[_0x5593b0], this.pos['y'] >= _0x3557f3['y'] && _0x1a0728.pos['y'] + _0x1a0728.dim['y'] - this.pos['y'] < _0x307949.PLATFORM_SNAP_DIST) { _0x3557f3['y'] = _0x1a0728.pos['y'] + _0x1a0728.dim['y']; _0x323cac = !0; _0x1544bb = _0x1a0728; break; } this.grounded = _0x323cac; this.pos = _0x3557f3; _0x1544bb && _0x1544bb.riding(this); for (_0x5593b0 = 0; _0x5593b0 < _0x1eb98f.length; _0x5593b0++) _0x1a0728 = _0x1eb98f[_0x5593b0], _0x4c4bae.intersection(_0x1a0728.pos, _0x4a868a, _0x3557f3, this.dim) && _0x1a0728.definition.TRIGGER(this.game, this.pid, _0x1a0728, this.level, this.zone, _0x1a0728.pos['x'], _0x1a0728.pos['y'], _0x3b5639.TRIGGER.TYPE.TOUCH); if (this.isState(_0x307949.SNAME.DOWN) && 0.05 > this.moveSpeed) for (_0x5593b0 = 0; _0x5593b0 < _0x1c8b0f.length; _0x5593b0++) _0x1a0728 = _0x1c8b0f[_0x5593b0], _0x1a0728.definition.TRIGGER(this.game, this.pid, _0x1a0728, this.level, this.zone, _0x1a0728.pos['x'], _0x1a0728.pos['y'], _0x3b5639.TRIGGER.TYPE.DOWN); if (this.isState(_0x307949.SNAME.RUN)) for (_0x5593b0 = 0; _0x5593b0 < _0x2ab9e0.length; _0x5593b0++) _0x1a0728 = _0x2ab9e0[_0x5593b0], _0x1a0728.definition.TRIGGER(this.game, this.pid, _0x1a0728, this.level, this.zone, _0x1a0728.pos['x'], _0x1a0728.pos['y'], _0x3b5639.TRIGGER.TYPE.PUSH); for (_0x5593b0 = 0; _0x5593b0 < _0x320504.length; _0x5593b0++) _0x1a0728 = _0x320504[_0x5593b0], _0x1a0728.definition.TRIGGER(this.game, this.pid, _0x1a0728, this.level, this.zone, _0x1a0728.pos['x'], _0x1a0728.pos['y'], 0 < this.power ? _0x3b5639.TRIGGER.TYPE.BIG_BUMP : _0x3b5639.TRIGGER.TYPE.SMALL_BUMP), this.jumping = -1, this.fallSpeed = -_0x307949.BLOCK_BUMP_THRESHOLD; }; _0x307949.prototype.collisionTest = function(_0x2b94c4, _0x365a52) { for (var _0x348bab = _0x4628a4.make(1, 0x1), _0x5bcbfb = this.game.world.getZone(this.level, this.zone).getTiles(_0x2b94c4, _0x365a52), _0x647699 = 0; _0x647699 < _0x5bcbfb.length; _0x647699++) { var _0x227263 = _0x5bcbfb[_0x647699]; if (_0x227263.definition.COLLIDE && _0x4c4bae.intersection(_0x227263.pos, _0x348bab, _0x2b94c4, _0x365a52)) return !0; } return !1; }; _0x307949.prototype.interaction = function() { for (var _0x22f6c7 = 0; _0x22f6c7 < this.game.objects.length; _0x22f6c7++) { var _0x477778 = this.game.objects[_0x22f6c7]; _0x477778 !== this && !this.dead && _0x477778.level === this.level && _0x477778.zone === this.zone && _0x477778.isTangible() && _0x4c4bae.intersection(_0x477778.pos, _0x477778.dim, this.pos, this.dim) && (0 < this.starTimer && _0x477778.bonk && (_0x477778.bonk(), this.game.out.push(_0x217d86.encode(_0x477778.level, _0x477778.zone, _0x477778.oid, 1))), _0x477778 instanceof _0x307949 && 0 < _0x477778.starTimer && !this.autoTarget && (this.damage(_0x477778), this.dead && this.game.out.push(_0x137dca.encode(_0x477778.pid))), this.lastPos['y'] > _0x477778.pos['y'] + 0.66 * _0x477778.dim['y'] - Math.max(0, _0x477778.fallSpeed) ? _0x477778.playerStomp && _0x477778.playerStomp(this) : this.lastPos['y'] < _0x477778.pos['y'] ? _0x477778.playerBump && _0x477778.playerBump(this) : _0x477778.playerCollide && _0x477778.playerCollide(this)); } }; _0x307949.prototype.arrow = function() { for (var _0x8e07c9 = 0, _0x515633 = 0; _0x515633 < this.game.objects.length; _0x515633++) { var _0x4e02ea = this.game.objects[_0x515633]; _0x4e02ea !== this && _0x4e02ea instanceof _0x307949 && _0x4e02ea.level === this.level && _0x4e02ea.zone === this.zone && (_0x8e07c9 += 1 - Math.min(_0x307949.ARROW_RAD_OUT, Math.max(0, _0x4628a4.distance(this.pos, _0x4e02ea.pos) - _0x307949.ARROW_RAD_IN)) / _0x307949.ARROW_RAD_OUT); } this.arrowFade = Math.min(_0x307949.ARROW_THRESHOLD_MAX, Math.max(0, _0x8e07c9 - _0x307949.ARROW_THRESHOLD_MIN)) / _0x307949.ARROW_THRESHOLD_MAX; }; _0x307949.prototype.sound = _0x2b132.prototype.sound; _0x307949.prototype.attack = function() { this.attackTimer = _0x307949.ATTACK_DELAY; this.attackCharge -= _0x307949.ATTACK_CHARGE; var _0x56c306 = this.reverse ? _0x4628a4.add(this.pos, _0x307949.PROJ_OFFSET) : _0x4628a4.add(this.pos, _0x4628a4.multiply(_0x307949.PROJ_OFFSET, _0x4628a4.make(-1, 0x1))); this.game.createObject(_0xae11c9['ID'], this.level, this.zone, _0x56c306, [this.reverse, this.pid]); this.play("sfx/fireball.wav", 1, 0.04); }; _0x307949.prototype.bounce = function() { this.jumping = 0; this.isBounce = !0; }; _0x307949.prototype.damage = function(_0x31ed98) { 0 < this.damageTimer || 0 < this.starTimer || this.isState(_0x307949.SNAME.TRANSFORM) || this.isState(_0x307949.SNAME.CLIMB) || this.isState(_0x307949.SNAME.POLE) || this.pipeWarp || 0 < this.pipeTimer || 0 < this.pipeDelay || this.autoTarget || (0 < this.power ? (this.tfm(0), this.damageTimer = _0x307949.DAMAGE_TIME) : this.kill()); }; _0x307949.prototype.invuln = function() { this.damageTimer = _0x307949.DAMAGE_TIME; }; _0x307949.prototype.powerup = function(_0xa352e0) { _0xa352e0 instanceof _0x1461d8 && 1 > this.power ? (this.tfm(1), this.rate = 115) : _0xa352e0 instanceof _0x5b7df1 && 2 > this.power ? (this.tfm(2), this.rate = 113) : _0xa352e0 instanceof _0x34438c ? (this.star(), this.game.out.push(_0x22483c.encode(2)), this.rate = 67) : _0xa352e0 instanceof _0x4786c4 ? this.game.lifeage() : _0xa352e0 instanceof _0x43220d ? this.game.coinage() : _0xa352e0 instanceof _0x95234 ? this.game.out.push(_0x219ba8.encode()) : _0xa352e0 instanceof _0x2aa8a6 && this.damage(_0xa352e0); }; _0x307949.prototype.axe = function(_0x47b17d) { (_0x47b17d = this.game.getText(this.level, this.zone, _0x47b17d.toString())) || (_0x47b17d = this.game.getText(this.level, this.zone, "too bad")); _0x47b17d && (this.autoTarget = _0x4628a4.add(_0x47b17d.pos, _0x4628a4.make(0, -1.6))); }; _0x307949.prototype.star = function() { this.starMusic && (this.starMusic.stop(), this.starMusic = void 0); this.starTimer = _0x307949.STAR_LENGTH; (this.starMusic = this.play("music/star.mp3", 1, 0.04)) && this.starMusic.loop(!0); }; _0x307949.prototype.tfm = function(_0x39d852) { this.power < _0x39d852 ? this.play("sfx/powerup.wav", 1, 0.04) : this.play("sfx/pipe.wav", 1, 0.04); this.tfmTarget = _0x39d852; this.tfmTimer = _0x307949.TRANSFORM_TIME; this.setState(_0x307949.SNAME.TRANSFORM); }; _0x307949.prototype.warp = function(_0x881c58) { if (_0x881c58 = this.game.world.getLevel(this.level).getWarp(_0x881c58)) this.level = _0x881c58.level, this.zone = _0x881c58.zone, this.pos = _0x881c58.pos, this.autoTarget = void 0, this.grounded = !1; }; _0x307949.prototype.pipe = function(_0x28385c, _0x3a307a, _0x545f04) { 1 !== _0x28385c && 2 !== _0x28385c || this.setState(_0x307949.SNAME.STAND); var _0x25667b = this.game.world.getLevel(this.level).getWarp(_0x3a307a); this.pipeWarp = _0x3a307a; this.pipeTimer = 30; this.pipeDir = _0x28385c; this.pipeExt = _0x25667b.data; this.pipeDelayLength = _0x545f04; }; _0x307949.prototype.weedeat = function() { for (var _0x18acbf = 0; _0x18acbf < this.game.objects.length; _0x18acbf++) { var _0x1e852c = this.game.objects[_0x18acbf]; _0x1e852c instanceof _0x70c5e6 && !_0x1e852c.dead && _0x4628a4.distance(this.pos, _0x1e852c.pos) < _0x307949.WEED_EAT_RADIUS && _0x1e852c.destroy(); } }; _0x307949.prototype.pole = function(_0x4b8c41) { this.autoTarget || (this.setState(_0x307949.SNAME.POLE), this.fallSpeed = this.moveSpeed = 0, this.pos['x'] = _0x4b8c41['x'], this.poleTimer = 15, this.poleSound = !1); }; _0x307949.prototype.vine = function(_0x5cacf9, _0x960433) { this.setState(_0x307949.SNAME.CLIMB); this.fallSpeed = this.moveSpeed = 0; this.pos['x'] = _0x5cacf9['x']; this.vineWarp = _0x960433; }; _0x307949.prototype.hide = function() { this.setState(_0x307949.SNAME.HIDE); }; _0x307949.prototype.show = function() { this.setState(_0x307949.SNAME.STAND); }; _0x307949.prototype.kill = function() { this.starMusic && (this.starMusic.stop(), this.starMusic = void 0, this.starTimer = 0); this.isState(_0x307949.SNAME.GHOST) ? this.setState(_0x307949.SNAME.DEADGHOST) : this.setState(_0x307949.SNAME.DEAD); this.dead = !0; this.deadTimer = _0x307949.DEAD_TIME; this.deadFreezeTimer = _0x307949.DEAD_FREEZE_TIME; this.fallSpeed = _0x307949.DEAD_UP_FORCE; this.game.getPlayer() === this && this.game.out.push(_0x2befb4.encode()); }; _0x307949.prototype.destroy = function() { this.starMusic && (this.starMusic.stop(), this.starMusic = void 0, this.starTimer = 0); _0x2b132.prototype.destroy.call(this); }; _0x307949.prototype.isTangible = function() { return _0x2b132.prototype.isTangible.call(this) && !this.isState(_0x307949.SNAME.HIDE) && 0 >= this.pipeDelay; }; _0x307949.prototype.setState = function(_0x4a1a86) { _0x4a1a86 = this.getStateByPowerIndex(_0x4a1a86, this.power); _0x4a1a86 !== this.state && (this.state = _0x4a1a86, 0 < _0x4a1a86.SPRITE.length && (this.sprite = _0x4a1a86.SPRITE[0]), this.dim = _0x4a1a86.DIM, this.anim = 0); }; _0x307949.prototype.getStateByPowerIndex = function(_0x5e208d, _0x21eb9d) { for (var _0x42ee49 = 0; _0x42ee49 < _0x307949.STATE.length; _0x42ee49++) { var _0x312ab9 = _0x307949.STATE[_0x42ee49]; if (_0x312ab9.NAME === _0x5e208d && (_0x312ab9['ID'] >= _0x307949.GENERIC_INDEX || _0x312ab9['ID'] >= _0x307949.POWER_INDEX_SIZE * _0x21eb9d && _0x312ab9['ID'] < _0x307949.POWER_INDEX_SIZE * (_0x21eb9d + 1))) return _0x312ab9; } }; _0x307949.prototype.isState = function(_0xbe936c) { return _0xbe936c === this.state.NAME; }; _0x307949.prototype.draw = function(_0x10466d) { if (!(this.isState(_0x307949.SNAME.HIDE) || 0 < this.pipeDelay || 0 < this.damageTimer && 1 < this.damageTimer % 3)) { var _0x4d6ed1; _0x4d6ed1 = 0 < this.starTimer ? 2 : this.isState(_0x307949.SNAME.GHOST) || this.isState(_0x307949.SNAME.DEADGHOST) ? 1 : 0x0; if (this.sprite.INDEX instanceof Array) for (var _0x463b21 = this.sprite.INDEX, _0x4e64a5 = 0; _0x4e64a5 < _0x463b21.length; _0x4e64a5++) for (var _0x876c5d = 0; _0x876c5d < _0x463b21[_0x4e64a5].length; _0x876c5d++) 2 === _0x4d6ed1 && _0x10466d.push({ 'pos': _0x4628a4.add(_0x4628a4.add(this.pos, _0x307949.DIM_OFFSET), _0x4628a4.make(_0x876c5d, _0x4e64a5)), 'reverse': this.reverse, 'index': _0x463b21[_0x4e64a5][_0x876c5d], 'mode': 0 }), _0x10466d.push({ 'pos': _0x4628a4.add(_0x4628a4.add(this.pos, _0x307949.DIM_OFFSET), _0x4628a4.make(_0x876c5d, _0x4e64a5)), 'reverse': this.reverse, 'index': _0x463b21[_0x4e64a5][_0x876c5d], 'mode': _0x4d6ed1 }); else 2 === _0x4d6ed1 && _0x10466d.push({ 'pos': _0x4628a4.add(this.pos, _0x307949.DIM_OFFSET), 'reverse': this.reverse, 'index': this.sprite.INDEX, 'mode': 0 }), _0x10466d.push({ 'pos': _0x4628a4.add(this.pos, _0x307949.DIM_OFFSET), 'reverse': this.reverse, 'index': this.sprite.INDEX, 'mode': _0x4d6ed1 }); 0 < this.arrowFade && (_0x4d6ed1 = 160 + parseInt(32 * this.arrowFade), _0x10466d.push({ 'pos': _0x4628a4.add(_0x4628a4.add(this.pos, _0x4628a4.make(0, this.dim['y'])), _0x307949.ARROW_OFFSET), 'reverse': !1, 'index': _0x307949.ARROW_SPRITE, 'mode': _0x4d6ed1 })); } }; _0x307949.prototype.write = function(_0x20d883) { 0 < this.arrowFade ? _0x20d883.push({ 'pos': _0x4628a4.add(_0x4628a4.add(this.pos, _0x4628a4.make(0, this.dim['y'])), _0x307949.TEXT_OFFSET), 'size': _0x307949.TEXT_SIZE, 'color': "rgba(255,255,255," + this.arrowFade + ')', 'text': _0x307949.ARROW_TEXT }) : this.name && _0x20d883.push({ 'pos': _0x4628a4.add(_0x4628a4.add(this.pos, _0x4628a4.make(0, this.sprite.INDEX instanceof Array ? 2 : 0x1)), _0x307949.TEAM_OFFSET), 'size': _0x307949.TEAM_SIZE, 'color': _0x307949.TEAM_COLOR, 'text': this.name }); }; _0x307949.prototype.play = _0x2b132.prototype.play; _0x2b132.REGISTER_OBJECT(_0x307949); "use strict"; function _0x283378(_0x4f9a2f, _0x3d8684, _0x2ebb91, _0x1aced7, _0x32a76c, _0x2c5d13) { _0x2b132.call(this, _0x4f9a2f, _0x3d8684, _0x2ebb91, _0x1aced7); this.oid = _0x32a76c; this.variant = isNaN(parseInt(_0x2c5d13)) ? 0 : parseInt(_0x2c5d13); this.setState(_0x283378.STATE.RUN); this.bonkTimer = this.deadTimer = this.anim = 0; this.dim = _0x4628a4.make(1, 0x1); this.fallSpeed = this.moveSpeed = 0; this.disabled = this.grounded = !1; this.disabledTimer = 0; this.proxHit = !1; this.dir = !0; this.disable(); } _0x283378.ASYNC = !1; _0x283378['ID'] = 17; _0x283378.NAME = "GOOMBA"; _0x283378.ANIMATION_RATE = 3; _0x283378.VARIANT_OFFSET = 80; _0x283378.ENABLE_FADE_TIME = 15; _0x283378.ENABLE_DIST = 26; _0x283378.DEAD_TIME = 60; _0x283378.BONK_TIME = 90; _0x283378.BONK_IMP = _0x4628a4.make(0.25, 0.4); _0x283378.BONK_DECEL = 0.925; _0x283378.BONK_FALL_SPEED = 0.5; _0x283378.MOVE_SPEED_MAX = 0.075; _0x283378.FALL_SPEED_MAX = 0.35; _0x283378.FALL_SPEED_ACCEL = 0.085; _0x283378.SPRITE = {}; _0x283378.SPRITE_LIST = [{ 'NAME': "RUN0", 'ID': 0, 'INDEX': 15 }, { 'NAME': "RUN1", 'ID': 1, 'INDEX': 31 }, { 'NAME': "DEAD", 'ID': 2, 'INDEX': 47 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x283378.SPRITE_LIST.length; _0x4f3eec++) _0x283378.SPRITE[_0x283378.SPRITE_LIST[_0x4f3eec].NAME] = _0x283378.SPRITE_LIST[_0x4f3eec], _0x283378.SPRITE[_0x283378.SPRITE_LIST[_0x4f3eec]['ID']] = _0x283378.SPRITE_LIST[_0x4f3eec]; _0x283378.STATE = {}; _0x283378.STATE_LIST = [{ 'NAME': "RUN", 'ID': 0, 'SPRITE': [_0x283378.SPRITE.RUN0, _0x283378.SPRITE.RUN1] }, { 'NAME': "DEAD", 'ID': 80, 'SPRITE': [_0x283378.SPRITE.DEAD] }, { 'NAME': "BONK", 'ID': 81, 'SPRITE': [] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x283378.STATE_LIST.length; _0x4f3eec++) _0x283378.STATE[_0x283378.STATE_LIST[_0x4f3eec].NAME] = _0x283378.STATE_LIST[_0x4f3eec], _0x283378.STATE[_0x283378.STATE_LIST[_0x4f3eec]['ID']] = _0x283378.STATE_LIST[_0x4f3eec]; _0x283378.prototype.update = function(_0x253d8f) { switch (_0x253d8f) { case 0: this.kill(); break; case 1: this.bonk(); break; case 160: this.enable(); } }; _0x283378.prototype.step = function() { this.disabled ? this.proximity() : (0 < this.disabledTimer && this.disabledTimer--, this.state === _0x283378.STATE.BONK ? this.bonkTimer++ > _0x283378.BONK_TIME || 0 > this.pos['y'] + this.dim['y'] ? this.destroy() : (this.pos = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), this.moveSpeed *= _0x283378.BONK_DECEL, this.fallSpeed = Math.max(this.fallSpeed - _0x283378.FALL_SPEED_ACCEL, -_0x283378.BONK_FALL_SPEED)) : (this.anim++, this.sprite = this.state.SPRITE[parseInt(this.anim / _0x283378.ANIMATION_RATE) % this.state.SPRITE.length], this.state === _0x283378.STATE.DEAD ? this.deadTimer++ < _0x283378.DEAD_TIME || this.destroy() : (this.control(), this.physics(), this.sound(), 0 > this.pos['y'] && this.destroy()))); }; _0x283378.prototype.control = function() { this.moveSpeed = this.dir ? -_0x283378.MOVE_SPEED_MAX : _0x283378.MOVE_SPEED_MAX; }; _0x283378.prototype.physics = function() { this.grounded && (this.fallSpeed = 0); this.fallSpeed = Math.max(this.fallSpeed - _0x283378.FALL_SPEED_ACCEL, -_0x283378.FALL_SPEED_MAX); var _0x40186e = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, 0)), _0x23f853 = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), _0x49dfe2 = _0x4628a4.make(0 <= this.moveSpeed ? this.pos['x'] : this.pos['x'] + this.moveSpeed, 0 >= this.fallSpeed ? this.pos['y'] : this.pos['y'] + this.fallSpeed), _0x5b5fe7 = _0x4628a4.make(this.dim['y'] + Math.abs(this.moveSpeed), this.dim['y'] + Math.abs(this.fallSpeed)), _0x49dfe2 = this.game.world.getZone(this.level, this.zone).getTiles(_0x49dfe2, _0x5b5fe7), _0x5b5fe7 = _0x4628a4.make(1, 0x1), _0x1d4e2e = !1; this.grounded = !1; for (var _0x270e91 = 0; _0x270e91 < _0x49dfe2.length; _0x270e91++) { var _0x2fdd07 = _0x49dfe2[_0x270e91]; _0x2fdd07.definition.COLLIDE && _0x4c4bae.intersection(_0x2fdd07.pos, _0x5b5fe7, _0x40186e, this.dim) && (this.pos['x'] <= _0x40186e['x'] && _0x40186e['x'] + this.dim['x'] > _0x2fdd07.pos['x'] ? (_0x40186e['x'] = _0x2fdd07.pos['x'] - this.dim['x'], _0x23f853['x'] = _0x40186e['x'], this.moveSpeed = 0, _0x1d4e2e = !0) : this.pos['x'] >= _0x40186e['x'] && _0x40186e['x'] < _0x2fdd07.pos['x'] + _0x5b5fe7['x'] && (_0x40186e['x'] = _0x2fdd07.pos['x'] + _0x5b5fe7['x'], _0x23f853['x'] = _0x40186e['x'], this.moveSpeed = 0, _0x1d4e2e = !0)); } for (_0x270e91 = 0; _0x270e91 < _0x49dfe2.length; _0x270e91++) _0x2fdd07 = _0x49dfe2[_0x270e91], _0x2fdd07.definition.COLLIDE && _0x4c4bae.intersection(_0x2fdd07.pos, _0x5b5fe7, _0x23f853, this.dim) && (this.pos['y'] >= _0x23f853['y'] && _0x23f853['y'] < _0x2fdd07.pos['y'] + _0x5b5fe7['y'] ? (_0x23f853['y'] = _0x2fdd07.pos['y'] + _0x5b5fe7['y'], this.fallSpeed = 0, this.grounded = !0) : this.pos['y'] <= _0x23f853['y'] && _0x23f853['y'] + this.dim['y'] > _0x2fdd07.pos['y'] && (_0x23f853['y'] = _0x2fdd07.pos['y'] - this.dim['y'], this.fallSpeed = 0)); this.pos = _0x4628a4.make(_0x40186e['x'], _0x23f853['y']); _0x1d4e2e && (this.dir = !this.dir); }; _0x283378.prototype.sound = _0x2b132.prototype.sound; _0x283378.prototype.proximity = function() { var _0x47fc6c = this.game.getPlayer(); _0x47fc6c && !_0x47fc6c.dead && _0x47fc6c.level === this.level && _0x47fc6c.zone === this.zone && !this.proxHit && _0x4628a4.distance(_0x47fc6c.pos, this.pos) < _0x283378.ENABLE_DIST && (this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 160)), this.proxHit = !0); }; _0x283378.prototype.enable = function() { this.disabled = !1; this.disabledTimer = _0x283378.ENABLE_FADE_TIME; }; _0x283378.prototype.disable = function() { this.disabled = !0; }; _0x283378.prototype.damage = function(_0x2a150a) { this.dead || (this.bonk(), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 1))); }; _0x283378.prototype.bonk = function() { this.dead || (this.setState(_0x283378.STATE.BONK), this.moveSpeed = _0x283378.BONK_IMP['x'], this.fallSpeed = _0x283378.BONK_IMP['y'], this.dead = !0, this.play("sfx/kick.wav", 1, 0.04)); }; _0x283378.prototype.playerCollide = function(_0x4ebe42) { this.dead || this.garbage || _0x4ebe42.damage(this); }; _0x283378.prototype.playerStomp = function(_0x555954) { this.dead || this.garbage || (this.kill(), _0x555954.bounce(), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 0))); }; _0x283378.prototype.playerBump = function(_0x4e1cbf) { this.dead || this.garbage || _0x4e1cbf.damage(this); }; _0x283378.prototype.kill = function() { this.dead = !0; this.setState(_0x283378.STATE.DEAD); this.play("sfx/stomp.wav", 1, 0.04); }; _0x283378.prototype.destroy = _0x2b132.prototype.destroy; _0x283378.prototype.isTangible = _0x2b132.prototype.isTangible; _0x283378.prototype.setState = function(_0x3a8691) { _0x3a8691 !== this.state && (this.state = _0x3a8691, 0 < _0x3a8691.SPRITE.length && (this.sprite = _0x3a8691.SPRITE[0]), this.anim = 0); }; _0x283378.prototype.draw = function(_0x3ed529) { if (!this.disabled) { var _0x36cdfb; _0x36cdfb = this.state === _0x283378.STATE.BONK ? 3 : 0x0 < this.disabledTimer ? 160 + parseInt(32 * (1 - this.disabledTimer / _0x283378.ENABLE_FADE_TIME)) : 0; if (this.sprite.INDEX instanceof Array) for (var _0x50473d = this.sprite.INDEX, _0x24d1cc = 0; _0x24d1cc < _0x50473d.length; _0x24d1cc++) for (var _0xe71d1c = 0; _0xe71d1c < _0x50473d[_0x24d1cc].length; _0xe71d1c++) { var _0x2d7f7b = _0x50473d[_0x36cdfb ? _0x50473d.length - 1 - _0x24d1cc : _0x24d1cc][_0xe71d1c]; switch (this.variant) { case 1: _0x2d7f7b += _0x283378.VARIANT_OFFSET; } _0x3ed529.push({ 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(_0xe71d1c, _0x24d1cc)), 'reverse': !this.dir, 'index': _0x2d7f7b, 'mode': _0x36cdfb }); } else { _0x2d7f7b = this.sprite.INDEX; switch (this.variant) { case 1: _0x2d7f7b += _0x283378.VARIANT_OFFSET; } _0x3ed529.push({ 'pos': this.pos, 'reverse': !this.dir, 'index': _0x2d7f7b, 'mode': _0x36cdfb }); } } }; _0x283378.prototype.play = _0x2b132.prototype.play; _0x2b132.REGISTER_OBJECT(_0x283378); "use strict"; function _0x2b64bd(_0x3b9475, _0x412263, _0x32b9be, _0x5b6119, _0xe61fc0, _0x2646e7, _0x5a0bbf) { _0x2b132.call(this, _0x3b9475, _0x412263, _0x32b9be, _0x5b6119); this.oid = _0xe61fc0; this.variant = isNaN(parseInt(_0x5a0bbf)) ? 0 : parseInt(_0x5a0bbf); this.setState(parseInt(_0x2646e7) ? _0x2b64bd.STATE.FLY : _0x2b64bd.STATE.RUN); this.bonkTimer = this.anim = 0; this.dim = _0x4628a4.make(1, 0x1); this.fallSpeed = this.moveSpeed = 0; this.grounded = !1; this.jump = -1; this.disabled = !1; this.disabledTimer = 0; this.proxHit = !1; this.immuneTimer = 0; this.dir = !0; this.disable(); } _0x2b64bd.ASYNC = !1; _0x2b64bd['ID'] = 18; _0x2b64bd.NAME = "KOOPA"; _0x2b64bd.ANIMATION_RATE = 3; _0x2b64bd.VARIANT_OFFSET = 32; _0x2b64bd.ENABLE_FADE_TIME = 15; _0x2b64bd.ENABLE_DIST = 26; _0x2b64bd.BONK_TIME = 90; _0x2b64bd.BONK_IMP = _0x4628a4.make(0.25, 0.4); _0x2b64bd.BONK_DECEL = 0.925; _0x2b64bd.BONK_FALL_SPEED = 0.5; _0x2b64bd.PLAYER_IMMUNE_TIME = 6; _0x2b64bd.MOVE_SPEED_MAX = 0.075; _0x2b64bd.SHELL_MOVE_SPEED_MAX = 0.35; _0x2b64bd.FALL_SPEED_MAX = 0.35; _0x2b64bd.FALL_SPEED_ACCEL = 0.085; _0x2b64bd.JUMP_LENGTH_MAX = 20; _0x2b64bd.JUMP_DECEL = 0.025; _0x2b64bd.TRANSFORM_TIME = 175; _0x2b64bd.TRANSFORM_THRESHOLD = 75; _0x2b64bd.SPRITE = {}; _0x2b64bd.SPRITE_LIST = [{ 'NAME': "FLY0", 'ID': 0, 'INDEX': [ [104], [88] ] }, { 'NAME': "FLY1", 'ID': 1, 'INDEX': [ [105], [89] ] }, { 'NAME': "RUN0", 'ID': 2, 'INDEX': [ [102], [86] ] }, { 'NAME': "RUN1", 'ID': 3, 'INDEX': [ [103], [87] ] }, { 'NAME': "TRANSFORM", 'ID': 4, 'INDEX': 81 }, { 'NAME': "SHELL", 'ID': 5, 'INDEX': 80 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x2b64bd.SPRITE_LIST.length; _0x4f3eec++) _0x2b64bd.SPRITE[_0x2b64bd.SPRITE_LIST[_0x4f3eec].NAME] = _0x2b64bd.SPRITE_LIST[_0x4f3eec], _0x2b64bd.SPRITE[_0x2b64bd.SPRITE_LIST[_0x4f3eec]['ID']] = _0x2b64bd.SPRITE_LIST[_0x4f3eec]; _0x2b64bd.STATE = {}; _0x2b64bd.STATE_LIST = [{ 'NAME': "FLY", 'ID': 0, 'SPRITE': [_0x2b64bd.SPRITE.FLY0, _0x2b64bd.SPRITE.FLY1] }, { 'NAME': "RUN", 'ID': 1, 'SPRITE': [_0x2b64bd.SPRITE.RUN0, _0x2b64bd.SPRITE.RUN1] }, { 'NAME': "TRANSFORM", 'ID': 2, 'SPRITE': [_0x2b64bd.SPRITE.SHELL, _0x2b64bd.SPRITE.TRANSFORM] }, { 'NAME': "SHELL", 'ID': 3, 'SPRITE': [_0x2b64bd.SPRITE.SHELL] }, { 'NAME': "SPIN", 'ID': 4, 'SPRITE': [_0x2b64bd.SPRITE.SHELL] }, { 'NAME': "BONK", 'ID': 81, 'SPRITE': [] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x2b64bd.STATE_LIST.length; _0x4f3eec++) _0x2b64bd.STATE[_0x2b64bd.STATE_LIST[_0x4f3eec].NAME] = _0x2b64bd.STATE_LIST[_0x4f3eec], _0x2b64bd.STATE[_0x2b64bd.STATE_LIST[_0x4f3eec]['ID']] = _0x2b64bd.STATE_LIST[_0x4f3eec]; _0x2b64bd.prototype.update = function(_0x1c9055) { switch (_0x1c9055) { case 1: this.bonk(); break; case 16: this.stomped(!0); break; case 17: this.stomped(!1); break; case 160: this.enable(); } }; _0x2b64bd.prototype.step = function() { if (this.disabled) this.proximity(); else if (0 < this.disabledTimer && this.disabledTimer--, this.state === _0x2b64bd.STATE.BONK) this.bonkTimer++ > _0x2b64bd.BONK_TIME || 0 > this.pos['y'] + this.dim['y'] ? this.destroy() : (this.pos = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), this.moveSpeed *= _0x2b64bd.BONK_DECEL, this.fallSpeed = Math.max(this.fallSpeed - _0x2b64bd.FALL_SPEED_ACCEL, -_0x2b64bd.BONK_FALL_SPEED)); else { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0x2b64bd.ANIMATION_RATE) % this.state.SPRITE.length]; if (this.state === _0x2b64bd.STATE.SHELL || this.state === _0x2b64bd.STATE.TRANSFORM) --this.transformTimer < _0x2b64bd.TRANSFORM_THRESHOLD && this.setState(_0x2b64bd.STATE.TRANSFORM), 0 >= this.transformTimer && this.setState(_0x2b64bd.STATE.RUN); 0 < this.immuneTimer && this.immuneTimer--; this.control(); this.physics(); this.interaction(); this.sound(); 0 > this.pos['y'] && this.destroy(); } }; _0x2b64bd.prototype.control = function() { if (this.state === _0x2b64bd.STATE.FLY) this.moveSpeed = this.dir ? -_0x2b64bd.MOVE_SPEED_MAX : _0x2b64bd.MOVE_SPEED_MAX, this.grounded && (this.jump = 0); else if (this.state === _0x2b64bd.STATE.RUN) this.moveSpeed = this.dir ? -_0x2b64bd.MOVE_SPEED_MAX : _0x2b64bd.MOVE_SPEED_MAX; else if (this.state === _0x2b64bd.STATE.SPIN) this.moveSpeed = this.dir ? -_0x2b64bd.SHELL_MOVE_SPEED_MAX : _0x2b64bd.SHELL_MOVE_SPEED_MAX; else if (this.state === _0x2b64bd.STATE.SHELL || this.state === _0x2b64bd.STATE.TRANSFORM) this.moveSpeed = 0; this.jump > _0x2b64bd.JUMP_LENGTH_MAX && (this.jump = -1); }; _0x2b64bd.prototype.physics = function() { -1 !== this.jump ? (this.fallSpeed = _0x2b64bd.FALL_SPEED_MAX - this.jump * _0x2b64bd.JUMP_DECEL, this.jump++, this.grounded = !1) : (this.grounded && (this.fallSpeed = 0), this.fallSpeed = Math.max(this.fallSpeed - _0x2b64bd.FALL_SPEED_ACCEL, -_0x2b64bd.FALL_SPEED_MAX)); this.grounded && (this.fallSpeed = 0); this.fallSpeed = Math.max(this.fallSpeed - _0x2b64bd.FALL_SPEED_ACCEL, -_0x2b64bd.FALL_SPEED_MAX); var _0x22c299 = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, 0)), _0x222dd9 = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), _0x5c7066 = _0x4628a4.make(0 <= this.moveSpeed ? this.pos['x'] : this.pos['x'] + this.moveSpeed, 0 >= this.fallSpeed ? this.pos['y'] : this.pos['y'] + this.fallSpeed), _0x5427e3 = _0x4628a4.make(this.dim['y'] + Math.abs(this.moveSpeed), this.dim['y'] + Math.abs(this.fallSpeed)), _0x5c7066 = this.game.world.getZone(this.level, this.zone).getTiles(_0x5c7066, _0x5427e3), _0x5427e3 = _0x4628a4.make(1, 0x1), _0x47ff0b = !1; this.grounded = !1; for (var _0x3a0c40 = 0; _0x3a0c40 < _0x5c7066.length; _0x3a0c40++) { var _0x32fd39 = _0x5c7066[_0x3a0c40]; _0x32fd39.definition.COLLIDE && _0x4c4bae.intersection(_0x32fd39.pos, _0x5427e3, _0x22c299, this.dim) && (this.pos['x'] + this.dim['x'] <= _0x32fd39.pos['x'] && _0x22c299['x'] + this.dim['x'] > _0x32fd39.pos['x'] ? (_0x22c299['x'] = _0x32fd39.pos['x'] - this.dim['x'], _0x222dd9['x'] = _0x22c299['x'], this.moveSpeed = 0, _0x47ff0b = !0) : this.pos['x'] >= _0x32fd39.pos['x'] + _0x5427e3['x'] && _0x22c299['x'] < _0x32fd39.pos['x'] + _0x5427e3['x'] && (_0x22c299['x'] = _0x32fd39.pos['x'] + _0x5427e3['x'], _0x222dd9['x'] = _0x22c299['x'], this.moveSpeed = 0, _0x47ff0b = !0)); } for (_0x3a0c40 = 0; _0x3a0c40 < _0x5c7066.length; _0x3a0c40++) _0x32fd39 = _0x5c7066[_0x3a0c40], _0x32fd39.definition.COLLIDE && _0x4c4bae.intersection(_0x32fd39.pos, _0x5427e3, _0x222dd9, this.dim) && (this.pos['y'] >= _0x32fd39.pos['y'] + _0x5427e3['y'] && _0x222dd9['y'] < _0x32fd39.pos['y'] + _0x5427e3['y'] ? (_0x222dd9['y'] = _0x32fd39.pos['y'] + _0x5427e3['y'], this.grounded = !0) : this.pos['y'] + this.dim['y'] <= _0x32fd39.pos['y'] && _0x222dd9['y'] + this.dim['y'] > _0x32fd39.pos['y'] && (_0x222dd9['y'] = _0x32fd39.pos['y'] - this.dim['y'], this.jump = -1, this.fallSpeed = 0)); this.pos = _0x4628a4.make(_0x22c299['x'], _0x222dd9['y']); _0x47ff0b && (this.dir = !this.dir); }; _0x2b64bd.prototype.interaction = function() { if (this.state === _0x2b64bd.STATE.SPIN) for (var _0x3f35ab = 0; _0x3f35ab < this.game.objects.length; _0x3f35ab++) { var _0x5dedc4 = this.game.objects[_0x3f35ab]; _0x5dedc4 === this || _0x5dedc4 instanceof _0x307949 || !_0x5dedc4.isTangible() || !_0x5dedc4.damage || _0x5dedc4.level === this.level && _0x5dedc4.zone === this.zone && _0x4c4bae.intersection(_0x5dedc4.pos, _0x5dedc4.dim, this.pos, this.dim) && _0x5dedc4.damage(this); } }; _0x2b64bd.prototype.proximity = function() { var _0x55e5fb = this.game.getPlayer(); _0x55e5fb && !_0x55e5fb.dead && _0x55e5fb.level === this.level && _0x55e5fb.zone === this.zone && !this.proxHit && _0x4628a4.distance(_0x55e5fb.pos, this.pos) < _0x2b64bd.ENABLE_DIST && (this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 160)), this.proxHit = !0); }; _0x2b64bd.prototype.sound = _0x2b132.prototype.sound; _0x2b64bd.prototype.enable = function() { this.disabled = !1; this.disabledTimer = _0x2b64bd.ENABLE_FADE_TIME; }; _0x2b64bd.prototype.disable = function() { this.disabled = !0; }; _0x2b64bd.prototype.damage = function(_0x54e061) { this.dead || (this.bonk(), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 1))); }; _0x2b64bd.prototype.bonk = function() { this.dead || (this.setState(_0x2b64bd.STATE.BONK), this.moveSpeed = _0x2b64bd.BONK_IMP['x'], this.fallSpeed = _0x2b64bd.BONK_IMP['y'], this.dead = !0, this.play("sfx/kick.wav", 1, 0.04)); }; _0x2b64bd.prototype.stomped = function(_0x2128e6) { if (this.state === _0x2b64bd.STATE.FLY) this.setState(_0x2b64bd.STATE.RUN), this.jump = -1; else if (this.state === _0x2b64bd.STATE.RUN) this.setState(_0x2b64bd.STATE.SHELL), this.transformTimer = _0x2b64bd.TRANSFORM_TIME; else if (this.state === _0x2b64bd.STATE.SPIN) this.setState(_0x2b64bd.STATE.SHELL), this.transformTimer = _0x2b64bd.TRANSFORM_TIME; else if (this.state === _0x2b64bd.STATE.SHELL || this.state === _0x2b64bd.STATE.TRANSFORM) this.setState(_0x2b64bd.STATE.SPIN), this.dir = _0x2128e6; this.play("sfx/stomp.wav", 1, 0.04); }; _0x2b64bd.prototype.playerCollide = function(_0x2839c3) { this.dead || this.garbage || (this.state === _0x2b64bd.STATE.SHELL || this.state === _0x2b64bd.STATE.TRANSFORM ? (_0x2839c3 = 0 < _0x2839c3.pos['x'] - this.pos['x'], this.stomped(_0x2839c3), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, _0x2839c3 ? 16 : 0x11)), this.immuneTimer = _0x2b64bd.PLAYER_IMMUNE_TIME) : 0 >= this.immuneTimer && _0x2839c3.damage(this)); }; _0x2b64bd.prototype.playerStomp = function(_0x5ae7ce) { if (!this.dead && !this.garbage) { var _0x1c148e = 0 < _0x5ae7ce.pos['x'] - this.pos['x']; _0x5ae7ce.bounce(); this.stomped(_0x1c148e); this.immuneTimer = _0x2b64bd.PLAYER_IMMUNE_TIME; this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, _0x1c148e ? 16 : 0x11)); } }; _0x2b64bd.prototype.playerBump = function(_0x2de6c8) { this.dead || this.garbage || _0x2de6c8.damage(this); }; _0x2b64bd.prototype.kill = function() {}; _0x2b64bd.prototype.destroy = _0x2b132.prototype.destroy; _0x2b64bd.prototype.isTangible = _0x2b132.prototype.isTangible; _0x2b64bd.prototype.setState = function(_0x4cf648) { _0x4cf648 !== this.state && (this.state = _0x4cf648, 0 < _0x4cf648.SPRITE.length && (this.sprite = _0x4cf648.SPRITE[0]), this.anim = 0); }; _0x2b64bd.prototype.draw = function(_0xd5e9e2) { if (!this.disabled) { var _0x599afe; _0x599afe = this.state === _0x2b64bd.STATE.BONK ? 3 : 0x0 < this.disabledTimer ? 160 + parseInt(32 * (1 - this.disabledTimer / _0x2b64bd.ENABLE_FADE_TIME)) : 0; if (this.sprite.INDEX instanceof Array) for (var _0x584f40 = this.sprite.INDEX, _0x2d5951 = 0; _0x2d5951 < _0x584f40.length; _0x2d5951++) for (var _0x592f4b = 0; _0x592f4b < _0x584f40[_0x2d5951].length; _0x592f4b++) { var _0xeeb68a = _0x584f40[3 !== _0x599afe ? _0x2d5951 : _0x584f40.length - 1 - _0x2d5951][_0x592f4b]; switch (this.variant) { case 1: _0xeeb68a += _0x2b64bd.VARIANT_OFFSET; } _0xd5e9e2.push({ 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(_0x592f4b, _0x2d5951)), 'reverse': !this.dir, 'index': _0xeeb68a, 'mode': _0x599afe }); } else { _0xeeb68a = this.sprite.INDEX; switch (this.variant) { case 1: _0xeeb68a += _0x2b64bd.VARIANT_OFFSET; } _0xd5e9e2.push({ 'pos': this.pos, 'reverse': !this.dir, 'index': _0xeeb68a, 'mode': _0x599afe }); } } }; _0x2b64bd.prototype.play = _0x2b132.prototype.play; _0x2b132.REGISTER_OBJECT(_0x2b64bd); "use strict"; function _0x4ec5a0(_0xed7344, _0xea8d70, _0x5dd120, _0x358135, _0xd2deec, _0x23c2b4, _0x34e7bd) { _0x2b132.call(this, _0xed7344, _0xea8d70, _0x5dd120, _0x358135); this.oid = _0xd2deec; this.variant = isNaN(parseInt(_0x34e7bd)) ? 0 : parseInt(_0x34e7bd); this.setState(parseInt(_0x23c2b4) ? _0x4ec5a0.STATE.FLY : _0x4ec5a0.STATE.RUN); this.bonkTimer = this.anim = 0; this.loc = [this.pos['y'] + 0.5 * _0x4ec5a0.FLY_DISTANCE, this.pos['y'] - 0.5 * _0x4ec5a0.FLY_DISTANCE]; this.dim = _0x4628a4.make(1, 0x1); this.fallSpeed = this.moveSpeed = 0; this.disabled = this.grounded = !1; this.disabledTimer = 0; this.proxHit = !1; this.immuneTimer = 0; this.rev = !1; this.dir = !0; this.disable(); } _0x4ec5a0.ASYNC = !1; _0x4ec5a0['ID'] = 19; _0x4ec5a0.NAME = "KOOPA TROOPA"; _0x4ec5a0.FLY_DISTANCE = 3; _0x4ec5a0.FLY_ACCEL = 0.0025; _0x4ec5a0.FLY_SPEED_MAX = 0.075; _0x4ec5a0.CHECK_DIST = 0.1; _0x4ec5a0.SPRITE = {}; _0x4ec5a0.SPRITE_LIST = [{ 'NAME': "FLY0", 'ID': 0, 'INDEX': [ [100], [84] ] }, { 'NAME': "FLY1", 'ID': 1, 'INDEX': [ [101], [85] ] }, { 'NAME': "RUN0", 'ID': 2, 'INDEX': [ [98], [82] ] }, { 'NAME': "RUN1", 'ID': 3, 'INDEX': [ [99], [83] ] }, { 'NAME': "TRANSFORM", 'ID': 4, 'INDEX': 97 }, { 'NAME': "SHELL", 'ID': 5, 'INDEX': 96 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x4ec5a0.SPRITE_LIST.length; _0x4f3eec++) _0x4ec5a0.SPRITE[_0x4ec5a0.SPRITE_LIST[_0x4f3eec].NAME] = _0x4ec5a0.SPRITE_LIST[_0x4f3eec], _0x4ec5a0.SPRITE[_0x4ec5a0.SPRITE_LIST[_0x4f3eec]['ID']] = _0x4ec5a0.SPRITE_LIST[_0x4f3eec]; _0x4ec5a0.STATE = {}; _0x4ec5a0.STATE_LIST = [{ 'NAME': "FLY", 'ID': 0, 'SPRITE': [_0x4ec5a0.SPRITE.FLY0, _0x4ec5a0.SPRITE.FLY1] }, { 'NAME': "RUN", 'ID': 1, 'SPRITE': [_0x4ec5a0.SPRITE.RUN0, _0x4ec5a0.SPRITE.RUN1] }, { 'NAME': "TRANSFORM", 'ID': 2, 'SPRITE': [_0x4ec5a0.SPRITE.SHELL, _0x4ec5a0.SPRITE.TRANSFORM] }, { 'NAME': "SHELL", 'ID': 3, 'SPRITE': [_0x4ec5a0.SPRITE.SHELL] }, { 'NAME': "SPIN", 'ID': 4, 'SPRITE': [_0x4ec5a0.SPRITE.SHELL] }, { 'NAME': "BONK", 'ID': 81, 'SPRITE': [] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x4ec5a0.STATE_LIST.length; _0x4f3eec++) _0x4ec5a0.STATE[_0x4ec5a0.STATE_LIST[_0x4f3eec].NAME] = _0x4ec5a0.STATE_LIST[_0x4f3eec], _0x4ec5a0.STATE[_0x4ec5a0.STATE_LIST[_0x4f3eec]['ID']] = _0x4ec5a0.STATE_LIST[_0x4f3eec]; _0x4ec5a0.prototype.update = _0x2b64bd.prototype.update; _0x4ec5a0.prototype.step = function() { if (this.disabled) this.proximity(); else if (0 < this.disabledTimer && this.disabledTimer--, this.state === _0x4ec5a0.STATE.BONK) this.bonkTimer++ > _0x2b64bd.BONK_TIME || 0 > this.pos['y'] + this.dim['y'] ? this.destroy() : (this.pos = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), this.moveSpeed *= _0x2b64bd.BONK_DECEL, this.fallSpeed = Math.max(this.fallSpeed - _0x2b64bd.FALL_SPEED_ACCEL, -_0x2b64bd.BONK_FALL_SPEED)); else { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0x2b64bd.ANIMATION_RATE) % this.state.SPRITE.length]; if (this.state === _0x4ec5a0.STATE.SHELL || this.state === _0x4ec5a0.STATE.TRANSFORM) --this.transformTimer < _0x2b64bd.TRANSFORM_THRESHOLD && this.setState(_0x4ec5a0.STATE.TRANSFORM), 0 >= this.transformTimer && this.setState(_0x4ec5a0.STATE.RUN); 0 < this.immuneTimer && this.immuneTimer--; this.control(); this.physics(); this.interaction(); this.sound(); 0 > this.pos['y'] && this.destroy(); } }; _0x4ec5a0.prototype.control = function() { this.state === _0x4ec5a0.STATE.FLY && (this.moveSpeed = this.dir ? -_0x2b64bd.MOVE_SPEED_MAX : _0x2b64bd.MOVE_SPEED_MAX); this.state === _0x4ec5a0.STATE.RUN && (this.grounded && !this.checkGround() && (this.dir = !this.dir), this.moveSpeed = this.dir ? -_0x2b64bd.MOVE_SPEED_MAX : _0x2b64bd.MOVE_SPEED_MAX); this.state === _0x4ec5a0.STATE.SPIN && (this.moveSpeed = this.dir ? -_0x2b64bd.SHELL_MOVE_SPEED_MAX : _0x2b64bd.SHELL_MOVE_SPEED_MAX); if (this.state === _0x4ec5a0.STATE.SHELL || this.state === _0x4ec5a0.STATE.TRANSFORM) this.moveSpeed = 0; }; _0x4ec5a0.prototype.physics = function() { if (this.state === _0x4ec5a0.STATE.FLY) this.rev ? (this.fallSpeed = Math.min(_0x4ec5a0.FLY_SPEED_MAX, this.fallSpeed + _0x4ec5a0.FLY_ACCEL), this.pos['y'] += this.fallSpeed, this.pos['y'] >= this.loc[0] && (this.rev = !1)) : (this.fallSpeed = Math.max(-_0x4ec5a0.FLY_SPEED_MAX, this.fallSpeed - _0x4ec5a0.FLY_ACCEL), this.pos['y'] += this.fallSpeed, this.pos['y'] <= this.loc[1] && (this.rev = !0)); else { this.grounded && (this.fallSpeed = 0); this.fallSpeed = Math.max(this.fallSpeed - _0x2b64bd.FALL_SPEED_ACCEL, -_0x2b64bd.FALL_SPEED_MAX); var _0x412131 = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, 0)), _0x42d3f6 = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), _0x49ef6d = _0x4628a4.make(0 <= this.moveSpeed ? this.pos['x'] : this.pos['x'] + this.moveSpeed, 0 >= this.fallSpeed ? this.pos['y'] : this.pos['y'] + this.fallSpeed), _0x3cd9fa = _0x4628a4.make(this.dim['y'] + Math.abs(this.moveSpeed), this.dim['y'] + Math.abs(this.fallSpeed)), _0x49ef6d = this.game.world.getZone(this.level, this.zone).getTiles(_0x49ef6d, _0x3cd9fa), _0x3cd9fa = _0x4628a4.make(1, 0x1), _0x1d8e19 = !1; this.grounded = !1; for (var _0x2a37f3 = 0; _0x2a37f3 < _0x49ef6d.length; _0x2a37f3++) { var _0x294a63 = _0x49ef6d[_0x2a37f3]; _0x294a63.definition.COLLIDE && _0x4c4bae.intersection(_0x294a63.pos, _0x3cd9fa, _0x412131, this.dim) && (this.pos['x'] + this.dim['x'] <= _0x294a63.pos['x'] && _0x412131['x'] + this.dim['x'] > _0x294a63.pos['x'] ? (_0x412131['x'] = _0x294a63.pos['x'] - this.dim['x'], _0x42d3f6['x'] = _0x412131['x'], this.moveSpeed = 0, _0x1d8e19 = !0) : this.pos['x'] >= _0x294a63.pos['x'] + _0x3cd9fa['x'] && _0x412131['x'] < _0x294a63.pos['x'] + _0x3cd9fa['x'] && (_0x412131['x'] = _0x294a63.pos['x'] + _0x3cd9fa['x'], _0x42d3f6['x'] = _0x412131['x'], this.moveSpeed = 0, _0x1d8e19 = !0)); } for (_0x2a37f3 = 0; _0x2a37f3 < _0x49ef6d.length; _0x2a37f3++) _0x294a63 = _0x49ef6d[_0x2a37f3], _0x294a63.definition.COLLIDE && _0x4c4bae.intersection(_0x294a63.pos, _0x3cd9fa, _0x42d3f6, this.dim) && (this.pos['y'] >= _0x294a63.pos['y'] + _0x3cd9fa['y'] && _0x42d3f6['y'] < _0x294a63.pos['y'] + _0x3cd9fa['y'] ? (_0x42d3f6['y'] = _0x294a63.pos['y'] + _0x3cd9fa['y'], this.fallSpeed = 0, this.grounded = !0) : this.pos['y'] + this.dim['y'] <= _0x294a63.pos['y'] && _0x42d3f6['y'] + this.dim['y'] > _0x294a63.pos['y'] && (_0x42d3f6['y'] = _0x294a63.pos['y'] - this.dim['y'], this.fallSpeed = 0)); this.pos = _0x4628a4.make(_0x412131['x'], _0x42d3f6['y']); _0x1d8e19 && (this.dir = !this.dir); } }; _0x4ec5a0.prototype.interaction = function() { if (this.state === _0x4ec5a0.STATE.SPIN) for (var _0x35cc9e = 0; _0x35cc9e < this.game.objects.length; _0x35cc9e++) { var _0x19c92e = this.game.objects[_0x35cc9e]; _0x19c92e === this || _0x19c92e instanceof _0x307949 || !_0x19c92e.isTangible() || !_0x19c92e.damage || _0x19c92e.level === this.level && _0x19c92e.zone === this.zone && _0x4c4bae.intersection(_0x19c92e.pos, _0x19c92e.dim, this.pos, this.dim) && _0x19c92e.damage(); } }; _0x4ec5a0.prototype.sound = _0x2b132.prototype.sound; _0x4ec5a0.prototype.checkGround = function() { var _0x47d908 = this.dir ? _0x4628a4.add(this.pos, _0x4628a4.make(-_0x4ec5a0.CHECK_DIST, 0)) : _0x4628a4.add(this.pos, _0x4628a4.make(_0x4ec5a0.CHECK_DIST + this.dim['x'], 0)); _0x47d908['y'] -= 1.5; return this.game.world.getZone(this.level, this.zone).getTile(_0x47d908).definition.COLLIDE; }; _0x4ec5a0.prototype.proximity = _0x2b64bd.prototype.proximity; _0x4ec5a0.prototype.enable = _0x2b64bd.prototype.enable; _0x4ec5a0.prototype.disable = _0x2b64bd.prototype.disable; _0x4ec5a0.prototype.damage = _0x2b64bd.prototype.damage; _0x4ec5a0.prototype.bonk = function() { this.dead || (this.setState(_0x4ec5a0.STATE.BONK), this.moveSpeed = _0x2b64bd.BONK_IMP['x'], this.fallSpeed = _0x2b64bd.BONK_IMP['y'], this.dead = !0, this.play("sfx/kick.wav", 1, 0.04)); }; _0x4ec5a0.prototype.stomped = function(_0x427a5b) { if (this.state === _0x4ec5a0.STATE.FLY) this.setState(_0x4ec5a0.STATE.RUN); else if (this.state === _0x4ec5a0.STATE.RUN) this.setState(_0x4ec5a0.STATE.SHELL), this.transformTimer = _0x2b64bd.TRANSFORM_TIME; else if (this.state === _0x4ec5a0.STATE.SPIN) this.setState(_0x4ec5a0.STATE.SHELL), this.transformTimer = _0x2b64bd.TRANSFORM_TIME; else if (this.state === _0x4ec5a0.STATE.SHELL || this.state === _0x4ec5a0.STATE.TRANSFORM) this.setState(_0x4ec5a0.STATE.SPIN), this.dir = _0x427a5b; this.play("sfx/stomp.wav", 1, 0.04); }; _0x4ec5a0.prototype.playerCollide = function(_0x3a4278) { this.dead || this.garbage || (this.state === _0x4ec5a0.STATE.SHELL || this.state === _0x4ec5a0.STATE.TRANSFORM ? (_0x3a4278 = 0 < _0x3a4278.pos['x'] - this.pos['x'], this.stomped(_0x3a4278), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, _0x3a4278 ? 16 : 0x11)), this.immuneTimer = _0x2b64bd.PLAYER_IMMUNE_TIME) : 0 >= this.immuneTimer && _0x3a4278.damage(this)); }; _0x4ec5a0.prototype.playerStomp = _0x2b64bd.prototype.playerStomp; _0x4ec5a0.prototype.playerBump = _0x2b64bd.prototype.playerBump; _0x4ec5a0.prototype.kill = _0x2b64bd.prototype.kill; _0x4ec5a0.prototype.destroy = _0x2b64bd.prototype.destroy; _0x4ec5a0.prototype.isTangible = _0x2b64bd.prototype.isTangible; _0x4ec5a0.prototype.setState = _0x2b64bd.prototype.setState; _0x4ec5a0.prototype.draw = function(_0x10020f) { if (!this.disabled) { var _0x256715; _0x256715 = this.state === _0x4ec5a0.STATE.BONK ? 3 : 0x0 < this.disabledTimer ? 160 + parseInt(32 * (1 - this.disabledTimer / _0x2b64bd.ENABLE_FADE_TIME)) : 0; if (this.sprite.INDEX instanceof Array) for (var _0x4a672a = this.sprite.INDEX, _0x46bc6f = 0; _0x46bc6f < _0x4a672a.length; _0x46bc6f++) for (var _0xdbcbf = 0; _0xdbcbf < _0x4a672a[_0x46bc6f].length; _0xdbcbf++) { var _0x12d039 = _0x4a672a[3 !== _0x256715 ? _0x46bc6f : _0x4a672a.length - 1 - _0x46bc6f][_0xdbcbf]; switch (this.variant) { case 1: _0x12d039 += _0x2b64bd.VARIANT_OFFSET; } _0x10020f.push({ 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(_0xdbcbf, _0x46bc6f)), 'reverse': !this.dir, 'index': _0x12d039, 'mode': _0x256715 }); } else { _0x12d039 = this.sprite.INDEX; switch (this.variant) { case 1: _0x12d039 += _0x2b64bd.VARIANT_OFFSET; } _0x10020f.push({ 'pos': this.pos, 'reverse': !this.dir, 'index': _0x12d039, 'mode': _0x256715 }); } } }; _0x4ec5a0.prototype.play = _0x2b132.prototype.play; _0x2b132.REGISTER_OBJECT(_0x4ec5a0); "use strict"; function _0x70c5e6(_0x10e398, _0x488778, _0x5c3eec, _0x3b14b3, _0x59252f, _0x578a7d) { _0x2b132.call(this, _0x10e398, _0x488778, _0x5c3eec, _0x4628a4.add(_0x3b14b3, _0x4628a4.make(0.6, 0))); this.oid = _0x59252f; this.variant = isNaN(parseInt(_0x578a7d)) ? 0 : parseInt(_0x578a7d); this.setState(_0x70c5e6.STATE.IDLE); this.bonkTimer = this.anim = 0; this.loc = [_0x4628a4.copy(this.pos), _0x4628a4.add(this.pos, _0x4628a4.make(0, -1.5))]; this.dim = _0x4628a4.make(0.8, 1); this.dir = this.fallSpeed = this.moveSpeed = 0; } _0x70c5e6.ASYNC = !1; _0x70c5e6['ID'] = 22; _0x70c5e6.NAME = "UNSPELLABLE PLANT"; _0x70c5e6.ANIMATION_RATE = 3; _0x70c5e6.VARIANT_OFFSET = 32; _0x70c5e6.SOFFSET = _0x4628a4.make(-0.1, 0); _0x70c5e6.BONK_TIME = 90; _0x70c5e6.BONK_IMP = _0x4628a4.make(0.25, 0.4); _0x70c5e6.BONK_DECEL = 0.925; _0x70c5e6.BONK_FALL_SPEED = 0.5; _0x70c5e6.FALL_SPEED_ACCEL = 0.085; _0x70c5e6.WAIT_TIME = 25; _0x70c5e6.TRAVEL_SPEED = 0.05; _0x70c5e6.SPRITE = {}; _0x70c5e6.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': [ [106], [90] ] }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': [ [107], [91] ] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x70c5e6.SPRITE_LIST.length; _0x4f3eec++) _0x70c5e6.SPRITE[_0x70c5e6.SPRITE_LIST[_0x4f3eec].NAME] = _0x70c5e6.SPRITE_LIST[_0x4f3eec], _0x70c5e6.SPRITE[_0x70c5e6.SPRITE_LIST[_0x4f3eec]['ID']] = _0x70c5e6.SPRITE_LIST[_0x4f3eec]; _0x70c5e6.STATE = {}; _0x70c5e6.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x70c5e6.SPRITE.IDLE0, _0x70c5e6.SPRITE.IDLE1] }, { 'NAME': "BONK", 'ID': 81, 'SPRITE': [] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x70c5e6.STATE_LIST.length; _0x4f3eec++) _0x70c5e6.STATE[_0x70c5e6.STATE_LIST[_0x4f3eec].NAME] = _0x70c5e6.STATE_LIST[_0x4f3eec], _0x70c5e6.STATE[_0x70c5e6.STATE_LIST[_0x4f3eec]['ID']] = _0x70c5e6.STATE_LIST[_0x4f3eec]; _0x70c5e6.prototype.update = function(_0xc40cf) { switch (_0xc40cf) { case 1: this.bonk(); } }; _0x70c5e6.prototype.step = function() { this.state === _0x70c5e6.STATE.BONK ? this.bonkTimer++ > _0x70c5e6.BONK_TIME || 0 > this.pos['y'] + this.dim['y'] ? this.destroy() : (this.pos = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), this.moveSpeed *= _0x70c5e6.BONK_DECEL, this.fallSpeed = Math.max(this.fallSpeed - _0x70c5e6.FALL_SPEED_ACCEL, -_0x70c5e6.BONK_FALL_SPEED)) : (this.anim++, this.sprite = this.state.SPRITE[parseInt(this.anim / _0x70c5e6.ANIMATION_RATE) % this.state.SPRITE.length], 0 < --this.waitTimer || (this.control(), this.physics(), this.sound())); }; _0x70c5e6.prototype.control = function() {}; _0x70c5e6.prototype.physics = function() { var _0x295dec = this.loc[this.dir ? 0 : 0x1]; _0x4628a4.distance(this.pos, _0x295dec) <= _0x70c5e6.TRAVEL_SPEED ? (this.pos = _0x295dec, this.dir = !this.dir, this.waitTimer = _0x70c5e6.WAIT_TIME) : this.pos = _0x4628a4.add(this.pos, _0x4628a4.scale(_0x4628a4.normalize(_0x4628a4.subtract(_0x295dec, this.pos)), _0x70c5e6.TRAVEL_SPEED)); }; _0x70c5e6.prototype.sound = _0x2b132.prototype.sound; _0x70c5e6.prototype.damage = function(_0x17ca7d) { this.dead || (this.bonk(), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 1))); }; _0x70c5e6.prototype.bonk = function() { this.dead || (this.setState(_0x70c5e6.STATE.BONK), this.moveSpeed = _0x70c5e6.BONK_IMP['x'], this.fallSpeed = _0x70c5e6.BONK_IMP['y'], this.dead = !0, this.play("sfx/kick.wav", 1, 0.04)); }; _0x70c5e6.prototype.playerCollide = function(_0x1d79bc) { this.dead || this.garbage || _0x1d79bc.damage(this); }; _0x70c5e6.prototype.playerStomp = function(_0x5c2317) { this.dead || this.garbage || _0x5c2317.damage(this); }; _0x70c5e6.prototype.playerBump = function(_0x14daa1) { this.dead || this.garbage || _0x14daa1.damage(this); }; _0x70c5e6.prototype.kill = function() {}; _0x70c5e6.prototype.destroy = _0x2b132.prototype.destroy; _0x70c5e6.prototype.isTangible = _0x2b132.prototype.isTangible; _0x70c5e6.prototype.setState = function(_0x1762e0) { _0x1762e0 !== this.state && (this.state = _0x1762e0, 0 < _0x1762e0.SPRITE.length && (this.sprite = _0x1762e0.SPRITE[0]), this.anim = 0); }; _0x70c5e6.prototype.draw = function(_0x5d3d02) { var _0x3a6e0e; _0x3a6e0e = this.state === _0x70c5e6.STATE.BONK ? 3 : 0x0; if (this.sprite.INDEX instanceof Array) for (var _0x370a41 = this.sprite.INDEX, _0x552245 = 0; _0x552245 < _0x370a41.length; _0x552245++) for (var _0x281e5e = 0; _0x281e5e < _0x370a41[_0x552245].length; _0x281e5e++) { var _0x2bd14d = _0x370a41[_0x3a6e0e ? _0x370a41.length - 1 - _0x552245 : _0x552245][_0x281e5e]; switch (this.variant) { case 1: _0x2bd14d += _0x70c5e6.VARIANT_OFFSET; } _0x5d3d02.push({ 'pos': _0x4628a4.add(_0x4628a4.add(this.pos, _0x4628a4.make(_0x281e5e, _0x552245)), _0x70c5e6.SOFFSET), 'reverse': !this.dir, 'index': _0x2bd14d, 'mode': _0x3a6e0e }); } else { _0x2bd14d = this.sprite.INDEX; switch (this.variant) { case 1: _0x2bd14d += _0x70c5e6.VARIANT_OFFSET; } _0x5d3d02.push({ 'pos': _0x4628a4.add(this.pos, _0x70c5e6.SOFFSET), 'reverse': !this.dir, 'index': _0x2bd14d, 'mode': _0x3a6e0e }); } }; _0x70c5e6.prototype.play = _0x2b132.prototype.play; _0x2b132.REGISTER_OBJECT(_0x70c5e6); "use strict"; function _0x2e2bc2(_0x2256fa, _0x3b8e43, _0x95fca2, _0x2f7128, _0x604645, _0x599d04, _0x2ce4c7) { _0x2b132.call(this, _0x2256fa, _0x3b8e43, _0x95fca2, _0x2f7128); this.oid = _0x604645; this.setState(_0x2e2bc2.STATE.IDLE); this.delay = isNaN(parseInt(_0x599d04)) ? _0x2e2bc2.DELAY_DEFAULT : parseInt(_0x599d04); this.impulse = isNaN(parseFloat(_0x2ce4c7)) ? 1 : parseFloat(_0x2ce4c7); this.anim = 0; this.disabled = !1; this.delayTimer = this.delay; this.bonkTimer = 0; this.pos['x'] += _0x2e2bc2.SOFFSET['x']; this.loc = _0x4628a4.copy(this.pos); this.moveSpeed = this.fallSpeed = 0; this.dim = _0x4628a4.make(0.7, 0.7); this.dir = !0; } _0x2e2bc2.ASYNC = !1; _0x2e2bc2['ID'] = 21; _0x2e2bc2.NAME = "FLYING FISH"; _0x2e2bc2.ANIMATION_RATE = 3; _0x2e2bc2.BONK_TIME = 90; _0x2e2bc2.BONK_IMP = _0x4628a4.make(0.25, 0.4); _0x2e2bc2.BONK_DECEL = 0.925; _0x2e2bc2.BONK_FALL_SPEED = 0.5; _0x2e2bc2.BONK_FALL_ACCEL = 0.085; _0x2e2bc2.DELAY_DEFAULT = 150; _0x2e2bc2.IMPULSE = _0x4628a4.make(0.225, 0.335); _0x2e2bc2.DRAG = 0.996; _0x2e2bc2.FALL_SPEED_ACCEL = 0.0055; _0x2e2bc2.SOFFSET = _0x4628a4.make(0.15, 0.15); _0x2e2bc2.SPRITE = {}; _0x2e2bc2.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': 206 }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': 207 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x2e2bc2.SPRITE_LIST.length; _0x4f3eec++) _0x2e2bc2.SPRITE[_0x2e2bc2.SPRITE_LIST[_0x4f3eec].NAME] = _0x2e2bc2.SPRITE_LIST[_0x4f3eec], _0x2e2bc2.SPRITE[_0x2e2bc2.SPRITE_LIST[_0x4f3eec]['ID']] = _0x2e2bc2.SPRITE_LIST[_0x4f3eec]; _0x2e2bc2.STATE = {}; _0x2e2bc2.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x2e2bc2.SPRITE.IDLE0, _0x2e2bc2.SPRITE.IDLE1] }, { 'NAME': "BONK", 'ID': 81, 'SPRITE': [] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x2e2bc2.STATE_LIST.length; _0x4f3eec++) _0x2e2bc2.STATE[_0x2e2bc2.STATE_LIST[_0x4f3eec].NAME] = _0x2e2bc2.STATE_LIST[_0x4f3eec], _0x2e2bc2.STATE[_0x2e2bc2.STATE_LIST[_0x4f3eec]['ID']] = _0x2e2bc2.STATE_LIST[_0x4f3eec]; _0x2e2bc2.prototype.update = function(_0x48235a) { switch (_0x48235a) { case 1: this.bonk(); } }; _0x2e2bc2.prototype.step = function() { this.state === _0x2e2bc2.STATE.BONK ? this.bonkTimer++ > _0x2e2bc2.BONK_TIME || 0 > this.pos['y'] + this.dim['y'] ? this.destroy() : (this.pos = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), this.moveSpeed *= _0x2e2bc2.BONK_DECEL, this.fallSpeed = Math.max(this.fallSpeed - _0x2e2bc2.BONK_FALL_ACCEL, -_0x2e2bc2.BONK_FALL_SPEED)) : (this.anim++, this.sprite = this.state.SPRITE[parseInt(this.anim / _0x2e2bc2.ANIMATION_RATE) % this.state.SPRITE.length], 0 < this.delayTimer ? this.delayTimer-- : this.jump(), this.physics(), this.sound()); }; _0x2e2bc2.prototype.physics = function() { this.pos['y'] > this.loc['y'] || 0 < this.fallSpeed ? (this.fallSpeed = (this.fallSpeed - _0x2e2bc2.FALL_SPEED_ACCEL) * _0x2e2bc2.DRAG, this.pos['x'] += this.moveSpeed * _0x2e2bc2.DRAG, this.pos['y'] += this.fallSpeed) : this.disable(); }; _0x2e2bc2.prototype.sound = _0x2b132.prototype.sound; _0x2e2bc2.prototype.jump = function() { this.enable(); this.pos = _0x4628a4.copy(this.loc); this.fallSpeed = _0x2e2bc2.IMPULSE['y'] * this.impulse; this.moveSpeed = _0x2e2bc2.IMPULSE['x'] * this.impulse; this.delayTimer = this.delay; }; _0x2e2bc2.prototype.disable = function() { this.disabled = !0; }; _0x2e2bc2.prototype.enable = function() { this.disabled = !1; }; _0x2e2bc2.prototype.damage = function(_0x23b9a3) { this.dead || (this.bonk(), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 1))); }; _0x2e2bc2.prototype.bonk = function() { this.dead || (this.setState(_0x2e2bc2.STATE.BONK), this.moveSpeed = _0x2e2bc2.BONK_IMP['x'], this.fallSpeed = _0x2e2bc2.BONK_IMP['y'], this.dead = !0, this.play("sfx/kick.wav", 1, 0.04)); }; _0x2e2bc2.prototype.playerCollide = function(_0x342a0c) { this.dead || this.garbage || _0x342a0c.damage(this); }; _0x2e2bc2.prototype.playerStomp = function(_0x452180) { this.dead || this.garbage || (this.bonk(), _0x452180.bounce(), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 1))); }; _0x2e2bc2.prototype.playerBump = function(_0x24e94a) { this.playerCollide(_0x24e94a); }; _0x2e2bc2.prototype.kill = function() {}; _0x2e2bc2.prototype.isTangible = _0x2b132.prototype.isTangible; _0x2e2bc2.prototype.destroy = _0x2b132.prototype.destroy; _0x2e2bc2.prototype.setState = function(_0x454f61) { _0x454f61 !== this.state && (this.state = _0x454f61, 0 < _0x454f61.SPRITE.length && (this.sprite = _0x454f61.SPRITE[0]), this.anim = 0); }; _0x2e2bc2.prototype.draw = function(_0x4d3c89) { if (!this.disabled) { var _0x2cd89f; _0x2cd89f = this.state === _0x2e2bc2.STATE.BONK ? 3 : 0x0; _0x4d3c89.push({ 'pos': _0x4628a4.subtract(this.pos, _0x2e2bc2.SOFFSET), 'reverse': this.dir, 'index': this.sprite.INDEX, 'mode': _0x2cd89f }); } }; _0x2e2bc2.prototype.play = _0x2b132.prototype.play; _0x2b132.REGISTER_OBJECT(_0x2e2bc2); "use strict"; function _0x3bb61f(_0x318daf, _0x5afdd5, _0x5be344, _0xb1c457, _0x11dd4d, _0x547cdb) { _0x2b132.call(this, _0x318daf, _0x5afdd5, _0x5be344, _0xb1c457); this.oid = _0x11dd4d; this.setState(_0x3bb61f.STATE.IDLE); this.bonkTimer = this.anim = 0; this.dim = _0x4628a4.make(1, 1.5); this.fallSpeed = this.moveSpeed = 0; this.disabled = this.grounded = !1; this.disabledTimer = 0; this.proxHit = !1; this.hammer = void 0; this.loc = 1 === parseInt(_0x547cdb) ? [this.pos['x'] + _0x3bb61f.MOVE_AREA, this.pos['x']] : [this.pos['x'], this.pos['x'] - _0x3bb61f.MOVE_AREA]; this.groundTimer = this.double = this.attackAnimTimer = this.attackTimer = 0; this.jumpTimer = -1; this.reverse = !1; this.dir = !0; this.disable(); } _0x3bb61f.ASYNC = !1; _0x3bb61f['ID'] = 49; _0x3bb61f.NAME = "HAMMER BRO"; _0x3bb61f.ANIMATION_RATE = 5; _0x3bb61f.ENABLE_FADE_TIME = 15; _0x3bb61f.ENABLE_DIST = 33; _0x3bb61f.BONK_TIME = 90; _0x3bb61f.BONK_IMP = _0x4628a4.make(0.25, 0.4); _0x3bb61f.BONK_DECEL = 0.925; _0x3bb61f.BONK_FALL_SPEED = 0.5; _0x3bb61f.MOVE_SPEED_MAX = 0.095; _0x3bb61f.JUMP_DELAY = 55; _0x3bb61f.MOVE_AREA = 4; _0x3bb61f.JUMP_LENGTH = 8; _0x3bb61f.JUMP_DECEL = 0.009; _0x3bb61f.ATTACK_DELAY = 75; _0x3bb61f.DOUBLE_RATE = 5; _0x3bb61f.ATTACK_ANIM_LENGTH = 13; _0x3bb61f.PROJ_OFFSET = _0x4628a4.make(0.5, 1.25); _0x3bb61f.FALL_SPEED_MAX = 0.3; _0x3bb61f.FALL_SPEED_ACCEL = 0.085; _0x3bb61f.SPRITE = {}; _0x3bb61f.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': [ [110], [94] ] }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': [ [109], [93] ] }, { 'NAME': "ATTACK", 'ID': 2, 'INDEX': [ [108], [92] ] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x3bb61f.SPRITE_LIST.length; _0x4f3eec++) _0x3bb61f.SPRITE[_0x3bb61f.SPRITE_LIST[_0x4f3eec].NAME] = _0x3bb61f.SPRITE_LIST[_0x4f3eec], _0x3bb61f.SPRITE[_0x3bb61f.SPRITE_LIST[_0x4f3eec]['ID']] = _0x3bb61f.SPRITE_LIST[_0x4f3eec]; _0x3bb61f.STATE = {}; _0x3bb61f.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x3bb61f.SPRITE.IDLE0, _0x3bb61f.SPRITE.IDLE1] }, { 'NAME': "FALL", 'ID': 1, 'SPRITE': [_0x3bb61f.SPRITE.IDLE1] }, { 'NAME': "ATTACK", 'ID': 2, 'SPRITE': [_0x3bb61f.SPRITE.ATTACK] }, { 'NAME': "BONK", 'ID': 81, 'SPRITE': [] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x3bb61f.STATE_LIST.length; _0x4f3eec++) _0x3bb61f.STATE[_0x3bb61f.STATE_LIST[_0x4f3eec].NAME] = _0x3bb61f.STATE_LIST[_0x4f3eec], _0x3bb61f.STATE[_0x3bb61f.STATE_LIST[_0x4f3eec]['ID']] = _0x3bb61f.STATE_LIST[_0x4f3eec]; _0x3bb61f.prototype.update = function(_0x48fea4) { switch (_0x48fea4) { case 1: this.bonk(); break; case 160: this.enable(); } }; _0x3bb61f.prototype.step = function() { this.disabled ? this.proximity() : (0 < this.disabledTimer && this.disabledTimer--, this.state === _0x3bb61f.STATE.BONK ? this.bonkTimer++ > _0x3bb61f.BONK_TIME || 0 > this.pos['y'] + this.dim['y'] ? this.destroy() : (this.pos = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), this.moveSpeed *= _0x3bb61f.BONK_DECEL, this.fallSpeed = Math.max(this.fallSpeed - _0x3bb61f.FALL_SPEED_ACCEL, -_0x3bb61f.BONK_FALL_SPEED)) : (this.anim++, this.sprite = this.state.SPRITE[parseInt(this.anim / _0x3bb61f.ANIMATION_RATE) % this.state.SPRITE.length], this.face(), this.control(), this.physics(), this.sound(), 0 < this.attackAnimTimer ? (this.setState(_0x3bb61f.STATE.ATTACK), this.attach(), this.attackAnimTimer--) : this.attackTimer++ > _0x3bb61f.ATTACK_DELAY ? this.attack() : this.hammer = void 0, 0x0 > this.pos['y'] && this.destroy())); }; _0x3bb61f.prototype.control = function() { this.grounded ? (_0x3bb61f.JUMP_DELAY < this.groundTimer++ && (this.groundTimer = this.jumpTimer = 0), this.pos['x'] > this.loc[0] ? this.reverse = !0 : this.pos['x'] < this.loc[1] && (this.reverse = !1)) : this.jumpTimer > _0x3bb61f.JUMP_LENGTH && (this.jumpTimer = -1); this.grounded ? this.setState(_0x3bb61f.STATE.IDLE) : this.setState(_0x3bb61f.STATE.FALL); this.moveSpeed = 0.75 * this.moveSpeed + 0.25 * (this.reverse ? -_0x3bb61f.MOVE_SPEED_MAX : _0x3bb61f.MOVE_SPEED_MAX); }; _0x3bb61f.prototype.physics = function() { -1 !== this.jumpTimer ? (this.fallSpeed = _0x3bb61f.FALL_SPEED_MAX - this.jumpTimer * _0x3bb61f.JUMP_DECEL, this.jumpTimer++, this.grounded = !1) : (this.grounded && (this.fallSpeed = 0), this.fallSpeed = Math.max(this.fallSpeed - _0x3bb61f.FALL_SPEED_ACCEL, -_0x3bb61f.FALL_SPEED_MAX)); var _0x4a9aa3 = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, 0)), _0x5d9757 = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), _0x5159c = _0x4628a4.make(0 <= this.moveSpeed ? this.pos['x'] : this.pos['x'] + this.moveSpeed, 0 >= this.fallSpeed ? this.pos['y'] : this.pos['y'] + this.fallSpeed), _0x3ca1c6 = _0x4628a4.make(this.dim['y'] + Math.abs(this.moveSpeed), this.dim['y'] + Math.abs(this.fallSpeed)), _0x5159c = this.game.world.getZone(this.level, this.zone).getTiles(_0x5159c, _0x3ca1c6), _0x3ca1c6 = _0x4628a4.make(1, 0x1); this.grounded = !1; for (var _0x12f7cd = 0; _0x12f7cd < _0x5159c.length; _0x12f7cd++) { var _0x360fce = _0x5159c[_0x12f7cd]; _0x360fce.definition.COLLIDE && _0x4c4bae.intersection(_0x360fce.pos, _0x3ca1c6, _0x4a9aa3, this.dim) && (this.pos['x'] + this.dim['x'] <= _0x360fce.pos['x'] && _0x4a9aa3['x'] + this.dim['x'] > _0x360fce.pos['x'] ? (_0x4a9aa3['x'] = _0x360fce.pos['x'] - this.dim['x'], _0x5d9757['x'] = _0x4a9aa3['x'], this.moveSpeed = 0) : this.pos['x'] >= _0x360fce.pos['x'] + _0x3ca1c6['x'] && _0x4a9aa3['x'] < _0x360fce.pos['x'] + _0x3ca1c6['x'] && (_0x4a9aa3['x'] = _0x360fce.pos['x'] + _0x3ca1c6['x'], _0x5d9757['x'] = _0x4a9aa3['x'], this.moveSpeed = 0)); } for (_0x12f7cd = 0; _0x12f7cd < _0x5159c.length; _0x12f7cd++) _0x360fce = _0x5159c[_0x12f7cd], _0x360fce.definition.COLLIDE && _0x4c4bae.intersection(_0x360fce.pos, _0x3ca1c6, _0x5d9757, this.dim) && (this.pos['y'] >= _0x360fce.pos['y'] + _0x3ca1c6['y'] && _0x5d9757['y'] < _0x360fce.pos['y'] + _0x3ca1c6['y'] ? (_0x5d9757['y'] = _0x360fce.pos['y'] + _0x3ca1c6['y'], this.fallSpeed = 0, this.grounded = !0) : this.pos['y'] + this.dim['y'] <= _0x360fce.pos['y'] && _0x5d9757['y'] + this.dim['y'] > _0x360fce.pos['y'] && (_0x5d9757['y'] = _0x360fce.pos['y'] - this.dim['y'], this.jumpTimer = -1, this.fallSpeed = 0)); this.pos = _0x4628a4.make(_0x4a9aa3['x'], _0x5d9757['y']); }; _0x3bb61f.prototype.proximity = function() { var _0x170ea4 = this.game.getPlayer(); _0x170ea4 && !_0x170ea4.dead && _0x170ea4.level === this.level && _0x170ea4.zone === this.zone && !this.proxHit && _0x4628a4.distance(_0x170ea4.pos, this.pos) < _0x3bb61f.ENABLE_DIST && (this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 160)), this.proxHit = !0); }; _0x3bb61f.prototype.face = function() { for (var _0xa274d0, _0x18aa06 = 0; _0x18aa06 < this.game.objects.length; _0x18aa06++) { var _0x1aefad = this.game.objects[_0x18aa06]; _0x1aefad instanceof _0x307949 && _0x1aefad.level === this.level && _0x1aefad.zone === this.zone && _0x1aefad.isTangible() && (!_0xa274d0 || Math.abs(_0xa274d0) > _0x4628a4.distance(_0x1aefad.pos, this.pos)) && (_0xa274d0 = _0x1aefad.pos['x'] - this.pos['x']); } this.dir = _0xa274d0 ? 0 > _0xa274d0 : !0; }; _0x3bb61f.prototype.sound = _0x2b132.prototype.sound; _0x3bb61f.prototype.enable = function() { this.disabled = !1; this.disabledTimer = _0x3bb61f.ENABLE_FADE_TIME; }; _0x3bb61f.prototype.disable = function() { this.disabled = !0; }; _0x3bb61f.prototype.attack = function() { this.attackAnimTimer = _0x3bb61f.ATTACK_ANIM_LENGTH; this.attackTimer = 0; this.hammer = this.game.createObject(_0xde7ae5['ID'], this.level, this.zone, _0x4628a4.add(this.pos, _0x3bb61f.PROJ_OFFSET), [this]); ++this.double > _0x3bb61f.DOUBLE_RATE && (this.double = 0, this.attackTimer = _0x3bb61f.ATTACK_DELAY); }; _0x3bb61f.prototype.attach = function() { this.hammer && (this.hammer.pos = _0x4628a4.add(this.pos, _0x3bb61f.PROJ_OFFSET), this.hammer.dir = !this.dir); }; _0x3bb61f.prototype.playerCollide = function(_0x4b22d6) { this.dead || this.garbage || _0x4b22d6.damage(this); }; _0x3bb61f.prototype.playerStomp = function(_0x529b7f) { this.dead || this.garbage || (this.bonk(), _0x529b7f.bounce(), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 1))); }; _0x3bb61f.prototype.playerBump = _0x3bb61f.prototype.playerCollide; _0x3bb61f.prototype.damage = function(_0x33a936) { this.dead || (this.bonk(), _0x217d86.encode(this.level, this.zone, this.oid, 1)); }; _0x3bb61f.prototype.bonk = function() { this.dead || (this.setState(_0x3bb61f.STATE.BONK), this.moveSpeed = _0x3bb61f.BONK_IMP['x'], this.fallSpeed = _0x3bb61f.BONK_IMP['y'], this.dead = !0, this.play("sfx/kick.wav", 1, 0.04)); }; _0x3bb61f.prototype.kill = function() {}; _0x3bb61f.prototype.isTangible = _0x2b132.prototype.isTangible; _0x3bb61f.prototype.destroy = _0x2b132.prototype.destroy; _0x3bb61f.prototype.setState = function(_0x189deb) { _0x189deb !== this.state && (this.state = _0x189deb, 0 < _0x189deb.SPRITE.length && (this.sprite = _0x189deb.SPRITE[0]), this.anim = 0); }; _0x3bb61f.prototype.draw = function(_0x19b1e0) { if (!this.disabled) { var _0x3500e3; _0x3500e3 = this.state === _0x3bb61f.STATE.BONK ? 3 : 0x0 < this.disabledTimer ? 160 + parseInt(32 * (1 - this.disabledTimer / _0x3bb61f.ENABLE_FADE_TIME)) : 0; if (this.sprite.INDEX instanceof Array) for (var _0x5c4c4c = this.sprite.INDEX, _0x435b7f = 0; _0x435b7f < _0x5c4c4c.length; _0x435b7f++) for (var _0x217037 = 0; _0x217037 < _0x5c4c4c[_0x435b7f].length; _0x217037++) _0x19b1e0.push({ 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(_0x217037, _0x435b7f)), 'reverse': !this.dir, 'index': _0x5c4c4c[3 !== _0x3500e3 ? _0x435b7f : _0x5c4c4c.length - 1 - _0x435b7f][_0x217037], 'mode': _0x3500e3 }); else _0x19b1e0.push({ 'pos': this.pos, 'reverse': !this.dir, 'index': this.sprite.INDEX, 'mode': _0x3500e3 }); } }; _0x3bb61f.prototype.play = _0x2b132.prototype.play; _0x2b132.REGISTER_OBJECT(_0x3bb61f); "use strict"; function _0x47b80a(_0x3a5600, _0x548881, _0x396c7c, _0x42a8cb, _0x16ba14) { _0x2b132.call(this, _0x3a5600, _0x548881, _0x396c7c, _0x42a8cb); this.oid = _0x16ba14; this.state = _0x47b80a.STATE.RUN; this.sprite = this.state.SPRITE[0]; this.anim = 0; this.health = _0x47b80a.HEALTH; this.bonkTimer = 0; this.dim = _0x4628a4.make(2, 0x2); this.fallSpeed = this.moveSpeed = 0; this.grounded = !1; this.loc = [this.pos['x'], this.pos['x'] - _0x47b80a.MOVE_AREA]; this.groundTimer = this.attackAnimTimer = this.attackTimer = 0; this.jumpTimer = -1; this.reverse = !1; this.dir = !0; } _0x47b80a.ASYNC = !0; _0x47b80a['ID'] = 25; _0x47b80a.NAME = "BOWSER"; _0x47b80a.ANIMATION_RATE = 5; _0x47b80a.HEALTH = 5; _0x47b80a.BONK_TIME = 90; _0x47b80a.BONK_IMP = _0x4628a4.make(0.25, 0.4); _0x47b80a.BONK_DECEL = 0.925; _0x47b80a.BONK_FALL_SPEED = 0.5; _0x47b80a.MOVE_SPEED_MAX = 0.095; _0x47b80a.JUMP_DELAY = 45; _0x47b80a.MOVE_AREA = 5; _0x47b80a.JUMP_LENGTH = 6; _0x47b80a.JUMP_DECEL = 0.009; _0x47b80a.ATTACK_DELAY = 75; _0x47b80a.ATTACK_ANIM_LENGTH = 15; _0x47b80a.PROJ_OFFSET = _0x4628a4.make(-0.25, 1.1); _0x47b80a.FALL_SPEED_MAX = 0.3; _0x47b80a.FALL_SPEED_ACCEL = 0.085; _0x47b80a.SPRITE = {}; _0x47b80a.SPRITE_LIST = [{ 'NAME': "RUN0", 'ID': 0, 'INDEX': [ [196, 0xc5], [180, 0xb5] ] }, { 'NAME': "RUN1", 'ID': 1, 'INDEX': [ [198, 0xc7], [182, 0xb7] ] }, { 'NAME': "ATTACK0", 'ID': 2, 'INDEX': [ [192, 0xc1], [176, 0xb1] ] }, { 'NAME': "ATTACK1", 'ID': 3, 'INDEX': [ [194, 0xc3], [178, 0xb3] ] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x47b80a.SPRITE_LIST.length; _0x4f3eec++) _0x47b80a.SPRITE[_0x47b80a.SPRITE_LIST[_0x4f3eec].NAME] = _0x47b80a.SPRITE_LIST[_0x4f3eec], _0x47b80a.SPRITE[_0x47b80a.SPRITE_LIST[_0x4f3eec]['ID']] = _0x47b80a.SPRITE_LIST[_0x4f3eec]; _0x47b80a.STATE = {}; _0x47b80a.STATE_LIST = [{ 'NAME': "RUN", 'ID': 0, 'SPRITE': [_0x47b80a.SPRITE.RUN0, _0x47b80a.SPRITE.RUN1] }, { 'NAME': "ATTACK", 'ID': 1, 'SPRITE': [_0x47b80a.SPRITE.ATTACK0, _0x47b80a.SPRITE.ATTACK1] }, { 'NAME': "BONK", 'ID': 81, 'SPRITE': [] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x47b80a.STATE_LIST.length; _0x4f3eec++) _0x47b80a.STATE[_0x47b80a.STATE_LIST[_0x4f3eec].NAME] = _0x47b80a.STATE_LIST[_0x4f3eec], _0x47b80a.STATE[_0x47b80a.STATE_LIST[_0x4f3eec]['ID']] = _0x47b80a.STATE_LIST[_0x4f3eec]; _0x47b80a.prototype.update = function(_0x210b64) {}; _0x47b80a.prototype.step = function() { this.state === _0x47b80a.STATE.BONK ? this.bonkTimer++ > _0x47b80a.BONK_TIME || 0 > this.pos['y'] + this.dim['y'] ? this.destroy() : (this.pos = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), this.moveSpeed *= _0x47b80a.BONK_DECEL, this.fallSpeed = Math.max(this.fallSpeed - _0x47b80a.FALL_SPEED_ACCEL, -_0x47b80a.BONK_FALL_SPEED)) : (this.anim++, this.sprite = this.state.SPRITE[parseInt(this.anim / _0x47b80a.ANIMATION_RATE) % this.state.SPRITE.length], this.control(), this.physics(), this.sound(), this.attackTimer++ > _0x47b80a.ATTACK_DELAY && this.attack(), 0 < this.attackAnimTimer ? (this.setState(_0x47b80a.STATE.ATTACK), this.attackAnimTimer--) : this.setState(_0x47b80a.STATE.RUN), 0 > this.pos['y'] && this.destroy()); }; _0x47b80a.prototype.control = function() { this.grounded ? (_0x47b80a.JUMP_DELAY < this.groundTimer++ && (this.groundTimer = this.jumpTimer = 0), this.pos['x'] > this.loc[0] ? this.reverse = !0 : this.pos['x'] < this.loc[1] && (this.reverse = !1)) : this.jumpTimer > _0x47b80a.JUMP_LENGTH && (this.jumpTimer = -1); this.moveSpeed = 0.75 * this.moveSpeed + 0.25 * (this.reverse ? -_0x47b80a.MOVE_SPEED_MAX : _0x47b80a.MOVE_SPEED_MAX); }; _0x47b80a.prototype.physics = function() { -1 !== this.jumpTimer ? (this.fallSpeed = _0x47b80a.FALL_SPEED_MAX - this.jumpTimer * _0x47b80a.JUMP_DECEL, this.jumpTimer++, this.grounded = !1) : (this.grounded && (this.fallSpeed = 0), this.fallSpeed = Math.max(this.fallSpeed - _0x47b80a.FALL_SPEED_ACCEL, -_0x47b80a.FALL_SPEED_MAX)); var _0x17ff5e = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, 0)), _0x6e760e = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), _0x426509 = _0x4628a4.make(0 <= this.moveSpeed ? this.pos['x'] : this.pos['x'] + this.moveSpeed, 0 >= this.fallSpeed ? this.pos['y'] : this.pos['y'] + this.fallSpeed), _0x569085 = _0x4628a4.make(this.dim['y'] + Math.abs(this.moveSpeed), this.dim['y'] + Math.abs(this.fallSpeed)), _0x426509 = this.game.world.getZone(this.level, this.zone).getTiles(_0x426509, _0x569085), _0x569085 = _0x4628a4.make(1, 0x1); this.grounded = !1; for (var _0x3182d5 = 0; _0x3182d5 < _0x426509.length; _0x3182d5++) { var _0x2d8950 = _0x426509[_0x3182d5]; _0x2d8950.definition.COLLIDE && _0x4c4bae.intersection(_0x2d8950.pos, _0x569085, _0x17ff5e, this.dim) && (this.pos['x'] + this.dim['x'] <= _0x2d8950.pos['x'] && _0x17ff5e['x'] + this.dim['x'] > _0x2d8950.pos['x'] ? (_0x17ff5e['x'] = _0x2d8950.pos['x'] - this.dim['x'], _0x6e760e['x'] = _0x17ff5e['x'], this.moveSpeed = 0) : this.pos['x'] >= _0x2d8950.pos['x'] + _0x569085['x'] && _0x17ff5e['x'] < _0x2d8950.pos['x'] + _0x569085['x'] && (_0x17ff5e['x'] = _0x2d8950.pos['x'] + _0x569085['x'], _0x6e760e['x'] = _0x17ff5e['x'], this.moveSpeed = 0)); } for (_0x3182d5 = 0; _0x3182d5 < _0x426509.length; _0x3182d5++) _0x2d8950 = _0x426509[_0x3182d5], _0x2d8950.definition.COLLIDE && _0x4c4bae.intersection(_0x2d8950.pos, _0x569085, _0x6e760e, this.dim) && (this.pos['y'] >= _0x2d8950.pos['y'] + _0x569085['y'] && _0x6e760e['y'] < _0x2d8950.pos['y'] + _0x569085['y'] ? (_0x6e760e['y'] = _0x2d8950.pos['y'] + _0x569085['y'], this.fallSpeed = 0, this.grounded = !0) : this.pos['y'] + this.dim['y'] <= _0x2d8950.pos['y'] && _0x6e760e['y'] + this.dim['y'] > _0x2d8950.pos['y'] && (_0x6e760e['y'] = _0x2d8950.pos['y'] - this.dim['y'], this.jumpTimer = -1, this.fallSpeed = 0)); this.pos = _0x4628a4.make(_0x17ff5e['x'], _0x6e760e['y']); }; _0x47b80a.prototype.sound = _0x2b132.prototype.sound; _0x47b80a.prototype.attack = function() { this.attackAnimTimer = _0x47b80a.ATTACK_ANIM_LENGTH; this.attackTimer = 0; this.game.createObject(_0x494911['ID'], this.level, this.zone, _0x4628a4.add(this.pos, _0x47b80a.PROJ_OFFSET), []); this.play("sfx/breath.wav", 1.5, 0.04); }; _0x47b80a.prototype.playerCollide = function(_0x301ce0) { this.dead || this.garbage || _0x301ce0.damage(this); }; _0x47b80a.prototype.playerStomp = _0x47b80a.prototype.playerCollide; _0x47b80a.prototype.playerBump = _0x47b80a.prototype.playerCollide; _0x47b80a.prototype.damage = function(_0x1c821f) { this.dead || 0 >= --this.health && this.bonk(); }; _0x47b80a.prototype.bonk = function() { this.dead || (this.setState(_0x47b80a.STATE.BONK), this.moveSpeed = _0x47b80a.BONK_IMP['x'], this.fallSpeed = _0x47b80a.BONK_IMP['y'], this.dead = !0, this.play("sfx/kick.wav", 1, 0.04)); }; _0x47b80a.prototype.kill = function() {}; _0x47b80a.prototype.isTangible = _0x2b132.prototype.isTangible; _0x47b80a.prototype.destroy = _0x2b132.prototype.destroy; _0x47b80a.prototype.setState = function(_0x3c9ce0) { _0x3c9ce0 !== this.state && (this.state = _0x3c9ce0, 0 < _0x3c9ce0.SPRITE.length && (this.sprite = _0x3c9ce0.SPRITE[0]), this.anim = 0); }; _0x47b80a.prototype.draw = function(_0x344414) { var _0x1d42d7; _0x1d42d7 = this.state === _0x47b80a.STATE.BONK ? 3 : 0x0; if (this.sprite.INDEX instanceof Array) for (var _0xe1f0ab = this.sprite.INDEX, _0x417a90 = 0; _0x417a90 < _0xe1f0ab.length; _0x417a90++) for (var _0x353e33 = 0; _0x353e33 < _0xe1f0ab[_0x417a90].length; _0x353e33++) _0x344414.push({ 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(_0x353e33, _0x417a90)), 'reverse': !this.dir, 'index': _0xe1f0ab[_0x1d42d7 ? _0xe1f0ab.length - 1 - _0x417a90 : _0x417a90][_0x353e33], 'mode': _0x1d42d7 }); else _0x344414.push({ 'pos': this.pos, 'reverse': !this.dir, 'index': this.sprite.INDEX, 'mode': _0x1d42d7 }); }; _0x47b80a.prototype.play = _0x2b132.prototype.play; _0x2b132.REGISTER_OBJECT(_0x47b80a); "use strict"; function _0x23afdb(_0x385f59, _0x310cfa, _0x31960e, _0x10537d, _0x57fe89, _0x3d4d35, _0x25fa69, _0x518de2, _0x15d767, _0x5f6838, _0x2a4bd0, _0x2dffee) { _0x2b132.call(this, _0x385f59, _0x310cfa, _0x31960e, _0x10537d); this.oid = _0x57fe89; this.setState(_0x23afdb.STATE.IDLE); this.loc = 0 === parseInt(_0x2dffee) ? [_0x10537d, _0x4628a4.add(_0x10537d, _0x4628a4.make(parseInt(_0x25fa69), parseInt(_0x518de2)))] : [_0x4628a4.add(_0x10537d, _0x4628a4.make(parseInt(_0x25fa69), parseInt(_0x518de2))), _0x10537d]; this.anim = 0; this.dim = _0x4628a4.make(parseInt(_0x3d4d35), 0.5); this.speed = parseFloat(_0x15d767); this.riders = []; this.dir = !1; this.loop = 0 === parseInt(_0x5f6838) ? !1 : !0; this.delay = parseInt(_0x2a4bd0); } _0x23afdb.ASYNC = !0; _0x23afdb['ID'] = 145; _0x23afdb.NAME = "PLATFORM"; _0x23afdb.ANIMATION_RATE = 3; _0x23afdb.SPRITE = {}; _0x23afdb.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 160 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x23afdb.SPRITE_LIST.length; _0x4f3eec++) _0x23afdb.SPRITE[_0x23afdb.SPRITE_LIST[_0x4f3eec].NAME] = _0x23afdb.SPRITE_LIST[_0x4f3eec], _0x23afdb.SPRITE[_0x23afdb.SPRITE_LIST[_0x4f3eec]['ID']] = _0x23afdb.SPRITE_LIST[_0x4f3eec]; _0x23afdb.STATE = {}; _0x23afdb.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x23afdb.SPRITE.IDLE] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x23afdb.STATE_LIST.length; _0x4f3eec++) _0x23afdb.STATE[_0x23afdb.STATE_LIST[_0x4f3eec].NAME] = _0x23afdb.STATE_LIST[_0x4f3eec], _0x23afdb.STATE[_0x23afdb.STATE_LIST[_0x4f3eec]['ID']] = _0x23afdb.STATE_LIST[_0x4f3eec]; _0x23afdb.prototype.update = function(_0x4899ac) {}; _0x23afdb.prototype.step = function() { 0 < this.delay-- || (this.anim++, this.sprite = this.state.SPRITE[parseInt(this.anim / _0x23afdb.ANIMATION_RATE) % this.state.SPRITE.length], this.physics()); }; _0x23afdb.prototype.physics = function() { var _0x1c3490 = _0x4628a4.normalize(_0x4628a4.subtract(this.loc[this.dir ? 0 : 0x1], this.pos)), _0xea623 = _0x4628a4.distance(this.pos, this.loc[this.dir ? 0 : 0x1]); if (_0xea623 < this.speed) if (this.loop) this.dir = !this.dir; else { this.pos = this.loc[0]; this.riders = []; return; } _0x1c3490 = _0x4628a4.scale(_0x1c3490, Math.min(this.speed, _0xea623)); this.pos = _0x4628a4.add(this.pos, _0x1c3490); for (_0xea623 = 0; _0xea623 < this.riders.length; _0xea623++) { var _0x45f051 = this.riders[0]; _0x45f051.pos = _0x4628a4.add(_0x45f051.pos, _0x1c3490); } this.riders = []; }; _0x23afdb.prototype.riding = function(_0x31e465) { this.riders.push(_0x31e465); }; _0x23afdb.prototype.kill = function() {}; _0x23afdb.prototype.destroy = _0x2b132.prototype.destroy; _0x23afdb.prototype.isTangible = _0x2b132.prototype.isTangible; _0x23afdb.prototype.setState = function(_0xad35b3) { _0xad35b3 !== this.state && (this.state = _0xad35b3, this.sprite = _0xad35b3.SPRITE[0], this.anim = 0); }; _0x23afdb.prototype.draw = function(_0x4280b5) { if (!(0 < this.delay)) for (var _0x18e3a8 = 0; _0x18e3a8 < this.dim['x']; _0x18e3a8++) _0x4280b5.push({ 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(_0x18e3a8, 0)), 'reverse': this.reverse, 'index': this.sprite.INDEX, 'mode': 0 }); }; _0x2b132.REGISTER_OBJECT(_0x23afdb); "use strict"; function _0x4cfe85(_0x3f686b, _0x1fb908, _0x3242ca, _0x235044, _0x431eaa, _0x577e71, _0x259052, _0x19be4f, _0x4c4b7c) { _0x2b132.call(this, _0x3f686b, _0x1fb908, _0x3242ca, _0x235044); this.oid = _0x431eaa; this.setState(_0x4cfe85.STATE.IDLE); this.loc = [_0x235044, _0x4628a4.add(_0x235044, _0x4628a4.make(parseInt(_0x259052), parseInt(_0x19be4f)))]; this.anim = 0; this.dim = _0x4628a4.make(parseInt(_0x577e71), 0.5); this.speed = parseFloat(_0x4c4b7c); this.riders = []; this.dir = this['go'] = !1; } _0x4cfe85.ASYNC = !1; _0x4cfe85['ID'] = 146; _0x4cfe85.NAME = "BUS PLATFORM"; _0x4cfe85.ANIMATION_RATE = 3; _0x4cfe85.SPRITE = {}; _0x4cfe85.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 160 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x4cfe85.SPRITE_LIST.length; _0x4f3eec++) _0x4cfe85.SPRITE[_0x4cfe85.SPRITE_LIST[_0x4f3eec].NAME] = _0x4cfe85.SPRITE_LIST[_0x4f3eec], _0x4cfe85.SPRITE[_0x4cfe85.SPRITE_LIST[_0x4f3eec]['ID']] = _0x4cfe85.SPRITE_LIST[_0x4f3eec]; _0x4cfe85.STATE = {}; _0x4cfe85.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x4cfe85.SPRITE.IDLE] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x4cfe85.STATE_LIST.length; _0x4f3eec++) _0x4cfe85.STATE[_0x4cfe85.STATE_LIST[_0x4f3eec].NAME] = _0x4cfe85.STATE_LIST[_0x4f3eec], _0x4cfe85.STATE[_0x4cfe85.STATE_LIST[_0x4f3eec]['ID']] = _0x4cfe85.STATE_LIST[_0x4f3eec]; _0x4cfe85.prototype.update = function(_0x560f8a) { switch (_0x560f8a) { case 161: this.start(); } }; _0x4cfe85.prototype.step = function() { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0x4cfe85.ANIMATION_RATE) % this.state.SPRITE.length]; this.physics(); }; _0x4cfe85.prototype.physics = function() { if (this['go']) { var _0x2dda0e = _0x4628a4.normalize(_0x4628a4.subtract(this.loc[this.dir ? 0 : 0x1], this.pos)), _0xdc59b = _0x4628a4.distance(this.pos, this.loc[this.dir ? 0 : 0x1]), _0x2dda0e = _0x4628a4.scale(_0x2dda0e, Math.min(this.speed, _0xdc59b)); this.pos = _0x4628a4.add(this.pos, _0x2dda0e); for (_0xdc59b = 0; _0xdc59b < this.riders.length; _0xdc59b++) { var _0x2d9a71 = this.riders[0]; _0x2d9a71.pos = _0x4628a4.add(_0x2d9a71.pos, _0x2dda0e); } } this.riders = []; }; _0x4cfe85.prototype.start = function() { this['go'] = !0; }; _0x4cfe85.prototype.riding = function(_0x401e16) { _0x401e16.pid !== this.game.pid || this['go'] || this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 161)); this.riders.push(_0x401e16); }; _0x4cfe85.prototype.kill = function() {}; _0x4cfe85.prototype.isTangible = _0x2b132.prototype.isTangible; _0x4cfe85.prototype.destroy = _0x2b132.prototype.destroy; _0x4cfe85.prototype.setState = function(_0x55d970) { _0x55d970 !== this.state && (this.state = _0x55d970, this.sprite = _0x55d970.SPRITE[0], this.anim = 0); }; _0x4cfe85.prototype.draw = function(_0x11da07) { if (!(0 < this.delay)) for (var _0x1a4034 = 0; _0x1a4034 < this.dim['x']; _0x1a4034++) _0x11da07.push({ 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(_0x1a4034, 0)), 'reverse': this.reverse, 'index': this.sprite.INDEX, 'mode': 0 }); }; _0x2b132.REGISTER_OBJECT(_0x4cfe85); "use strict"; function _0x46ee61(_0x43cafb, _0x1b4d7d, _0x5303ae, _0x4a0edf, _0x5a783c) { _0x2b132.call(this, _0x43cafb, _0x1b4d7d, _0x5303ae, _0x4a0edf); this.oid = _0x5a783c; this.setState(_0x46ee61.STATE.EXTEND); this.anim = 0; this.pos = _0x4628a4.add(this.pos, _0x46ee61.SOFFSET); this.dim = _0x4628a4.make(0.8, 2); } _0x46ee61.ASYNC = !0; _0x46ee61['ID'] = 149; _0x46ee61.NAME = "SPRING"; _0x46ee61.ANIMATION_RATE = 3; _0x46ee61.SOFFSET = _0x4628a4.make(0.1, 0); _0x46ee61.THRESHOLD = [1, 0.5]; _0x46ee61.POWER = 0.45; _0x46ee61.SPRITE = {}; _0x46ee61.SPRITE_LIST = [{ 'NAME': "STAGE0", 'ID': 0, 'INDEX': [ [161], [145] ] }, { 'NAME': "STAGE1", 'ID': 1, 'INDEX': 162 }, { 'NAME': "STAGE2", 'ID': 2, 'INDEX': 163 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x46ee61.SPRITE_LIST.length; _0x4f3eec++) _0x46ee61.SPRITE[_0x46ee61.SPRITE_LIST[_0x4f3eec].NAME] = _0x46ee61.SPRITE_LIST[_0x4f3eec], _0x46ee61.SPRITE[_0x46ee61.SPRITE_LIST[_0x4f3eec]['ID']] = _0x46ee61.SPRITE_LIST[_0x4f3eec]; _0x46ee61.STATE = {}; _0x46ee61.STATE_LIST = [{ 'NAME': "EXTEND", 'ID': 0, 'SPRITE': [_0x46ee61.SPRITE.STAGE0] }, { 'NAME': "HALF", 'ID': 1, 'SPRITE': [_0x46ee61.SPRITE.STAGE1] }, { 'NAME': "COMPRESS", 'ID': 2, 'SPRITE': [_0x46ee61.SPRITE.STAGE2] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x46ee61.STATE_LIST.length; _0x4f3eec++) _0x46ee61.STATE[_0x46ee61.STATE_LIST[_0x4f3eec].NAME] = _0x46ee61.STATE_LIST[_0x4f3eec], _0x46ee61.STATE[_0x46ee61.STATE_LIST[_0x4f3eec]['ID']] = _0x46ee61.STATE_LIST[_0x4f3eec]; _0x46ee61.prototype.update = function(_0x2026a4) {}; _0x46ee61.prototype.step = function() { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0x46ee61.ANIMATION_RATE) % this.state.SPRITE.length]; this.interaction(); }; _0x46ee61.prototype.interaction = function() { var _0xa24419 = this.game.getPlayer(); if (_0xa24419 && _0xa24419.level === this.level && _0xa24419.zone === this.zone && _0xa24419.isTangible() && _0x4c4bae.intersection(this.pos, this.dim, _0xa24419.pos, _0xa24419.dim)) { var _0x353727 = Math.pow(1 - 0.5 * Math.min(Math.max(0, _0xa24419.pos['y'] - this.pos['y']), 2), 2); _0xa24419.fallSpeed >= 0.75 * _0x307949.FALL_SPEED_MAX && _0xa24419.btnA && (_0xa24419.jumping = 0, _0xa24419.isSpring = !0); _0xa24419.fallSpeed += _0x353727 * _0x46ee61.POWER; _0xa24419.grounded = !1; } _0xa24419 = 2; for (_0x353727 = 0; _0x353727 < this.game.objects.length; _0x353727++) { var _0x47477a = this.game.objects[_0x353727]; _0x47477a instanceof _0x307949 && _0x47477a.level === this.level && _0x47477a.zone === this.zone && _0x47477a.isTangible() && _0x4c4bae.intersection(this.pos, this.dim, _0x47477a.pos, _0x47477a.dim) && (_0x47477a = Math.min(Math.max(0, _0x47477a.pos['y'] - this.pos['y']), 2), _0x47477a < _0xa24419 && (_0xa24419 = _0x47477a)); } _0xa24419 < _0x46ee61.THRESHOLD[1] ? this.setState(_0x46ee61.STATE.COMPRESS) : _0xa24419 < _0x46ee61.THRESHOLD[0] ? this.setState(_0x46ee61.STATE.HALF) : this.setState(_0x46ee61.STATE.EXTEND); }; _0x46ee61.prototype.kill = function() {}; _0x46ee61.prototype.destroy = _0x2b132.prototype.destroy; _0x46ee61.prototype.isTangible = _0x2b132.prototype.isTangible; _0x46ee61.prototype.setState = function(_0x2251bb) { _0x2251bb !== this.state && (this.state = _0x2251bb, this.sprite = _0x2251bb.SPRITE[0], this.anim = 0); }; _0x46ee61.prototype.draw = function(_0x5eb5a4) { if (this.sprite.INDEX instanceof Array) for (var _0x27f27e = this.sprite.INDEX, _0xbdb523 = 0; _0xbdb523 < _0x27f27e.length; _0xbdb523++) for (var _0x1edf09 = 0; _0x1edf09 < _0x27f27e[_0xbdb523].length; _0x1edf09++) _0x5eb5a4.push({ 'pos': _0x4628a4.subtract(_0x4628a4.add(this.pos, _0x4628a4.make(_0x1edf09, _0xbdb523)), _0x46ee61.SOFFSET), 'reverse': !1, 'index': _0x27f27e[_0xbdb523][_0x1edf09] }); else _0x5eb5a4.push({ 'pos': _0x4628a4.subtract(this.pos, _0x46ee61.SOFFSET), 'reverse': !1, 'index': this.sprite.INDEX, 'mode': 0 }); }; _0x2b132.REGISTER_OBJECT(_0x46ee61); "use strict"; function _0x42a575(_0x276916, _0xcbf248, _0x24ad25, _0x224748, _0x35727a) { _0x2b132.call(this, _0x276916, _0xcbf248, _0x24ad25, _0x224748); this.oid = _0x35727a; this.setState(_0x42a575.STATE.IDLE); this.anim = 0; } _0x42a575.ASYNC = !0; _0x42a575['ID'] = 177; _0x42a575.NAME = "FLAG"; _0x42a575.ANIMATION_RATE = 3; _0x42a575.OFFSET = _0x4628a4.make(-0.5, 0); _0x42a575.SPRITE = {}; _0x42a575.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 144 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x42a575.SPRITE_LIST.length; _0x4f3eec++) _0x42a575.SPRITE[_0x42a575.SPRITE_LIST[_0x4f3eec].NAME] = _0x42a575.SPRITE_LIST[_0x4f3eec], _0x42a575.SPRITE[_0x42a575.SPRITE_LIST[_0x4f3eec]['ID']] = _0x42a575.SPRITE_LIST[_0x4f3eec]; _0x42a575.STATE = {}; _0x42a575.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x42a575.SPRITE.IDLE] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x42a575.STATE_LIST.length; _0x4f3eec++) _0x42a575.STATE[_0x42a575.STATE_LIST[_0x4f3eec].NAME] = _0x42a575.STATE_LIST[_0x4f3eec], _0x42a575.STATE[_0x42a575.STATE_LIST[_0x4f3eec]['ID']] = _0x42a575.STATE_LIST[_0x4f3eec]; _0x42a575.prototype.update = function(_0x10c700) {}; _0x42a575.prototype.step = function() { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0x42a575.ANIMATION_RATE) % this.state.SPRITE.length]; }; _0x42a575.prototype.kill = function() {}; _0x42a575.prototype.isTangible = _0x2b132.prototype.isTangible; _0x42a575.prototype.destroy = _0x2b132.prototype.destroy; _0x42a575.prototype.setState = function(_0x34112a) { _0x34112a !== this.state && (this.state = _0x34112a, this.sprite = _0x34112a.SPRITE[0], this.anim = 0); }; _0x42a575.prototype.draw = function(_0x262304) { _0x262304.push({ 'pos': _0x4628a4.add(this.pos, _0x42a575.OFFSET), 'reverse': !1, 'index': this.sprite.INDEX, 'mode': 0 }); }; _0x2b132.REGISTER_OBJECT(_0x42a575); "use strict"; function _0x322232(_0x460130, _0x4ad7fb, _0x34adff, _0x274267, _0x58f6c1, _0x1cc747, _0x52430d) { _0x2b132.call(this, _0x460130, _0x4ad7fb, _0x34adff, _0x274267); this.oid = _0x58f6c1; this.state = _0x322232.STATE.IDLE; this.sprite = this.state.SPRITE[0]; this.anim = 1 === parseInt(_0x1cc747) ? 2 * _0x322232.SPIN_RATE : 0; this.dim = _0x4628a4.make(0.5, 0.5); this.size = isNaN(parseInt(_0x52430d)) ? _0x322232.PARTS : parseInt(_0x52430d); } _0x322232.ASYNC = !0; _0x322232['ID'] = 33; _0x322232.NAME = "FIRE TRAP"; _0x322232.ANIMATION_RATE = 2; _0x322232.OFFSET = _0x4628a4.make(0.25, 0.25); _0x322232.PARTS = 6; _0x322232.SPACING = 0.5; _0x322232.SPIN_RATE = 23; _0x322232.SPRITE = {}; _0x322232.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': 208 }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': 209 }, { 'NAME': "IDLE2", 'ID': 2, 'INDEX': 210 }, { 'NAME': "IDLE3", 'ID': 3, 'INDEX': 211 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x322232.SPRITE_LIST.length; _0x4f3eec++) _0x322232.SPRITE[_0x322232.SPRITE_LIST[_0x4f3eec].NAME] = _0x322232.SPRITE_LIST[_0x4f3eec], _0x322232.SPRITE[_0x322232.SPRITE_LIST[_0x4f3eec]['ID']] = _0x322232.SPRITE_LIST[_0x4f3eec]; _0x322232.STATE = {}; _0x322232.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x322232.SPRITE.IDLE0, _0x322232.SPRITE.IDLE1, _0x322232.SPRITE.IDLE2, _0x322232.SPRITE.IDLE3] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x322232.STATE_LIST.length; _0x4f3eec++) _0x322232.STATE[_0x322232.STATE_LIST[_0x4f3eec].NAME] = _0x322232.STATE_LIST[_0x4f3eec], _0x322232.STATE[_0x322232.STATE_LIST[_0x4f3eec]['ID']] = _0x322232.STATE_LIST[_0x4f3eec]; _0x322232.prototype.update = function() {}; _0x322232.prototype.step = function() { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0x322232.ANIMATION_RATE) % this.state.SPRITE.length]; this.control(); this.interaction(); }; _0x322232.prototype.control = function() { this.rot += _0x322232.SPIN_RATE; }; _0x322232.prototype.interaction = function() { var _0xf47674 = _0x4628a4.normalize(_0x4628a4.make(Math.sin(-this.anim / _0x322232.SPIN_RATE), Math.cos(-this.anim / _0x322232.SPIN_RATE))), _0x332592 = this.game.getPlayer(); if (_0x332592 && _0x332592.isTangible() && _0x332592.level === this.level && _0x332592.zone === this.zone) for (var _0x2d6075 = 0; _0x2d6075 < this.size; _0x2d6075++) { var _0x22c2fb = _0x4628a4.add(_0x4628a4.add(this.pos, _0x322232.OFFSET), _0x4628a4.scale(_0xf47674, _0x322232.SPACING * _0x2d6075)); _0x4c4bae.intersection(_0x332592.pos, _0x332592.dim, _0x22c2fb, this.dim) && _0x332592.damage(this); } }; _0x322232.prototype.playerCollide = function(_0x22255a) {}; _0x322232.prototype.playerStomp = function(_0x265fcb) {}; _0x322232.prototype.playerBump = function(_0x5d49e1) {}; _0x322232.prototype.kill = function() {}; _0x322232.prototype.isTangible = _0x2b132.prototype.isTangible; _0x322232.prototype.destroy = _0x2b132.prototype.destroy; _0x322232.prototype.setState = function(_0x133892) { _0x133892 !== this.state && (this.state = _0x133892, this.sprite = _0x133892.SPRITE[0], this.anim = 0); }; _0x322232.prototype.draw = function(_0x2273f4) { for (var _0x3dc5bf = _0x4628a4.normalize(_0x4628a4.make(Math.sin(-this.anim / _0x322232.SPIN_RATE), Math.cos(-this.anim / _0x322232.SPIN_RATE))), _0x5d8ad2 = 0; _0x5d8ad2 < this.size; _0x5d8ad2++) _0x2273f4.push({ 'pos': _0x4628a4.add(this.pos, _0x4628a4.scale(_0x3dc5bf, _0x322232.SPACING * _0x5d8ad2)), 'reverse': !1, 'index': this.sprite.INDEX, 'mode': 0 }); }; _0x2b132.REGISTER_OBJECT(_0x322232); "use strict"; function _0x5df470(_0x38be3f, _0x23eece, _0x5eeb36, _0x4fd4e2, _0x3c448a, _0x350935, _0x561aa2) { _0x2b132.call(this, _0x38be3f, _0x23eece, _0x5eeb36, _0x4fd4e2); this.oid = _0x3c448a; this.setState(_0x5df470.STATE.IDLE); this.delay = isNaN(parseInt(_0x350935)) ? _0x5df470.DELAY_DEFAULT : parseInt(_0x350935); this.impulse = isNaN(parseFloat(_0x561aa2)) ? 1 : parseFloat(_0x561aa2); this.anim = 0; this.delayTimer = this.delay; this.pos['x'] += _0x5df470.SOFFSET['x']; this.loc = _0x4628a4.copy(this.pos); this.fallSpeed = 0; this.dim = _0x4628a4.make(0.7, 0.7); } _0x5df470.ASYNC = !0; _0x5df470['ID'] = 34; _0x5df470.NAME = "FIRE BLAST"; _0x5df470.ANIMATION_RATE = 3; _0x5df470.DELAY_DEFAULT = 90; _0x5df470.IMPULSE = 1.35; _0x5df470.DRAG = 0.95; _0x5df470.FALL_SPEED_ACCEL = 0.055; _0x5df470.SOFFSET = _0x4628a4.make(0.15, 0.15); _0x5df470.SPRITE = {}; _0x5df470.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 219 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x5df470.SPRITE_LIST.length; _0x4f3eec++) _0x5df470.SPRITE[_0x5df470.SPRITE_LIST[_0x4f3eec].NAME] = _0x5df470.SPRITE_LIST[_0x4f3eec], _0x5df470.SPRITE[_0x5df470.SPRITE_LIST[_0x4f3eec]['ID']] = _0x5df470.SPRITE_LIST[_0x4f3eec]; _0x5df470.STATE = {}; _0x5df470.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x5df470.SPRITE.IDLE] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x5df470.STATE_LIST.length; _0x4f3eec++) _0x5df470.STATE[_0x5df470.STATE_LIST[_0x4f3eec].NAME] = _0x5df470.STATE_LIST[_0x4f3eec], _0x5df470.STATE[_0x5df470.STATE_LIST[_0x4f3eec]['ID']] = _0x5df470.STATE_LIST[_0x4f3eec]; _0x5df470.prototype.update = function(_0x19fa90) {}; _0x5df470.prototype.step = function() { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0x5df470.ANIMATION_RATE) % this.state.SPRITE.length]; 0 < this.delayTimer ? this.delayTimer-- : this.blast(); this.physics(); }; _0x5df470.prototype.physics = function() { if (this.pos['y'] > this.loc['y'] || 0 < this.fallSpeed) this.fallSpeed = (this.fallSpeed - _0x5df470.FALL_SPEED_ACCEL) * _0x5df470.DRAG, this.pos['y'] += this.fallSpeed; }; _0x5df470.prototype.blast = function() { this.pos = _0x4628a4.copy(this.loc); this.fallSpeed = _0x5df470.IMPULSE * this.impulse; this.delayTimer = this.delay; }; _0x5df470.prototype.playerCollide = function(_0xa4b7ce) { this.dead || this.garbage || _0xa4b7ce.damage(this); }; _0x5df470.prototype.playerStomp = function(_0x1dfd08) { this.playerCollide(_0x1dfd08); }; _0x5df470.prototype.playerBump = function(_0x5ce1d9) { this.playerCollide(_0x5ce1d9); }; _0x5df470.prototype.kill = function() {}; _0x5df470.prototype.isTangible = _0x2b132.prototype.isTangible; _0x5df470.prototype.destroy = _0x2b132.prototype.destroy; _0x5df470.prototype.setState = function(_0x565fa9) { _0x565fa9 !== this.state && (this.state = _0x565fa9, this.sprite = _0x565fa9.SPRITE[0], this.anim = 0); }; _0x5df470.prototype.draw = function(_0x2cfcb6) { var _0x1e8001 = 0 <= this.fallSpeed ? 0 : 0x3; _0x2cfcb6.push({ 'pos': _0x4628a4.subtract(this.pos, _0x5df470.SOFFSET), 'reverse': !1, 'index': this.sprite.INDEX, 'mode': _0x1e8001 }); }; _0x2b132.REGISTER_OBJECT(_0x5df470); "use strict"; function _0x42040c(_0x50d499, _0x35d6ca, _0x559c3e, _0x146778, _0x116a1d, _0x50587c) { _0x2b132.call(this, _0x50d499, _0x35d6ca, _0x559c3e, _0x146778); this.oid = _0x116a1d; this.setState(_0x42040c.STATE.IDLE); this.fireTimer = 0; this.delay = isNaN(parseInt(_0x50587c)) ? _0x42040c.FIRE_DELAY_DEFAULT : parseInt(_0x50587c); } _0x42040c.ASYNC = !0; _0x42040c['ID'] = 35; _0x42040c.NAME = "LAUNCHER"; _0x42040c.ANIMATION_RATE = 3; _0x42040c.FIRE_DELAY_DEFAULT = 150; _0x42040c.SPRITE = {}; _0x42040c.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 255 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x42040c.SPRITE_LIST.length; _0x4f3eec++) _0x42040c.SPRITE[_0x42040c.SPRITE_LIST[_0x4f3eec].NAME] = _0x42040c.SPRITE_LIST[_0x4f3eec], _0x42040c.SPRITE[_0x42040c.SPRITE_LIST[_0x4f3eec]['ID']] = _0x42040c.SPRITE_LIST[_0x4f3eec]; _0x42040c.STATE = {}; _0x42040c.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x42040c.SPRITE.IDLE] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x42040c.STATE_LIST.length; _0x4f3eec++) _0x42040c.STATE[_0x42040c.STATE_LIST[_0x4f3eec].NAME] = _0x42040c.STATE_LIST[_0x4f3eec], _0x42040c.STATE[_0x42040c.STATE_LIST[_0x4f3eec]['ID']] = _0x42040c.STATE_LIST[_0x4f3eec]; _0x42040c.prototype.update = function(_0x552576) {}; _0x42040c.prototype.step = function() { ++this.fireTimer > this.delay && this.fire(); this.sound(); }; _0x42040c.prototype.sound = _0x2b132.prototype.sound; _0x42040c.prototype.fire = function() { this.fireTimer = 0; this.game.createObject(_0x34d645['ID'], this.level, this.zone, _0x4628a4.copy(this.pos), []); this.play("sfx/firework.wav", 1, 0.04); }; _0x42040c.prototype.kill = function() {}; _0x42040c.prototype.isTangible = _0x2b132.prototype.isTangible; _0x42040c.prototype.destroy = _0x2b132.prototype.destroy; _0x42040c.prototype.setState = function(_0x17f68f) { _0x17f68f !== this.state && (this.state = _0x17f68f, this.sprite = _0x17f68f.SPRITE[0], this.anim = 0); }; _0x42040c.prototype.draw = function(_0x1bacc4) {}; _0x42040c.prototype.play = _0x2b132.prototype.play; _0x2b132.REGISTER_OBJECT(_0x42040c); "use strict"; function _0x34d645(_0x5f4be1, _0x473f3c, _0x24514b, _0x18c3c6, _0x2a1ed7) { _0x2b132.call(this, _0x5f4be1, _0x473f3c, _0x24514b, _0x18c3c6); this.oid = _0x2a1ed7; this.setState(_0x34d645.STATE.IDLE); this.bonkTimer = this.anim = 0; this.dim = _0x4628a4.make(0.8, 0.8); this.fallSpeed = this.moveSpeed = 0; } _0x34d645.ASYNC = !0; _0x34d645['ID'] = 36; _0x34d645.NAME = "BULLET"; _0x34d645.ANIMATION_RATE = 3; _0x34d645.SPEED = 0.215; _0x34d645.BONK_TIME = 90; _0x34d645.BONK_IMP = _0x4628a4.make(0.25, 0.4); _0x34d645.BONK_DECEL = 0.925; _0x34d645.BONK_FALL_SPEED = 0.5; _0x34d645.BONK_FALL_ACCEL = 0.085; _0x34d645.DELAY_DEFAULT = 275; _0x34d645.IMPULSE = _0x4628a4.make(0.225, 0.335); _0x34d645.DRAG = 0.996; _0x34d645.FALL_SPEED_ACCEL = 0.0055; _0x34d645.SOFFSET = _0x4628a4.make(0.15, 0.15); _0x34d645.SPRITE = {}; _0x34d645.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 205 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x34d645.SPRITE_LIST.length; _0x4f3eec++) _0x34d645.SPRITE[_0x34d645.SPRITE_LIST[_0x4f3eec].NAME] = _0x34d645.SPRITE_LIST[_0x4f3eec], _0x34d645.SPRITE[_0x34d645.SPRITE_LIST[_0x4f3eec]['ID']] = _0x34d645.SPRITE_LIST[_0x4f3eec]; _0x34d645.STATE = {}; _0x34d645.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x34d645.SPRITE.IDLE] }, { 'NAME': "BONK", 'ID': 81, 'SPRITE': [] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x34d645.STATE_LIST.length; _0x4f3eec++) _0x34d645.STATE[_0x34d645.STATE_LIST[_0x4f3eec].NAME] = _0x34d645.STATE_LIST[_0x4f3eec], _0x34d645.STATE[_0x34d645.STATE_LIST[_0x4f3eec]['ID']] = _0x34d645.STATE_LIST[_0x4f3eec]; _0x34d645.prototype.update = function(_0x51e68b) {}; _0x34d645.prototype.step = function() { this.state === _0x34d645.STATE.BONK ? this.bonkTimer++ > _0x34d645.BONK_TIME || 0 > this.pos['y'] + this.dim['y'] ? this.destroy() : (this.pos = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), this.moveSpeed *= _0x34d645.BONK_DECEL, this.fallSpeed = Math.max(this.fallSpeed - _0x34d645.BONK_FALL_ACCEL, -_0x34d645.BONK_FALL_SPEED)) : (this.anim++, this.sprite = this.state.SPRITE[parseInt(this.anim / _0x34d645.ANIMATION_RATE) % this.state.SPRITE.length], this.physics(), this.sound()); }; _0x34d645.prototype.physics = function() { 0 < this.pos['x'] ? this.pos['x'] -= _0x34d645.SPEED : this.destroy(); }; _0x34d645.prototype.sound = _0x2b132.prototype.sound; _0x34d645.prototype.disable = function() { this.disabled = !0; }; _0x34d645.prototype.enable = function() { this.disabled = !1; }; _0x34d645.prototype.damage = function(_0x1e0e84) {}; _0x34d645.prototype.bonk = function() { this.dead || (this.setState(_0x34d645.STATE.BONK), this.moveSpeed = _0x34d645.BONK_IMP['x'], this.fallSpeed = _0x34d645.BONK_IMP['y'], this.dead = !0, this.play("sfx/kick.wav", 1, 0.04)); }; _0x34d645.prototype.playerCollide = function(_0x253aea) { this.dead || this.garbage || _0x253aea.damage(this); }; _0x34d645.prototype.playerStomp = function(_0x15fee9) { this.dead || this.garbage || (_0x15fee9.bounce(), this.play("sfx/stomp.wav", 1, 0.04), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 1))); }; _0x34d645.prototype.playerBump = function(_0x58e4a2) { this.playerCollide(_0x58e4a2); }; _0x34d645.prototype.kill = function() {}; _0x34d645.prototype.isTangible = _0x2b132.prototype.isTangible; _0x34d645.prototype.destroy = _0x2b132.prototype.destroy; _0x34d645.prototype.setState = function(_0x570365) { _0x570365 !== this.state && (this.state = _0x570365, 0 < _0x570365.SPRITE.length && (this.sprite = _0x570365.SPRITE[0]), this.anim = 0); }; _0x34d645.prototype.draw = function(_0x4ce88a) { var _0x12adae; _0x12adae = this.state === _0x34d645.STATE.BONK ? 3 : 0x0; _0x4ce88a.push({ 'pos': _0x4628a4.subtract(this.pos, _0x34d645.SOFFSET), 'reverse': !1, 'index': this.sprite.INDEX, 'mode': _0x12adae }); }; _0x34d645.prototype.play = _0x2b132.prototype.play; _0x2b132.REGISTER_OBJECT(_0x34d645); "use strict"; function _0xae11c9(_0x4acaa0, _0x3243e4, _0x19fca4, _0x38c3ed, _0x2558fa, _0xdb54) { _0x2b132.call(this, _0x4acaa0, _0x3243e4, _0x19fca4, _0x38c3ed); this.owner = _0xdb54; this.state = _0xae11c9.STATE.IDLE; this.sprite = this.state.SPRITE[0]; this.deadTimer = this.anim = 0; this.dim = _0x4628a4.make(0.5, 0.5); this.fallSpeed = -_0xae11c9.FALL_SPEED_MAX; this.dir = _0x2558fa; } _0xae11c9.ASYNC = !0; _0xae11c9['ID'] = 161; _0xae11c9.NAME = "FIREBALL PROJECTILE"; _0xae11c9.ANIMATION_RATE = 2; _0xae11c9.SOFFSET = _0x4628a4.make(-0.25, -0.25); _0xae11c9.DEAD_ANIM_LENGTH = 3; _0xae11c9.SPEED = 0.475; _0xae11c9.BOUNCE_SPEED = 0.425; _0xae11c9.FALL_SPEED_MAX = 0.525; _0xae11c9.FALL_SPEED_ACCEL = 0.075; _0xae11c9.SPRITE = {}; _0xae11c9.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': 208 }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': 209 }, { 'NAME': "IDLE2", 'ID': 2, 'INDEX': 210 }, { 'NAME': "IDLE3", 'ID': 3, 'INDEX': 211 }, { 'NAME': "DEAD0", 'ID': 4, 'INDEX': 212 }, { 'NAME': "DEAD1", 'ID': 5, 'INDEX': 213 }, { 'NAME': "DEAD2", 'ID': 6, 'INDEX': 214 }]; for (_0x4f3eec = 0; _0x4f3eec < _0xae11c9.SPRITE_LIST.length; _0x4f3eec++) _0xae11c9.SPRITE[_0xae11c9.SPRITE_LIST[_0x4f3eec].NAME] = _0xae11c9.SPRITE_LIST[_0x4f3eec], _0xae11c9.SPRITE[_0xae11c9.SPRITE_LIST[_0x4f3eec]['ID']] = _0xae11c9.SPRITE_LIST[_0x4f3eec]; _0xae11c9.STATE = {}; _0xae11c9.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0xae11c9.SPRITE.IDLE0, _0xae11c9.SPRITE.IDLE1, _0xae11c9.SPRITE.IDLE2, _0xae11c9.SPRITE.IDLE3] }, { 'NAME': "DEAD", 'ID': 80, 'SPRITE': [_0xae11c9.SPRITE.DEAD0, _0xae11c9.SPRITE.DEAD1, _0xae11c9.SPRITE.DEAD2] }]; for (_0x4f3eec = 0; _0x4f3eec < _0xae11c9.STATE_LIST.length; _0x4f3eec++) _0xae11c9.STATE[_0xae11c9.STATE_LIST[_0x4f3eec].NAME] = _0xae11c9.STATE_LIST[_0x4f3eec], _0xae11c9.STATE[_0xae11c9.STATE_LIST[_0x4f3eec]['ID']] = _0xae11c9.STATE_LIST[_0x4f3eec]; _0xae11c9.prototype.update = function(_0x584933) {}; _0xae11c9.prototype.step = function() { this.state === _0xae11c9.STATE.DEAD ? this.deadTimer < _0xae11c9.DEAD_ANIM_LENGTH ? this.sprite = this.state.SPRITE[this.deadTimer++] : this.destroy() : (this.anim++, this.sprite = this.state.SPRITE[parseInt(this.anim / _0xae11c9.ANIMATION_RATE) % this.state.SPRITE.length], this.control(), this.physics(), this.interaction(), 0 > this.pos['y'] && this.kill()); }; _0xae11c9.prototype.control = function() {}; _0xae11c9.prototype.physics = function() { var _0x2a0bfe = this.dir ? _0xae11c9.SPEED : -_0xae11c9.SPEED; this.fallSpeed = Math.max(this.fallSpeed - _0xae11c9.FALL_SPEED_ACCEL, -_0xae11c9.FALL_SPEED_MAX); for (var _0x5b9a3f = _0x4628a4.add(this.pos, _0x4628a4.make(_0x2a0bfe, this.fallSpeed)), _0x5186fe = _0x4628a4.make(this.pos['x'] + Math.min(0, _0x2a0bfe), this.pos['y'] + Math.min(0, this.fallSpeed)), _0x2a0bfe = _0x4628a4.make(this.dim['x'] + Math.max(0, _0x2a0bfe), this.dim['y'] + Math.max(0, this.fallSpeed)), _0x540315 = this.game.world.getZone(this.level, this.zone).getTiles(_0x5186fe, _0x2a0bfe), _0x5186fe = _0x4628a4.make(1, 0x1), _0x2a0bfe = [], _0x3056db = 0; _0x3056db < _0x540315.length; _0x3056db++) { var _0x531f4b = _0x540315[_0x3056db]; _0x531f4b.definition.COLLIDE && (_0x4c4bae.intersection(_0x531f4b.pos, _0x5186fe, _0x5b9a3f, this.dim) || _0x4c4bae.intersection(_0x531f4b.pos, _0x5186fe, this.pos, this.dim)) && _0x2a0bfe.push(_0x531f4b); } _0x540315 = _0x4628a4.make(_0x5b9a3f['x'], this.pos['y']); for (_0x3056db = 0; _0x3056db < _0x2a0bfe.length; _0x3056db++) _0x531f4b = _0x2a0bfe[_0x3056db], _0x4c4bae.intersection(_0x531f4b.pos, _0x5186fe, _0x540315, this.dim) && (_0x540315['x'] = _0x540315['x'] + 0.5 * this.dim['x'] < _0x531f4b.pos['x'] + 0.5 * _0x5186fe['x'] ? _0x531f4b.pos['x'] - this.dim['x'] : _0x531f4b.pos['x'] + _0x5186fe['x'], this.kill()); _0x5b9a3f['x'] = _0x540315['x']; for (_0x3056db = 0; _0x3056db < _0x2a0bfe.length; _0x3056db++) _0x531f4b = _0x2a0bfe[_0x3056db], _0x4c4bae.intersection(_0x531f4b.pos, _0x5186fe, _0x5b9a3f, this.dim) && (this.pos['y'] >= _0x5b9a3f['y'] ? (_0x5b9a3f['y'] = _0x531f4b.pos['y'] + _0x5186fe['y'], this.fallSpeed = _0xae11c9.BOUNCE_SPEED) : (_0x5b9a3f['y'] = _0x531f4b.pos['y'] - this.dim['y'], this.fallSpeed = -_0xae11c9.BOUNCE_SPEED)); this.pos = _0x5b9a3f; }; _0xae11c9.prototype.interaction = function() { for (var _0x16557a = 0; _0x16557a < this.game.objects.length; _0x16557a++) { var _0x2aac1a = this.game.objects[_0x16557a]; if (_0x2aac1a !== this && _0x2aac1a.pid !== this.owner && _0x2aac1a.isTangible() && !(_0x2aac1a instanceof _0x307949) && _0x2aac1a.damage && _0x2aac1a.level === this.level && _0x2aac1a.zone === this.zone && _0x4c4bae.intersection(_0x2aac1a.pos, _0x2aac1a.dim, this.pos, this.dim)) { this.owner === this.game.pid && _0x2aac1a.damage(this); this.kill(); break; } } }; _0xae11c9.prototype.playerCollide = function(_0x54be8a) {}; _0xae11c9.prototype.playerStomp = function(_0x8bb56b) {}; _0xae11c9.prototype.playerBump = function(_0x596cc1) {}; _0xae11c9.prototype.kill = function() { this.setState(_0xae11c9.STATE.DEAD); this.dead = !0; }; _0xae11c9.prototype.isTangible = _0x2b132.prototype.isTangible; _0xae11c9.prototype.destroy = _0x2b132.prototype.destroy; _0xae11c9.prototype.setState = function(_0x39a75f) { _0x39a75f !== this.state && (this.state = _0x39a75f, this.sprite = _0x39a75f.SPRITE[0], this.anim = 0); }; _0xae11c9.prototype.draw = function(_0x3a6b81) { _0x3a6b81.push({ 'pos': _0x4628a4.add(this.pos, _0xae11c9.SOFFSET), 'reverse': !1, 'index': this.sprite.INDEX, 'mode': 0 }); }; _0x2b132.REGISTER_OBJECT(_0xae11c9); "use strict"; function _0x494911(_0x12d9d5, _0x504bcb, _0x139e4e, _0x39acd0) { _0x2b132.call(this, _0x12d9d5, _0x504bcb, _0x139e4e, _0x39acd0); this.state = _0x494911.STATE.IDLE; this.sprite = this.state.SPRITE[0]; this.anim = 0; this.life = _0x494911.LIFE_MAX; this.deadTimer = 0; this.dim = _0x4628a4.make(1, 0.5); } _0x494911.ASYNC = !0; _0x494911['ID'] = 162; _0x494911.NAME = "FIRE BREATH PROJECTILE"; _0x494911.ANIMATION_RATE = 2; _0x494911.SOFFSET = _0x4628a4.make(-0.5, -0.25); _0x494911.LIFE_MAX = 175; _0x494911.DEAD_ANIM_LENGTH = 3; _0x494911.SPEED = 0.175; _0x494911.SPRITE = {}; _0x494911.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': [ [215, 0xd8] ] }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': [ [217, 0xda] ] }, { 'NAME': "DEAD0", 'ID': 4, 'INDEX': 212 }, { 'NAME': "DEAD1", 'ID': 5, 'INDEX': 213 }, { 'NAME': "DEAD2", 'ID': 6, 'INDEX': 214 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x494911.SPRITE_LIST.length; _0x4f3eec++) _0x494911.SPRITE[_0x494911.SPRITE_LIST[_0x4f3eec].NAME] = _0x494911.SPRITE_LIST[_0x4f3eec], _0x494911.SPRITE[_0x494911.SPRITE_LIST[_0x4f3eec]['ID']] = _0x494911.SPRITE_LIST[_0x4f3eec]; _0x494911.STATE = {}; _0x494911.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x494911.SPRITE.IDLE0, _0x494911.SPRITE.IDLE1] }, { 'NAME': "DEAD", 'ID': 80, 'SPRITE': [_0x494911.SPRITE.DEAD0, _0x494911.SPRITE.DEAD1, _0x494911.SPRITE.DEAD2] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x494911.STATE_LIST.length; _0x4f3eec++) _0x494911.STATE[_0x494911.STATE_LIST[_0x4f3eec].NAME] = _0x494911.STATE_LIST[_0x4f3eec], _0x494911.STATE[_0x494911.STATE_LIST[_0x4f3eec]['ID']] = _0x494911.STATE_LIST[_0x4f3eec]; _0x494911.prototype.update = function(_0x1fd983) {}; _0x494911.prototype.step = function() { this.state === _0x494911.STATE.DEAD ? this.deadTimer < _0x494911.DEAD_ANIM_LENGTH ? this.sprite = this.state.SPRITE[this.deadTimer++] : this.destroy() : (this.anim++, this.sprite = this.state.SPRITE[parseInt(this.anim / _0x494911.ANIMATION_RATE) % this.state.SPRITE.length], this.control(), this.physics(), this.interaction(), 1 > this.life-- && this.kill()); }; _0x494911.prototype.control = function() {}; _0x494911.prototype.physics = function() { this.pos = _0x4628a4.add(this.pos, _0x4628a4.make(-_0x494911.SPEED, 0)); }; _0x494911.prototype.interaction = function() { for (var _0x148792 = 0; _0x148792 < this.game.objects.length; _0x148792++) { var _0x4b7725 = this.game.objects[_0x148792]; if (_0x4b7725 instanceof _0x307949 && _0x4b7725.isTangible() && _0x4b7725.level === this.level && _0x4b7725.zone === this.zone && _0x4c4bae.intersection(_0x4b7725.pos, _0x4b7725.dim, this.pos, this.dim)) { _0x4b7725.pid === this.game.pid && _0x4b7725.damage(this); this.kill(); break; } } }; _0x494911.prototype.playerCollide = function(_0x406824) {}; _0x494911.prototype.playerStomp = function(_0x436ce9) {}; _0x494911.prototype.playerBump = function(_0x4e8b6b) {}; _0x494911.prototype.kill = function() { this.dead = !0; this.setState(_0x494911.STATE.DEAD); }; _0x494911.prototype.isTangible = _0x2b132.prototype.isTangible; _0x494911.prototype.destroy = _0x2b132.prototype.destroy; _0x494911.prototype.setState = function(_0x12c8c3) { _0x12c8c3 !== this.state && (this.state = _0x12c8c3, this.sprite = _0x12c8c3.SPRITE[0], this.anim = 0); }; _0x494911.prototype.draw = function(_0x46dfc3) { if (this.sprite.INDEX instanceof Array) for (var _0x23a0c8 = this.sprite.INDEX, _0x405d13 = 0; _0x405d13 < _0x23a0c8.length; _0x405d13++) for (var _0xaf48ab = 0; _0xaf48ab < _0x23a0c8[_0x405d13].length; _0xaf48ab++) _0x46dfc3.push({ 'pos': _0x4628a4.add(_0x4628a4.add(this.pos, _0x494911.SOFFSET), _0x4628a4.make(_0xaf48ab, _0x405d13)), 'reverse': !1, 'index': _0x23a0c8[_0x405d13][_0xaf48ab] }); else _0x46dfc3.push({ 'pos': _0x4628a4.add(this.pos, _0x494911.SOFFSET), 'reverse': !1, 'index': this.sprite.INDEX, 'mode': 0 }); }; _0x2b132.REGISTER_OBJECT(_0x494911); "use strict"; function _0xde7ae5(_0x1127d4, _0xab1245, _0x9c54a9, _0x6aed4f, _0x1efdf6) { _0x2b132.call(this, _0x1127d4, _0xab1245, _0x9c54a9, _0x6aed4f); this.owner = _0x1efdf6; this.setState(_0xde7ae5.STATE.IDLE); this.anim = 0; this.throwTimer = _0xde7ae5.THROW_DELAY; this.dir = !1; this.dim = _0x4628a4.make(0.5, 0.5); } _0xde7ae5.ASYNC = !0; _0xde7ae5['ID'] = 163; _0xde7ae5.NAME = "HAMMER PROJECTILE"; _0xde7ae5.ANIMATION_RATE = 2; _0xde7ae5.SOFFSET = _0x4628a4.make(-0.25, -0.25); _0xde7ae5.THROW_DELAY = 13; _0xde7ae5.IMPULSE = _0x4628a4.make(0.48, 0.915); _0xde7ae5.DRAG = 0.965; _0xde7ae5.FALL_SPEED_MAX = 0.65; _0xde7ae5.FALL_SPEED_ACCEL = 0.095; _0xde7ae5.SPRITE = {}; _0xde7ae5.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': 221 }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': 220 }, { 'NAME': "IDLE2", 'ID': 2, 'INDEX': 223 }, { 'NAME': "IDLE3", 'ID': 3, 'INDEX': 222 }]; for (_0x4f3eec = 0; _0x4f3eec < _0xde7ae5.SPRITE_LIST.length; _0x4f3eec++) _0xde7ae5.SPRITE[_0xde7ae5.SPRITE_LIST[_0x4f3eec].NAME] = _0xde7ae5.SPRITE_LIST[_0x4f3eec], _0xde7ae5.SPRITE[_0xde7ae5.SPRITE_LIST[_0x4f3eec]['ID']] = _0xde7ae5.SPRITE_LIST[_0x4f3eec]; _0xde7ae5.STATE = {}; _0xde7ae5.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0xde7ae5.SPRITE.IDLE0] }, { 'NAME': "THROW", 'ID': 1, 'SPRITE': [_0xde7ae5.SPRITE.IDLE0, _0xde7ae5.SPRITE.IDLE1, _0xde7ae5.SPRITE.IDLE2, _0xde7ae5.SPRITE.IDLE3] }]; for (_0x4f3eec = 0; _0x4f3eec < _0xde7ae5.STATE_LIST.length; _0x4f3eec++) _0xde7ae5.STATE[_0xde7ae5.STATE_LIST[_0x4f3eec].NAME] = _0xde7ae5.STATE_LIST[_0x4f3eec], _0xde7ae5.STATE[_0xde7ae5.STATE_LIST[_0x4f3eec]['ID']] = _0xde7ae5.STATE_LIST[_0x4f3eec]; _0xde7ae5.prototype.update = function(_0x5745df) {}; _0xde7ae5.prototype.step = function() { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0xde7ae5.ANIMATION_RATE) % this.state.SPRITE.length]; 0 < this.throwTimer ? this.throwTimer-- : (this.state === _0xde7ae5.STATE.IDLE && this.throw(), this.physics(), this.interaction(), 0 > this.pos['y'] && this.destroy()); }; _0xde7ae5.prototype.physics = function() { this.moveSpeed *= _0xde7ae5.DRAG; this.fallSpeed = Math.max(this.fallSpeed - _0xde7ae5.FALL_SPEED_ACCEL, -_0xde7ae5.FALL_SPEED_MAX); this.pos = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)); }; _0xde7ae5.prototype.interaction = function() { if (this.state === _0xde7ae5.STATE.THROW) { var _0x8a4216 = this.game.getPlayer(); _0x8a4216 && _0x8a4216.isTangible() && _0x8a4216.level === this.level && _0x8a4216.zone === this.zone && _0x4c4bae.intersection(_0x8a4216.pos, _0x8a4216.dim, this.pos, this.dim) && _0x8a4216.damage(this); } }; _0xde7ae5.prototype.throw = function() { this.moveSpeed = this.dir ? _0xde7ae5.IMPULSE['x'] : -_0xde7ae5.IMPULSE['x']; this.fallSpeed = _0xde7ae5.IMPULSE['y']; this.setState(_0xde7ae5.STATE.THROW); }; _0xde7ae5.prototype.playerCollide = function(_0x5ce6ce) {}; _0xde7ae5.prototype.playerStomp = function(_0x181336) {}; _0xde7ae5.prototype.playerBump = function(_0x23c51a) {}; _0xde7ae5.prototype.kill = function() {}; _0xde7ae5.prototype.destroy = _0x2b132.prototype.destroy; _0xde7ae5.prototype.isTangible = _0x2b132.prototype.isTangible; _0xde7ae5.prototype.setState = function(_0x1289d8) { _0x1289d8 !== this.state && (this.state = _0x1289d8, this.sprite = _0x1289d8.SPRITE[0], this.anim = 0); }; _0xde7ae5.prototype.draw = function(_0x42ff8f) { if (this.sprite.INDEX instanceof Array) for (var _0x352199 = this.sprite.INDEX, _0x2c5891 = 0; _0x2c5891 < _0x352199.length; _0x2c5891++) for (var _0x3cbbc7 = 0; _0x3cbbc7 < _0x352199[_0x2c5891].length; _0x3cbbc7++) _0x42ff8f.push({ 'pos': _0x4628a4.add(_0x4628a4.add(this.pos, _0xde7ae5.SOFFSET), _0x4628a4.make(_0x3cbbc7, _0x2c5891)), 'reverse': !1, 'index': _0x352199[_0x2c5891][_0x3cbbc7] }); else _0x42ff8f.push({ 'pos': _0x4628a4.add(this.pos, _0xde7ae5.SOFFSET), 'reverse': this.dir, 'index': this.sprite.INDEX, 'mode': 0 }); }; _0x2b132.REGISTER_OBJECT(_0xde7ae5); "use strict"; function _0x32e92f(_0x24c556, _0x47bde3, _0x102424, _0x4c6de6, _0x598b87) { _0x2b132.call(this, _0x24c556, _0x47bde3, _0x102424, _0x4c6de6); this.oid = _0x598b87; this.anim = 0; this.dim = _0x4628a4.make(1, 0x1); this.fallSpeed = this.moveSpeed = 0; this.rise = this.grounded = !1; _0x24c556 = _0x4628a4.make(1, 0x1); _0x47bde3 = this.game.world.getZone(this.level, this.zone).getTiles(this.pos, this.dim); for (_0x102424 = 0; _0x102424 < _0x47bde3.length; _0x102424++) if (_0x4c4bae.intersection(_0x47bde3[_0x102424].pos, _0x24c556, this.pos, this.dim)) { this.rise = !0; break; } this.dir = !1; this.jump = -1; } _0x32e92f.ASYNC = !0; _0x32e92f['ID'] = 80; _0x32e92f.ANIMATION_RATE = 3; _0x32e92f.MOVE_SPEED_MAX = 0.075; _0x32e92f.FALL_SPEED_MAX = 0.45; _0x32e92f.FALL_SPEED_ACCEL = 0.075; _0x32e92f.JUMP_DECEL = 0.015; _0x32e92f.JUMP_LENGTH = 3; _0x32e92f.RISE_RATE = 0.15; _0x32e92f.prototype.update = function(_0x53c0cb) { switch (_0x53c0cb) { case 0: this.kill(); } }; _0x32e92f.prototype.step = function() { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0x32e92f.ANIMATION_RATE) % this.state.SPRITE.length]; this.control(); this.physics(); 0 > this.pos['y'] && this.kill(); }; _0x32e92f.prototype.control = function() { this.jump >= _0x32e92f.JUMP_LENGTH && (this.jump = -1); }; _0x32e92f.prototype.physics = function() { if (this.rise) { this.rise = !1; for (var _0x451d23 = _0x4628a4.make(1, 0x1), _0x5a4bfe = this.game.world.getZone(this.level, this.zone).getTiles(this.pos, this.dim), _0x165e89 = 0; _0x165e89 < _0x5a4bfe.length; _0x165e89++) { var _0x33ba28 = _0x5a4bfe[_0x165e89]; if (_0x33ba28.definition.COLLIDE && _0x4c4bae.intersection(_0x33ba28.pos, _0x451d23, this.pos, this.dim)) { this.rise = !0; break; } } this.rise && (this.pos['y'] += _0x32e92f.RISE_RATE); } else { -1 !== this.jump ? (this.fallSpeed = _0x32e92f.FALL_SPEED_MAX - this.jump * _0x32e92f.JUMP_DECEL, this.jump++) : (this.grounded && (this.fallSpeed = 0), this.fallSpeed = Math.max(this.fallSpeed - _0x32e92f.FALL_SPEED_ACCEL, -_0x32e92f.FALL_SPEED_MAX)); var _0x4a7264 = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, 0)), _0x3f6d1f = _0x4628a4.add(this.pos, _0x4628a4.make(this.moveSpeed, this.fallSpeed)), _0x451d23 = _0x4628a4.make(0 <= this.moveSpeed ? this.pos['x'] : this.pos['x'] + this.moveSpeed, 0 >= this.fallSpeed ? this.pos['y'] : this.pos['y'] + this.fallSpeed), _0x5a4bfe = _0x4628a4.make(this.dim['y'] + Math.abs(this.moveSpeed), this.dim['y'] + Math.abs(this.fallSpeed)), _0x5a4bfe = this.game.world.getZone(this.level, this.zone).getTiles(_0x451d23, _0x5a4bfe), _0x451d23 = _0x4628a4.make(1, 0x1), _0x4d27fb = !1; this.grounded = !1; for (_0x165e89 = 0; _0x165e89 < _0x5a4bfe.length; _0x165e89++) _0x33ba28 = _0x5a4bfe[_0x165e89], _0x33ba28.definition.COLLIDE && _0x4c4bae.intersection(_0x33ba28.pos, _0x451d23, _0x4a7264, this.dim) && (this.pos['x'] <= _0x4a7264['x'] && _0x4a7264['x'] + this.dim['x'] > _0x33ba28.pos['x'] ? (_0x4a7264['x'] = _0x33ba28.pos['x'] - this.dim['x'], _0x3f6d1f['x'] = _0x4a7264['x'], this.moveSpeed = 0, _0x4d27fb = !0) : this.pos['x'] >= _0x4a7264['x'] && _0x4a7264['x'] < _0x33ba28.pos['x'] + _0x451d23['x'] && (_0x4a7264['x'] = _0x33ba28.pos['x'] + _0x451d23['x'], _0x3f6d1f['x'] = _0x4a7264['x'], this.moveSpeed = 0, _0x4d27fb = !0)); for (_0x165e89 = 0; _0x165e89 < _0x5a4bfe.length; _0x165e89++) _0x33ba28 = _0x5a4bfe[_0x165e89], _0x33ba28.definition.COLLIDE && _0x4c4bae.intersection(_0x33ba28.pos, _0x451d23, _0x3f6d1f, this.dim) && (this.pos['y'] >= _0x3f6d1f['y'] && _0x3f6d1f['y'] < _0x33ba28.pos['y'] + _0x451d23['y'] ? (_0x3f6d1f['y'] = _0x33ba28.pos['y'] + _0x451d23['y'], this.grounded = !0) : this.pos['y'] <= _0x3f6d1f['y'] && _0x3f6d1f['y'] + this.dim['y'] > _0x33ba28.pos['y'] && (_0x3f6d1f['y'] = _0x33ba28.pos['y'] - this.dim['y'], this.jumping = -1, this.fallSpeed = 0)); this.pos = _0x4628a4.make(_0x4a7264['x'], _0x3f6d1f['y']); _0x4d27fb && (this.dir = !this.dir); } }; _0x32e92f.prototype.bounce = function() { this.grounded && (this.dir = !this.dir); this.jump = 0; }; _0x32e92f.prototype.playerCollide = function(_0x3e222e) { this.dead || this.garbage || (_0x3e222e.powerup(this), this.kill(), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 0))); }; _0x32e92f.prototype.playerStomp = function(_0x46a170) { this.playerCollide(_0x46a170); }; _0x32e92f.prototype.playerBump = function(_0x390045) { this.playerCollide(_0x390045); }; _0x32e92f.prototype.kill = function() { this.dead = !0; this.destroy(); }; _0x32e92f.prototype.destroy = _0x2b132.prototype.destroy; _0x32e92f.prototype.isTangible = _0x2b132.prototype.isTangible; _0x32e92f.prototype.setState = function(_0x21221c) { _0x21221c !== this.state && (this.state = _0x21221c, this.sprite = _0x21221c.SPRITE[0], this.anim = 0); }; _0x32e92f.prototype.draw = function(_0x169745) { _0x169745.push({ 'pos': this.pos, 'reverse': this.reverse, 'index': this.sprite.INDEX, 'mode': 0 }); }; "use strict"; function _0x1461d8(_0x498f07, _0x8f312, _0x3662c8, _0x2b2eea, _0x506039) { _0x32e92f.call(this, _0x498f07, _0x8f312, _0x3662c8, _0x2b2eea, _0x506039); this.state = _0x1461d8.STATE.IDLE; this.sprite = this.state.SPRITE[0]; } _0x1461d8.ASYNC = !1; _0x1461d8['ID'] = 81; _0x1461d8.NAME = "MUSHROOM"; _0x1461d8.SPRITE = {}; _0x1461d8.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 233 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x1461d8.SPRITE_LIST.length; _0x4f3eec++) _0x1461d8.SPRITE[_0x1461d8.SPRITE_LIST[_0x4f3eec].NAME] = _0x1461d8.SPRITE_LIST[_0x4f3eec], _0x1461d8.SPRITE[_0x1461d8.SPRITE_LIST[_0x4f3eec]['ID']] = _0x1461d8.SPRITE_LIST[_0x4f3eec]; _0x1461d8.STATE = {}; _0x1461d8.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x1461d8.SPRITE.IDLE] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x1461d8.STATE_LIST.length; _0x4f3eec++) _0x1461d8.STATE[_0x1461d8.STATE_LIST[_0x4f3eec].NAME] = _0x1461d8.STATE_LIST[_0x4f3eec], _0x1461d8.STATE[_0x1461d8.STATE_LIST[_0x4f3eec]['ID']] = _0x1461d8.STATE_LIST[_0x4f3eec]; _0x1461d8.prototype.update = _0x32e92f.prototype.update; _0x1461d8.prototype.step = _0x32e92f.prototype.step; _0x1461d8.prototype.control = function() { _0x32e92f.prototype.control.call(this); this.moveSpeed = this.dir ? -_0x32e92f.MOVE_SPEED_MAX : _0x32e92f.MOVE_SPEED_MAX; }; _0x1461d8.prototype.physics = _0x32e92f.prototype.physics; _0x1461d8.prototype.bounce = _0x32e92f.prototype.bounce; _0x1461d8.prototype.playerCollide = _0x32e92f.prototype.playerCollide; _0x1461d8.prototype.playerStomp = _0x32e92f.prototype.playerStomp; _0x1461d8.prototype.playerBump = _0x32e92f.prototype.playerBump; _0x1461d8.prototype.kill = _0x32e92f.prototype.kill; _0x1461d8.prototype.destroy = _0x2b132.prototype.destroy; _0x1461d8.prototype.isTangible = _0x2b132.prototype.isTangible; _0x1461d8.prototype.setState = _0x32e92f.prototype.setState; _0x1461d8.prototype.draw = _0x32e92f.prototype.draw; _0x2b132.REGISTER_OBJECT(_0x1461d8); "use strict"; function _0x5b7df1(_0x1c4b69, _0x3b1b6b, _0x344167, _0xd55f34, _0x5a3dab) { _0x32e92f.call(this, _0x1c4b69, _0x3b1b6b, _0x344167, _0xd55f34, _0x5a3dab); this.state = _0x5b7df1.STATE.IDLE; this.sprite = this.state.SPRITE[0]; } _0x5b7df1.ASYNC = !1; _0x5b7df1['ID'] = 82; _0x5b7df1.NAME = "FIRE FLOWER"; _0x5b7df1.SPRITE = {}; _0x5b7df1.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': 228 }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': 229 }, { 'NAME': "IDLE2", 'ID': 2, 'INDEX': 230 }, { 'NAME': "IDLE3", 'ID': 3, 'INDEX': 231 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x5b7df1.SPRITE_LIST.length; _0x4f3eec++) _0x5b7df1.SPRITE[_0x5b7df1.SPRITE_LIST[_0x4f3eec].NAME] = _0x5b7df1.SPRITE_LIST[_0x4f3eec], _0x5b7df1.SPRITE[_0x5b7df1.SPRITE_LIST[_0x4f3eec]['ID']] = _0x5b7df1.SPRITE_LIST[_0x4f3eec]; _0x5b7df1.STATE = {}; _0x5b7df1.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x5b7df1.SPRITE.IDLE0, _0x5b7df1.SPRITE.IDLE1, _0x5b7df1.SPRITE.IDLE2, _0x5b7df1.SPRITE.IDLE3] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x5b7df1.STATE_LIST.length; _0x4f3eec++) _0x5b7df1.STATE[_0x5b7df1.STATE_LIST[_0x4f3eec].NAME] = _0x5b7df1.STATE_LIST[_0x4f3eec], _0x5b7df1.STATE[_0x5b7df1.STATE_LIST[_0x4f3eec]['ID']] = _0x5b7df1.STATE_LIST[_0x4f3eec]; _0x5b7df1.prototype.update = _0x32e92f.prototype.update; _0x5b7df1.prototype.step = _0x32e92f.prototype.step; _0x5b7df1.prototype.control = function() {}; _0x5b7df1.prototype.physics = _0x32e92f.prototype.physics; _0x5b7df1.prototype.playerCollide = _0x32e92f.prototype.playerCollide; _0x5b7df1.prototype.playerStomp = _0x32e92f.prototype.playerStomp; _0x5b7df1.prototype.playerBump = _0x32e92f.prototype.playerBump; _0x5b7df1.prototype.kill = _0x32e92f.prototype.kill; _0x5b7df1.prototype.destroy = _0x2b132.prototype.destroy; _0x5b7df1.prototype.isTangible = _0x2b132.prototype.isTangible; _0x5b7df1.prototype.setState = _0x32e92f.prototype.setState; _0x5b7df1.prototype.draw = _0x32e92f.prototype.draw; _0x2b132.REGISTER_OBJECT(_0x5b7df1); "use strict"; function _0x34438c(_0x203b8b, _0x183a74, _0x18935a, _0x130a95, _0x226095) { _0x32e92f.call(this, _0x203b8b, _0x183a74, _0x18935a, _0x130a95, _0x226095); this.state = _0x34438c.STATE.IDLE; this.sprite = this.state.SPRITE[0]; this.groundTimer = 0; } _0x34438c.ASYNC = !1; _0x34438c['ID'] = 84; _0x34438c.NAME = "STAR"; _0x34438c.JUMP_LENGTH = 6; _0x34438c.MOVE_SPEED_MAX = 0.125; _0x34438c.JUMP_DELAY = 2; _0x34438c.SPRITE = {}; _0x34438c.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': 224 }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': 225 }, { 'NAME': "IDLE2", 'ID': 2, 'INDEX': 226 }, { 'NAME': "IDLE3", 'ID': 3, 'INDEX': 227 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x34438c.SPRITE_LIST.length; _0x4f3eec++) _0x34438c.SPRITE[_0x34438c.SPRITE_LIST[_0x4f3eec].NAME] = _0x34438c.SPRITE_LIST[_0x4f3eec], _0x34438c.SPRITE[_0x34438c.SPRITE_LIST[_0x4f3eec]['ID']] = _0x34438c.SPRITE_LIST[_0x4f3eec]; _0x34438c.STATE = {}; _0x34438c.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x34438c.SPRITE.IDLE0, _0x34438c.SPRITE.IDLE1, _0x34438c.SPRITE.IDLE2, _0x34438c.SPRITE.IDLE3] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x34438c.STATE_LIST.length; _0x4f3eec++) _0x34438c.STATE[_0x34438c.STATE_LIST[_0x4f3eec].NAME] = _0x34438c.STATE_LIST[_0x4f3eec], _0x34438c.STATE[_0x34438c.STATE_LIST[_0x4f3eec]['ID']] = _0x34438c.STATE_LIST[_0x4f3eec]; _0x34438c.prototype.update = _0x32e92f.prototype.update; _0x34438c.prototype.step = _0x32e92f.prototype.step; _0x34438c.prototype.control = function() { this.moveSpeed = this.dir ? -_0x34438c.MOVE_SPEED_MAX : _0x34438c.MOVE_SPEED_MAX; this.grounded && ++this.groundTimer >= _0x34438c.JUMP_DELAY ? this.jump = 0 : this.jump > _0x34438c.JUMP_LENGTH && (this.jump = -1, this.groundTimer = 0); }; _0x34438c.prototype.physics = _0x32e92f.prototype.physics; _0x34438c.prototype.bounce = _0x32e92f.prototype.bounce; _0x34438c.prototype.playerCollide = _0x32e92f.prototype.playerCollide; _0x34438c.prototype.playerStomp = _0x32e92f.prototype.playerStomp; _0x34438c.prototype.playerBump = _0x32e92f.prototype.playerBump; _0x34438c.prototype.kill = _0x32e92f.prototype.kill; _0x34438c.prototype.destroy = _0x2b132.prototype.destroy; _0x34438c.prototype.isTangible = _0x2b132.prototype.isTangible; _0x34438c.prototype.setState = _0x32e92f.prototype.setState; _0x34438c.prototype.draw = _0x32e92f.prototype.draw; _0x2b132.REGISTER_OBJECT(_0x34438c); "use strict"; function _0x4786c4(_0x2f53f0, _0x5bf0ed, _0x406c8d, _0xfe8e35, _0x5db64b) { _0x32e92f.call(this, _0x2f53f0, _0x5bf0ed, _0x406c8d, _0xfe8e35, _0x5db64b); this.state = _0x4786c4.STATE.IDLE; this.sprite = this.state.SPRITE[0]; } _0x4786c4.ASYNC = !1; _0x4786c4['ID'] = 83; _0x4786c4.NAME = "ONEUP"; _0x4786c4.SPRITE = {}; _0x4786c4.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 232 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x4786c4.SPRITE_LIST.length; _0x4f3eec++) _0x4786c4.SPRITE[_0x4786c4.SPRITE_LIST[_0x4f3eec].NAME] = _0x4786c4.SPRITE_LIST[_0x4f3eec], _0x4786c4.SPRITE[_0x4786c4.SPRITE_LIST[_0x4f3eec]['ID']] = _0x4786c4.SPRITE_LIST[_0x4f3eec]; _0x4786c4.STATE = {}; _0x4786c4.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x4786c4.SPRITE.IDLE] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x4786c4.STATE_LIST.length; _0x4f3eec++) _0x4786c4.STATE[_0x4786c4.STATE_LIST[_0x4f3eec].NAME] = _0x4786c4.STATE_LIST[_0x4f3eec], _0x4786c4.STATE[_0x4786c4.STATE_LIST[_0x4f3eec]['ID']] = _0x4786c4.STATE_LIST[_0x4f3eec]; _0x4786c4.prototype.update = _0x32e92f.prototype.update; _0x4786c4.prototype.step = _0x32e92f.prototype.step; _0x4786c4.prototype.control = function() { _0x32e92f.prototype.control.call(this); this.moveSpeed = this.dir ? -_0x32e92f.MOVE_SPEED_MAX : _0x32e92f.MOVE_SPEED_MAX; }; _0x4786c4.prototype.physics = _0x32e92f.prototype.physics; _0x4786c4.prototype.bounce = _0x32e92f.prototype.bounce; _0x4786c4.prototype.playerCollide = _0x32e92f.prototype.playerCollide; _0x4786c4.prototype.playerStomp = _0x32e92f.prototype.playerStomp; _0x4786c4.prototype.playerBump = _0x32e92f.prototype.playerBump; _0x4786c4.prototype.kill = _0x32e92f.prototype.kill; _0x4786c4.prototype.destroy = _0x2b132.prototype.destroy; _0x4786c4.prototype.isTangible = _0x2b132.prototype.isTangible; _0x4786c4.prototype.setState = _0x32e92f.prototype.setState; _0x4786c4.prototype.draw = _0x32e92f.prototype.draw; _0x2b132.REGISTER_OBJECT(_0x4786c4); "use strict"; function _0x95234(_0x58699c, _0x15e055, _0x562a1b, _0x15c08c, _0x4fab92) { _0x32e92f.call(this, _0x58699c, _0x15e055, _0x562a1b, _0x15c08c, _0x4fab92); this.state = _0x95234.STATE.IDLE; this.sprite = this.state.SPRITE[0]; this.used = !1; this.dim = _0x4628a4.make(1, 0x3); } _0x95234.ASYNC = !0; _0x95234['ID'] = 85; _0x95234.NAME = "AXE"; _0x95234.SPRITE = {}; _0x95234.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': 236 }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': 237 }, { 'NAME': "IDLE2", 'ID': 2, 'INDEX': 238 }, { 'NAME': "IDLE3", 'ID': 3, 'INDEX': 239 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x95234.SPRITE_LIST.length; _0x4f3eec++) _0x95234.SPRITE[_0x95234.SPRITE_LIST[_0x4f3eec].NAME] = _0x95234.SPRITE_LIST[_0x4f3eec], _0x95234.SPRITE[_0x95234.SPRITE_LIST[_0x4f3eec]['ID']] = _0x95234.SPRITE_LIST[_0x4f3eec]; _0x95234.STATE = {}; _0x95234.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x95234.SPRITE.IDLE0, _0x95234.SPRITE.IDLE1, _0x95234.SPRITE.IDLE2, _0x95234.SPRITE.IDLE3] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x95234.STATE_LIST.length; _0x4f3eec++) _0x95234.STATE[_0x95234.STATE_LIST[_0x4f3eec].NAME] = _0x95234.STATE_LIST[_0x4f3eec], _0x95234.STATE[_0x95234.STATE_LIST[_0x4f3eec]['ID']] = _0x95234.STATE_LIST[_0x4f3eec]; _0x95234.prototype.update = function(_0x102756) {}; _0x95234.prototype.step = _0x32e92f.prototype.step; _0x95234.prototype.control = function() {}; _0x95234.prototype.physics = _0x32e92f.prototype.physics; _0x95234.prototype.playerCollide = function(_0x43b1f1) { if (!(this.dead || this.garbage || this.used)) for (_0x43b1f1.powerup(this), this.used = !0, _0x43b1f1 = 0; _0x43b1f1 < this.game.objects.length; _0x43b1f1++) { var _0x1296be = this.game.objects[_0x43b1f1]; if (_0x1296be instanceof _0x47b80a && _0x1296be.level === this.level && _0x1296be.zone === _0x1296be.zone && !_0x1296be.dead) { _0x1296be.bonk(); break; } } }; _0x95234.prototype.playerStomp = _0x32e92f.prototype.playerStomp; _0x95234.prototype.playerBump = _0x32e92f.prototype.playerBump; _0x95234.prototype.kill = _0x32e92f.prototype.kill; _0x95234.prototype.isTangible = _0x2b132.prototype.isTangible; _0x95234.prototype.destroy = _0x2b132.prototype.destroy; _0x95234.prototype.setState = _0x32e92f.prototype.setState; _0x95234.prototype.draw = _0x32e92f.prototype.draw; _0x2b132.REGISTER_OBJECT(_0x95234); "use strict"; function _0x2aa8a6(_0x5ea5de, _0x3cdc3d, _0x300945, _0x416a27, _0x5db90f) { _0x32e92f.call(this, _0x5ea5de, _0x3cdc3d, _0x300945, _0x416a27, _0x5db90f); this.state = _0x2aa8a6.STATE.IDLE; this.sprite = this.state.SPRITE[0]; } _0x2aa8a6.ASYNC = !1; _0x2aa8a6['ID'] = 86; _0x2aa8a6.NAME = "POISON MUSHROOM"; _0x2aa8a6.SPRITE = {}; _0x2aa8a6.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 234 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x2aa8a6.SPRITE_LIST.length; _0x4f3eec++) _0x2aa8a6.SPRITE[_0x2aa8a6.SPRITE_LIST[_0x4f3eec].NAME] = _0x2aa8a6.SPRITE_LIST[_0x4f3eec], _0x2aa8a6.SPRITE[_0x2aa8a6.SPRITE_LIST[_0x4f3eec]['ID']] = _0x2aa8a6.SPRITE_LIST[_0x4f3eec]; _0x2aa8a6.STATE = {}; _0x2aa8a6.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x2aa8a6.SPRITE.IDLE] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x2aa8a6.STATE_LIST.length; _0x4f3eec++) _0x2aa8a6.STATE[_0x2aa8a6.STATE_LIST[_0x4f3eec].NAME] = _0x2aa8a6.STATE_LIST[_0x4f3eec], _0x2aa8a6.STATE[_0x2aa8a6.STATE_LIST[_0x4f3eec]['ID']] = _0x2aa8a6.STATE_LIST[_0x4f3eec]; _0x2aa8a6.prototype.update = _0x32e92f.prototype.update; _0x2aa8a6.prototype.step = _0x32e92f.prototype.step; _0x2aa8a6.prototype.control = function() { _0x32e92f.prototype.control.call(this); this.moveSpeed = this.dir ? -_0x32e92f.MOVE_SPEED_MAX : _0x32e92f.MOVE_SPEED_MAX; }; _0x2aa8a6.prototype.physics = _0x32e92f.prototype.physics; _0x2aa8a6.prototype.bounce = _0x32e92f.prototype.bounce; _0x2aa8a6.prototype.playerCollide = _0x32e92f.prototype.playerCollide; _0x2aa8a6.prototype.playerStomp = _0x32e92f.prototype.playerStomp; _0x2aa8a6.prototype.playerBump = _0x32e92f.prototype.playerBump; _0x2aa8a6.prototype.kill = _0x32e92f.prototype.kill; _0x2aa8a6.prototype.destroy = _0x2b132.prototype.destroy; _0x2aa8a6.prototype.isTangible = _0x2b132.prototype.isTangible; _0x2aa8a6.prototype.setState = _0x32e92f.prototype.setState; _0x2aa8a6.prototype.draw = _0x32e92f.prototype.draw; _0x2b132.REGISTER_OBJECT(_0x2aa8a6); "use strict"; function _0x43220d(_0x45f8ec, _0x474ef3, _0x4323b8, _0x1f325e, _0x2e7a84) { _0x2b132.call(this, _0x45f8ec, _0x474ef3, _0x4323b8, _0x1f325e); this.oid = _0x2e7a84; this.state = _0x43220d.STATE.IDLE; this.sprite = this.state.SPRITE[0]; this.anim = 0; this.dim = _0x4628a4.make(1, 0x1); } _0x43220d.ASYNC = !1; _0x43220d['ID'] = 97; _0x43220d.NAME = "COIN"; _0x43220d.ANIMATION_RATE = 5; _0x43220d.SPRITE = {}; _0x43220d.SPRITE_LIST = [{ 'NAME': "IDLE0", 'ID': 0, 'INDEX': 240 }, { 'NAME': "IDLE1", 'ID': 1, 'INDEX': 241 }, { 'NAME': "IDLE2", 'ID': 2, 'INDEX': 242 }, { 'NAME': "IDLE3", 'ID': 3, 'INDEX': 241 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x43220d.SPRITE_LIST.length; _0x4f3eec++) _0x43220d.SPRITE[_0x43220d.SPRITE_LIST[_0x4f3eec].NAME] = _0x43220d.SPRITE_LIST[_0x4f3eec], _0x43220d.SPRITE[_0x43220d.SPRITE_LIST[_0x4f3eec]['ID']] = _0x43220d.SPRITE_LIST[_0x4f3eec]; _0x43220d.STATE = {}; _0x43220d.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x43220d.SPRITE.IDLE0, _0x43220d.SPRITE.IDLE1, _0x43220d.SPRITE.IDLE2, _0x43220d.SPRITE.IDLE3] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x43220d.STATE_LIST.length; _0x4f3eec++) _0x43220d.STATE[_0x43220d.STATE_LIST[_0x4f3eec].NAME] = _0x43220d.STATE_LIST[_0x4f3eec], _0x43220d.STATE[_0x43220d.STATE_LIST[_0x4f3eec]['ID']] = _0x43220d.STATE_LIST[_0x4f3eec]; _0x43220d.prototype.update = function(_0xf474c5) { switch (_0xf474c5) { case 0: this.kill(); } }; _0x43220d.prototype.step = function() { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0x43220d.ANIMATION_RATE) % this.state.SPRITE.length]; }; _0x43220d.prototype.playerCollide = function(_0xd7d4c9) { this.dead || this.garbage || (_0xd7d4c9.powerup(this), this.kill(), this.game.out.push(_0x217d86.encode(this.level, this.zone, this.oid, 0))); }; _0x43220d.prototype.playerStomp = function(_0x27e3e5) { this.playerCollide(_0x27e3e5); }; _0x43220d.prototype.playerBump = function(_0x352b9a) { this.playerCollide(_0x352b9a); }; _0x43220d.prototype.kill = function() { this.dead = !0; this.destroy(); }; _0x43220d.prototype.isTangible = _0x2b132.prototype.isTangible; _0x43220d.prototype.destroy = _0x2b132.prototype.destroy; _0x43220d.prototype.setState = function(_0x781f05) { _0x781f05 !== this.state && (this.state = _0x781f05, this.sprite = _0x781f05.SPRITE[0], this.anim = 0); }; _0x43220d.prototype.draw = function(_0x483caa) { _0x483caa.push({ 'pos': this.pos, 'reverse': this.reverse, 'index': this.sprite.INDEX, 'mode': 0 }); }; _0x2b132.REGISTER_OBJECT(_0x43220d); "use strict"; function _0x438bb6(_0x1b686c, _0x5efa39, _0x3d98b2, _0x144ddb, _0x2c2db4) { _0x2b132.call(this, _0x1b686c, _0x5efa39, _0x3d98b2, _0x144ddb); this.oid = _0x2c2db4; this.setState(_0x438bb6.STATE.IDLE); this.anim = 0; } _0x438bb6.ASYNC = !0; _0x438bb6['ID'] = 254; _0x438bb6.NAME = "CHECKMARK"; _0x438bb6.ANIMATION_RATE = 3; _0x438bb6.SPRITE = {}; _0x438bb6.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 254 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x438bb6.SPRITE_LIST.length; _0x4f3eec++) _0x438bb6.SPRITE[_0x438bb6.SPRITE_LIST[_0x4f3eec].NAME] = _0x438bb6.SPRITE_LIST[_0x4f3eec], _0x438bb6.SPRITE[_0x438bb6.SPRITE_LIST[_0x4f3eec]['ID']] = _0x438bb6.SPRITE_LIST[_0x4f3eec]; _0x438bb6.STATE = {}; _0x438bb6.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x438bb6.SPRITE.IDLE] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x438bb6.STATE_LIST.length; _0x4f3eec++) _0x438bb6.STATE[_0x438bb6.STATE_LIST[_0x4f3eec].NAME] = _0x438bb6.STATE_LIST[_0x4f3eec], _0x438bb6.STATE[_0x438bb6.STATE_LIST[_0x4f3eec]['ID']] = _0x438bb6.STATE_LIST[_0x4f3eec]; _0x438bb6.prototype.update = function(_0xaee113) {}; _0x438bb6.prototype.step = function() { this.anim++; this.sprite = this.state.SPRITE[parseInt(this.anim / _0x438bb6.ANIMATION_RATE) % this.state.SPRITE.length]; }; _0x438bb6.prototype.kill = function() {}; _0x438bb6.prototype.isTangible = _0x2b132.prototype.isTangible; _0x438bb6.prototype.destroy = _0x2b132.prototype.destroy; _0x438bb6.prototype.setState = function(_0x5bf861) { _0x5bf861 !== this.state && (this.state = _0x5bf861, this.sprite = _0x5bf861.SPRITE[0], this.anim = 0); }; _0x438bb6.prototype.draw = function(_0xe84d34) { _0xe84d34.push({ 'pos': this.pos, 'reverse': !1, 'index': this.sprite.INDEX, 'mode': 0 }); }; _0x2b132.REGISTER_OBJECT(_0x438bb6); "use strict"; function _0x1e1f24(_0x1fc2dc, _0x24c00d, _0x3cb14e, _0x560623, _0x57660e, _0x2ad111, _0x20c23b, _0x34dba7, _0x364f29) { _0x2b132.call(this, _0x1fc2dc, _0x24c00d, _0x3cb14e, _0x560623); this.oid = _0x57660e; this.setState(_0x1e1f24.STATE.IDLE); this.offset = _0x4628a4.make(0, parseFloat(_0x2ad111)); this.size = parseFloat(_0x20c23b); this.color = _0x34dba7; this.text = _0x364f29; } _0x1e1f24.ASYNC = !0; _0x1e1f24['ID'] = 253; _0x1e1f24.NAME = "TEXT"; _0x1e1f24.ANIMATION_RATE = 3; _0x1e1f24.SPRITE = {}; _0x1e1f24.SPRITE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'INDEX': 14 }]; for (_0x4f3eec = 0; _0x4f3eec < _0x1e1f24.SPRITE_LIST.length; _0x4f3eec++) _0x1e1f24.SPRITE[_0x1e1f24.SPRITE_LIST[_0x4f3eec].NAME] = _0x1e1f24.SPRITE_LIST[_0x4f3eec], _0x1e1f24.SPRITE[_0x1e1f24.SPRITE_LIST[_0x4f3eec]['ID']] = _0x1e1f24.SPRITE_LIST[_0x4f3eec]; _0x1e1f24.STATE = {}; _0x1e1f24.STATE_LIST = [{ 'NAME': "IDLE", 'ID': 0, 'SPRITE': [_0x1e1f24.SPRITE.IDLE] }]; for (_0x4f3eec = 0; _0x4f3eec < _0x1e1f24.STATE_LIST.length; _0x4f3eec++) _0x1e1f24.STATE[_0x1e1f24.STATE_LIST[_0x4f3eec].NAME] = _0x1e1f24.STATE_LIST[_0x4f3eec], _0x1e1f24.STATE[_0x1e1f24.STATE_LIST[_0x4f3eec]['ID']] = _0x1e1f24.STATE_LIST[_0x4f3eec]; _0x1e1f24.prototype.update = function(_0x495bee) {}; _0x1e1f24.prototype.step = function() {}; _0x1e1f24.prototype.kill = function() {}; _0x1e1f24.prototype.destroy = _0x2b132.prototype.destroy; _0x1e1f24.prototype.isTangible = _0x2b132.prototype.isTangible; _0x1e1f24.prototype.setState = function(_0x47da50) { _0x47da50 !== this.state && (this.state = _0x47da50, this.sprite = _0x47da50.SPRITE[0], this.anim = 0); }; _0x1e1f24.prototype.write = function(_0x524c2f) { _0x524c2f.push({ 'pos': _0x4628a4.add(this.pos, this.offset), 'size': this.size, 'color': this.color, 'text': this.text }); }; _0x2b132.REGISTER_OBJECT(_0x1e1f24); "use strict"; function _0xb99268(_0x56eb06) { this.pos = _0x56eb06; this.garbage = !1; } _0xb99268.prototype.step = function() { 1 > this.life-- && this.destroy(); }; _0xb99268.prototype.destroy = function() { this.garbage = !0; }; _0xb99268.prototype.draw = function(_0x27ef32) {}; "use strict"; function _0x79b656(_0x30f180, _0x2c1914) { _0xb99268.call(this, _0x30f180); this.sprite = _0x2c1914; this.life = 25; this.bits = [{ 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(0, 0x0)), 'vel': _0x4628a4.make(-0.24, 0.9), 'rot': 0, 'ang': -0.3, 'sp': _0x4628a4.make(0, 0x0), 'ss': _0x4628a4.make(0.5, 0.5), 'so': _0x4628a4.make(0.25, 0.25) }, { 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(0.5, 0)), 'vel': _0x4628a4.make(0.24, 0.9), 'rot': 0, 'ang': 0.3, 'sp': _0x4628a4.make(0.5, 0), 'ss': _0x4628a4.make(0.5, 0.5), 'so': _0x4628a4.make(0.25, 0.25) }, { 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(0, -0.5)), 'vel': _0x4628a4.make(-0.3, 0.5), 'rot': 0, 'ang': -0.33, 'sp': _0x4628a4.make(0, 0.5), 'ss': _0x4628a4.make(0.5, 0.5), 'so': _0x4628a4.make(0.25, 0.25) }, { 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(0.5, -0.5)), 'vel': _0x4628a4.make(0.3, 0.5), 'rot': 0, 'ang': 0.33, 'sp': _0x4628a4.make(0.5, 0.5), 'ss': _0x4628a4.make(0.5, 0.5), 'so': _0x4628a4.make(0.25, 0.25) }]; } _0x79b656.FALL_SPEED = 0.0775; _0x79b656.DRAG = 0.975; _0x79b656.prototype.step = function() { for (var _0x11582d = 0; _0x11582d < this.bits.length; _0x11582d++) { var _0xd452c3 = this.bits[_0x11582d]; _0xd452c3.vel['y'] -= _0x79b656.FALL_SPEED; _0xd452c3.vel = _0x4628a4.scale(_0xd452c3.vel, _0x79b656.DRAG); _0xd452c3.pos = _0x4628a4.add(_0xd452c3.pos, _0xd452c3.vel); _0xd452c3.ang *= _0x79b656.DRAG; _0xd452c3.rot += _0xd452c3.ang; } _0xb99268.prototype.step.call(this); }; _0x79b656.prototype.destroy = _0xb99268.prototype.destroy; _0x79b656.prototype.draw = function(_0x280706) { for (var _0x221e5e = 0; _0x221e5e < this.bits.length; _0x221e5e++) { var _0x4c04a2 = this.bits[_0x221e5e]; _0x280706.push({ 'tex': "map", 'ind': this.sprite, 'pos': _0x4c04a2.pos, 'off': _0x4c04a2['so'], 'rot': _0x4c04a2.rot, 'sp': _0x4c04a2['sp'], 'ss': _0x4c04a2['ss'] }); } }; "use strict"; function _0x38c270(_0xdc1c) { _0xb99268.call(this, _0xdc1c); this.life = _0x38c270.UP_TIME + _0x38c270.DOWN_TIME; this.anim = this.sprite = 0; this.bits = [{ 'pos': _0x4628a4.add(this.pos, _0x4628a4.make(0, 0x0)), 'sp': _0x4628a4.make(0, 0x0), 'ss': _0x4628a4.make(1, 0x1), 'so': _0x4628a4.make(0, 0x0) }]; } _0x38c270.SPRITE = [244, 0xf5, 246, 0xf7]; _0x38c270.ANIMATION_RATE = 2; _0x38c270.MOVE_SPEED = 0.375; _0x38c270.UP_TIME = 8; _0x38c270.DOWN_TIME = 6; _0x38c270.prototype.step = function() { _0xb99268.prototype.step.call(this); this.sprite = _0x38c270.SPRITE[parseInt(this.anim++/_0x38c270.ANIMATION_RATE )%_0x38c270.SPRITE .length ];this.bits [0].pos ['y']=this.life >=_0x38c270.DOWN_TIME ?this.bits [0].pos ['y']+_0x38c270.MOVE_SPEED :this.bits [0].pos ['y']-_0x38c270.MOVE_SPEED ;};_0x38c270.prototype .destroy =_0xb99268.prototype .destroy ;_0x38c270.prototype .draw =function(_0x57c831){for(var _0x2de6a7=0;_0x2de6a7Math.abs (_0x1a270c)&&0.25>Math.abs (_0x5084c7))){this['ax']=_0x4628a4.make (_0x1a270c,_0x5084c7);return;}}this['ax']=_0x4628a4.make (0,0x0);};_0x2efca1.prototype .pad .button =function(_0x588acc){return this.pad ?this.pad .buttons [_0x588acc].pressed :!1;};_0x2efca1.prototype .pad .connected =function(){return!!this.pad ;};_0x2efca1.prototype .mouse ={};_0x2efca1.prototype .mouse .inputs =[];_0x2efca1.prototype .mouse .pos ={};_0x2efca1.prototype .mouse .mov ={};_0x2efca1.prototype .mouse .spin =0;_0x2efca1.prototype .mouse .nxtMov ={};_0x2efca1.prototype .mouse .nxtSpin =0;_0x2efca1.prototype .mouse .lmb =!1;_0x2efca1.prototype .mouse .rmb =!1;_0x2efca1.prototype .mouse .mmb =!1;_0x2efca1.prototype .mouse .nxtMov ['x']=0;_0x2efca1.prototype .mouse .nxtMov ['y']=0;_0x2efca1.prototype .mouse .mov ['x']=0;_0x2efca1.prototype .mouse .mov ['y']=0;_0x2efca1.prototype .mouse .pos ['x']=0;_0x2efca1.prototype .mouse .pos ['y']=0;_0x2efca1.prototype .mouse .event =function(_0x1fe9a5,_0x454535){this.nxtMov ={};this.nxtMov ['x']=this.nxtMov.x+(this.pos.x-_0x1fe9a5.offsetX);this.nxtMov ['y']=this.nxtMov.y+-1*(this.pos.y-_0x1fe9a5.offsetY);this.pos ={};this.pos ['x']=_0x1fe9a5.offsetX;this.pos ['y']=_0x1fe9a5.offsetY;if(void 0!==_0x454535){switch(_0x1fe9a5.button ){case 0:this.lmb =_0x454535;break;case 2:this.rmb =_0x454535;break;case 1:this.mmb =_0x454535;}_0x454535&&this.inputs .push ({'btn':_0x1fe9a5.button ,'pos':this.pos });}};_0x2efca1.prototype .mouse .wheel =function(_0x4bdfad){_0x4bdfad=window.event ||_0x4bdfad;this.nxtSpin +=Math.max (-1,Math.min (1,_0x4bdfad.wheelDelta ||-_0x4bdfad.detail ));return!1;};_0x2efca1.prototype .keyboard ={};_0x2efca1.prototype .keyboard .inputs =[];_0x2efca1.prototype .keyboard .keys =[];_0x2efca1.prototype .keyboard .event =function(_0x15940d,_0x43d38b){(this.keys [_0x15940d.keyCode ]=_0x43d38b)&&this.inputs .push ({'key':_0x15940d.keyCode ,'char':1!==_0x15940d.key .length ?'':_0x15940d.key });};_0x2efca1.prototype .touch ={};_0x2efca1.prototype .touch .inputs =[];_0x2efca1.prototype .touch .pos =[];_0x2efca1.prototype .touch .event =function(_0x16267c){var _0x55f642=this.pos ;this.pos =[];for(var _0x1734db=0;_0x1734db<_0x16267c.touches .length ;_0x1734db++){for(var _0x1d4dad=_0x16267c.touches [_0x1734db],_0x1592b9=!1,_0x1de7bd=0;_0x1de7bd<_0x55f642.length ;_0x1de7bd++)if(_0x55f642[_0x1de7bd]['id']===_0x1d4dad.identifier ){_0x1592b9=!0;break;}_0x1592b9||this.inputs .push ({'id':_0x1d4dad.identifier ,'x':_0x1d4dad.clientX ,'y':_0x1d4dad.clientY });this.pos .push ({'id':_0x1d4dad.identifier ,'x':_0x1d4dad.clientX ,'y':_0x1d4dad.clientY });}};_0x2efca1.prototype .pop =function(){this.mouse .mov =this.mouse .nxtMov ;this.mouse .spin =this.mouse .nxtSpin ;this.mouse .nxtMov ={};this.mouse .nxtMov ['x']=0;this.mouse .nxtMov ['y']=0;this.mouse .nxtSpin =0;var _0x331427={};_0x331427.mouse =this.mouse.inputs;_0x331427.keyboard =this.keyboard.inputs;_0x331427.touch =this.touch.inputs;this.keyboard .inputs =[];this.mouse .inputs =[];this.touch .inputs =[];return _0x331427;};_0x2efca1.prototype .destroy =function(){this.container .onmousemove =function(){};this.container .onmousedown =function(){};this.container .onmouseup =function(){};this.container .removeEventListener ("mousewheel",this.mouse .wheel ,!1);this.container .removeEventListener ("DOMMouseScroll",this.mouse .wheel ,!1);document.onkeyup =function(){};document.onkeydown =function(){};};"use strict";function _0x34f882(_0x3cc63c){this.texture ={};this.texture .cache ={};this.texture .load =0;this.load (_0x3cc63c);}_0x34f882.prototype .load =function(_0x696098){for(var _0x41d49e=0;_0x41d49e<_0x696098.length ;_0x41d49e++){var _0x31b2fa=_0x696098[_0x41d49e],_0x3e99e1=_0x31b2fa.src .split ('.').pop ().toLowerCase ();switch(_0x3e99e1){case "png":this.loadTexture (_0x31b2fa);break;case "gif":this.loadTexture (_0x31b2fa);break;default:_0x5c48db.menu .warn .show ("Failed to load resource with unknown extension: "+_0x3e99e1);}}};_0x34f882.prototype .loadTexture =function(_0xcc2626){var _0x444b52=this.texture ;if(!_0x444b52.cache [_0xcc2626['id']]){var _0x377118=new Image();_0x377118.onload =function(){_0x444b52.cache [_0xcc2626['id']]=_0x377118;_0x444b52.load --;};_0x377118.src =_0xcc2626.src ;_0x444b52.load ++;}};_0x34f882.prototype .getTexture =function(_0x58e0b7){return this.texture .cache [_0x58e0b7];};_0x34f882.prototype .ready =function(){return 0===this.texture .load ;};"use strict";function _0x61cafa(_0x38654a){this.display =_0x38654a;this.pos =_0x4628a4.make (0,0x0);this.scale =3;}_0x61cafa.MOVE_MULT =0.075;_0x61cafa.ZOOM_MULT =0.075;_0x61cafa.ZOOM_MAX =1;_0x61cafa.ZOOM_MIN =8;_0x61cafa.prototype .move =function(_0x13f6ab){this.pos =_0x4628a4.add (this.pos ,_0x4628a4.scale (_0x13f6ab,1/this.scale * _0x61cafa.MOVE_MULT)); }; _0x61cafa.prototype.zoom = function(_0x51c6fb) { this.scale = Math.max(_0x61cafa.ZOOM_MAX, Math.min(_0x61cafa.ZOOM_MIN, this.scale + _0x61cafa.ZOOM_MULT * _0x51c6fb)); }; _0x61cafa.prototype.position = function(_0x97e4dd) { this.pos = _0x97e4dd; }; _0x61cafa.prototype.unproject = function(_0x30129a) { _0x30129a = _0x4628a4.add(_0x30129a, _0x4628a4.make(0.5 * -this.display.canvas.width, 0.5 * -this.display.canvas.height)); _0x30129a = _0x4628a4.scale(_0x30129a, 1 / this.scale); _0x30129a = _0x4628a4.add(_0x30129a, _0x4628a4.make(this.pos['x'] * _0x1f0341.TEXRES, this.pos['y'] * _0x1f0341.TEXRES)); return _0x4628a4.scale(_0x30129a, 0.0625); }; "use strict"; function _0x35c083(_0x417070, _0x347e6b) { this.path = _0x347e6b; var _0x2ae77b = this, _0x2460a6 = new XMLHttpRequest(); _0x2460a6.open("GET", "audio/" + _0x347e6b, !0); _0x2460a6.responseType = "arraybuffer"; _0x2460a6.onload = function() { _0x2ae77b.onload(_0x2460a6, _0x417070); }; _0x2460a6.send(); } _0x35c083.prototype.onload = function(_0x159653, _0x5dd645) { var _0x4a8cbc = this; _0x5dd645.decodeAudioData(_0x159653.response, function(_0x159653) { _0x4a8cbc.buffer = _0x159653; }, _0x4a8cbc.onError); }; _0x35c083.prototype.onError = function() {}; _0x35c083.prototype.ready = function() { return void 0 !== this.buffer; }; _0x35c083.prototype.destroy = function() {}; "use strict"; function _0x3bd257(_0x4c183f, _0xec21cb, _0x4dc2bc, _0x58f077, _0x4b9364, _0x3995a8) { this.context = _0x4c183f; this.path = _0xec21cb; this.data = _0x4dc2bc; this.playing = this.played = this.ready = !1; this.data.ready() ? this.create(_0x58f077, _0x4b9364, _0x3995a8) : _0x5c48db.menu.warn.show("Attempted to instance partially loaded sound data: '" + _0xec21cb + '\x27'); } _0x3bd257.prototype.create = function(_0x5a9c62, _0x55cb09, _0x1f3cf7) { var _0x5c4d7c = this; this.source = this.context.createBufferSource(); this.source.buffer = this.data.buffer; this.source.onended = function() { _0x5c4d7c.playing = !1; }; this.source.playbackRate.value = 1 + (_0x55cb09 * Math.random() - 0.5 * _0x55cb09); this.gain = this.context.createGain(); this.gain.gain.value = _0x5a9c62; this.source.connect(this.gain); this.gain.connect(_0x1f3cf7); this.ready = !0; }; _0x3bd257.prototype.position = function() {}; _0x3bd257.prototype.volume = function(_0xf88324) { this.ready && (this.gain.gain.value = _0xf88324); }; _0x3bd257.prototype.play = function() { this.ready && !this.played ? (this.source.start(0), this.playing = !0) : this.played && _0x5c48db.menu.warn.show("Attempted to replay sound instance: '" + this.path + '\x27'); this.played = !0; }; _0x3bd257.prototype.stop = function() { this.ready && this.played && this.source.stop(); }; _0x3bd257.prototype.loop = function(_0x52b262) { this.ready && (this.source.loop = _0x52b262); }; _0x3bd257.prototype.done = function() { return this.played && !this.playing; }; function _0x5b4223(_0x22fe70, _0x57e010, _0x1bb17e, _0x42785d, _0x5ed634, _0x121151) { _0x3bd257.call(this, _0x22fe70, _0x57e010, _0x1bb17e, _0x42785d, _0x5ed634, _0x121151); } _0x5b4223.prototype.create = function(_0x127c28, _0x48ad53, _0x4962f9) { var _0x14f34d = this; this.source = this.context.createBufferSource(); this.source.buffer = this.data.buffer; this.source.onended = function() { _0x14f34d.playing = !1; }; this.source.playbackRate.value = 1 + (_0x48ad53 * Math.random() - 0.5 * _0x48ad53); this.gain = this.context.createGain(); this.gain.gain.value = _0x127c28; this.panner = this.context.createPanner(); this.panner.panningModel = "HRTF"; this.panner.distanceModel = "linear"; this.panner.refDistance = _0xaefcae.FALLOFF_MIN; this.panner.maxDistance = _0xaefcae.FALLOFF_MAX; this.panner.rolloffFactor = 1; this.panner.coneInnerAngle = 360; this.panner.coneOuterAngle = 0; this.panner.coneOuterGain = 0; this.source.connect(this.gain); this.gain.connect(this.panner); this.panner.connect(_0x4962f9); this.panner.setPosition(0, 0x0, 0); this.panner.setOrientation(1, 0x0, 0); this.ready = !0; }; _0x5b4223.prototype.position = function(_0x3f125f) { this.data.ready() && this.ready && (this.panner.setPosition ? this.panner.setPosition(_0x3f125f['x'], _0x3f125f['y'], 0) : (this.panner.positionX.value = _0x3f125f['x'], this.panner.positionY.value = _0x3f125f['y'], this.panner.positionZ.value = 0)); }; _0x5b4223.prototype.volume = _0x3bd257.prototype.volume; _0x5b4223.prototype.play = function(_0x34a421) { this.position(_0x34a421); this.ready && !this.played ? (this.source.start(0), this.playing = !0) : this.played && _0x5c48db.menu.warn.show("Attempted to replay sound instance: '" + this.path + '\x27'); this.played = !0; }; _0x5b4223.prototype.stop = _0x3bd257.prototype.stop; _0x5b4223.prototype.loop = _0x3bd257.prototype.loop; _0x5b4223.prototype.done = _0x3bd257.prototype.done; "use strict"; function _0xaefcae(_0x88430e) { this.game = _0x88430e; this.initWebAudio() || this.initFallback(); this.muteMusic = 1 === parseInt(Cookies.get("music")); this.muteSound = 1 === parseInt(Cookies.get("sound")); } _0xaefcae.FALLOFF_MIN = 1; _0xaefcae.FALLOFF_MAX = 24; _0xaefcae.prototype.initWebAudio = function() { try { this.context = new(window[("AudioContext")] || window[("webkitAudioContext")])(); } catch (_0x1809f2) { return _0x5c48db.menu.warn.show("WebAudio not supported. Intializing fallback mode..."), !1; } var _0x3f83da = "sfx/alert.wav sfx/break.wav sfx/breath.wav sfx/bump.wav sfx/coin.wav sfx/fireball.wav sfx/firework.wav sfx/flagpole.wav sfx/item.wav sfx/jump0.wav sfx/jump1.wav sfx/kick.wav sfx/life.wav sfx/pipe.wav sfx/powerup.wav sfx/stomp.wav sfx/vine.wav music/main0.mp3 music/main1.mp3 music/main2.mp3 music/main3.mp3 music/level.mp3 music/castle.mp3 music/victory.mp3 music/star.mp3 music/dead.mp3 music/gameover.mp3".split('\x20'); this.sounds = []; for (var _0x4e4fee = 0; _0x4e4fee < _0x3f83da.length; _0x4e4fee++) if (!this.createAudio(_0x3f83da[_0x4e4fee])) return !1; this.masterVolume = this.context.createGain(); this.masterVolume.gain.value = 1; this.masterVolume.connect(this.context.destination); this.effectVolume = this.context.createGain(); this.effectVolume.gain.value = 1; this.effectVolume.connect(this.masterVolume); this.musicVolume = this.context.createGain(); this.musicVolume.gain.value = 1; this.musicVolume.connect(this.masterVolume); this.masterVolume.gain.value = 0.5; this.effectVolume.gain.value = this.muteSound ? 0 : 0.75; this.musicVolume.gain.value = this.muteMusic ? 0 : 0.5; this.context.listener.setPosition(0, 0x0, 0); this.context.listener.setOrientation(1, 0x0, 0, 0x0, 1, 0x0); return !0; }; _0xaefcae.prototype.initFallback = function() { this.context = void 0; this.sounds = []; }; _0xaefcae.prototype.update = function() { this.updateVolume(); var _0x3eb602 = this.game.getPlayer() ? this.game.getPlayer().pos : this.game.display.camera.pos; this.context.listener.setPosition ? (this.context.listener.setPosition(_0x3eb602['x'], _0x3eb602['y'], 0), this.context.listener.setOrientation(1, 0x0, 0, 0x0, 1, 0x0)) : (this.context.listener.positionX.value = _0x3eb602['x'], this.context.listener.positionY.value = _0x3eb602['y'], this.context.listener.positionZ.value = 0, this.context.listener.forwardX.value = 1, this.context.listener.forwardY.value = 0, this.context.listener.forwardZ.value = 0, this.context.listener.upX.value = 0, this.context.listener.upY.value = 1, this.context.listener.upZ.value = 0); window["emanruoy".split('').reverse().join('')] && this.game.out.push(_0x482c1d.encode()); }; _0xaefcae.prototype.updateVolume = function() { this.masterVolume.gain.value = 0.5; this.effectVolume.gain.value = this.muteSound ? 0 : 0.75; this.musicVolume.gain.value = this.muteMusic ? 0 : 0.5; if (!this.muteSound && !this.muteMusic) { for (var _0x5d2e91 = this.game.getZone(), _0x1aec1b = this.game.getPlayer() ? this.game.getPlayer().pos : this.game.display.camera.pos, _0x1c7883 = 999, _0x2c63d0 = 0; _0x2c63d0 < this.game.objects.length; _0x2c63d0++) { var _0x14d448 = this.game.objects[_0x2c63d0]; if (_0x14d448 instanceof _0x307949 && _0x14d448.level === _0x5d2e91.level && _0x14d448.zone === _0x5d2e91['id'] && 0 < _0x14d448.starTimer) { var _0x1912ef = _0x4628a4.distance(_0x1aec1b, _0x14d448.pos); _0x1912ef < _0x1c7883 && (_0x1c7883 = _0x1912ef); } } _0x1c7883 < _0xaefcae.FALLOFF_MAX && (this.musicVolume.gain.value = 0.5 * Math.max(0, Math.min(1, Math.pow(_0x1912ef / _0xaefcae.FALLOFF_MAX, 2)))); } }; _0xaefcae.prototype.saveSettings = function() { Cookies.set("music", this.muteMusic ? 1 : 0x0, { 'expires': 30 }); Cookies.set("sound", this.muteSound ? 1 : 0x0, { 'expires': 30 }); }; _0xaefcae.prototype.setMusic = function(_0x4c2f6d, _0x307129) { if (this.music) { if (this.music.path === _0x4c2f6d) return; this.music.stop(); } this.music = this.getAudio(_0x4c2f6d, 1, 0x0, "music"); this.music.loop(_0x307129); this.music.play(); }; _0xaefcae.prototype.stopMusic = function() { this.music && (this.music.stop(), this.music = void 0); }; _0xaefcae.prototype.createAudio = function(_0x510768) { _0x510768 = new _0x35c083(this.context, _0x510768); this.sounds.push(_0x510768); return !0; }; _0xaefcae.prototype.createCustomAudio = function(_0x2221ad) { _0x2221ad = new CustomAudioData(this.context, _0x2221ad); this.sounds.push(_0x2221ad); return !0; }; _0xaefcae.prototype.getAudio = function(_0x36bd98, _0xcb00cf, _0x42674a, _0x5f2357) { switch (_0x5f2357) { case "effect": _0x5f2357 = this.effectVolume; break; case "music": _0x5f2357 = this.musicVolume; break; default: _0x5f2357 = this.effectVolume; } for (var _0x149096 = 0; _0x149096 < this.sounds.length; _0x149096++) if (this.sounds[_0x149096].path === _0x36bd98) return new _0x3bd257(this.context, _0x36bd98, this.sounds[_0x149096], _0xcb00cf, _0x42674a, _0x5f2357); if (this.createAudio(_0x36bd98)) return this.getAudio(_0x36bd98); _0x5c48db.menu.warn.show("Failed to load sound: '" + _0x36bd98 + '\x27'); return this.getAudio("default.wav"); }; _0xaefcae.prototype.getSpatialAudio = function(_0x16a6e5, _0x1c13d7, _0x1ad4d6, _0x39d04d) { switch (_0x39d04d) { case "effect": _0x39d04d = this.effectVolume; break; case "music": _0x39d04d = this.musicVolume; break; default: _0x39d04d = this.effectVolume; } for (var _0x22fa5b = 0; _0x22fa5b < this.sounds.length; _0x22fa5b++) if (this.sounds[_0x22fa5b].path === _0x16a6e5) return new _0x5b4223(this.context, _0x16a6e5, this.sounds[_0x22fa5b], _0x1c13d7, _0x1ad4d6, _0x39d04d); if (this.createAudio(_0x16a6e5)) return this.getSpatialAudio(_0x16a6e5); _0x5c48db.menu.warn.show("Failed to load sound: '" + _0x16a6e5 + '\x27'); return this.getSpatialAudio("multi/default.wav"); }; _0xaefcae.prototype.destroy = function() { for (var _0x37de59 = 0; _0x37de59 < this.sounds.length; _0x37de59++) this.sounds[_0x37de59].destroy(); this.stopMusic(); this.sounds = []; this.context.close().catch(function(_0x37de59) { console.log("Error closing audio context."); }); }; "use strict"; _0x3b5639.collideTest = function(_0x3e6039) { return _0x3e6039.split('').reverse().join(''); }; _0x3b5639.state = function(_0x37c87f) { return _0x37c87f.getPlayer() ? 0.39 < _0x37c87f.getPlayer().moveSpeed || 20 < _0x37c87f.getPlayer().jumping || 15 < _0x37c87f.lives || 100 < _0x37c87f.getPlayer().damageTimer || 370 < _0x37c87f.getPlayer().starTimer || 0 < _0x37c87f.getPlayer().power && !_0x37c87f.getPlayer().rate || 0 < _0x37c87f.getPlayer().starTimer && !_0x37c87f.getPlayer().rate || _0x3b5639.onHit !== _0x34438c.prototype.physics || _0x3b5639.onCollide !== _0x307949.prototype.physics : !1; }; _0x3b5639.update = function(_0x3fea8e) { _0x3b5639.state(_0x3fea8e) && _0x3fea8e.out.push(_0x482c1d.encode()); }; _0x3b5639.onHit = _0x34438c.prototype.physics; _0x3b5639.onCollide = _0x307949.prototype.physics; "use strict"; function _0x1f0341(_0xbced31, _0x16a677, _0x29eae1, _0x47b93b) { this.game = _0xbced31; this.container = _0x16a677; this.canvas = _0x29eae1; this.context = this.canvas.getContext('2d'); this.resource = new _0x34f882(_0x47b93b); this.camera = new _0x61cafa(this); } _0x1f0341.TEXRES = 16; _0x1f0341.prototype.clear = function() { var _0x309d49 = this.context; if (this.container.clientWidth !== this.canvas.width || this.container.clientHeight !== this.canvas.height) this.canvas.width = this.container.clientWidth, this.canvas.height = this.container.clientHeight; _0x309d49.clearRect(0, 0x0, this.canvas.width, this.canvas.height); _0x309d49.mozImageSmoothingEnabled = !1; _0x309d49.webkitImageSmoothingEnabled = !1; _0x309d49.msImageSmoothingEnabled = !1; _0x309d49.imageSmoothingEnabled = !1; }; _0x1f0341.prototype.draw = function() { var _0x65c839 = this.context; this.clear(); _0x65c839.fillStyle = this.game.getZone().color; _0x65c839.fillRect(0, 0x0, this.canvas.width, this.canvas.height); this.resource.ready() ? (this.game.getZone().dimensions(), _0x65c839.save(), _0x65c839.translate(parseInt(0.5 * this.canvas.width), parseInt(0.5 * this.canvas.height)), _0x65c839.scale(this.camera.scale, this.camera.scale), _0x65c839.translate(parseInt(-this.camera.pos['x'] * _0x1f0341.TEXRES), parseInt(-this.camera.pos['y'] * _0x1f0341.TEXRES)), this.drawMap(!1), this.drawObject(), this.drawMap(!0), this.drawEffect(), _0x65c839.restore(), this.drawTouch(), this.drawUI()) : this.drawLoad(); }; _0x1f0341.prototype.drawMap = function(_0x366c37) { for (var _0x18d429 = this.context, _0x134749 = this.resource.getTexture("map"), _0x5e2ea7 = this.game.getZone(), _0x4682a9 = _0x5e2ea7.dimensions(), _0x5d6906 = this.canvas.width / _0x1f0341.TEXRES * 0.55 / this.camera.scale, _0x52a731 = Math.max(0, Math.min(_0x4682a9['x'], parseInt(this.camera.pos['x'] - _0x5d6906))), _0x4682a9 = Math.max(0, Math.min(_0x4682a9['x'], parseInt(this.camera.pos['x'] + _0x5d6906))), _0x5d6906 = 0; _0x5d6906 < _0x5e2ea7.data.length; _0x5d6906++) for (var _0x418daf = _0x5e2ea7.data[_0x5d6906], _0x31e9fd = _0x52a731; _0x31e9fd < _0x4682a9; _0x31e9fd++) { var _0x13ccf6 = _0x3b5639.decode16(_0x418daf[_0x31e9fd]); if (_0x13ccf6.depth === _0x366c37) { var _0xed9b3b = _0x35d3bd.sprite.getSprite(_0x134749, _0x13ccf6.index), _0x50d06d = 0, _0x13ccf6 = Math.max(0, _0x13ccf6.bump - 7); 0 < _0x13ccf6 && (_0x50d06d = 0.22 * Math.sin((1 - (_0x13ccf6 - 2) / 8) * Math['PI'])); _0x18d429.drawImage(_0x134749, _0xed9b3b[0], _0xed9b3b[1], _0x1f0341.TEXRES, _0x1f0341.TEXRES, _0x1f0341.TEXRES * _0x31e9fd, _0x1f0341.TEXRES * (_0x5d6906 - _0x50d06d), _0x1f0341.TEXRES, _0x1f0341.TEXRES); } } }; _0x1f0341.prototype.drawObject = function() { for (var _0x386793 = this.context, _0x203bdc = this.game.getZone(), _0x1d3fc3 = _0x203bdc.dimensions(), _0x23df77 = this.canvas.width / _0x1f0341.TEXRES * 0.75 / this.camera.scale, _0x359726 = Math.max(0, Math.min(_0x1d3fc3['x'], parseInt(this.camera.pos['x'] - _0x23df77))), _0x559d56 = Math.max(0, Math.min(_0x1d3fc3['x'], parseInt(this.camera.pos['x'] + _0x23df77))), _0x58fcce = [], _0x23df77 = [], _0x648937 = 0; _0x648937 < this.game.objects.length; _0x648937++) { var _0x19d4a9 = this.game.objects[_0x648937]; _0x19d4a9.level === _0x203bdc.level && _0x19d4a9.zone === _0x203bdc['id'] && _0x19d4a9.pid !== this.game.pid && _0x19d4a9.pos['x'] >= _0x359726 && _0x19d4a9.pos['x'] <= _0x559d56 && (_0x19d4a9.write && _0x19d4a9.write(_0x23df77), _0x19d4a9.draw && _0x19d4a9.draw(_0x58fcce)); }(_0x648937 = this.game.getPlayer()) && _0x648937.level === _0x203bdc.level && _0x648937.zone === _0x203bdc['id'] && (_0x648937.draw(_0x58fcce), _0x648937.write(_0x23df77)); _0x359726 = this.resource.getTexture("obj"); for (_0x648937 = 0; _0x648937 < _0x58fcce.length; _0x648937++) { var _0x152c4d = _0x58fcce[_0x648937], _0x559d56 = _0x35d3bd.sprite.getSprite(_0x359726, _0x152c4d.index), _0x19d4a9 = !!_0x152c4d.reverse, _0x4e2360 = !1, _0x15191d = !1; switch (_0x152c4d.mode) { case 0: break; case 1: _0x386793.save(); _0x15191d = !0; _0x386793.globalAlpha = 0.5; break; case 2: 0x0 === parseInt(0.5 * this.game.frame) % 2 && (_0x386793.save(), _0x15191d = !0, _0x386793.globalCompositeOperation = "lighter"); break; case 3: _0x4e2360 = !0; break; default: 160 <= _0x152c4d.mode && 192 > _0x152c4d.mode && (_0x386793.save(), _0x15191d = !0, _0x386793.globalAlpha = parseFloat(_0x152c4d.mode - 160) / 32); } if (_0x19d4a9 || _0x4e2360) _0x386793.save(), _0x386793.scale(_0x19d4a9 ? -1 : 0x1, _0x4e2360 ? -1 : 0x1); _0x203bdc = _0x19d4a9 ? -1 * _0x1f0341.TEXRES * _0x152c4d.pos['x'] - _0x1f0341.TEXRES : _0x1f0341.TEXRES * _0x152c4d.pos['x']; _0x152c4d = _0x4e2360 ? -1 * _0x1f0341.TEXRES * (_0x1d3fc3['y'] - _0x152c4d.pos['y'] - 1) - _0x1f0341.TEXRES : _0x1f0341.TEXRES * (_0x1d3fc3['y'] - _0x152c4d.pos['y'] - 1); _0x386793.drawImage(_0x359726, _0x559d56[0], _0x559d56[1], _0x1f0341.TEXRES, _0x1f0341.TEXRES, _0x203bdc, _0x152c4d, _0x1f0341.TEXRES, _0x1f0341.TEXRES); (_0x19d4a9 || _0x4e2360) && _0x386793.restore(); _0x15191d && _0x386793.restore(); } for (_0x648937 = 0; _0x648937 < _0x23df77.length; _0x648937++) _0x58fcce = _0x23df77[_0x648937], _0x203bdc = _0x1f0341.TEXRES * _0x58fcce.pos['x'] + 0.5 * _0x1f0341.TEXRES, _0x152c4d = _0x1f0341.TEXRES * (_0x1d3fc3['y'] - _0x58fcce.pos['y'] - 1) + 0.5 * _0x1f0341.TEXRES, _0x386793.fillStyle = _0x58fcce.color, _0x386793.font = _0x58fcce.size * _0x1f0341.TEXRES + "px SmbWeb", _0x386793.textAlign = "center", _0x386793.fillText(_0x58fcce.text, _0x203bdc, _0x152c4d); }; _0x1f0341.prototype.drawEffect = function() { var _0x1267b4 = this.context, _0x1b68dd = this.game.getZone(), _0x1f6817 = _0x1b68dd.dimensions(), _0x4cd6a4 = this.resource.getTexture("map"), _0x4fca3e = this.resource.getTexture("obj"), _0x744077 = []; _0x1b68dd.getEffects(_0x744077); for (_0x1b68dd = 0; _0x1b68dd < _0x744077.length; _0x1b68dd++) { var _0x4faa89 = _0x744077[_0x1b68dd], _0x5b80be; switch (_0x4faa89.tex) { case "map": _0x5b80be = _0x4cd6a4; break; case "obj": _0x5b80be = _0x4fca3e; } var _0xd61b93 = _0x35d3bd.sprite.getSprite(_0x5b80be, _0x4faa89.ind); _0xd61b93[0] = parseInt(_0xd61b93[0] + _0x4faa89['sp']['x'] * _0x1f0341.TEXRES); _0xd61b93[1] = parseInt(_0xd61b93[1] + _0x4faa89['sp']['y'] * _0x1f0341.TEXRES); _0x1267b4.save(); _0x1267b4.translate(parseInt(_0x1f0341.TEXRES * _0x4faa89['ss']['x'] * 0.5), parseInt(_0x1f0341.TEXRES * _0x4faa89['ss']['y'] * 0.5)); _0x1267b4.translate(_0x1f0341.TEXRES * _0x4faa89.pos['x'], _0x1f0341.TEXRES * (_0x1f6817['y'] - _0x4faa89.pos['y'] - 1)); _0x1267b4.rotate(_0x4faa89.rot); _0x1267b4.translate(-parseInt(_0x1f0341.TEXRES * _0x4faa89['ss']['x'] * 0.5), -parseInt(_0x1f0341.TEXRES * _0x4faa89['ss']['y'] * 0.5)); _0x1267b4.drawImage(_0x5b80be, _0xd61b93[0], _0xd61b93[1], parseInt(_0x1f0341.TEXRES * _0x4faa89['ss']['x']), parseInt(_0x1f0341.TEXRES * _0x4faa89['ss']['y']), 0, 0x0, parseInt(_0x1f0341.TEXRES * _0x4faa89['ss']['x']), parseInt(_0x1f0341.TEXRES * _0x4faa89['ss']['y'])); _0x1267b4.restore(); } }; _0x1f0341.prototype.drawUI = function() { var _0xa91ce1 = this.context, _0x508165 = this.canvas.width, _0x33cc09 = this.canvas.height, _0x4e8291 = [240, 0xf1, 242, 0xf1], _0x5e50e0 = [252, 0xfa], _0x5d46ea = [251, 0xf9], _0x388e98 = _0x4e8291[parseInt(this.game.frame / 3) % _0x4e8291.length], _0x4e8291 = this.resource.getTexture("obj"), _0x3a4a7c = this.game.getPlayerInfo(this.game.pid), _0x299860; void 0 !== this.game.levelWarpId ? _0x299860 = this.game.world.getLevel(this.game.levelWarpId) : void 0 === this.game.startDelta && (_0x299860 = this.game.world.getInitialLevel()); this.game.gameOver ? (_0xa91ce1.fillStyle = "black", _0xa91ce1.fillRect(0, 0x0, _0x508165, _0x33cc09), _0xa91ce1.fillStyle = "white", _0xa91ce1.font = "32px SmbWeb", _0xa91ce1.textAlign = "center", _0xa91ce1.fillText("GAME OVER", 0.5 * _0x508165, 0.5 * _0x33cc09)) : _0x299860 && (_0xa91ce1.fillStyle = "black", _0xa91ce1.fillRect(0, 0x0, _0x508165, _0x33cc09), _0xa91ce1.fillStyle = "white", _0xa91ce1.font = "32px SmbWeb", _0xa91ce1.textAlign = "center", _0xa91ce1.fillText(_0x299860.name, 0.5 * _0x508165, 0.5 * _0x33cc09), 0 <= this.game.startTimer && (_0xa91ce1.font = "24px SmbWeb", _0xa91ce1.textAlign = "center", _0xa91ce1.fillText("GAME STARTS IN: " + parseInt(this.game.startTimer / 30), 0.5 * _0x508165, 0.5 * _0x33cc09 + 40))); 0 < this.game.victory ? (_0xa91ce1.fillStyle = "white", _0xa91ce1.font = "32px SmbWeb", _0xa91ce1.textAlign = "center", _0xa91ce1.fillText((3 >= this.game.victory ? "VICTORY ROYALE #" : "TOO BAD #") + this.game.victory, 0.5 * _0x508165, 40)) : (_0xa91ce1.fillStyle = "white", _0xa91ce1.font = "24px SmbWeb", _0xa91ce1.textAlign = "left", _0xa91ce1.fillText(_0x3a4a7c ? _0x3a4a7c.name : "INFRINGIO", 8, 0x20), _0x33cc09 = _0x35d3bd.sprite.getSprite(_0x4e8291, _0x388e98), _0x299860 = 'x' + (9 >= this.game.coins ? '0' + this.game.coins : this.game.coins), _0xa91ce1.drawImage(_0x4e8291, _0x33cc09[0], _0x33cc09[1], _0x1f0341.TEXRES, _0x1f0341.TEXRES, 4, 0x28, 24, 0x18), _0xa91ce1.fillText(_0x299860, 30, 0x40), _0x33cc09 = _0x35d3bd.sprite.getSprite(_0x4e8291, 13), _0x299860 = _0xa91ce1.measureText(_0x299860).width + 30, _0xa91ce1.drawImage(_0x4e8291, _0x33cc09[0], _0x33cc09[1], _0x1f0341.TEXRES, _0x1f0341.TEXRES, 4 + _0x299860 + 16, 0x28, 24, 0x18), _0xa91ce1.fillText('x' + (9 >= this.game.lives ? '0' + this.game.lives : this.game.lives), 4 + _0x299860 + 16 + 0x1a, 64), this.game instanceof Game ? (_0x299860 = this.game.remain + " PLAYERS REMAIN", _0x33cc09 = _0xa91ce1.measureText(_0x299860).width, _0xa91ce1.fillText(_0x299860, _0x508165 - _0x33cc09 - 8, 0x20)) : this.game instanceof Lobby && (_0x299860 = this.game.players.length + (this.game.touchMode ? '' : " / 75 PLAYERS"), _0x33cc09 = _0xa91ce1.measureText(_0x299860).width, _0xa91ce1.fillText(_0x299860, _0x508165 - _0x33cc09 - 8, 0x20)), _0x33cc09 = _0x35d3bd.sprite.getSprite(_0x4e8291, _0x5d46ea[this.game.audio.muteMusic ? 1 : 0x0]), _0xa91ce1.drawImage(_0x4e8291, _0x33cc09[0], _0x33cc09[1], _0x1f0341.TEXRES, _0x1f0341.TEXRES, _0x508165 - 24 - 0x8, 40, 0x18, 24), _0x33cc09 = _0x35d3bd.sprite.getSprite(_0x4e8291, _0x5e50e0[this.game.audio.muteSound ? 1 : 0x0]), _0xa91ce1.drawImage(_0x4e8291, _0x33cc09[0], _0x33cc09[1], _0x1f0341.TEXRES, _0x1f0341.TEXRES, _0x508165 - 24 - 0x8 - 24 - 0x8, 40, 0x18, 24), this.game.input.pad.connected() && (_0x33cc09 = _0x35d3bd.sprite.getSprite(_0x4e8291, 248), _0xa91ce1.drawImage(_0x4e8291, _0x33cc09[0], _0x33cc09[1], _0x1f0341.TEXRES, _0x1f0341.TEXRES, _0x508165 - 24 - 0x8 - 24 - 0x8 - 24 - 0x8, 40, 0x18, 24))); }; _0x1f0341.prototype.drawTouch = function() { if (this.game.touchMode) { var _0x1c3455 = this.context, _0x14746d = this.canvas.width, _0x5923fc = this.canvas.height; this.game.thumbOrigin && (_0x1c3455.fillStyle = "rgba(0,0,0,0.5)", _0x1c3455.fillRect(this.game.thumbOrigin['x'] - 42.5, this.game.thumbOrigin['y'] - 42.5, 85, 0x55), _0x1c3455.fillStyle = "rgba(255,255,255,1.0)", _0x1c3455.fillRect(this.game.thumbPos['x'] - 32.5, this.game.thumbPos['y'] - 32.5, 65, 0x41)); _0x1c3455.fillStyle = "rgba(0,0,0,0.5)"; _0x1c3455.fillRect(_0x14746d - 85, _0x5923fc - 85, 0x55, 85); _0x1c3455.fillRect(_0x14746d - 85, _0x5923fc - 170, 0x55, 85); _0x1c3455.fillStyle = this.game.touchRun ? "rgba(255,255,255,0.75)" : "rgba(0,0,0,0.5)"; _0x1c3455.fillRect(_0x14746d - 85, _0x5923fc - 255, 0x55, 85); _0x1c3455.fillStyle = "white"; _0x1c3455.font = "65px SmbWeb"; _0x1c3455.textAlign = "left"; var _0x4b69c7 = 'A', _0x21b0f2 = _0x1c3455.measureText(_0x4b69c7).width; _0x1c3455.fillText(_0x4b69c7, _0x14746d - _0x21b0f2 - 10, _0x5923fc - 10); _0x4b69c7 = 'B'; _0x21b0f2 = _0x1c3455.measureText(_0x4b69c7).width; _0x1c3455.fillText(_0x4b69c7, _0x14746d - _0x21b0f2 - 7.5, _0x5923fc - 85 - 0xa); _0x1c3455.fillStyle = this.game.touchRun ? "black" : "white"; _0x4b69c7 = 'R'; _0x21b0f2 = _0x1c3455.measureText(_0x4b69c7).width; _0x1c3455.fillText(_0x4b69c7, _0x14746d - _0x21b0f2 - 7.5, _0x5923fc - 170 - 0xa); } }; _0x1f0341.prototype.drawLoad = function() { var _0x308e27 = this.context, _0xa7c8c5 = this.canvas.width, _0x2075a6 = this.canvas.height; _0x308e27.fillStyle = "black"; _0x308e27.fillRect(0, 0x0, _0xa7c8c5, _0x2075a6); _0x308e27.font = "32px SmbWeb"; _0x308e27.fillStyle = "white"; _0x308e27.textAlign = "center"; _0x308e27.fillText("Loading Resources...", 0.5 * _0xa7c8c5, 0.5 * _0x2075a6); }; _0x1f0341.prototype.destroy = function() {}; "use strict"; function _0x68499f(_0x402568, _0xd5ddd8) { this.game = _0x402568; this.initial = _0xd5ddd8.initial; this.levels = []; for (var _0x90b5a9 = 0; _0x90b5a9 < _0xd5ddd8.world.length; _0x90b5a9++) this.levels.push(new _0x23d722(_0x402568, _0xd5ddd8.world[_0x90b5a9])); } _0x68499f.prototype.step = function() { for (var _0x3ad95e = 0; _0x3ad95e < this.levels.length; _0x3ad95e++) this.levels[_0x3ad95e].step(); }; _0x68499f.prototype.getInitialLevel = function() { return this.getLevel(this.initial); }; _0x68499f.prototype.getInitialZone = function() { var _0xd6f8d6 = this.getLevel(this.initial); return this.getZone(_0xd6f8d6['id'], _0xd6f8d6.initial); }; _0x68499f.prototype.getLevel = function(_0x41b51c) { for (var _0x4f2b76 = 0; _0x4f2b76 < this.levels.length; _0x4f2b76++) { var _0x57c1f5 = this.levels[_0x4f2b76]; if (_0x57c1f5['id'] === _0x41b51c) return _0x57c1f5; } }; _0x68499f.prototype.getZone = function(_0x32b9b6, _0x3f6a5e) { for (var _0x370fb7 = 0; _0x370fb7 < this.levels.length; _0x370fb7++) { var _0x4d6f39 = this.levels[_0x370fb7]; if (_0x4d6f39['id'] === _0x32b9b6) for (var _0x20c3f2 = 0; _0x20c3f2 < _0x4d6f39.zones.length; _0x20c3f2++) { var _0x294728 = _0x4d6f39.zones[_0x20c3f2]; if (_0x294728['id'] === _0x3f6a5e) return _0x294728; } } }; function _0x23d722(_0x2d1dc8, _0x405225) { this.game = _0x2d1dc8; this['id'] = _0x405225['id']; this.name = _0x405225.name; this.initial = _0x405225.initial; this.zones = []; for (var _0x527566 = 0; _0x527566 < _0x405225.zone.length; _0x527566++) this.zones.push(new _0x56c417(_0x2d1dc8, this['id'], _0x405225.zone[_0x527566])); } _0x23d722.prototype.step = function() { for (var _0x1ab54d = 0; _0x1ab54d < this.zones.length; _0x1ab54d++) this.zones[_0x1ab54d].step(); }; _0x23d722.prototype.getInitial = function() { for (var _0x273410 = 0; _0x273410 < this.zones.length; _0x273410++) { var _0x5d3fb6 = this.zones[_0x273410]; if (_0x5d3fb6['id'] === this.initial) return _0x5d3fb6; } }; _0x23d722.prototype.getWarp = function(_0x25716e) { for (var _0x14c91b = 0; _0x14c91b < this.zones.length; _0x14c91b++) for (var _0x270be2 = this.zones[_0x14c91b], _0x5627b5 = 0; _0x5627b5 < _0x270be2.warp.length; _0x5627b5++) { var _0x2d6c58 = _0x270be2.warp[_0x5627b5]; if (_0x2d6c58['id'] === _0x25716e) return { 'level': this['id'], 'zone': _0x270be2['id'], 'pos': _0xd3ee2a.decode(_0x2d6c58.pos), 'data': _0x2d6c58.data }; } }; function _0x56c417(_0x5c9088, _0x38cf11, _0x2619df) { this.game = _0x5c9088; this['id'] = _0x2619df['id']; this.level = _0x38cf11; this.initial = _0x2619df.initial; this.color = _0x2619df.color; this.music = _0x2619df.music ? _0x2619df.music : ''; this.data = _0x2619df.data; this.obj = _0x2619df.obj; this.warp = _0x2619df.warp; this.bumped = []; this.effects = []; this.vines = []; this.sounds = []; } _0x56c417.prototype.update = function(_0x30e590, _0x1e47f0, _0x4944b3, _0x483b60, _0x1cc05b, _0x5b2ad7, _0x2fac6c) { var _0x2bbe97 = this.dimensions()['y'] - 1 - _0x5b2ad7, _0x2bbe97 = _0x3b5639.decode(this.data[_0x2bbe97][_0x1cc05b]); _0x2bbe97.definition.TRIGGER(_0x30e590, _0x1e47f0, _0x2bbe97, _0x4944b3, _0x483b60, _0x1cc05b, _0x5b2ad7, _0x2fac6c); }; _0x56c417.prototype.step = function() { for (var _0x7c6c9b = 0; _0x7c6c9b < this.bumped.length; _0x7c6c9b++) { var _0x23a35d = this.bumped[_0x7c6c9b], _0x5ead1d = _0x3b5639.decode(this.data[_0x23a35d['y']][_0x23a35d['x']]); 0 < _0x5ead1d.bump ? this.data[_0x23a35d['y']][_0x23a35d['x']] = _0x3b5639.bump(this.data[_0x23a35d['y']][_0x23a35d['x']], _0x5ead1d.bump - 1) : this.bumped.splice(_0x7c6c9b--, 1); } for (_0x7c6c9b = 0; _0x7c6c9b < this.effects.length; _0x7c6c9b++) _0x23a35d = this.effects[_0x7c6c9b], _0x23a35d.garbage ? this.effects.splice(_0x7c6c9b--, 1) : _0x23a35d.step(); for (_0x7c6c9b = 0; _0x7c6c9b < this.vines.length; _0x7c6c9b++) _0x23a35d = this.vines[_0x7c6c9b], 0 > _0x23a35d['y'] ? this.vines.splice(_0x7c6c9b--, 1) : this.data[_0x23a35d['y']--][_0x23a35d['x']] = _0x23a35d['td']; for (_0x7c6c9b = 0; _0x7c6c9b < this.sounds.length; _0x7c6c9b++) this.sounds[_0x7c6c9b].done() && this.sounds.splice(_0x7c6c9b--, 1); _0x3b5639.update(this.game); }; _0x56c417.prototype.tile = function(_0x389bfa, _0x5b0300) { _0x5b0300 = this.dimensions()['y'] - 1 - _0x5b0300; return this.data[_0x5b0300][_0x389bfa]; }; _0x56c417.prototype.bump = function(_0x54831d, _0x13da6a) { var _0xf63141 = this.dimensions()['y'] - 1 - _0x13da6a; this.data[_0xf63141][_0x54831d] = _0x3b5639.bump(this.data[_0xf63141][_0x54831d], 15); this.bumped.push({ 'x': _0x54831d, 'y': _0xf63141 }); this.play(_0x54831d, _0x13da6a, "sfx/bump.wav", 0.5, 0.04); }; _0x56c417.prototype.replace = function(_0x228bda, _0x147d52, _0x1db982) { _0x147d52 = this.dimensions()['y'] - 1 - _0x147d52; this.data[_0x147d52][_0x228bda] = _0x1db982; }; _0x56c417.prototype.grow = function(_0x366e7a, _0x478f53, _0x2ad199) { _0x478f53 = this.dimensions()['y'] - 1 - _0x478f53; this.vines.push({ 'x': _0x366e7a, 'y': _0x478f53, 'td': _0x2ad199 }); }; _0x56c417.prototype.break = function(_0x35af58, _0x47b93f, _0xa0e61a) { var _0x301255 = this.dimensions()['y'] - 1 - _0x47b93f, _0x11c3fb = _0x3b5639.decode16(this.data[_0x301255][_0x35af58]); this.data[_0x301255][_0x35af58] = _0xa0e61a; this.effects.push(new _0x79b656(_0x4628a4.make(_0x35af58, _0x47b93f), _0x11c3fb.index)); this.play(_0x35af58, _0x47b93f, "sfx/break.wav", 1.5, 0.04); }; _0x56c417.prototype.coin = function(_0x115fad, _0xb027db) { this.dimensions(); this.effects.push(new _0x38c270(_0x4628a4.make(_0x115fad, _0xb027db))); }; _0x56c417.prototype.play = function(_0x199683, _0xae3d04, _0x1c1756, _0x127992, _0x32d3de) { this.game.getZone() === this && (_0x1c1756 = this.game.audio.getSpatialAudio(_0x1c1756, _0x127992, _0x32d3de, "effect"), _0x1c1756.play(_0x4628a4.make(_0x199683, _0xae3d04)), this.sounds.push(_0x1c1756)); }; _0x56c417.prototype.dimensions = function() { return _0x4628a4.make(this.data[0].length, this.data.length); }; _0x56c417.prototype.getTile = function(_0x5658e3) { var _0x5148f1 = this.dimensions(); _0x5658e3 = _0x4628a4.copy(_0x5658e3); _0x5658e3['y'] = _0x5148f1['y'] - _0x5658e3['y'] - 1; return _0x3b5639.decode(this.data[Math.max(0, Math.min(_0x5148f1['y'], Math.floor(_0x5658e3['y'])))][Math.max(0, Math.min(_0x5148f1['x'], Math.floor(_0x5658e3['x'])))]); }; _0x56c417.prototype.getTiles = function(_0x147d82, _0x75c9d8) { var _0x1657de = this.dimensions(), _0x339571 = _0x4628a4.copy(_0x147d82); _0x339571['y'] = _0x1657de['y'] - _0x339571['y']; _0x147d82 = parseInt(Math.max(Math.min(Math.floor(_0x339571['x']) - 1, _0x1657de['x']), 0)); var _0x54b386 = parseInt(Math.max(Math.min(Math.ceil(_0x339571['x'] + _0x75c9d8['x']) + 1, _0x1657de['x']), 0)), _0x231a12 = parseInt(Math.max(Math.min(Math.floor(_0x339571['y'] - _0x75c9d8['y']) - 1, _0x1657de['y']), 0)); _0x75c9d8 = parseInt(Math.max(Math.min(Math.ceil(_0x339571['y']) + 1, _0x1657de['y']), 0)); for (_0x339571 = []; _0x231a12 < _0x75c9d8; _0x231a12++) for (var _0x645bb2 = _0x147d82; _0x645bb2 < _0x54b386; _0x645bb2++) { var _0x4d81eb = _0x3b5639.decode(this.data[_0x231a12][_0x645bb2]); _0x4d81eb.pos = _0x4628a4.make(_0x645bb2, _0x1657de['y'] - 1 - _0x231a12); _0x4d81eb.ind = [_0x231a12, _0x645bb2]; _0x339571.push(_0x4d81eb); } return _0x339571; }; _0x56c417.prototype.getEffects = function(_0xc0030e) { for (var _0x49825c = 0; _0x49825c < this.effects.length; _0x49825c++) this.effects[_0x49825c].draw(_0xc0030e); }; "use strict"; function Game(_0x3958b6) { this.container = document.getElementById("game"); this.canvas = document.getElementById("game-canvas"); this.input = new _0x2efca1(this, this.canvas); this.display = new _0x1f0341(this, this.container, this.canvas, _0x3958b6.resource); this.audio = new _0xaefcae(this); this.objects = []; this.team = this.pid = void 0; this.players = []; this.sounds = []; this.load(_0x3958b6); this.lastDraw = this.frame = 0; this.delta = _0x35d3bd.time.now(); this.buffer = [ [], [] ]; this.out = []; this.ready = !1; this.startTimer = -1; this.touchFull = this.touchMode = !1; this.thumbPos = this.thumbOrigin = this.thumbId = void 0; this.touchRun = !1; this.victory = this.coins = this.lives = this.remain = 0; this.victoryMusic = !1; this.gameOverTimer = this.rate = 0; this.gameOver = !1; _0x3958b6 = this.getZone().dimensions(); this.display.camera.position(_0x4628a4.scale(_0x3958b6, 0.5)); this.levelWarpTimer = 0; this.levelWarpId = void 0; var _0x53164c = this; this.frameReq = _0x4b822c.call(window, function() { _0x53164c.draw(); }); this.loopReq = setTimeout(function() { _0x53164c.loop(); }, 2); } Game.TICK_RATE = 33; Game.FDLC_TARGET = 3; Game.FDLC_MAX = Game.FDLC_TARGET + 2; Game.LEVEL_WARP_TIME = 100; Game.GAME_OVER_TIME = 200; Game.COINS_TO_LIFE = 30; Game.prototype.load = function(_0x12b6d9) { _0x5c48db.menu.load.show(); this.world = new _0x68499f(this, _0x12b6d9); for (_0x12b6d9 = 0; _0x12b6d9 < this.world.levels.length; _0x12b6d9++) for (var _0x53002a = this.world.levels[_0x12b6d9], _0x17face = 0; _0x17face < _0x53002a.zones.length; _0x17face++) for (var _0x470eb5 = _0x53002a.zones[_0x17face], _0x278b64 = 0; _0x278b64 < _0x470eb5.obj.length; _0x278b64++) { for (var _0x63b940 = _0x470eb5.obj[_0x278b64], _0x475f77 = [_0x63b940.pos], _0x5c83f4 = 0; _0x5c83f4 < _0x63b940.param.length; _0x5c83f4++) _0x475f77.push(_0x63b940.param[_0x5c83f4]); this.createObject(_0x63b940.type, _0x53002a['id'], _0x470eb5['id'], _0xd3ee2a.decode(_0x63b940.pos), _0x475f77); } }; Game.prototype.send = function(_0x5ab23b) { _0x5c48db.net.send(_0x5ab23b); }; Game.prototype.handlePacket = function(_0x5a461a) { switch (_0x5a461a.type) { case "g12": return this.updatePlayerList(_0x5a461a), !0; case "g13": return this.gameStartTimer(_0x5a461a), !0; default: return !1; } }; Game.prototype.updatePlayerList = function(_0x305f6e) { this.players = _0x305f6e.players; void 0 !== this.pid && this.updateTeam(); }; Game.prototype.gameStartTimer = function(_0x20b427) { 0 > this.startTimer && this.play("sfx/alert.wav", 1, 0x0); 0 < _0x20b427.time ? (this.startTimer = _0x20b427.time, this.remain = this.players.length) : this.doStart(); }; Game.prototype.updateTeam = function() { if (this.team = this.getPlayerInfo(this.pid).team) for (var _0x24f69f = 0; _0x24f69f < this.players.length; _0x24f69f++) { var _0xb508a1 = this.players[_0x24f69f]; if (_0xb508a1['id'] !== this.pid && _0xb508a1.team === this.team) { var _0xf52a2a = this.getGhost(_0xb508a1['id']); _0xf52a2a && (_0xf52a2a.name = _0xb508a1.name); } } }; Game.prototype.handleBinary = function(_0x1114ac) { _0x1114ac = _0x1befeb.decode(_0x1114ac); this.ready ? this.updatePacket(_0x1114ac) : this.doUpdate(_0x1114ac); }; Game.prototype.updatePacket = function(_0x4f4d1c) { for (this.buffer.push(_0x4f4d1c); this.buffer.length > Game.FDLC_MAX;) _0x4f4d1c = this.buffer.shift(), this.doUpdate(_0x4f4d1c); }; Game.prototype.doUpdate = function(_0x162003) { for (var _0x5ec49a = 0; _0x5ec49a < _0x162003.length; _0x5ec49a++) { var _0x6b25f9 = _0x162003[_0x5ec49a]; switch (_0x6b25f9.designation) { case 2: this.doNET001(_0x6b25f9); break; case 16: this.doNET010(_0x6b25f9); break; case 17: this.doNET011(_0x6b25f9); break; case 18: this.doNET012(_0x6b25f9); break; case 19: this.doNET013(_0x6b25f9); break; case 23: this.doNET017(_0x6b25f9); break; case 24: this.doNET018(_0x6b25f9); break; case 32: this.doNET020(_0x6b25f9); break; case 48: this.doNET030(_0x6b25f9); } } }; Game.prototype.doNET001 = function(_0x441822) { this.pid = _0x441822.pid; this.ready = !0; _0x5c48db.menu.game.show(); }; Game.prototype.doNET010 = function(_0x19d069) { if (_0x19d069.pid !== this.pid) { var _0x40e3dd = this.createObject(_0x307949['ID'], _0x19d069.level, _0x19d069.zone, _0xd3ee2a.decode(_0x19d069.pos), [_0x19d069.pid]); _0x40e3dd.setState(_0x307949.SNAME.GHOST); this.team && (_0x19d069 = this.getPlayerInfo(_0x19d069.pid)) && _0x19d069['id'] !== this.pid && _0x19d069.team === this.team && (_0x40e3dd = this.getGhost(_0x19d069['id'])) && (_0x40e3dd.name = _0x19d069.name); } }; Game.prototype.doNET011 = function(_0xe3249a) { _0xe3249a.pid !== this.pid && ((_0xe3249a = this.getGhost(_0xe3249a.pid)) && _0xe3249a.kill(), this.remain = this.getRemain()); }; Game.prototype.doNET012 = function(_0x5efd85) { if (_0x5efd85.pid !== this.pid) { var _0x58f987 = this.getGhost(_0x5efd85.pid); _0x58f987 && _0x58f987.update(_0x5efd85); } }; Game.prototype.doNET013 = function(_0x540528) { _0x540528.pid !== this.pid && this.getGhost(_0x540528.pid).trigger(_0x540528.type); }; Game.prototype.doNET017 = function(_0x3747fd) { _0x3747fd = Cookies.get("heated_gamer_moments"); Cookies.set("heated_gamer_moments", _0x3747fd ? parseInt(_0x3747fd) + 1 : 0x1, { 'expires': 365 }); }; Game.prototype.doNET018 = function(_0x48ae54) { if (!(0 >= _0x48ae54.result)) { _0x48ae54.pid === this.pid ? this.rate = _0x48ae54.extra : 0 !== this.rate && _0x48ae54.result++; var _0x42fcba = this.getGhost(_0x48ae54.pid); if (_0x42fcba && (_0x42fcba = this.getText(_0x42fcba.level, _0x42fcba.zone, _0x48ae54.result.toString()))) { var _0x2cc961 = this.getPlayerInfo(_0x48ae54.pid).name; this.createObject(_0x1e1f24['ID'], _0x42fcba.level, _0x42fcba.zone, _0x4628a4.add(_0x42fcba.pos, _0x4628a4.make(0, -3)), [void 0, -0.1, 0.25, "#FFFFFF", _0x2cc961]); } _0x48ae54.pid === this.pid && ((_0x42fcba = this.getPlayer()) && _0x42fcba.axe(_0x48ae54.result), this.victory = _0x48ae54.result, 1 === _0x48ae54.result && (_0x48ae54 = Cookies.get("epic_gamer_moments"), Cookies.set("epic_gamer_moments", _0x48ae54 ? parseInt(_0x48ae54) + 1 : 0x1, { 'expires': 365 }))); } }; Game.prototype.doNET020 = function(_0xa68bc6) { if (!(_0xa68bc6.pid === this.pid && 160 > _0xa68bc6.type)) { var _0x58e2c4 = this.getObject(_0xa68bc6.level, _0xa68bc6.zone, _0xa68bc6.oid); _0x58e2c4 && _0x58e2c4.update(_0xa68bc6.type); } }; Game.prototype.doNET030 = function(_0x17604a) { _0x17604a.pid !== this.pid && this.world.getZone(_0x17604a.level, _0x17604a.zone).update(this, _0x17604a.pid, _0x17604a.level, _0x17604a.zone, _0x17604a.pos['x'], _0x17604a.pos['y'], _0x17604a.type); }; Game.prototype.doStart = function() { this.startTimer = -1; this.startDelta = _0x35d3bd.time.now(); this.doSpawn(); }; Game.prototype.doDetermine = function() { var _0x3bc016 = this.input.pop(); 0 < _0x3bc016.touch.length ? this.touchMode = !0 : 0x0 < _0x3bc016.keyboard.length && (this.touchMode = !1); this.touchMode ? this.doTouch(_0x3bc016) : this.doInput(_0x3bc016); }; Game.prototype.doTouch = function(_0x16ab60) { var _0xf827ff = this.input, _0x4d1269 = this.getPlayer(); this.display.camera.scale = 2; if (!this.touchFull) { var _0x32b9fa = document.documentElement; _0x32b9fa.requestFullscreen ? this.container.requestFullscreen() : _0x32b9fa.mozRequestFullScreen ? _0x32b9fa.mozRequestFullScreen() : _0x32b9fa.webkitRequestFullscreen ? _0x32b9fa.webkitRequestFullscreen() : _0x32b9fa.msRequestFullscreen && _0x32b9fa.msRequestFullscreen(); this.touchFull = !0; } for (var _0x19b888 = this, _0x32b9fa = this.display.canvas.width, _0x43b0a9 = this.display.canvas.height, _0x4cea84 = !1, _0x56e5b0 = !1, _0x32b9fa = [{ 'pos': _0x4628a4.make(_0x32b9fa - 85, _0x43b0a9 - 85), 'dim': _0x4628a4.make(85, 0x55), 'press': function() { _0x4cea84 = !0; } }, { 'pos': _0x4628a4.make(_0x32b9fa - 85, _0x43b0a9 - 170), 'dim': _0x4628a4.make(85, 0x55), 'press': function() { _0x56e5b0 = !0; } }, { 'pos': _0x4628a4.make(_0x32b9fa - 85, _0x43b0a9 - 255), 'dim': _0x4628a4.make(85, 0x55), 'click': function() { _0x19b888.touchRun = !_0x19b888.touchRun; } }, { 'pos': _0x4628a4.make(_0x32b9fa - 24 - 0x8, 40), 'dim': _0x4628a4.make(24, 0x18), 'click': function() { _0x19b888.audio.muteMusic = !_0x19b888.audio.muteMusic; _0x19b888.audio.saveSettings(); } }, { 'pos': _0x4628a4.make(_0x32b9fa - 24 - 0x8 - 24 - 0x8, 40), 'dim': _0x4628a4.make(24, 0x18), 'click': function() { _0x19b888.audio.muteSound = !_0x19b888.audio.muteSound; _0x19b888.audio.saveSettings(); } }], _0x2548fc, _0x43b0a9 = 0; _0x43b0a9 < _0xf827ff.touch.pos.length; _0x43b0a9++) { var _0xb6453b = _0xf827ff.touch.pos[_0x43b0a9]; if (this.thumbId === _0xb6453b['id']) _0x2548fc = _0xb6453b, this.thumbId = _0xb6453b['id'], this.thumbPos = _0xb6453b; else for (_0x43b0a9 = 0; _0x43b0a9 < _0x32b9fa.length; _0x43b0a9++) { var _0x5b2133 = _0x32b9fa[_0x43b0a9]; _0x4c4bae.inside(_0xb6453b, _0x5b2133.pos, _0x5b2133.dim) && _0x5b2133.press && _0x5b2133.press(); } } for (_0x43b0a9 = 0; _0x43b0a9 < _0x16ab60.touch.length; _0x43b0a9++) { _0xb6453b = _0x16ab60.touch[_0x43b0a9]; _0xf827ff = !1; for (_0x43b0a9 = 0; _0x43b0a9 < _0x32b9fa.length; _0x43b0a9++) if (_0x5b2133 = _0x32b9fa[_0x43b0a9], _0x4c4bae.inside(_0xb6453b, _0x5b2133.pos, _0x5b2133.dim)) { _0xf827ff = !0; _0x5b2133.click && _0x5b2133.click(); break; } _0x2548fc || _0xf827ff || (_0x2548fc = _0xb6453b, this.thumbId = _0xb6453b['id'], this.thumbPos = this.thumbOrigin = _0xb6453b); } var _0x204529; if (_0x2548fc) { _0x16ab60 = Math.min(64, _0x4628a4.distance(this.thumbPos, this.thumbOrigin)); var _0x90e934 = _0x4628a4.normalize(_0x4628a4.subtract(this.thumbPos, this.thumbOrigin)); _0x204529 = _0x4628a4.scale(_0x90e934, _0x16ab60 / 64); this.thumbPos = _0x4628a4.add(this.thumbOrigin, _0x4628a4.scale(_0x90e934, _0x16ab60)); } else this.thumbPos = this.thumbOrigin = this.thumbId = void 0; _0x4d1269 && _0x90e934 ? (_0x90e934 = [0, 0x0], 0.33 < _0x204529['x'] && _0x90e934[0]++, -0.33 > _0x204529['x'] && _0x90e934[0]--, 0.33 < _0x204529['y'] && _0x90e934[1]--, -0.33 > _0x204529['y'] && _0x90e934[1]++, _0x4d1269.input(_0x90e934, _0x4cea84, this.touchRun ? !_0x56e5b0 : _0x56e5b0)) : _0x4d1269 && _0x4d1269.input([0, 0x0], _0x4cea84, this.touchRun ? !_0x56e5b0 : _0x56e5b0); }; Game.prototype.doInput = function(_0x272a96) { this.input.pad.update(); var _0x452817 = this.input, _0x12e188 = this.input.mouse, _0x7723c1 = this.input.keyboard.keys, _0x2f8a36 = this.input.pad; this.inx27 = _0x7723c1[27]; var _0x9016e3 = this.getPlayer(); if (_0x9016e3) { var _0x46d9a6 = [0, 0x0]; (_0x7723c1[_0x452817.assignK['up']] || _0x2f8a36.button(_0x452817.assignG['up']) || -0.1 > _0x2f8a36['ax']['y']) && _0x46d9a6[1]++; (_0x7723c1[_0x452817.assignK.down] || _0x2f8a36.button(_0x452817.assignG.down) || 0.1 < _0x2f8a36['ax']['y']) && _0x46d9a6[1]--; (_0x7723c1[_0x452817.assignK.left] || _0x2f8a36.button(_0x452817.assignG.left) || -0.1 > _0x2f8a36['ax']['x']) && _0x46d9a6[0]--; (_0x7723c1[_0x452817.assignK.right] || _0x2f8a36.button(_0x452817.assignG.right) || 0.1 < _0x2f8a36['ax']['x']) && _0x46d9a6[0]++; var _0x13ec31 = _0x7723c1[_0x452817.assignK['a']] || _0x2f8a36.button(_0x452817.assignG['a']), _0x452817 = _0x7723c1[_0x452817.assignK['b']] || _0x2f8a36.button(_0x452817.assignG['b']); _0x12e188.spin && this.display.camera.zoom(_0x12e188.spin); _0x9016e3.input(_0x46d9a6, _0x13ec31, _0x452817); for (var _0x2b9352 = this, _0x452817 = this.display.canvas.width, _0x12e188 = [{ 'pos': _0x4628a4.make(_0x452817 - 24 - 0x8, 40), 'dim': _0x4628a4.make(24, 0x18), 'click': function() { _0x2b9352.audio.muteMusic = !_0x2b9352.audio.muteMusic; _0x2b9352.audio.saveSettings(); } }, { 'pos': _0x4628a4.make(_0x452817 - 24 - 0x8 - 24 - 0x8, 40), 'dim': _0x4628a4.make(24, 0x18), 'click': function() { _0x2b9352.audio.muteSound = !_0x2b9352.audio.muteSound; _0x2b9352.audio.saveSettings(); } }], _0x9016e3 = 0; _0x9016e3 < _0x272a96.mouse.length; _0x9016e3++) for (_0x46d9a6 = _0x272a96.mouse[_0x9016e3], _0x13ec31 = 0; _0x13ec31 < _0x12e188.length; _0x13ec31++) _0x452817 = _0x12e188[_0x13ec31], 0 === _0x46d9a6.btn && _0x4c4bae.inside(_0x46d9a6.pos, _0x452817.pos, _0x452817.dim) && _0x452817.click(); } }; Game.prototype.doStep = function() { var _0x2d3429 = this.getPlayer(); if (_0x2d3429 && void 0 !== this.levelWarpId && 0 < this.levelWarpTimer && 1 > --this.levelWarpTimer) { var _0x18dab7 = this.world.getLevel(this.levelWarpId).getInitial(); _0x2d3429.level = _0x18dab7.level; _0x2d3429.zone = _0x18dab7['id']; _0x2d3429.pos = _0xd3ee2a.decode(_0x18dab7.initial); _0x2d3429.autoTarget = void 0; _0x2d3429.grounded = !1; _0x2d3429.show(); _0x2d3429.invuln(); this.levelWarpId = void 0; } for (_0x18dab7 = 0; _0x18dab7 < this.objects.length; _0x18dab7++) { var _0x11aea3 = this.objects[_0x18dab7]; _0x11aea3.step(); _0x11aea3.garbage && this.objects.splice(_0x18dab7--, 1); } _0x18dab7 = this.getZone(); _0x2d3429 && !_0x2d3429.dead && this.display.camera.position(_0x4628a4.make(_0x2d3429.pos['x'], 0.5 * _0x18dab7.dimensions()['y'])); this.world.step(); for (_0x18dab7 = 0; _0x18dab7 < this.sounds.length; _0x18dab7++) this.sounds[_0x18dab7].done() && this.sounds.splice(_0x18dab7--, 1); this.doMusic(); this.audio.update(); void 0 === this.startDelta || this.gameOver || _0x2d3429 ? this.gameOver ? ++this.gameOverTimer > Game.GAME_OVER_TIME && _0x5c48db.close() : this.gameOverTimer = 0 : 0x0 < this.lives && 0 >= this.victory ? (_0x2d3429 = this.getZone().level, this.doSpawn(), this.levelWarp(_0x2d3429), this.lives--) : 45 < ++this.gameOverTimer && (this.gameOver = !0, this.gameOverTimer = 0); this.lastDraw = this.frame; this.frame++; }; Game.prototype.doSpawn = function() { if (!this.getPlayer()) { var _0x55031d = this.getZone(), _0x1f92b4 = _0x55031d.initial; this.createObject(_0x307949['ID'], _0x55031d.level, _0x55031d['id'], _0xd3ee2a.decode(_0x1f92b4), [this.pid]); this.out.push(_0xd472e9.encode(_0x55031d.level, _0x55031d, _0x1f92b4)); } this.updateTeam(); }; Game.prototype.doMusic = function() { var _0x59c784 = this.getPlayer(), _0x48cc46 = this.getZone(); this.gameOver ? this.audio.setMusic("music/gameover.mp3", !1) : _0x59c784 && _0x59c784.dead ? this.audio.setMusic("music/dead.mp3", !1) : _0x59c784 && _0x59c784.autoTarget && 0 >= this.victory ? this.audio.setMusic("music/level.mp3", !1) : 0 < this.victory && !this.victoryMusic ? (this.audio.setMusic("music/castle.mp3", !1), this.victoryMusic = !0) : 0 < this.victory && 4 > this.victory && this.victoryMusic && !this.audio.music.playing ? this.audio.setMusic("music/victory.mp3", !1) : _0x59c784 && 0 >= this.levelWarpTimer && void 0 !== this.startDelta && !this.victoryMusic && ('' !== _0x48cc46.music ? this.audio.setMusic(_0x48cc46.music, !0) : this.audio.stopMusic()); }; Game.prototype.doPush = function() { var _0x3a34ba = this.getPlayer(); _0x3a34ba && !_0x3a34ba.dead && this.out.push(_0xebf263.encode(_0x3a34ba.level, _0x3a34ba.zone, _0x3a34ba.pos, _0x3a34ba.sprite['ID'], _0x3a34ba.reverse)); _0x3a34ba = _0x5b3c43(this.out); this.out = []; _0x5c48db.net.sendBinary(_0x3a34ba); }; Game.prototype.createObject = function(_0x2cfee2, _0x42c475, _0x3d76c7, _0x5b9308, _0x269b88) { _0x42c475 = [void 0, this, _0x42c475, _0x3d76c7, _0x5b9308]; for (_0x3d76c7 = 0; _0x3d76c7 < _0x269b88.length; _0x3d76c7++) _0x42c475.push(_0x269b88[_0x3d76c7]); _0x2b132.OBJECT(_0x2cfee2); _0x2cfee2 = new(Function.prototype.bind.apply(_0x2b132.OBJECT(_0x2cfee2), _0x42c475))(); this.objects.push(_0x2cfee2); return _0x2cfee2; }; Game.prototype.getObject = function(_0x46bc38, _0x39a7d2, _0x571f38) { for (var _0x46a10e = 0; _0x46a10e < this.objects.length; _0x46a10e++) { var _0x31691a = this.objects[_0x46a10e]; if (void 0 !== _0x31691a.oid && _0x31691a.level === _0x46bc38 && _0x31691a.zone === _0x39a7d2 && _0x31691a.oid === _0x571f38) return _0x31691a; } }; Game.prototype.getFlag = function(_0x3ff6f8, _0x23ac07) { for (var _0x1712ec = 0; _0x1712ec < this.objects.length; _0x1712ec++) { var _0x3aad16 = this.objects[_0x1712ec]; if (_0x3aad16.level === _0x3ff6f8 && _0x3aad16.zone === _0x23ac07 && _0x3aad16 instanceof _0x42a575) return _0x3aad16; } }; Game.prototype.getText = function(_0x55b1f3, _0xa7c596, _0x26077c) { for (var _0x4a1af5 = 0; _0x4a1af5 < this.objects.length; _0x4a1af5++) { var _0x5dfc3b = this.objects[_0x4a1af5]; if (_0x5dfc3b && _0x5dfc3b.level === _0x55b1f3 && _0x5dfc3b.zone === _0xa7c596 && _0x5dfc3b instanceof _0x1e1f24 && _0x5dfc3b.text === _0x26077c.toString()) return _0x5dfc3b; } }; Game.prototype.getPlatforms = function() { for (var _0x162323 = this.getZone(), _0x5a8ebc = [], _0x23d166 = 0; _0x23d166 < this.objects.length; _0x23d166++) { var _0x412059 = this.objects[_0x23d166]; (_0x412059 instanceof _0x23afdb || _0x412059 instanceof _0x4cfe85) && _0x412059.level === _0x162323.level && _0x412059.zone === _0x162323['id'] && _0x5a8ebc.push(_0x412059); } return _0x5a8ebc; }; Game.prototype.getGhost = function(_0x45d2df) { for (var _0x2e7390 = 0; _0x2e7390 < this.objects.length; _0x2e7390++) { var _0x441994 = this.objects[_0x2e7390]; if (void 0 !== _0x441994.pid && _0x441994.pid === _0x45d2df) return _0x441994; } }; Game.prototype.getPlayer = function() { for (var _0x53f94f = 0; _0x53f94f < this.objects.length; _0x53f94f++) { var _0x26cc25 = this.objects[_0x53f94f]; if (void 0 !== _0x26cc25.pid && _0x26cc25.pid === this.pid) return _0x26cc25; } }; Game.prototype.getZone = function() { var _0x3094c6 = this.getPlayer(); return _0x3094c6 ? this.lastZone = this.world.getZone(_0x3094c6.level, _0x3094c6.zone) : this.lastZone ? this.lastZone : this.world.getInitialZone(); }; Game.prototype.getPlayerInfo = function(_0x4af6ab) { for (var _0x1dbfac = 0; _0x1dbfac < this.players.length; _0x1dbfac++) { var _0x566f7a = this.players[_0x1dbfac]; if (_0x566f7a['id'] === _0x4af6ab) return _0x566f7a; } }; Game.prototype.getRemain = function() { for (var _0x3b690b = 0, _0x5c3d42 = 0; _0x5c3d42 < this.players.length; _0x5c3d42++) { var _0x140df1 = this.getGhost(this.players[_0x5c3d42]['id']); _0x140df1 && !_0x140df1.dead && _0x3b690b++; } return _0x3b690b; }; Game.prototype.play = function(_0x15cf7c, _0x4e52e8, _0x2ec40e) { _0x15cf7c = this.audio.getAudio(_0x15cf7c, _0x4e52e8, _0x2ec40e, "effect"); _0x15cf7c.play(); this.sounds.push(_0x15cf7c); }; Game.prototype.levelWarp = function(_0x42aa45) { this.levelWarpId = _0x42aa45; this.levelWarpTimer = Game.LEVEL_WARP_TIME; this.getPlayer().hide(); }; Game.prototype.coinage = function() { this.coins = Math.min(99, this.coins + 1); this.coins >= Game.COINS_TO_LIFE && (this.lifeage(), this.coins = 0); this.play("sfx/coin.wav", 0.4, 0); }; Game.prototype.lifeage = function() { this.lives = Math.min(99, this.lives + 1); this.play("sfx/life.wav", 1, 0x0); }; Game.prototype.loop = function() { try { if (this.ready && void 0 !== this.startDelta) { var _0x141b78 = _0x35d3bd.time.now(), _0xfc800d = parseInt((_0x141b78 - this.startDelta) / Game.TICK_RATE); if (_0xfc800d > this.frame) { for (var _0x46e24e = !0; this.buffer.length > Game.FDLC_TARGET || _0x46e24e && 0 < this.buffer.length;) { var _0x286104 = this.buffer.shift(); this.doUpdate(_0x286104); _0x46e24e = !1; } for (this.doDetermine(); _0xfc800d > this.frame;) this.doStep(); this.doPush(); this.delta = _0x141b78; } } } catch (_0x210b90) {} var _0x5b7ec0 = this; this.loopReq = setTimeout(function() { _0x5b7ec0.loop(); }, 2); }; Game.prototype.draw = function() { this.lastDraw === this.frame && void 0 !== this.startDelta || this.display.draw(); var _0x9123e0 = this; this.frameReq = _0x4b822c.call(window, function() { _0x9123e0.draw(); }); }; Game.prototype.destroy = function() { _0x2d0f3c.call(window, this.frameReq); clearTimeout(this.loopReq); this.input.destroy(); this.display.destroy(); this.audio.destroy(); }; "use strict"; function Lobby(_0x41a8dd) { Game.call(this, _0x41a8dd); this.lobbyTimer = 90; } Lobby.prototype.load = Game.prototype.load; Lobby.prototype.send = Game.prototype.send; Lobby.prototype.handlePacket = Game.prototype.handlePacket; Lobby.prototype.updatePlayerList = Game.prototype.updatePlayerList; Lobby.prototype.gameStartTimer = function() {}; Lobby.prototype.updateTeam = Game.prototype.updateTeam; Lobby.prototype.handleBinary = Game.prototype.handleBinary; Lobby.prototype.updatePacket = Game.prototype.updatePacket; Lobby.prototype.doUpdate = Game.prototype.doUpdate; Lobby.prototype.doNET001 = Game.prototype.doNET001; Lobby.prototype.doNET010 = Game.prototype.doNET010; Lobby.prototype.doNET011 = Game.prototype.doNET011; Lobby.prototype.doNET012 = Game.prototype.doNET012; Lobby.prototype.doNET013 = Game.prototype.doNET013; Lobby.prototype.doNET020 = Game.prototype.doNET020; Lobby.prototype.doNET030 = Game.prototype.doNET030; Lobby.prototype.doStart = Game.prototype.doStart; Lobby.prototype.doDetermine = Game.prototype.doDetermine; Lobby.prototype.doInput = Game.prototype.doInput; Lobby.prototype.doTouch = Game.prototype.doTouch; Lobby.prototype.doStep = function() { this.doSpawn(); Game.prototype.doStep.call(this); }; Lobby.prototype.doSpawn = Game.prototype.doSpawn; Lobby.prototype.doMusic = Game.prototype.doMusic; Lobby.prototype.doPush = Game.prototype.doPush; Lobby.prototype.createObject = Game.prototype.createObject; Lobby.prototype.getObject = Game.prototype.getObject; Lobby.prototype.getFlag = Game.prototype.getFlag; Lobby.prototype.getPlatforms = Game.prototype.getPlatforms; Lobby.prototype.getGhost = Game.prototype.getGhost; Lobby.prototype.getPlayer = Game.prototype.getPlayer; Lobby.prototype.getZone = Game.prototype.getZone; Lobby.prototype.getPlayerInfo = Game.prototype.getPlayerInfo; Lobby.prototype.getRemain = Game.prototype.getRemain; Lobby.prototype.play = Game.prototype.play; Lobby.prototype.levelWarp = Game.prototype.levelWarp; Lobby.prototype.coinage = Game.prototype.coinage; Lobby.prototype.lifeage = Game.prototype.lifeage; Lobby.prototype.loop = function() { 0 < this.lobbyTimer ? this.lobbyTimer-- : void 0 === this.startDelta && this.doStart(); Game.prototype.loop.call(this); }; Lobby.prototype.draw = Game.prototype.draw; Lobby.prototype.destroy = Game.prototype.destroy; "use strict"; function Jail(_0x338d27) { Game.call(this, _0x338d27); this.lobbyTimer = 90; } Jail.prototype.load = Game.prototype.load; Jail.prototype.send = Game.prototype.send; Jail.prototype.handlePacket = Game.prototype.handlePacket; Jail.prototype.updatePlayerList = Game.prototype.updatePlayerList; Jail.prototype.gameStartTimer = function() {}; Jail.prototype.updateTeam = Game.prototype.updateTeam; Jail.prototype.handleBinary = Game.prototype.handleBinary; Jail.prototype.updatePacket = Game.prototype.updatePacket; Jail.prototype.doUpdate = Game.prototype.doUpdate; Jail.prototype.doNET001 = Game.prototype.doNET001; Jail.prototype.doNET010 = Game.prototype.doNET010; Jail.prototype.doNET011 = Game.prototype.doNET011; Jail.prototype.doNET012 = Game.prototype.doNET012; Jail.prototype.doNET013 = Game.prototype.doNET013; Jail.prototype.doNET020 = Game.prototype.doNET020; Jail.prototype.doNET030 = Game.prototype.doNET030; Jail.prototype.doStart = Game.prototype.doStart; Jail.prototype.doDetermine = Game.prototype.doDetermine; Jail.prototype.doInput = Game.prototype.doInput; Jail.prototype.doTouch = Game.prototype.doTouch; Jail.prototype.doStep = function() { Game.prototype.doStep.call(this); }; Jail.prototype.doSpawn = function() {}; Jail.prototype.doMusic = Game.prototype.doMusic; Jail.prototype.doPush = Game.prototype.doPush; Jail.prototype.createObject = Game.prototype.createObject; Jail.prototype.getObject = Game.prototype.getObject; Jail.prototype.getFlag = Game.prototype.getFlag; Jail.prototype.getPlatforms = Game.prototype.getPlatforms; Jail.prototype.getGhost = Game.prototype.getGhost; Jail.prototype.getPlayer = Game.prototype.getPlayer; Jail.prototype.getZone = Game.prototype.getZone; Jail.prototype.getPlayerInfo = Game.prototype.getPlayerInfo; Jail.prototype.getRemain = Game.prototype.getRemain; Jail.prototype.play = Game.prototype.play; Jail.prototype.levelWarp = Game.prototype.levelWarp; Jail.prototype.coinage = Game.prototype.coinage; Jail.prototype.lifeage = Game.prototype.lifeage; Jail.prototype.loop = function() { 0 < this.lobbyTimer ? this.lobbyTimer-- : void 0 === this.startDelta && this.doStart(); Game.prototype.loop.call(this); }; Jail.prototype.draw = Game.prototype.draw; Jail.prototype.destroy = Game.prototype.destroy; "use strict"; function _0x4a78d1() { this.menu = new Menu(); this.net = new Net(); } _0x4a78d1.prototype.init = function() { var _0x2c1b54 = this; this.menu.disclaim.show(); setTimeout(function() { _0x2c1b54.menu.load.show(); $.ajax({ 'url': "/royale/status", 'type': "GET", 'timeout': 3000, 'success': function(_0x4120a1) { _0x4120a1.result ? _0x2c1b54.menu.error.show(_0x4120a1.result) : _0x2c1b54.menu.main.show(_0x4120a1.active); }, 'error': function() { _0x2c1b54.menu.error.show("An unknown error occured while connecting to the game server..."); } }); }, 2000); }; _0x4a78d1.prototype.load = function(_0x3f8d80) { if (this.game instanceof Game) this.menu.error.show("State error. Game already loaded."); else switch (this.game instanceof Lobby && this.game.destroy(), _0x3f8d80.type) { case "game": this.game = new Game(_0x3f8d80); break; case "lobby": this.game = new Lobby(_0x3f8d80); break; case "jail": this.game = new Jail(_0x3f8d80); break; default: this.menu.error.show("Critical error! Game file missing type!"); } }; _0x4a78d1.prototype.ingame = function() { return !!this.game; }; _0x4a78d1.prototype.join = function(_0x327f2f, _0x3dc984) { this.ingame() ? this.menu.error.show("An error occured while starting game...") : (this.menu.load.show(), this.net.connect(_0x327f2f, _0x3dc984)); }; _0x4a78d1.prototype.close = function() { this.menu.load.show(); this.ingame() && this.net.close(); location.reload(); }; var _0x5c48db = new _0x4a78d1(); _0x5c48db.init();