From 75f4c6236a8ac7f1f0f577217b6baefbad607519 Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 29 Oct 2019 13:05:19 +1000 Subject: [PATCH] separate out demo tab --- CHANGELOG.md | 8 +++++ client/src/components/anims/counter.jsx | 2 +- client/src/components/demo.jsx | 18 +++++----- client/src/components/welcome.jsx | 47 ++++++++++++++----------- 4 files changed, 45 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59f027bf..e86d66ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,23 +38,31 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Haste - Cooldown reduced to 1T (was 2T) + - Sleep - Cooldown reduced to 2T (was 3T) - Skill multiplier reduced from 240/300/400 -> 200/290/400 + - Hybrid - Cooldown reduced to 1T (was 3T) + - Silence - Cooldown reduced to 2T (was 3T) + - Banish - Cooldown reduced to 2T (was 3T) + - Siphon - Skill multiplier increased from 20/25/30 -> 25/30/40 + - Bash - Skill multiplier reduced from 65/95/140 -> 45/65/100 + - Curse - Now created by combining Debuff + RB was Debuff + RG - Fixed issue where curse was only increasing blue damage taken instead of red and blue - Fixed an issue where the animation would not display if it occured already + - Invert - Now created by combining Debuff + RG was debuff + RB diff --git a/client/src/components/anims/counter.jsx b/client/src/components/anims/counter.jsx index e19d3518..ec7a0399 100644 --- a/client/src/components/anims/counter.jsx +++ b/client/src/components/anims/counter.jsx @@ -60,7 +60,7 @@ class Counter extends Component { this.animations.push(anime({ targets: ['#counter'], rotateX: 180, - delay: TIMES.TARGET_DELAY_MS * 2, + delay: TIMES.TARGET_DELAY_MS + TIMES.TARGET_DURATION_MS / 3, duration: TIMES.TARGET_DURATION_MS / 2, easing: 'easeOutSine', })); diff --git a/client/src/components/demo.jsx b/client/src/components/demo.jsx index 57c814ee..6735998e 100644 --- a/client/src/components/demo.jsx +++ b/client/src/components/demo.jsx @@ -1,11 +1,11 @@ const { connect } = require('preact-redux'); const preact = require('preact'); -const actions = require('../actions'); +// const actions = require('../actions'); const shapes = require('./shapes'); const { ConstructAvatar } = require('./construct'); -const { ConstructAnimation } = require('./animations'); +// const { ConstructAnimation } = require('./animations'); const addState = connect( function receiveState(state) { @@ -20,15 +20,15 @@ const addState = connect( itemInfo, demo, }; - }, + } - function receiveDispatch(dispatch) { +/* function receiveDispatch(dispatch) { function setAnimTarget(anim) { dispatch(actions.setAnimTarget(anim)); } return { setAnimTarget }; - } + } */ ); @@ -38,7 +38,7 @@ function Demo(args) { itemInfo, account, - setAnimTarget, + // setAnimTarget, } = args; if (!demo || !itemInfo.items.length || account) return false; @@ -90,7 +90,7 @@ function Demo(args) { VBOX PHASE {shapes.Red()} {shapes.Green()} {shapes.Blue()}

- Combine the colour base items with an array of skills and specialisations to build powerful variants. + Combine the colour base items with skills and specialisations to build an array of powerful variants.

 
@@ -179,10 +179,10 @@ function Demo(args) { }; return ( -
+
+ {gameDemo()} {vboxDemo()} {vboxConstructs()} - {gameDemo()}
); } diff --git a/client/src/components/welcome.jsx b/client/src/components/welcome.jsx index 558e5719..2a1bfa67 100644 --- a/client/src/components/welcome.jsx +++ b/client/src/components/welcome.jsx @@ -10,7 +10,6 @@ const Demo = require('./demo'); function Welcome() { const page = this.state.page || 'register'; - const navRegister = () => this.setState({ page: 'register' }); const pageEl = () => { if (page === 'login') return ; if (page === 'register') return ; @@ -18,6 +17,26 @@ function Welcome() { return false; }; + const news = ( +
+

Welcome to mnml.

+ +

MNML is a turn-based 1v1 strategy game in an abstract setting.

+

+ Build a unique team of 3 constructs from a range of skills and specialisations.
+ Outplay your opponent in multiple rounds by adapting to an always shifting meta.
+ Simple rules, complex interactions and unique mechanics.
+

+

Free to play, no pay to win. Register to start playing.

+ + Tutorial Playthrough on YouTube +
+ ); + + const main = (['login', 'register', 'help'].includes(page)) + ?
{news}{pageEl()}
+ : ; + return (
@@ -39,6 +58,12 @@ function Welcome() { onClick={() => this.setState({ page: 'register' })}> Register +
-
-
-

- Welcome to mnml. -

-

MNML is a turn-based 1v1 strategy game in an abstract setting.

-

- Build a unique team of 3 constructs from a range of skills and specialisations.
- Outplay your opponent in multiple rounds by adapting to an always shifting meta.
- Simple rules, complex interactions and unique mechanics.
-

-

- Free to play, no pay to win. Register to start playing.
-

- Tutorial Playthrough on YouTube -
- {pageEl()} -
+ {main}
-
); }