Skip to content

Instantly share code, notes, and snippets.

"use strict";var _ref;function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}var imageCache={};function loadImage(e){var t=imageCache[e];return t||(t=new Image,(imageCache[e]=t).src=e),t}var doubleDeathImage=loadImage("images/double_death.png"),portal=null,weaponBox=null,weaponUseCount={},weaponConfigs=[{id:"sword",name:"Sword",flavor:"Slice slice!",type:"melee",frameSpeed:100,frameFilenames:["sword_0.png","sword_1.png"],destroyType:"sword",unlimited:!0,hitBox:{x:50,y:50,width:30,height:30}},{id:"bat",name:"Home Run Bat",flavor:"Batter up!",type:"melee",frameSpeed:75,frameCount:2,stillFrameFilename:"bat_still.png",frameFilenames:["bat_0.png","bat_1.png","bat_2.png","bat_3.png"],xOffset:-1,yOffset:-48.5,hideDino:!0,destroyType:"bat",unlimited:!0,hitBox:{x:50,y:50,width:10,height:15