diff --git a/client/animations.test.js b/client/animations.test.js index 3271b840..b447e649 100644 --- a/client/animations.test.js +++ b/client/animations.test.js @@ -9,6 +9,6 @@ require('./assets/styles/vbox.less'); require('./assets/styles/game.less'); require('./assets/styles/player.less'); require('./assets/styles/styles.mobile.css'); -require('./assets/styles/instance.mobile.css'); +require('./assets/styles/instance.mobile.less'); require('./src/animations.test.jsx'); diff --git a/client/package.json b/client/package.json index a97bc66a..221ea1cf 100644 --- a/client/package.json +++ b/client/package.json @@ -41,7 +41,7 @@ "babel-plugin-module-resolver": "^3.2.0", "babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", - "eslint": "^5.6.0", + "eslint": "^5.16.0", "eslint-config-airbnb-base": "^13.1.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-react": "^7.11.1", diff --git a/client/src/actions.jsx b/client/src/actions.jsx index 282d2474..85b113de 100644 --- a/client/src/actions.jsx +++ b/client/src/actions.jsx @@ -4,6 +4,7 @@ export const setActiveConstruct = value => ({ type: 'SET_ACTIVE_CONSTRUCT', valu export const setAnimating = value => ({ type: 'SET_ANIMATING', value }); export const setAnimCb = value => ({ type: 'SET_ANIM_CB', value }); export const setAnimFocus = value => ({ type: 'SET_ANIM_FOCUS', value }); +export const setAnimSkill = value => ({ type: 'SET_ANIM_SKILL', value }); export const setAnimSource = value => ({ type: 'SET_ANIM_SOURCE', value }); export const setAnimTarget = value => ({ type: 'SET_ANIM_TARGET', value }); export const setAnimText = value => ({ type: 'SET_ANIM_TEXT', value }); diff --git a/client/src/animations.utils.jsx b/client/src/animations.utils.jsx index 788ba2f0..c74185fd 100644 --- a/client/src/animations.utils.jsx +++ b/client/src/animations.utils.jsx @@ -36,7 +36,7 @@ function getObjects(resolution, stages, game, account) { const i = sourceIsPlayer ? playerTeamIds.findIndex(c => c === resolution.source.id) : otherTeamIds.findIndex(c => c === resolution.source.id); - + const j = targetIsPlayer ? playerTeamIds.findIndex(c => c === resolution.target.id) : otherTeamIds.findIndex(c => c === resolution.target.id); @@ -68,6 +68,7 @@ function getObjects(resolution, stages, game, account) { return { animSource, animTarget, + animSkill: event.skill, }; } diff --git a/client/src/components/targeting.arrows.jsx b/client/src/components/targeting.arrows.jsx index 7d401887..0fe0fcb3 100644 --- a/client/src/components/targeting.arrows.jsx +++ b/client/src/components/targeting.arrows.jsx @@ -9,8 +9,8 @@ const shapes = require('./shapes'); const { removeTier } = require('../utils'); const addState = connect( - ({ game, account, animTarget, animating, itemInfo }) => - ({ game, account, animTarget, animating, itemInfo }) + ({ game, account, animSkill, animating, itemInfo }) => + ({ game, account, animSkill, animating, itemInfo }) ); class TargetSvg extends Component { @@ -28,15 +28,15 @@ class TargetSvg extends Component { } render(props, state) { - const { game, account, animating, animTarget, itemInfo } = props; + const { game, account, animating, animSkill, itemInfo } = props; const { width, height } = state; if (!game) return false; // game will be null when battle ends // resolutions happening // just put skill name up if (animating) { - if (!animTarget) return false; - const itemSource = itemInfo.combos.filter(c => c.item === removeTier(animTarget.skill)); + if (!animSkill) return false; + const itemSource = itemInfo.combos.filter(c => c.item === removeTier(animSkill)); const itemSourceInfo = itemSource.length ? `${itemSource[0].components[0]} ${itemSource[0].components[1]} ${itemSource[0].components[2]}` : false; @@ -44,7 +44,7 @@ class TargetSvg extends Component { const itemSourceDescription = reactStringReplace(itemSourceInfo, itemRegEx, match => shapes[match]()); return (