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/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..76e6943e 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, 8000); 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/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, }; 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}
); 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() { 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)); 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; } 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 = {}; 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/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/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] 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 { 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": {