// POSITIONING FNS // floors prevent subpixel rendering which looks trash const CANVAS_WIDTH = 1600; const CANVAS_HEIGHT = 1000; const headerWidth = () => CANVAS_WIDTH; const headerHeight = () => Math.floor(CANVAS_HEIGHT * 0.05); const menuCrypListWidth = () => Math.floor(CANVAS_WIDTH * 0.3); const menuCrypListHeight = () => Math.floor(CANVAS_HEIGHT * 0.5); const menuCrypListX = () => 0; const menuCrypListY = () => headerHeight(); const itemListWidth = () => Math.floor(CANVAS_WIDTH * 0.5); const itemListHeight = () => Math.floor(CANVAS_HEIGHT * 0.5); const itemListX = () => 0; const itemListY = () => Math.floor(CANVAS_HEIGHT * 0.5); const itemBlockWidth = () => Math.floor(itemListWidth() * 0.075); const itemBlockHeight = () => Math.floor(itemListHeight() * 0.12); const menuNavigationWidth = () => Math.floor(CANVAS_WIDTH * 0.5); const menuNavigationHeight = () => Math.floor(CANVAS_HEIGHT * 0.3); const menuNavigationX = () => Math.floor(CANVAS_WIDTH * 0.5); const menuNavigationY = () => Math.floor(CANVAS_HEIGHT * 0.7); const menuMainWidth = () => Math.floor(CANVAS_WIDTH * 0.7); const menuMainHeight = () => Math.floor(CANVAS_HEIGHT * 0.5); const menuMainX = () => Math.floor(CANVAS_WIDTH * 0.3); const menuMainY = () => headerHeight(); const combatWidth = () => CANVAS_WIDTH; const combatHeight = () => CANVAS_HEIGHT - headerHeight(); const combatY = () => headerHeight(); const combatX = () => 0; const combatCrypMargin = () => Math.floor((CANVAS_HEIGHT - headerHeight()) / 4.5); const combatTextMargin = () => Math.floor((CANVAS_HEIGHT - headerHeight()) / 35); const statsWidth = () => Math.floor(CANVAS_WIDTH - menuCrypListWidth()); const statsHeight = () => CANVAS_HEIGHT - headerHeight(); const statsY = () => headerHeight(); const statsX = () => menuCrypListWidth(); const statsKnownX = () => Math.floor(statsX() + statsWidth() / 4); const statsLearnableX = () => Math.floor(statsX() + statsWidth() / 2); const statsTextMargin = () => 24; const statsLearnableMargin = () => 12; const logWidth = () => Math.floor(combatWidth() * 0.5); const logHeight = () => Math.floor(combatHeight() * 0.3); const logY = () => Math.floor(headerHeight() + (combatHeight() * 0.7)); const logX = () => Math.floor(combatWidth() * 0.2); module.exports = { TEXT: { NORMAL: { fontFamily: 'Jura', fontSize: 18, color: '#ffffff' }, LEARNABLE: { fontFamily: 'Jura', fontSize: 18, color: '#ffffff' }, HEADER: { fontFamily: 'Jura', fontSize: 24, color: '#ffffff', fontStyle: 'bold' }, HOVER: { fontFamily: 'Jura', fontSize: 16, color: '#ffffff', backgroundColor: '#222222' }, }, POSITIONS: { HEADER: { width: headerWidth, height: headerHeight, }, CRYP_LIST: { x: menuCrypListX, y: menuCrypListY, width: menuCrypListWidth, height: menuCrypListHeight, }, MENU_MAIN: { x: menuMainX, y: menuMainY, width: menuMainWidth, height: menuMainHeight, }, NAVIGATION: { x: menuNavigationX, y: menuNavigationY, width: menuNavigationWidth, height: menuNavigationHeight, }, ITEM_LIST: { x: itemListX, y: itemListY, width: itemListWidth, height: itemListHeight, itemWidth: itemBlockWidth, itemHeight: itemBlockHeight, }, STATS: { x: statsX, y: statsY, width: statsWidth, height: statsHeight, knownX: statsKnownX, learnableX: statsLearnableX, textMargin: statsTextMargin, learnableMargin: statsLearnableMargin, }, COMBAT: { x: combatX, y: combatY, width: combatWidth, height: combatHeight, crypMargin: combatCrypMargin, textMargin: combatTextMargin, LOG: { x: logX, y: logY, width: logWidth, height: logHeight, }, }, }, COLOURS: { BLUE: 0x004bfe, CYAN: 0x27e7c0, PURPLE: 0x61008c, YELLOW: 0xfdfe02, ORANGE: 0xff9215, PINK: 0xe766b6, GRAY: 0x9d9ea0, LBLUE: 0x87c6f2, GREEN: 0x166c4f, BROWN: 0x583108, BLACK: 0x000000, RED: 0xff0000, WHITE: 0xffffff, SELECT: 0x003300, }, DELAYS: { MOVE_CREEP: 500, DAMAGE_TICK: 500, ANIMATION_DURATION: 1000, // wall: [500], // spit: [300, 500], // gravBomb: [300, 500], // gravBlast: [300, 500], // chargeBall: [300, 500], }, SKILLS: { LEARNABLE: [ { name: 'Amplify', description: 'increase the magic damage dealt by a cryp' }, { name: 'Attack', description: 'a fast attack with red damage' }, { name: 'Banish', description: 'target cryp is prevented from casting any skills and taking any damage' }, { name: 'Blast', description: 'blast the target with magic damage' }, { name: 'Block', description: 'decreases incoming red damage for 1T' }, { name: 'Curse', description: 'target cryp takes increased magic damage' }, { name: 'Decay', description: 'afflict a cryp with a blue damage based damage over time debuff' }, { name: 'Siphon', description: 'siphon hp from target cryp with a blue damage based debuff' }, { name: 'Empower', description: 'increase the red damage dealt by a cryp' }, { name: 'Haste', description: 'magical skill that increases speed of target cryp' }, { name: 'Heal', description: 'heal a cryp with blue damage' }, { name: 'Hex', description: 'magical based skill that prevents target cryp from using any skills' }, { name: 'Parry', description: 'prevents all red damage for 1T' }, { name: 'Purge', description: 'remove magical buffs from target cryp' }, { name: 'Purify', description: 'remove magical debuffs from target cryp' }, { name: 'Shield', description: 'grants immunity to magical skills to target cryp' }, { name: 'Silence', description: 'prevent target cryp from casting magical skills' }, { name: 'Slow', description: 'magical skill that reduces speed of target cryp' }, { name: 'Snare', description: 'prevents red skills from being used for 2T' }, { name: 'Stun', description: 'red skill that prevents target cryp from using any skills' }, { name: 'Throw', description: 'stuns and makes the target take increased red damage' }, { name: 'Triage', description: 'grants a blue damage based healing over time buff' } ] }, };