diff --git a/VERSION b/VERSION index c56eaaaf..44fdbc3a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.12.3 \ No newline at end of file +1.12.4 \ No newline at end of file diff --git a/acp/package.json b/acp/package.json index c072126b..8d5b3a7b 100644 --- a/acp/package.json +++ b/acp/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.12.3", + "version": "1.12.4", "description": "", "main": "index.js", "scripts": { diff --git a/client/package.json b/client/package.json index 25380772..93868dc0 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.12.3", + "version": "1.12.4", "description": "", "main": "index.js", "scripts": { diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx index f3980794..2fa74788 100644 --- a/client/src/components/game.construct.jsx +++ b/client/src/components/game.construct.jsx @@ -15,7 +15,7 @@ const addState = connect( ws, game, - authenticated, + instance, activeSkill, animFocus, resolution, @@ -30,7 +30,7 @@ const addState = connect( return { game, - authenticated, + instance, activeSkill, animFocus, resolution, @@ -54,7 +54,7 @@ class GameConstruct extends preact.Component { render() { const { // Changing state variables - authenticated, + instance, game, activeSkill, animFocus, @@ -81,7 +81,9 @@ class GameConstruct extends preact.Component { const unfocus = animFocus && !animFocus.includes(construct.id) ? 'unfocus' : ''; const targeted = game.stack.find(c => c.target === construct.id); - const highlight = !authenticated && !targeted && activeSkill ? 'highlight' : ''; + + const firstRoundTutorial = instance && instance.time_control === 'Practice' && !game.resolutions.length; + const highlight = firstRoundTutorial && !targeted && activeSkill ? 'highlight' : ''; const crypSkills = player ?
{range(0, 3).map(j => )}
diff --git a/client/src/components/game.ctrl.btns.jsx b/client/src/components/game.ctrl.btns.jsx index a374ae80..24a7462c 100644 --- a/client/src/components/game.ctrl.btns.jsx +++ b/client/src/components/game.ctrl.btns.jsx @@ -10,6 +10,7 @@ const addState = connect( game, account, authenticated, + instance, chatShow, animating, } = state; @@ -35,6 +36,7 @@ const addState = connect( game, account, authenticated, + instance, chatShow, sendAbandon, sendGameSkillClear, @@ -68,6 +70,7 @@ function GameCtrlBtns(args) { account, chatShow, authenticated, + instance, getInstanceState, sendGameSkillClear, @@ -86,7 +89,8 @@ function GameCtrlBtns(args) { quit(); } - const noTargets = !authenticated && game.stack.length === 0; + const firstRoundTutorial = instance && instance.time_control === 'Practice' && !game.resolutions.length; + const noTargets = firstRoundTutorial && game.stack.length === 0; const readyBtn = ; const quitBtn = ; diff --git a/client/src/components/instance.ctrl.btns.jsx b/client/src/components/instance.ctrl.btns.jsx index 136987c2..dbc3f476 100644 --- a/client/src/components/instance.ctrl.btns.jsx +++ b/client/src/components/instance.ctrl.btns.jsx @@ -50,7 +50,7 @@ function InstanceCtrlBtns(args) { } = args; const finished = instance && instance.phase === 'Finished'; - const tutorialDisable = tutorial && tutorial < 8; + const tutorialDisable = instance.time_control === 'Practice' && tutorial && tutorial < 8; return (
diff --git a/client/src/components/targeting.arrows.jsx b/client/src/components/targeting.arrows.jsx index 2d570121..fba1b064 100644 --- a/client/src/components/targeting.arrows.jsx +++ b/client/src/components/targeting.arrows.jsx @@ -44,15 +44,14 @@ class TargetSvg extends Component { animating, game, gameEffectInfo, - authenticated, } = props; const { width, height } = state; if (!game) return false; // game will be null when battle ends if (game.phase === 'Finished') return false; // Clear everything if its over (in case of abandon) - // First time joining game phase - if (!authenticated && game.stack.length === 0) { + // First round of a game + if (!game.resolutions.length && game.stack.length === 0) { return (

Select a skill from each construct, click a target for that skill and then click READY.

diff --git a/client/src/components/vbox.stash.jsx b/client/src/components/vbox.stash.jsx index 0e737627..3d2f85dd 100644 --- a/client/src/components/vbox.stash.jsx +++ b/client/src/components/vbox.stash.jsx @@ -9,7 +9,7 @@ const buttons = require('./buttons'); const { removeTier } = require('../utils'); const addState = connect( - ({ itemUnequip, vboxHighlight, vboxSelected, tutorial }) => ({ itemUnequip, vboxHighlight, vboxSelected, tutorial })); + ({ itemUnequip, vboxHighlight, vboxSelected, tutorial, instance }) => ({ itemUnequip, vboxHighlight, vboxSelected, tutorial, instance })); class stashElement extends preact.Component { shouldComponentUpdate(newProps) { @@ -41,6 +41,7 @@ class stashElement extends preact.Component { vboxHighlight, vboxSelected, tutorial, + instance, } = props; const { storeSelect, stashSelect } = vboxSelected; @@ -97,7 +98,7 @@ class stashElement extends preact.Component { : `${border} ${notValidCombo ? 'fade' : ''}`; const invObject = shapes[v] ? shapes[v]() : v; - const tutorialDisable = tutorial === 1; + const tutorialDisable = tutorial === 1 && instance.time_control === 'Practice' && instance.rounds.length === 1; return (