From 97f96a9fa2883ff2e4dd4635f5df5d4ad886329b Mon Sep 17 00:00:00 2001 From: Mashy Date: Sun, 20 Oct 2019 16:52:50 +1000 Subject: [PATCH 01/26] misc log --- WORKLOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WORKLOG.md b/WORKLOG.md index e5d75a31..2ca377f4 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -3,9 +3,10 @@ *PRODUCTION* -* rename vbox to shop +* rename vbox to shop (just for display) * give the shop and inventory distinct delineation * proper victory / lose page instead of just face off (you are the winner or something) +* vbox phase skill list navigator (overlay maybe?) * mobile styles * mobile info page From fe177df80a836baebeefb7daf6f86793f1658a23 Mon Sep 17 00:00:00 2001 From: Mashy Date: Sun, 20 Oct 2019 17:31:37 +1000 Subject: [PATCH 02/26] improve copy link --- WORKLOG.md | 3 +++ client/src/components/play.ctrl.jsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WORKLOG.md b/WORKLOG.md index 2ca377f4..7eb7271c 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -8,6 +8,9 @@ * proper victory / lose page instead of just face off (you are the winner or something) * vbox phase skill list navigator (overlay maybe?) +* clear active mtx after joining game + + * mobile styles * mobile info page diff --git a/client/src/components/play.ctrl.jsx b/client/src/components/play.ctrl.jsx index e0391b32..b5ab1c39 100644 --- a/client/src/components/play.ctrl.jsx +++ b/client/src/components/play.ctrl.jsx @@ -121,7 +121,7 @@ function JoinButtons(args) { class='pvp ready enabled' onClick={copyClick} type="submit"> - Copy Link + Copy

🔗

); }; From fa1135170bba7a602bf4dc1871801675a9d8e44b Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 21 Oct 2019 10:43:14 +1000 Subject: [PATCH 03/26] worklog --- WORKLOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/WORKLOG.md b/WORKLOG.md index 7eb7271c..ee4b4714 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -10,6 +10,12 @@ * clear active mtx after joining game +* Check results stack for whether a construct has ticked a dot already. Current issue E.g. + Construct 1 with slow speed applies siphon round 1 on Enemy Construct 1 + Construct 2 with fast speed applies siphon round 2 on Enemy Construct 2 + Siphon tick won't proc at all that turn + It assumes the dot has triggered already from existing dot from pre_resolve + Instead of checking a dot already exists instead search for a matching dot tick event in results * mobile styles * mobile info page From 25cda59773db277c10f5eed4f8e408dc8326b00d Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 21 Oct 2019 12:55:10 +1100 Subject: [PATCH 04/26] workog --- WORKLOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index e5d75a31..24884b6a 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -4,7 +4,7 @@ *PRODUCTION* * rename vbox to shop -* give the shop and inventory distinct delineation +* give the shop and inventory distinct delineation * proper victory / lose page instead of just face off (you are the winner or something) * mobile styles @@ -38,7 +38,7 @@ * remove names so games/instances are copy *$$$* - * chatwheel + * instead of red noise, red and black bar gradient * eth adapter * illusions * vaporwave From 6a0d03c49d3c3ddb57f7280cf69543ac8079c4ec Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 21 Oct 2019 17:03:53 +1100 Subject: [PATCH 05/26] 'fix' play ctrl styles --- client/src/components/play.ctrl.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/components/play.ctrl.jsx b/client/src/components/play.ctrl.jsx index b5ab1c39..36ca50c5 100644 --- a/client/src/components/play.ctrl.jsx +++ b/client/src/components/play.ctrl.jsx @@ -66,9 +66,8 @@ function JoinButtons(args) {
{discordBtn} -
-
 
-
+
+
From 8e6048b912579b15cfef7fd463b8ed480660009b Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 21 Oct 2019 19:40:19 +1000 Subject: [PATCH 06/26] fix tick speed bug with new application --- WORKLOG.md | 10 ---------- server/src/game.rs | 8 +++++--- server/src/skill.rs | 31 ++++++++++++++++++++++++++----- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index ee4b4714..150a20d0 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -10,13 +10,6 @@ * clear active mtx after joining game -* Check results stack for whether a construct has ticked a dot already. Current issue E.g. - Construct 1 with slow speed applies siphon round 1 on Enemy Construct 1 - Construct 2 with fast speed applies siphon round 2 on Enemy Construct 2 - Siphon tick won't proc at all that turn - It assumes the dot has triggered already from existing dot from pre_resolve - Instead of checking a dot already exists instead search for a matching dot tick event in results - * mobile styles * mobile info page @@ -25,9 +18,6 @@ * can't reset password without knowing password =\ * Invert recharge - * serde serialize privatise - * chat - * Convert spec 'Plus' -> '+' when it appears as combo text in combiner and in info text ## SOON diff --git a/server/src/game.rs b/server/src/game.rs index af4746ed..0421ab65 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -377,9 +377,11 @@ impl Game { let mut sorted = self.stack.clone(); sorted.iter_mut() .for_each(|s| { - let caster = self.construct_by_id(s.source_construct_id).unwrap(); - let speed = caster.skill_speed(s.skill); - s.speed = speed; + if !s.skill.is_tick() { + let caster = self.construct_by_id(s.source_construct_id).unwrap(); + let speed = caster.skill_speed(s.skill); + s.speed = speed; + } }); sorted.sort_unstable_by_key(|s| s.speed); diff --git a/server/src/skill.rs b/server/src/skill.rs index 6431d39d..d4685c2a 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -384,7 +384,7 @@ impl Cast { source_player_id: source.account, target_construct_id: target.id, skill, - speed: 0, + speed: source.skill_speed(skill), } } @@ -1499,7 +1499,13 @@ fn heal(source: &mut Construct, target: &mut Construct, mut results: Resolutions } fn triage(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions { - let skip_tick = target.effects.iter().any(|e| e.effect == Effect::Triage); + let skip_tick = target.effects.iter().any(|e| { + match e.effect { + Effect::Triage => source.skill_speed(skill) <= e.tick.unwrap().speed, + _ => false, + } + }); + let ConstructEffect { effect, duration, meta, tick: _ } = skill.effect()[0]; let tick_skill = match meta { Some(EffectMeta::Skill(s)) => s, @@ -1565,7 +1571,12 @@ fn decay(source: &mut Construct, target: &mut Construct, mut results: Resolution let wither = skill.effect()[0]; results.push(Resolution::new(source, target).event(target.add_effect(skill, wither))); - let skip_tick = target.effects.iter().any(|e| e.effect == Effect::Decay); + let skip_tick = target.effects.iter().any(|e| { + match e.effect { + Effect::Decay => source.skill_speed(skill) <= e.tick.unwrap().speed, + _ => false, + } + }); let ConstructEffect { effect, duration, meta, tick: _ } = skill.effect()[1]; let tick_skill = match meta { Some(EffectMeta::Skill(s)) => s, @@ -1619,7 +1630,12 @@ fn electrocute(source: &mut Construct, target: &mut Construct, mut results: Reso _ => panic!("no electrocute tick skill"), }; - let skip_tick = target.effects.iter().any(|e| e.effect == Effect::Electrocute); + let skip_tick = target.effects.iter().any(|e| { + match e.effect { + Effect::Electrocute => source.skill_speed(skill) <= e.tick.unwrap().speed, + _ => false, + } + }); let electrocute = ConstructEffect::new(effect, duration).set_tick(Cast::new_tick(source, target, tick_skill)); results.push(Resolution::new(source, target) .event(target.add_effect(skill, electrocute)) @@ -1716,7 +1732,12 @@ fn recharge(source: &mut Construct, target: &mut Construct, mut results: Resolut fn siphon(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions { - let skip_tick = target.effects.iter().any(|e| e.effect == Effect::Siphon); + let skip_tick = target.effects.iter().any(|e| { + match e.effect { + Effect::Siphon => source.skill_speed(skill) <= e.tick.unwrap().speed, + _ => false, + } + }); let ConstructEffect { effect, duration, meta, tick: _ } = skill.effect()[0]; let tick_skill = match meta { Some(EffectMeta::Skill(s)) => s, From 0c9c4a769256c00d3c651158ae412017a77e3ec8 Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 22 Oct 2019 09:52:24 +1000 Subject: [PATCH 07/26] 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) { From a304f003d0c42b73603daf942cc3c8f8d356ce4c Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 22 Oct 2019 10:28:28 +1000 Subject: [PATCH 08/26] added sub back to home, controls on reshape menu --- client/src/components/controls.jsx | 2 +- client/src/components/play.jsx | 69 ++++++++++++++++++++++++++++-- client/src/components/reshape.jsx | 2 - 3 files changed, 67 insertions(+), 6 deletions(-) diff --git a/client/src/components/controls.jsx b/client/src/components/controls.jsx index 8df3d524..e7b4e639 100644 --- a/client/src/components/controls.jsx +++ b/client/src/components/controls.jsx @@ -38,7 +38,7 @@ function Controls(args) { if (game) return ; if (instance) return ; - if (nav === 'play' || nav === 'shop' || !nav) return + if (nav === 'play' || nav === 'shop' || nav === 'reshape' || !nav) return if (nav === 'team' || nav === 'account') return return false; diff --git a/client/src/components/play.jsx b/client/src/components/play.jsx index ec1dd4c1..6d846016 100644 --- a/client/src/components/play.jsx +++ b/client/src/components/play.jsx @@ -1,9 +1,61 @@ // 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; -function Play() { +const addState = connect( + function receiveState(state) { + const { + ws, + account, + } = state; + + return { + account, + }; + }, + + 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 Play(args) { + const { + account, + setNav, + } = args; + + const subscription = account.subscribed + ? + : ; + return (
@@ -23,7 +75,18 @@ function Play() {

-

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

+

¤ {account.balance}

+
+ {subscription} + +
+
+

Click LEARN to practice the game without time controls.
Select INVITE then click COPY LINK to create a game invitation for a friend.
@@ -35,4 +98,4 @@ function Play() { ); } -module.exports = Play; +module.exports = addState(Play); diff --git a/client/src/components/reshape.jsx b/client/src/components/reshape.jsx index 30e56aa7..d45bd4d4 100644 --- a/client/src/components/reshape.jsx +++ b/client/src/components/reshape.jsx @@ -4,8 +4,6 @@ const { connect } = require('preact-redux'); const actions = require('./../actions'); -const VERSION = process.env.npm_package_version; - const addState = connect( function receiveState(state) { const { From e3f906ef195cb84ec1f3a89fe30f5fef041ef583 Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 22 Oct 2019 11:46:14 +1100 Subject: [PATCH 09/26] fix siphon anim --- client/assets/styles/game.less | 6 ++++++ client/assets/styles/styles.less | 4 ++-- client/src/components/play.ctrl.jsx | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client/assets/styles/game.less b/client/assets/styles/game.less index ef445028..f85ca3cf 100644 --- a/client/assets/styles/game.less +++ b/client/assets/styles/game.less @@ -235,6 +235,9 @@ width: 100%; height: 100%; position: absolute; + overflow: hidden; + max-height: 100%; + max-width: 100%; } .combat-anim svg { @@ -339,6 +342,9 @@ .skill-animation { opacity: 0; stroke-width: 5px; + overflow: hidden; + max-height: 100%; + max-width: 100%; // height: 5em; } diff --git a/client/assets/styles/styles.less b/client/assets/styles/styles.less index 1cb6f712..7150057e 100644 --- a/client/assets/styles/styles.less +++ b/client/assets/styles/styles.less @@ -14,7 +14,7 @@ html body { -ms-user-select: none; overflow-x: hidden; - overflow-y: hidden; + // overflow-y: hidden; } #mnml { @@ -26,7 +26,7 @@ html body { /* stops inspector going skitz*/ overflow-x: hidden; - overflow-y: hidden; + // overflow-y: hidden; } // @media (min-width: 1921px) { diff --git a/client/src/components/play.ctrl.jsx b/client/src/components/play.ctrl.jsx index 36ca50c5..8bdeab21 100644 --- a/client/src/components/play.ctrl.jsx +++ b/client/src/components/play.ctrl.jsx @@ -70,7 +70,7 @@ function JoinButtons(args) {

- + - +
diff --git a/client/src/events.jsx b/client/src/events.jsx index b89d739f..3db2ce7b 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -180,6 +180,7 @@ function registerEvents(store) { } function setAccountInstances(v) { + store.dispatch(actions.setMtxActive(null)); return store.dispatch(actions.setInstances(v)); } From c05ad8637fabcad7f4068a4e87588a04c561abce Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 22 Oct 2019 11:58:00 +1000 Subject: [PATCH 11/26] stop idle construct movement causing overflow --- client/assets/styles/menu.less | 1 + client/assets/styles/player.less | 1 + 2 files changed, 2 insertions(+) diff --git a/client/assets/styles/menu.less b/client/assets/styles/menu.less index 4d0dd7ca..cbe04a86 100644 --- a/client/assets/styles/menu.less +++ b/client/assets/styles/menu.less @@ -35,6 +35,7 @@ .construct { flex: 1 1 33%; + overflow: hidden; display: flex; flex-flow: column; diff --git a/client/assets/styles/player.less b/client/assets/styles/player.less index 4eb448d9..6bcf804b 100644 --- a/client/assets/styles/player.less +++ b/client/assets/styles/player.less @@ -2,6 +2,7 @@ .player-box { display: grid; + overflow: hidden; grid-template-areas: "msg" "img" From c522180366cbe9c3faa038d9431b3c3e46a793c4 Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 22 Oct 2019 13:15:57 +1000 Subject: [PATCH 12/26] faceoff text for start, win, lose --- WORKLOG.md | 6 +---- client/assets/styles/instance.less | 10 ++++++++- client/src/components/faceoff.jsx | 35 ++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index e61cdcd9..2f72978e 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -3,13 +3,9 @@ *PRODUCTION* -* rename vbox to shop (just for display) -* give the shop and inventory distinct delineation -* proper victory / lose page instead of just face off (you are the winner or something) +* give the vbox and inventory distinct delineation * vbox phase skill list navigator (overlay maybe?) -* clear active mtx after joining game - * mobile styles * mobile info page diff --git a/client/assets/styles/instance.less b/client/assets/styles/instance.less index 05952fc7..60ba9412 100644 --- a/client/assets/styles/instance.less +++ b/client/assets/styles/instance.less @@ -413,9 +413,10 @@ text-align: center; overflow: hidden; display: grid; - grid-template-rows: 1fr 1.5fr; + grid-template-rows: 1fr 0.25fr 1.5fr; grid-template-areas: "opponent" + "text" "player"; h1 { @@ -445,6 +446,13 @@ } } +.faceoff-text { + grid-area: text; + text-align: center; + align-self: center; + height: auto; +} + /* Mobile Nav*/ .instance-nav { display: none; } diff --git a/client/src/components/faceoff.jsx b/client/src/components/faceoff.jsx index 68de5481..41a95e86 100644 --- a/client/src/components/faceoff.jsx +++ b/client/src/components/faceoff.jsx @@ -66,6 +66,7 @@ function Faceoff(props) { ); } + function OpponentTeam(team) { const constructs = team.constructs.map((c, i) => ); @@ -78,10 +79,44 @@ function Faceoff(props) {
); } + function faceoffText() { + if (!instance.winner) { + const zero = Date.parse(instance.phase_start); + const now = Date.now(); + const end = Date.parse(instance.phase_end); + const timerPct = instance.phase_end + ? ((now - zero) / (end - zero) * 100) + : 100; + const fight = timerPct > 10 ?

FIGHT

: null; + return ( +
+

{otherTeam.name}

+

vs

+

{playerTeam.name}

+ {fight} +
+ ); + } + + if (instance.winner === playerTeam.id) { + return ( +
+

You are the champion

+
+ ) + } + + return ( +
+

You lose

+
+ ) + } return (
{OpponentTeam(otherTeam)} + {faceoffText()} {PlayerTeam(playerTeam)}
); From 21d55e27b092efdd038dc512b68cdad3cf201394 Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 22 Oct 2019 14:11:01 +1000 Subject: [PATCH 13/26] add back overflow to body --- client/assets/styles/instance.less | 2 +- client/assets/styles/styles.less | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/assets/styles/instance.less b/client/assets/styles/instance.less index 60ba9412..30e26403 100644 --- a/client/assets/styles/instance.less +++ b/client/assets/styles/instance.less @@ -413,7 +413,7 @@ text-align: center; overflow: hidden; display: grid; - grid-template-rows: 1fr 0.25fr 1.5fr; + grid-template-rows: 1fr 0.5fr 1.5fr; grid-template-areas: "opponent" "text" diff --git a/client/assets/styles/styles.less b/client/assets/styles/styles.less index 7150057e..2d3af757 100644 --- a/client/assets/styles/styles.less +++ b/client/assets/styles/styles.less @@ -14,7 +14,7 @@ html body { -ms-user-select: none; overflow-x: hidden; - // overflow-y: hidden; + overflow-y: hidden; } #mnml { From 4edeb6d315ee3bd509aad5a327e26b94647bb320 Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 22 Oct 2019 14:24:30 +1000 Subject: [PATCH 14/26] change win text --- client/src/components/faceoff.jsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/client/src/components/faceoff.jsx b/client/src/components/faceoff.jsx index 41a95e86..c589a60c 100644 --- a/client/src/components/faceoff.jsx +++ b/client/src/components/faceoff.jsx @@ -97,20 +97,13 @@ function Faceoff(props) {
); } - - if (instance.winner === playerTeam.id) { - return ( -
-

You are the champion

-
- ) - } - + const winner = instance.winner === playerTeam.id ? playerTeam.name : otherTeam.name; return (
-

You lose

+

{winner} wins

) + } return ( From ec3a2a0ce5a356c2c7a4ec32fc311d618f03588d Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 22 Oct 2019 20:07:33 +1000 Subject: [PATCH 15/26] highlight colours for noobs --- client/src/components/vbox.component.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index 7e56bafb..ed39b212 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -97,7 +97,7 @@ function Vbox(args) { const { combiner, navInstance, - // instance, + instance, itemInfo, player, reclaiming, @@ -161,6 +161,14 @@ function Vbox(args) { function availableBtn(v, group, index) { if (!v) return ; + const tutorial = instance.time_control === 'Practice' + && instance.rounds.length === 1 + && group === 0 + && combiner.length === 0 + && vboxSelected.length === 0 + && vbox.bits > 10 + && vbox.free[0].filter(c => c).length > 4 + ? 'combo-border' : null; const selected = vboxSelected[0] === group && vboxSelected[1] === index; @@ -194,7 +202,7 @@ function Vbox(args) { } return false; }) ? 'combo-border' : ''; - const classes = `${v.toLowerCase()} ${selected ? 'highlight' : ''} ${comboHighlight}`; + const classes = `${v.toLowerCase()} ${selected ? 'highlight' : ''} ${comboHighlight} ${tutorial}`; if (shapes[v]) { return ( From 1ec43cd6b03355de9ad0f8b31dffa0c21111a364 Mon Sep 17 00:00:00 2001 From: Mashy Date: Wed, 23 Oct 2019 08:26:15 +1000 Subject: [PATCH 16/26] add inventory tutorial step --- client/assets/styles/instance.less | 12 +----------- client/src/components/vbox.component.jsx | 12 +++++++++++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/client/assets/styles/instance.less b/client/assets/styles/instance.less index 30e26403..44857870 100644 --- a/client/assets/styles/instance.less +++ b/client/assets/styles/instance.less @@ -97,8 +97,7 @@ grid-template-columns: 1fr min-content 1fr; grid-template-areas: "vbox varrow inventory" - "vbox . carrow" - "vbox . combiner"; + "vbox varrow combiner"; } .vbox-inventory { @@ -112,15 +111,6 @@ justify-content: flex-end; } -.vbox-combiner-arrow { - color: @gray-hint; - grid-area: carrow; - display: block; - text-align: center; - font-size: 2em; - vertical-align: center; -} - .vbox-arrow, .vbox-arrow-mobile { display: flex; justify-content:center; diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index ed39b212..16bdab66 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -275,6 +275,16 @@ function Vbox(args) { return ; } + const tutorial = instance.time_control === 'Practice' + && instance.rounds.length === 1 + && i === 0 + && combiner.length === 0 + && vboxSelected.length === 0 + && vbox.bits === 16 + && vbox.bound.length === 5 + && vbox.free[0].filter(c => c).length === 4 + ? 'combo-border' : null; + const combinerItems = combiner.map(j => vbox.bound[j]); const combinerCount = countBy(combinerItems, co => co); @@ -314,7 +324,7 @@ function Vbox(args) { const highlighted = combiner.indexOf(i) > -1; const border = buttons[removeTier(v)] ? buttons[removeTier(v)]() : ''; - const classes = `${highlighted ? 'highlight' : border} ${comboHighlight}`; + const classes = `${highlighted ? 'highlight' : border} ${comboHighlight} ${tutorial}`; if (shapes[v]) { return ( - ); - - if (instances.length) { - return ( - - ); - } - - const inviteBtn = () => { - if (!invite) { - return ( - - ); - } - - function copyClick(e) { - const link = `${document.location.origin}#join=${invite}`; - const textArea = document.createElement('textarea', { id: '#clipboard' }); - textArea.value = link; - document.body.appendChild(textArea); - textArea.focus(); - textArea.select(); - - try { - document.execCommand('copy'); - infoToast('Invite link copied to clipboard.'); - } catch (err) { - console.error('link copy error', err); - errorToast('Invite link copy error.'); - } - - document.body.removeChild(textArea); - return true; - } - - return ( - - ); - }; - return ( ); } -module.exports = addState(JoinButtons); +module.exports = JoinButtons; diff --git a/client/src/components/play.jsx b/client/src/components/play.jsx index 6d846016..dc7a1720 100644 --- a/client/src/components/play.jsx +++ b/client/src/components/play.jsx @@ -2,6 +2,7 @@ const preact = require('preact'); const { connect } = require('preact-redux'); +const { errorToast, infoToast } = require('../utils'); const actions = require('./../actions'); const VERSION = process.env.npm_package_version; @@ -11,10 +12,35 @@ const addState = connect( const { ws, account, + instances, + invite, } = state; + function sendInstanceState(id) { + ws.sendInstanceState(id); + } + + function sendInstancePractice() { + ws.sendInstancePractice(); + } + + function sendInstanceQueue() { + ws.sendInstanceQueue(); + } + + function sendInstanceInvite() { + ws.sendInstanceInvite(); + } + return { account, + instances, + invite, + + sendInstanceState, + sendInstanceQueue, + sendInstancePractice, + sendInstanceInvite, }; }, @@ -36,13 +62,69 @@ const addState = connect( } ); - function Play(args) { const { account, + instances, + invite, + + sendInstanceState, + sendInstanceQueue, + sendInstancePractice, + sendInstanceInvite, + setNav, } = args; - + + const inviteBtn = () => { + if (!invite) { + return ( +
+ +
Invite a Friend
+
+ + ); + } + + function copyClick(e) { + const link = `${document.location.origin}#join=${invite}`; + const textArea = document.createElement('textarea', { id: '#clipboard' }); + textArea.value = link; + document.body.appendChild(textArea); + textArea.focus(); + textArea.select(); + + try { + document.execCommand('copy'); + infoToast('Invite link copied to clipboard.'); + } catch (err) { + console.error('link copy error', err); + errorToast('Invite link copy error.'); + } + + document.body.removeChild(textArea); + return true; + } + + return ( +
+ +
Invite Generated
+
+ ); + }; + const subscription = account.subscribed ? +
Matchmaking
+ + {inviteBtn()} +
+ +
Practice MNML
+
+
+ +
Join the Community
+
+
+ ); + + return ( +
+
+ +
Resume playing
+
+
+ ); + } + return (
-

v{VERSION}

-

- 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.
-

-

- 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 -

+

v{VERSION}

+ {list()}

¤ {account.balance}

@@ -84,15 +199,19 @@ function Play(args) { role="link"> Get Credits -
+
+
+ Join our Discord server to find opponents and talk to the devs.
+ Message @ntr or @mashy for some credits to get started.

-

- 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.

+
+ If you enjoy the game you can support the development: +
    +
  • Invite people to play pvp games and grow the community.
  • +
  • Subscribe or purchase credits.
  • +
+
); diff --git a/client/src/components/shop.jsx b/client/src/components/shop.jsx index 16883b22..08a79fad 100644 --- a/client/src/components/shop.jsx +++ b/client/src/components/shop.jsx @@ -41,7 +41,7 @@ function Shop(args) { Subscriptions grant extra benefits:
  • ¤150 per month
  • -
  • Account icons
  • +
  • Account img
  • Chat wheel

diff --git a/client/src/socket.jsx b/client/src/socket.jsx index 5fed2f29..adad1a66 100644 --- a/client/src/socket.jsx +++ b/client/src/socket.jsx @@ -259,7 +259,7 @@ function createSocket(events) { QueueRequested: () => events.notify('pvp queue request received'), QueueJoined: () => events.notify('you have joined the pvp queue'), - InviteRequested: () => events.notify('pvp queue request received'), + InviteRequested: () => events.notify('pvp invite request received'), Invite: code => events.setInvite(code), InstanceChat: chat => events.setInstanceChat(chat), ChatWheel: wheel => events.setChatWheel(wheel), From eb161f7d78864644035547964401ae201ab45db0 Mon Sep 17 00:00:00 2001 From: ntr Date: Wed, 23 Oct 2019 16:26:34 +1100 Subject: [PATCH 24/26] shorten faceoff time --- server/src/instance.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/instance.rs b/server/src/instance.rs index 4f4ae29e..8c92a821 100644 --- a/server/src/instance.rs +++ b/server/src/instance.rs @@ -81,7 +81,7 @@ impl TimeControl { pub fn lobby_timeout(&self) -> DateTime { Utc::now() - .checked_add_signed(Duration::seconds(30)) + .checked_add_signed(Duration::seconds(15)) .expect("could not set phase end") } From 84672f91a92e448f4a9c33b4569a5a4af2d54dfc Mon Sep 17 00:00:00 2001 From: ntr Date: Wed, 23 Oct 2019 16:27:16 +1100 Subject: [PATCH 25/26] v1.6.3 --- VERSION | 2 +- acp/package.json | 2 +- client/package.json | 2 +- ops/package.json | 2 +- server/Cargo.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 308b6faa..f5d2a585 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.2 \ No newline at end of file +1.6.3 \ No newline at end of file diff --git a/acp/package.json b/acp/package.json index 50e3dad7..b0f4f97b 100644 --- a/acp/package.json +++ b/acp/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.6.2", + "version": "1.6.3", "description": "", "main": "index.js", "scripts": { diff --git a/client/package.json b/client/package.json index c3f92b8c..c2b00a0b 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.6.2", + "version": "1.6.3", "description": "", "main": "index.js", "scripts": { diff --git a/ops/package.json b/ops/package.json index 164423a5..07c68e1e 100755 --- a/ops/package.json +++ b/ops/package.json @@ -1,6 +1,6 @@ { "name": "mnml-ops", - "version": "1.6.2", + "version": "1.6.3", "description": "", "main": "index.js", "scripts": { diff --git a/server/Cargo.toml b/server/Cargo.toml index 90c16448..80e33093 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml" -version = "1.6.2" +version = "1.6.3" authors = ["ntr "] [dependencies] From 157db74b7b46227be351f7bcba6958a030951761 Mon Sep 17 00:00:00 2001 From: ntr Date: Wed, 23 Oct 2019 16:46:05 +1100 Subject: [PATCH 26/26] changelog --- CHANGELOG.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7507c689..9be80477 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,17 @@ 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 +## [1.6.3] - 2019-10-23 + +### Added +- MNNI: the MNML guide + - Delivers the message of the day + ### Fixed - Fixed issue where dots / hots would not trigger when reapplied at a higher speed - Changed layout of home page. UI elements for rerolling construct avatars moved to a separate tab. - Added highlighting to first round of a game against the bots to guide new users -- Fixed UI issues related to scroll bars +- Fixed UI issues related to scrolling - Improved the invite link ## [1.6.2] - 2019-10-20