From 9e5a6127394b80b21cda34068cd42bff583ee340 Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 1 Jul 2019 21:23:13 +1000 Subject: [PATCH] misc fixes --- client/src/animations.socket.jsx | 4 +--- client/src/components/animations.jsx | 3 --- client/src/components/game.construct.jsx | 3 +-- client/src/constants.jsx | 12 +++--------- 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/client/src/animations.socket.jsx b/client/src/animations.socket.jsx index c3df8347..9dcc6ebd 100644 --- a/client/src/animations.socket.jsx +++ b/client/src/animations.socket.jsx @@ -29,17 +29,15 @@ function createSocket(store) { if (['Disable', 'TargetKo'].includes(r.event[0])) return cb(); // Create sub events for combat animations const sequence = getCombatSequence(r); - console.log(sequence); return eachSeries(sequence, (stages, sCb) => { const stagedR = Object.create(r); stagedR.stages = stages; let timeout = 0; if (stages.includes('START_SKILL') && stages.includes('END_SKILL')) { - timeout = (TIMES.SOURCE_DURATION_MS + TIMES.TARGET_DURATION_MS - TIMES.TARGET_DELAY_MS); + timeout = (TIMES.TARGET_DURATION_MS + TIMES.TARGET_DELAY_MS); } else if (stages.includes('START_SKILL')) timeout = TIMES.SOURCE_DURATION_MS; else if (stages.includes('END_SKILL')) timeout = TIMES.TARGET_DURATION_MS; else if (stages.includes('POST_SKILL')) timeout = TIMES.POST_SKILL_DURATION_MS; - store.dispatch(actions.setResolution(stagedR)); return setTimeout(sCb, timeout); diff --git a/client/src/components/animations.jsx b/client/src/components/animations.jsx index 7d807024..a3d6e984 100644 --- a/client/src/components/animations.jsx +++ b/client/src/components/animations.jsx @@ -40,13 +40,11 @@ const SOURCE_ANIM_MS = 850; function animations(props) { const { game, account, resolution, player, construct } = props; - console.log(resolution); if (!resolution) return false; const [, event] = resolution.event; if (!event.skill) return false; if (!resolution.target) return false; const { stages } = resolution; - console.log(stages); // source animation if (resolution.source.id === construct.id && stages.includes('START_SKILL')) { @@ -89,7 +87,6 @@ function animations(props) { if (resolution.target.id !== construct.id) return false; // target animation - console.log(stages); const anim = text => { console.log(text); if (!text || !stages.includes('END_SKILL')) return false; diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx index 9427f7b2..4a729976 100644 --- a/client/src/components/game.construct.jsx +++ b/client/src/components/game.construct.jsx @@ -2,8 +2,7 @@ const { connect } = require('preact-redux'); const preact = require('preact'); const range = require('lodash/range'); -const actions = require('../actions'); -const { STATS, eventClasses, getCombatText } = require('../utils'); +const { STATS, eventClasses } = require('../utils'); const { ConstructAvatar } = require('./construct'); const animations = require('./animations'); const shapes = require('./shapes'); diff --git a/client/src/constants.jsx b/client/src/constants.jsx index e8d0b929..4db86e3c 100644 --- a/client/src/constants.jsx +++ b/client/src/constants.jsx @@ -1,15 +1,9 @@ module.exports = { TIMES: { -<<<<<<< HEAD -======= - RESOLUTION_TOTAL_MS: 2000, - // RESOLUTION_TOTAL_MS: 200000, - ->>>>>>> anims-change SOURCE_DURATION_MS: 1000, - TARGET_DELAY_MS: 500, - TARGET_DURATION_MS: 1000, - POST_SKILL_DURATION_MS: 750, + TARGET_DELAY_MS: 700, + TARGET_DURATION_MS: 1300, + POST_SKILL_DURATION_MS: 1000, }, COLOURS: {