From 0c9c4a769256c00d3c651158ae412017a77e3ec8 Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 22 Oct 2019 09:52:24 +1000 Subject: [PATCH] add reshape tab, remove mtx from play page --- CHANGELOG.md | 4 + client/src/components/header.jsx | 5 ++ client/src/components/main.top.jsx | 2 + client/src/components/play.jsx | 128 ++++------------------------ client/src/components/reshape.jsx | 131 +++++++++++++++++++++++++++++ client/src/events.jsx | 3 +- 6 files changed, 161 insertions(+), 112 deletions(-) create mode 100644 client/src/components/reshape.jsx diff --git a/CHANGELOG.md b/CHANGELOG.md index fab461ad..c97e3d50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [1.6.3] - 2019-10-XX +### Fixed +- Fixed bug where dots / hots would not trigger when reapplied by a skill caster at higher speed + ## [1.6.2] - 2019-10-20 ### Fixed - Combiner bug where it would preview items for different combinations diff --git a/client/src/components/header.jsx b/client/src/components/header.jsx index 9bb8d9e0..8810ecb3 100644 --- a/client/src/components/header.jsx +++ b/client/src/components/header.jsx @@ -83,6 +83,11 @@ function Header(args) { class={`login-btn ${nav === 'play' ? 'highlight' : ''}`}> Play + - - ); - }; - - const availableMtx = (item, i) => ( -
-
Enable {item.variant}
- -
- ); - - const subscription = account.subscribed - ? - : ; - +function Play() { return (

v{VERSION}

-

Use the buttons on the right to join an instance.

- Select PVP to play against other players.
- Select INVITE then click COPY LINK to generate an instance invitation for a friend.
- Click LEARN to practice the game without time controls. + Join our discord server to find opponents and talk to the devs.
+ Message @ntr or @mashy on discord. Invite link on the right control panel.
+ We will also give you some credits to try the mtx.

-

Join our Discord server to find opponents, message @ntr or @mashy for some credits to get started.

- If you enjoy the game please support its development by subscribing or purchasing credits.
+ If you enjoy the game you can support the development: +

    +
  • Invite people to play pvp games and grow the community.
  • +
  • Subscribe or purchase credits.
  • +
glhf

-

¤ {account.balance}

-
- {subscription} - -
-
-
- {shop.owned.map(useMtx)} -
-
- {shop.available.map(availableMtx)} -
+

The buttons on the right are the controls to play the game.

+

+ Click LEARN to practice the game without time controls.
+ Select INVITE then click COPY LINK to create a game invitation for a friend.
+ Select PVP to queue for a game against other players.
+

+

If you can't find a match through pvp queue, ask around on discord.

); } -module.exports = addState(Play); +module.exports = Play; diff --git a/client/src/components/reshape.jsx b/client/src/components/reshape.jsx new file mode 100644 index 00000000..30e56aa7 --- /dev/null +++ b/client/src/components/reshape.jsx @@ -0,0 +1,131 @@ +// const { connect } = require('preact-redux'); +const preact = require('preact'); +const { connect } = require('preact-redux'); + +const actions = require('./../actions'); + +const VERSION = process.env.npm_package_version; + +const addState = connect( + function receiveState(state) { + const { + ws, + account, + shop, + } = state; + + function mtxBuy(mtx) { + return ws.sendMtxBuy(mtx.variant); + } + + return { + account, + shop, + mtxBuy, + }; + }, + + function receiveDispatch(dispatch) { + function setMtxActive(mtx) { + dispatch(actions.setConstructRename(null)); + dispatch(actions.setMtxActive(mtx)); + return true; + } + + function setNav(place) { + return dispatch(actions.setNav(place)); + } + + return { + setMtxActive, + setNav, + }; + } +); + +function Reshape(args) { + const { + account, + shop, + mtxBuy, + + setMtxActive, + setNav, + } = args; + + if (!shop) return false; + + const useMtx = (item, i) => { + const price = item === 'Rename' ? 5 : 1; + return ( +
{ + e.stopPropagation(); + setMtxActive(item); + }}> +
{item}
+ +
+ ); + }; + + const availableMtx = (item, i) => ( +
+
Enable {item.variant}
+ +
+ ); + + const subscription = account.subscribed + ? + : ; + + return ( +
setMtxActive(null)}> +
+

Use credits to modify your construct names and appearance.

+
    + +
  • Purchase image sets to unlock different types of avatars.
  • +
  • You can reroll any avatar to a new avatar from owned sets.
  • +
  • Reroll avatars by clicking the owned set and then the construct you wish to reroll.
  • +
  • Press escape to clear any active mtx.
  • +
+ +

+ You can switch out your active constructs in the account settings.
+ Accounts start with 4 constructs by default.
+

+
+
+

¤ {account.balance}

+
+ {subscription} + +
+
+
+ {shop.owned.map(useMtx)} +
+
+ {shop.available.map(availableMtx)} +
+
+
+ ); +} + +module.exports = addState(Reshape); diff --git a/client/src/events.jsx b/client/src/events.jsx index faf2b0ee..b89d739f 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -28,7 +28,8 @@ function registerEvents(store) { function setTeam(team) { store.dispatch(actions.setTeam(team)); - setNav('play'); + const { nav } = store.getState(); + if (nav !== 'reshape') setNav('play'); } function setSubscription(sub) {