Merge branch 'release/1.14.0'

This commit is contained in:
ntr 2020-02-05 20:09:47 +10:00
commit 4abcfdef0c
20 changed files with 75 additions and 33 deletions

View File

@ -1 +1 @@
1.13.0 1.14.0

View File

@ -1,6 +1,6 @@
{ {
"name": "mnml-client", "name": "mnml-client",
"version": "1.13.0", "version": "1.14.0",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -1,6 +1,6 @@
{ {
"name": "mnml-client", "name": "mnml-client",
"version": "1.13.0", "version": "1.14.0",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -59,8 +59,13 @@ class AccountAvatar extends Component {
} }
componentDidMount() { componentDidMount() {
this.idle = idleAnimation(this.props.account.id); const startIdle = () => {
return this.animations.push(this.idle); this.idle = idleAnimation(this.props.account.id);
this.animations.push(this.idle);
this.idle.finished.then(startIdle);
};
startIdle();
} }
resetAnimations() { resetAnimations() {

View File

@ -1,8 +1,9 @@
const anime = require('animejs').default; const anime = require('animejs').default;
function idle(id) { function idle(id) {
const duration = anime.random(2000, 18000); const duration = anime.random(2000, 8000);
const target = document.getElementById(id); const target = document.getElementById(id);
return anime({ return anime({
targets: target, targets: target,
translateX: () => anime.random(-20, 20), translateX: () => anime.random(-20, 20),
@ -10,8 +11,7 @@ function idle(id) {
rotate: () => anime.random(-15, 15), rotate: () => anime.random(-15, 15),
duration, duration,
direction: 'alternate', direction: 'alternate',
easing: 'linear', easing: 'easeInOutSine',
loop: true,
}); });
} }

View File

@ -48,8 +48,13 @@ class ConstructAvatar extends Component {
} }
componentDidMount() { componentDidMount() {
this.idle = idleAnimation(this.props.construct.id); const startIdle = () => {
return this.animations.push(this.idle); this.idle = idleAnimation(this.props.construct.id);
this.animations.push(this.idle);
this.idle.finished.then(startIdle);
};
startIdle();
} }
resetAnimations() { resetAnimations() {

View File

@ -22,7 +22,7 @@ const addState = connect(
} }
return { return {
promptRegister: tutorial === 99, // see events promptRegister: !tutorial, // see events
account, account,
sendInstancePractice, sendInstancePractice,
}; };

View File

@ -98,7 +98,7 @@ function GameCtrlBtns(args) {
return ( return (
<div class="game-ctrl-btns"> <div class="game-ctrl-btns">
<button disabled={!account.subscribed} onClick={() => setChatShow(!chatShow)}>Chat</button> <button disabled={!account.subscribed} onClick={() => setChatShow(!chatShow)}>Chat</button>
<button disabled={animating} onClick={sendGameSkillClear}>Clear</button> <button disabled={finished || animating} onClick={sendGameSkillClear}>Clear</button>
{finished ? quitBtn : readyBtn} {finished ? quitBtn : readyBtn}
</div> </div>
); );

View File

@ -34,8 +34,13 @@ class MnniAvatatr extends Component {
} }
componentDidMount() { componentDidMount() {
this.idle = idleAnimation('mnni'); const startIdle = () => {
return this.animations.push(this.idle); this.idle = idleAnimation('mnni');
this.animations.push(this.idle);
this.idle.finished.then(startIdle);
};
startIdle();
} }
resetAnimations() { resetAnimations() {

View File

@ -37,8 +37,13 @@ class Img extends Component {
} }
componentDidMount() { componentDidMount() {
this.idle = idleAnimation(this.props.id); const startIdle = () => {
return this.animations.push(this.idle); this.idle = idleAnimation(this.props.id);
this.animations.push(this.idle);
this.idle.finished.then(startIdle);
};
startIdle();
} }
resetAnimations() { resetAnimations() {

View File

@ -167,7 +167,7 @@ function registerEvents(store) {
if (!code) return store.dispatch(actions.setInvite(null)); if (!code) return store.dispatch(actions.setInvite(null));
const link = `${document.location.origin}#join=${code}`; const link = `${document.location.origin}#join=${code}`;
navigator.clipboard.writeText(link).then(() => { 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)); return store.dispatch(actions.setInvite(code));

View File

@ -349,6 +349,7 @@ function createSocket(events) {
sendItemInfo(); sendItemInfo();
events.urlHashChange(); events.urlHashChange();
events.setPvp(false);
return true; return true;
} }

View File

@ -97,6 +97,7 @@ function tutorialVbox(player, store, tutorial) {
if (stage === 7) { if (stage === 7) {
if (vbox.bits < 25) { if (vbox.bits < 25) {
stage += 1; stage += 1;
setTimeout(() => store.dispatch(actions.setTutorial(null)), 4000);
} else { } else {
vbox.store.Colours = {}; vbox.store.Colours = {};
vbox.store.Skills = {}; vbox.store.Skills = {};

View File

@ -1,6 +1,6 @@
[package] [package]
name = "mnml_core" name = "mnml_core"
version = "1.13.0" version = "1.14.0"
authors = ["ntr <ntr@smokestack.io>", "mashy <mashy@mnml.gg>"] authors = ["ntr <ntr@smokestack.io>", "mashy <mashy@mnml.gg>"]
[dependencies] [dependencies]

View File

@ -121,13 +121,7 @@ impl Effect {
} }
pub fn disables_skill(&self, skill: Skill) -> bool { pub fn disables_skill(&self, skill: Skill) -> bool {
if skill.is_tick() { if !skill.can_be_disabled() {
return false;
}
// electrocute always goes off baybee
// even if you are stunned particularly
if [Skill::Electrocute, Skill::ElectrocutePlus, Skill::ElectrocutePlusPlus].contains(&skill) {
return false; return false;
} }

View File

@ -2335,13 +2335,23 @@ mod tests {
}, },
_ => false, _ => false,
})); }));
}
/* assert!(match game.players[1].constructs[0].effects[0].meta { #[test]
Some(EffectMeta::AddedDamage(d)) => d, fn absorb_silence_test() {
_ => 0 let mut game = create_2v2_test_game();
// 320 base blue power and 125 base blue life let player_id = game.players[0].id;
} == 320.pct(Skill::Blast.multiplier()) - 125);*/ 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] #[test]

View File

@ -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<Skill> { pub fn additional_skill(&self, effect: Effect) -> Option<Skill> {
match effect { match effect {
Effect::Haste => match self { Effect::Haste => match self {

View File

@ -1,6 +1,6 @@
{ {
"name": "mnml-ops", "name": "mnml-ops",
"version": "1.13.0", "version": "1.14.0",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -1,6 +1,6 @@
[package] [package]
name = "mnml" name = "mnml"
version = "1.13.0" version = "1.14.0"
authors = ["ntr <ntr@smokestack.io>"] authors = ["ntr <ntr@smokestack.io>"]
[dependencies] [dependencies]

View File

@ -1,6 +1,6 @@
{ {
"name": "mnml-studios", "name": "mnml-studios",
"version": "1.13.0", "version": "1.14.0",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {