diff --git a/client/assets/styles/game.css b/client/assets/styles/game.css index 162b848d..c64ad48b 100644 --- a/client/assets/styles/game.css +++ b/client/assets/styles/game.css @@ -206,7 +206,6 @@ font-size: 2em; font-family: 'Jura'; position: absolute; - object-fit: contain; top: 15%; } diff --git a/client/src/components/animations.jsx b/client/src/components/animations.jsx index a3d6e984..82d7025c 100644 --- a/client/src/components/animations.jsx +++ b/client/src/components/animations.jsx @@ -118,7 +118,6 @@ function animations(props) { }; const combatAnim = anim(event.skill); - if (combatAnim) { return (
@@ -127,15 +126,6 @@ function animations(props) { ); } - if (stages.includes('POST_SKILL')) { - const combatText = getCombatText(resolution); - return ( -
- {combatText} -
- ); - } - return (
); } diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx index 4a729976..792822c0 100644 --- a/client/src/components/game.construct.jsx +++ b/client/src/components/game.construct.jsx @@ -2,7 +2,7 @@ const { connect } = require('preact-redux'); const preact = require('preact'); const range = require('lodash/range'); -const { STATS, eventClasses } = require('../utils'); +const { STATS, eventClasses, getCombatText } = require('../utils'); const { ConstructAvatar } = require('./construct'); const animations = require('./animations'); const shapes = require('./shapes'); @@ -78,8 +78,8 @@ function GameConstruct(props) { ? construct.effects.map(c =>
{c.effect} - {c.duration}T
) :
 
; - const combatInfo = animations({ game, account, resolution, player, construct }); - + const combatAnim = animations({ game, account, resolution, player, construct }); + const combatText = getCombatText(resolution, construct); return (
selectSkillTarget(construct.id)} @@ -89,7 +89,8 @@ function GameConstruct(props) { {crypSkills}
{stats}
- {combatInfo} + {combatAnim} +
{combatText}
{effects}
); diff --git a/client/src/utils.jsx b/client/src/utils.jsx index 0ca02e31..e7c0640f 100644 --- a/client/src/utils.jsx +++ b/client/src/utils.jsx @@ -200,8 +200,10 @@ function getCombatSequence(resolution) { } } -function getCombatText(resolution) { +function getCombatText(resolution, construct) { if (!resolution) return false; + if (!resolution.stages.includes('POST_SKILL')) return false; + if (construct.id !== resolution.target.id) return false; const [type, event] = resolution.event; if (type === 'Ko') {