From d5ba37226447d55cbec3c742165c7ce6d14f7e65 Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 23 Jan 2020 11:19:33 +1000 Subject: [PATCH 01/10] Invite link text same as play.jsx --- client/src/events.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/events.jsx b/client/src/events.jsx index 9a0ae91a..72609eb0 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -167,7 +167,7 @@ function registerEvents(store) { if (!code) return store.dispatch(actions.setInvite(null)); const link = `${document.location.origin}#join=${code}`; navigator.clipboard.writeText(link).then(() => { - notify('Your invite code was copied to the clipboard.'); + notify('Invite link copied to clipboard.'); }, () => {}); return store.dispatch(actions.setInvite(code)); From 594fe49eb22d754ebe5fb893d7420222487026b2 Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 23 Jan 2020 14:59:44 +1000 Subject: [PATCH 02/10] timeout to clear vbox tutorial --- client/src/tutorial.utils.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/tutorial.utils.jsx b/client/src/tutorial.utils.jsx index 410b7cf7..e0ccc827 100644 --- a/client/src/tutorial.utils.jsx +++ b/client/src/tutorial.utils.jsx @@ -97,6 +97,7 @@ function tutorialVbox(player, store, tutorial) { if (stage === 7) { if (vbox.bits < 25) { stage += 1; + setTimeout(() => store.dispatch(actions.setTutorial(null)), 4000); } else { vbox.store.Colours = {}; vbox.store.Skills = {}; From 2e7a8c353007fc3d4e95028679e00b4e09cd6335 Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 31 Jan 2020 11:45:06 +1000 Subject: [PATCH 03/10] absorb silence test --- core/src/game.rs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/core/src/game.rs b/core/src/game.rs index 6a30e96f..0140e7a2 100644 --- a/core/src/game.rs +++ b/core/src/game.rs @@ -2335,13 +2335,23 @@ mod tests { }, _ => false, })); + } -/* assert!(match game.players[1].constructs[0].effects[0].meta { - Some(EffectMeta::AddedDamage(d)) => d, - _ => 0 - // 320 base blue power and 125 base blue life - } == 320.pct(Skill::Blast.multiplier()) - 125);*/ + #[test] + fn absorb_silence_test() { + let mut game = create_2v2_test_game(); + let player_id = game.players[0].id; + let target_player_id = game.players[1].id; + let source = game.players[0].constructs[0].id; + let target = game.players[1].constructs[0].id; + + game.new_resolve(Cast::new(target, player_id, target, Skill::Absorb)); + assert!(game.construct_by_id(target).unwrap().affected(Effect::Absorb)); + + game.new_resolve(Cast::new(source, target_player_id, target, Skill::Silence)); + assert!(game.construct_by_id(target).unwrap().affected(Effect::Silence)); + assert!(game.construct_by_id(target).unwrap().affected(Effect::Absorption)); } #[test] From 1f2dcbe83f6f045850b54f8afded42bd23657ea2 Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 31 Jan 2020 13:29:29 +1000 Subject: [PATCH 04/10] can_be_disabled skill fix (absorption) --- core/src/effect.rs | 8 +------- core/src/skill.rs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/core/src/effect.rs b/core/src/effect.rs index 549bb4aa..601a77d8 100644 --- a/core/src/effect.rs +++ b/core/src/effect.rs @@ -121,13 +121,7 @@ impl Effect { } pub fn disables_skill(&self, skill: Skill) -> bool { - if skill.is_tick() { - return false; - } - - // electrocute always goes off baybee - // even if you are stunned particularly - if [Skill::Electrocute, Skill::ElectrocutePlus, Skill::ElectrocutePlusPlus].contains(&skill) { + if !skill.can_be_disabled() { return false; } diff --git a/core/src/skill.rs b/core/src/skill.rs index 0c7f2338..9c03baed 100644 --- a/core/src/skill.rs +++ b/core/src/skill.rs @@ -834,6 +834,22 @@ impl Skill { } } + pub fn can_be_disabled(self) -> bool { + match self { + Skill::ElectrocuteTick | + Skill::DecayTick | + Skill::SiphonTick | + Skill::TriageTick | + Skill::Electrocute | + Skill::ElectrocutePlus | + Skill::ElectrocutePlusPlus | + Skill::Absorption | + Skill::AbsorptionPlus | + Skill::AbsorptionPlusPlus => false, + _ => true, + } + } + pub fn additional_skill(&self, effect: Effect) -> Option { match effect { Effect::Haste => match self { From 87af1fded76f8172bd6885dfd9a35f239943a182 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 31 Jan 2020 15:00:29 +1000 Subject: [PATCH 05/10] fix register prompt --- client/src/components/front.page.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/front.page.jsx b/client/src/components/front.page.jsx index 44c0d442..9bfeab7d 100644 --- a/client/src/components/front.page.jsx +++ b/client/src/components/front.page.jsx @@ -22,7 +22,7 @@ const addState = connect( } return { - promptRegister: tutorial === 99, // see events + promptRegister: !tutorial, // see events account, sendInstancePractice, }; From 262eaa357b5f1aaa7718c673bcc89098f6319117 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 31 Jan 2020 15:00:51 +1000 Subject: [PATCH 06/10] v1.14.0 --- VERSION | 2 +- acp/package.json | 2 +- client/package.json | 2 +- core/Cargo.toml | 2 +- ops/package.json | 2 +- server/Cargo.toml | 2 +- studios/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index f88cf52e..cd99d386 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.13.0 \ No newline at end of file +1.14.0 \ No newline at end of file diff --git a/acp/package.json b/acp/package.json index 088c98c3..42d68b36 100644 --- a/acp/package.json +++ b/acp/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.13.0", + "version": "1.14.0", "description": "", "main": "index.js", "scripts": { diff --git a/client/package.json b/client/package.json index 2d2452b2..c603670b 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.13.0", + "version": "1.14.0", "description": "", "main": "index.js", "scripts": { diff --git a/core/Cargo.toml b/core/Cargo.toml index 2d5a2f48..dc97bf1a 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml_core" -version = "1.13.0" +version = "1.14.0" authors = ["ntr ", "mashy "] [dependencies] diff --git a/ops/package.json b/ops/package.json index 95ddbb39..bd5b728b 100644 --- a/ops/package.json +++ b/ops/package.json @@ -1,6 +1,6 @@ { "name": "mnml-ops", - "version": "1.13.0", + "version": "1.14.0", "description": "", "main": "index.js", "scripts": { diff --git a/server/Cargo.toml b/server/Cargo.toml index 9107e872..01ca5d67 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml" -version = "1.13.0" +version = "1.14.0" authors = ["ntr "] [dependencies] diff --git a/studios/package.json b/studios/package.json index cff9af6b..2bac12e1 100644 --- a/studios/package.json +++ b/studios/package.json @@ -1,6 +1,6 @@ { "name": "mnml-studios", - "version": "1.13.0", + "version": "1.14.0", "description": "", "main": "index.js", "scripts": { From 0a0db9e57ff668e489e1627b549fea8a1fd40213 Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 4 Feb 2020 11:37:24 +1000 Subject: [PATCH 07/10] set pvp false when connecting --- client/src/socket.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/socket.jsx b/client/src/socket.jsx index b2240e4b..52ade8a2 100644 --- a/client/src/socket.jsx +++ b/client/src/socket.jsx @@ -349,6 +349,7 @@ function createSocket(events) { sendItemInfo(); events.urlHashChange(); + events.setPvp(false); return true; } From c3a8463ea991884ee2035b2ed9eba4d6f9a6ee3a Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 4 Feb 2020 20:56:03 +1000 Subject: [PATCH 08/10] fix sketchy idle animation --- client/src/components/account.box.jsx | 9 +++++++-- client/src/components/anims/idle.jsx | 6 +++--- client/src/components/construct.jsx | 9 +++++++-- client/src/components/mnni.jsx | 9 +++++++-- client/src/components/player.box.jsx | 9 +++++++-- 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/client/src/components/account.box.jsx b/client/src/components/account.box.jsx index 0ff61b8f..1071e129 100644 --- a/client/src/components/account.box.jsx +++ b/client/src/components/account.box.jsx @@ -59,8 +59,13 @@ class AccountAvatar extends Component { } componentDidMount() { - this.idle = idleAnimation(this.props.account.id); - return this.animations.push(this.idle); + const startIdle = () => { + this.idle = idleAnimation(this.props.account.id); + this.animations.push(this.idle); + this.idle.finished.then(startIdle); + }; + + startIdle(); } resetAnimations() { diff --git a/client/src/components/anims/idle.jsx b/client/src/components/anims/idle.jsx index 0972b4ac..82f3484a 100644 --- a/client/src/components/anims/idle.jsx +++ b/client/src/components/anims/idle.jsx @@ -1,8 +1,9 @@ const anime = require('animejs').default; function idle(id) { - const duration = anime.random(2000, 18000); + const duration = anime.random(2000, 4000); const target = document.getElementById(id); + return anime({ targets: target, translateX: () => anime.random(-20, 20), @@ -10,8 +11,7 @@ function idle(id) { rotate: () => anime.random(-15, 15), duration, direction: 'alternate', - easing: 'linear', - loop: true, + easing: 'easeInOutSine', }); } diff --git a/client/src/components/construct.jsx b/client/src/components/construct.jsx index 0c979107..ddd7cc30 100644 --- a/client/src/components/construct.jsx +++ b/client/src/components/construct.jsx @@ -48,8 +48,13 @@ class ConstructAvatar extends Component { } componentDidMount() { - this.idle = idleAnimation(this.props.construct.id); - return this.animations.push(this.idle); + const startIdle = () => { + this.idle = idleAnimation(this.props.construct.id); + this.animations.push(this.idle); + this.idle.finished.then(startIdle); + }; + + startIdle(); } resetAnimations() { diff --git a/client/src/components/mnni.jsx b/client/src/components/mnni.jsx index f1506dfc..cde56f78 100644 --- a/client/src/components/mnni.jsx +++ b/client/src/components/mnni.jsx @@ -34,8 +34,13 @@ class MnniAvatatr extends Component { } componentDidMount() { - this.idle = idleAnimation('mnni'); - return this.animations.push(this.idle); + const startIdle = () => { + this.idle = idleAnimation('mnni'); + this.animations.push(this.idle); + this.idle.finished.then(startIdle); + }; + + startIdle(); } resetAnimations() { diff --git a/client/src/components/player.box.jsx b/client/src/components/player.box.jsx index f4f0908f..7e135133 100644 --- a/client/src/components/player.box.jsx +++ b/client/src/components/player.box.jsx @@ -37,8 +37,13 @@ class Img extends Component { } componentDidMount() { - this.idle = idleAnimation(this.props.id); - return this.animations.push(this.idle); + const startIdle = () => { + this.idle = idleAnimation(this.props.id); + this.animations.push(this.idle); + this.idle.finished.then(startIdle); + }; + + startIdle(); } resetAnimations() { From 0e97eb462de329ab5095d9b212449473d3f3a54e Mon Sep 17 00:00:00 2001 From: ntr Date: Wed, 5 Feb 2020 15:14:50 +1000 Subject: [PATCH 09/10] disable clear button on game finished --- client/src/components/game.ctrl.btns.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/game.ctrl.btns.jsx b/client/src/components/game.ctrl.btns.jsx index 24a7462c..d5b763db 100644 --- a/client/src/components/game.ctrl.btns.jsx +++ b/client/src/components/game.ctrl.btns.jsx @@ -98,7 +98,7 @@ function GameCtrlBtns(args) { return (
- + {finished ? quitBtn : readyBtn}
); From 7539b40f08c622027130a050092e8656fe99d96c Mon Sep 17 00:00:00 2001 From: ntr Date: Wed, 5 Feb 2020 20:09:43 +1000 Subject: [PATCH 10/10] increase duration --- client/src/components/anims/idle.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/anims/idle.jsx b/client/src/components/anims/idle.jsx index 82f3484a..76e6943e 100644 --- a/client/src/components/anims/idle.jsx +++ b/client/src/components/anims/idle.jsx @@ -1,7 +1,7 @@ const anime = require('animejs').default; function idle(id) { - const duration = anime.random(2000, 4000); + const duration = anime.random(2000, 8000); const target = document.getElementById(id); return anime({