misc fixes
This commit is contained in:
parent
81970f5abf
commit
9e5a612739
@ -29,17 +29,15 @@ function createSocket(store) {
|
|||||||
if (['Disable', 'TargetKo'].includes(r.event[0])) return cb();
|
if (['Disable', 'TargetKo'].includes(r.event[0])) return cb();
|
||||||
// Create sub events for combat animations
|
// Create sub events for combat animations
|
||||||
const sequence = getCombatSequence(r);
|
const sequence = getCombatSequence(r);
|
||||||
console.log(sequence);
|
|
||||||
return eachSeries(sequence, (stages, sCb) => {
|
return eachSeries(sequence, (stages, sCb) => {
|
||||||
const stagedR = Object.create(r);
|
const stagedR = Object.create(r);
|
||||||
stagedR.stages = stages;
|
stagedR.stages = stages;
|
||||||
let timeout = 0;
|
let timeout = 0;
|
||||||
if (stages.includes('START_SKILL') && stages.includes('END_SKILL')) {
|
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('START_SKILL')) timeout = TIMES.SOURCE_DURATION_MS;
|
||||||
else if (stages.includes('END_SKILL')) timeout = TIMES.TARGET_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;
|
else if (stages.includes('POST_SKILL')) timeout = TIMES.POST_SKILL_DURATION_MS;
|
||||||
|
|
||||||
store.dispatch(actions.setResolution(stagedR));
|
store.dispatch(actions.setResolution(stagedR));
|
||||||
|
|
||||||
return setTimeout(sCb, timeout);
|
return setTimeout(sCb, timeout);
|
||||||
|
|||||||
@ -40,13 +40,11 @@ const SOURCE_ANIM_MS = 850;
|
|||||||
|
|
||||||
function animations(props) {
|
function animations(props) {
|
||||||
const { game, account, resolution, player, construct } = props;
|
const { game, account, resolution, player, construct } = props;
|
||||||
console.log(resolution);
|
|
||||||
if (!resolution) return false;
|
if (!resolution) return false;
|
||||||
const [, event] = resolution.event;
|
const [, event] = resolution.event;
|
||||||
if (!event.skill) return false;
|
if (!event.skill) return false;
|
||||||
if (!resolution.target) return false;
|
if (!resolution.target) return false;
|
||||||
const { stages } = resolution;
|
const { stages } = resolution;
|
||||||
console.log(stages);
|
|
||||||
|
|
||||||
// source animation
|
// source animation
|
||||||
if (resolution.source.id === construct.id && stages.includes('START_SKILL')) {
|
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;
|
if (resolution.target.id !== construct.id) return false;
|
||||||
|
|
||||||
// target animation
|
// target animation
|
||||||
console.log(stages);
|
|
||||||
const anim = text => {
|
const anim = text => {
|
||||||
console.log(text);
|
console.log(text);
|
||||||
if (!text || !stages.includes('END_SKILL')) return false;
|
if (!text || !stages.includes('END_SKILL')) return false;
|
||||||
|
|||||||
@ -2,8 +2,7 @@ const { connect } = require('preact-redux');
|
|||||||
const preact = require('preact');
|
const preact = require('preact');
|
||||||
const range = require('lodash/range');
|
const range = require('lodash/range');
|
||||||
|
|
||||||
const actions = require('../actions');
|
const { STATS, eventClasses } = require('../utils');
|
||||||
const { STATS, eventClasses, getCombatText } = require('../utils');
|
|
||||||
const { ConstructAvatar } = require('./construct');
|
const { ConstructAvatar } = require('./construct');
|
||||||
const animations = require('./animations');
|
const animations = require('./animations');
|
||||||
const shapes = require('./shapes');
|
const shapes = require('./shapes');
|
||||||
|
|||||||
@ -1,15 +1,9 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
TIMES: {
|
TIMES: {
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
RESOLUTION_TOTAL_MS: 2000,
|
|
||||||
// RESOLUTION_TOTAL_MS: 200000,
|
|
||||||
|
|
||||||
>>>>>>> anims-change
|
|
||||||
SOURCE_DURATION_MS: 1000,
|
SOURCE_DURATION_MS: 1000,
|
||||||
TARGET_DELAY_MS: 500,
|
TARGET_DELAY_MS: 700,
|
||||||
TARGET_DURATION_MS: 1000,
|
TARGET_DURATION_MS: 1300,
|
||||||
POST_SKILL_DURATION_MS: 750,
|
POST_SKILL_DURATION_MS: 1000,
|
||||||
},
|
},
|
||||||
|
|
||||||
COLOURS: {
|
COLOURS: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user