From 74271de3ff3a0292c0b5a41b3dceef523a02c831 Mon Sep 17 00:00:00 2001 From: ntr Date: Thu, 19 Sep 2019 21:52:15 +1000 Subject: [PATCH 01/14] mouse down wiggle --- client/src/components/construct.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/construct.jsx b/client/src/components/construct.jsx index d603460c..334ba19e 100644 --- a/client/src/components/construct.jsx +++ b/client/src/components/construct.jsx @@ -34,7 +34,7 @@ class ConstructAvatar extends Component {
From d6d0800566d64368e16e7ffb81e411a058513b49 Mon Sep 17 00:00:00 2001 From: ntr Date: Thu, 19 Sep 2019 21:55:15 +1000 Subject: [PATCH 02/14] v1.4.7 --- 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 7b5753f5..b000a6a0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.6 \ No newline at end of file +1.4.7 \ No newline at end of file diff --git a/acp/package.json b/acp/package.json index 9b9d7f41..d930178a 100644 --- a/acp/package.json +++ b/acp/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.4.6", + "version": "1.4.7", "description": "", "main": "index.js", "scripts": { diff --git a/client/package.json b/client/package.json index 13676814..bbc55739 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.4.6", + "version": "1.4.7", "description": "", "main": "index.js", "scripts": { diff --git a/ops/package.json b/ops/package.json index a7f08e96..35c94dd8 100755 --- a/ops/package.json +++ b/ops/package.json @@ -1,6 +1,6 @@ { "name": "mnml-ops", - "version": "1.4.6", + "version": "1.4.7", "description": "", "main": "index.js", "scripts": { diff --git a/server/Cargo.toml b/server/Cargo.toml index 89ecb188..565aef8f 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml" -version = "1.4.6" +version = "1.4.7" authors = ["ntr "] [dependencies] From 2217afaa642e86ec9d65f667e245570f9b5e07f7 Mon Sep 17 00:00:00 2001 From: ntr Date: Thu, 19 Sep 2019 22:33:07 +1000 Subject: [PATCH 03/14] demo state check --- client/src/events.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/events.jsx b/client/src/events.jsx index 05b01677..216af011 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -206,6 +206,7 @@ function registerEvents(store) { } function setDemo(d) { + const initial = { players: d, combiner: [], @@ -215,7 +216,8 @@ function registerEvents(store) { }; const startDemo = () => { - console.log(initial); + const { account } = store.getState(); + if (account) return false; store.dispatch(actions.setDemo(initial)); store.dispatch(actions.setAnimTarget(null)); setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0] }))), 2000); From 3ad679cb021161afa6e52a83a5622321d9532cca Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 20 Sep 2019 12:22:48 +1000 Subject: [PATCH 04/14] vbox show costs, penalty for combo sale --- WORKLOG.md | 2 +- client/src/components/info.component.jsx | 9 ++++----- server/src/item.rs | 18 ++++++++++++++++-- server/src/rpc.rs | 2 +- server/src/vbox.rs | 2 +- 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index 3fd7fa5d..4debb7b2 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -27,7 +27,7 @@ * fuck magic * empower on ko -var / skill info rpc -> sell cost / cooldown +var / skill info rpc -> cooldown * rework vecs into sets * remove names so games/instances are copy diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index b088f711..d0e85c25 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -52,7 +52,7 @@ function InfoComponent(args) { const speed =
Speed {shapes.SpeedStat()} multiplier {calcSpeed}%
; return (
-

{fullInfo.item}

+

{fullInfo.item} - {fullInfo.cost}b

SKILL

{itemSourceDescription}
{infoDescription}
@@ -133,7 +133,6 @@ function InfoComponent(args) { } return false; }); - console.log(info); const bonusObj = info.includes('Life') ?
+ {bonus.bonus}
:
+ {bonus.bonus}%
; @@ -157,7 +156,7 @@ function InfoComponent(args) { return (
-

{info}

+

{info} - {fullInfo.cost}b

SPEC

{itemSourceDescription}
{infoDescription}
@@ -167,10 +166,10 @@ function InfoComponent(args) {
); } - + const cost = fullInfo.cost ? `- ${fullInfo.cost}b` : false; return (
-

{fullInfo.item}

+

{fullInfo.item} {cost}

{fullInfo.description}
); diff --git a/server/src/item.rs b/server/src/item.rs index 42d564b5..80a8f6f2 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -320,7 +320,19 @@ impl Item { let combos = get_combos(); let combo = combos.iter().find(|c| c.item == *self) .unwrap_or_else(|| panic!("unable to find components for {:?}", self)); - return combo.components.iter().fold(0, |acc, c| acc + c.cost()); + return combo.components.iter().fold(0, |acc, c| { + match c { + Item::Attack | + Item::Block | + Item::Buff | + Item::Debuff | + Item::Stun => acc, + Item::Power | + Item::Life | + Item::Speed => acc + 1, + _ => acc + c.cost(), + } + }); }, } } @@ -960,7 +972,7 @@ impl Item { Item::BreakPlus => vec![Item::Break, Item::Break, Item::Break], Item::BreakPlusPlus => vec![Item::BreakPlus, Item::BreakPlus, Item::BreakPlus], Item::LinkPlus => vec![Item::Link, Item::Link, Item::Link], - Item::LinkPlusPlus => vec![Item::LinkPlusPlus, Item::LinkPlusPlus, Item::LinkPlusPlus], + Item::LinkPlusPlus => vec![Item::LinkPlus, Item::LinkPlus, Item::LinkPlus], Item::BanishPlus => vec![Item::Banish, Item::Banish, Item::Banish], Item::BanishPlusPlus => vec![Item::BanishPlus, Item::BanishPlus, Item::BanishPlus], @@ -1425,6 +1437,7 @@ pub fn get_combos() -> Vec { #[derive(Debug,Clone,Serialize,Deserialize)] pub struct ItemInfo { pub item: Item, + pub cost: usize, pub spec: bool, pub skill: bool, pub values: Option, @@ -1455,6 +1468,7 @@ pub fn item_info() -> ItemInfoCtr { .into_iter() .map(|v| ItemInfo { item: v, + cost: v.cost(), spec: v.into_spec().is_some(), skill: v.into_skill().is_some(), description: v.into_description(), diff --git a/server/src/rpc.rs b/server/src/rpc.rs index be3071e8..d006a316 100644 --- a/server/src/rpc.rs +++ b/server/src/rpc.rs @@ -14,7 +14,7 @@ use cookie::Cookie; use stripe::{Client as StripeClient, Subscription}; use crossbeam_channel::{unbounded, Sender as CbSender}; -use ws::{Builder, listen, CloseCode, Message, Handler, Request, Response, Settings, Sender as WsSender}; +use ws::{Builder, CloseCode, Message, Handler, Request, Response, Settings, Sender as WsSender}; use account::{Account}; use account; diff --git a/server/src/vbox.rs b/server/src/vbox.rs index 7088d0e9..c8df2087 100644 --- a/server/src/vbox.rs +++ b/server/src/vbox.rs @@ -240,7 +240,7 @@ mod tests { let mut vbox = Vbox::new(); vbox.bound = vec![Item::Strike]; vbox.reclaim(0).unwrap(); - assert_eq!(vbox.bits, 22); + assert_eq!(vbox.bits, 20); } #[test] From 6fba9d9f4daa6f333b725f79442c9b7a53a9c8d6 Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 20 Sep 2019 13:03:13 +1000 Subject: [PATCH 05/14] show skill delay on info --- WORKLOG.md | 1 - client/src/components/info.component.jsx | 4 +++- server/src/item.rs | 11 ++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index 4debb7b2..f4230f25 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -27,7 +27,6 @@ * fuck magic * empower on ko -var / skill info rpc -> cooldown * rework vecs into sets * remove names so games/instances are copy diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index d0e85c25..372de462 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -50,11 +50,13 @@ function InfoComponent(args) { ? (24 + (itemSpeed(itemSource[0].components[0]) + itemSpeed(itemSource[0].components[1])) * itemSpeed(itemSource[0].components[2])) * 4 : (24 + itemSpeed(info)) * 4; const speed =
Speed {shapes.SpeedStat()} multiplier {calcSpeed}%
; + const cooldown = fullInfo.cooldown ? `${fullInfo.cooldown} Turn delay` : null; return (

{fullInfo.item} - {fullInfo.cost}b

-

SKILL

+

SKILL

{itemSourceDescription} +
{cooldown}
{infoDescription}
{speed}
diff --git a/server/src/item.rs b/server/src/item.rs index 80a8f6f2..56ba9968 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -1439,8 +1439,9 @@ pub struct ItemInfo { pub item: Item, pub cost: usize, pub spec: bool, - pub skill: bool, pub values: Option, + pub skill: bool, + pub cooldown: Option, pub description: String, } @@ -1470,12 +1471,16 @@ pub fn item_info() -> ItemInfoCtr { item: v, cost: v.cost(), spec: v.into_spec().is_some(), - skill: v.into_skill().is_some(), - description: v.into_description(), values: match v.into_spec() { Some(s) => Some(s.values()), None => None }, + skill: v.into_skill().is_some(), + description: v.into_description(), + cooldown: match v.into_skill() { + Some(s) => s.base_cd(), + None => None + }, }) .collect::>(); From 40f6073977e26e57c922a18518c3821c3b23107a Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 20 Sep 2019 13:06:37 +1000 Subject: [PATCH 06/14] use cd pub type --- server/src/item.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/item.rs b/server/src/item.rs index 56ba9968..6a1266c2 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -1,7 +1,7 @@ use skill::{Skill}; use spec::{Spec, SpecValues}; use construct::{Colours}; -use effect::{Colour}; +use effect::{Colour, Cooldown}; #[derive(Debug,Copy,Clone,Serialize,Deserialize,PartialEq,PartialOrd,Ord,Eq)] pub enum Item { @@ -1441,7 +1441,7 @@ pub struct ItemInfo { pub spec: bool, pub values: Option, pub skill: bool, - pub cooldown: Option, + pub cooldown: Cooldown, pub description: String, } From 2894e346e39fadd47adb202e2e3ccca945032fb6 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 20 Sep 2019 14:09:09 +1000 Subject: [PATCH 07/14] v1.4.8 --- 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 b000a6a0..721b9931 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.7 \ No newline at end of file +1.4.8 \ No newline at end of file diff --git a/acp/package.json b/acp/package.json index d930178a..67f5a80c 100644 --- a/acp/package.json +++ b/acp/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.4.7", + "version": "1.4.8", "description": "", "main": "index.js", "scripts": { diff --git a/client/package.json b/client/package.json index bbc55739..387e4c64 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.4.7", + "version": "1.4.8", "description": "", "main": "index.js", "scripts": { diff --git a/ops/package.json b/ops/package.json index 35c94dd8..9bd16061 100755 --- a/ops/package.json +++ b/ops/package.json @@ -1,6 +1,6 @@ { "name": "mnml-ops", - "version": "1.4.7", + "version": "1.4.8", "description": "", "main": "index.js", "scripts": { diff --git a/server/Cargo.toml b/server/Cargo.toml index 565aef8f..1df1bf9a 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml" -version = "1.4.7" +version = "1.4.8" authors = ["ntr "] [dependencies] From 1b71c79bb92f60f0ca178e47c1ddd2913e836213 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 20 Sep 2019 14:56:49 +1000 Subject: [PATCH 08/14] name max len of 20 --- server/src/construct.rs | 7 +++++-- server/src/mtx.rs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/src/construct.rs b/server/src/construct.rs index 80b4d7bb..f464d39c 100644 --- a/server/src/construct.rs +++ b/server/src/construct.rs @@ -271,8 +271,11 @@ impl Construct { self } - pub fn new_name(self, name: String) -> Construct { - self.named(&name) + pub fn new_name(self, name: String) -> Result { + if name.len() > 20 { + return Err(err_msg("20 character name maximum")); + } + Ok(self.named(&name)) } pub fn learn(mut self, s: Skill) -> Construct { diff --git a/server/src/mtx.rs b/server/src/mtx.rs index 3352d100..f32f9339 100644 --- a/server/src/mtx.rs +++ b/server/src/mtx.rs @@ -152,7 +152,7 @@ pub fn apply(tx: &mut Transaction, account: &Account, variant: MtxVariant, const account::debit(tx, account.id, cost)?; construct = match mtx.variant { - MtxVariant::Rename => construct.new_name(name), + MtxVariant::Rename => construct.new_name(name)?, _ => construct.new_img(), }; From 14070ac5c4bc2a4e2dccfec9481184bc3b1667b2 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 20 Sep 2019 15:32:21 +1000 Subject: [PATCH 09/14] fix game skill clear --- server/src/construct.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/construct.rs b/server/src/construct.rs index f464d39c..21647aef 100644 --- a/server/src/construct.rs +++ b/server/src/construct.rs @@ -238,7 +238,7 @@ impl Construct { pub fn from_skeleton(skeleton: &ConstructSkeleton) -> Construct { return Construct { id: skeleton.id, - account: skeleton.id, + account: skeleton.account, img: skeleton.img, name: skeleton.name.clone(), @@ -249,7 +249,7 @@ impl Construct { pub fn to_skeleton(&self) -> ConstructSkeleton { ConstructSkeleton { id: self.id, - account: self.id, + account: self.account, img: self.img, name: self.name.clone(), } From 2e366e2ecad6210d50624293a5d364a34fa1d92f Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 20 Sep 2019 15:34:09 +1000 Subject: [PATCH 10/14] speed fix, counter fix, client side anim fix --- client/src/events.jsx | 2 +- server/src/game.rs | 2 +- server/src/item.rs | 30 ++++++++++++++++++++++-------- server/src/skill.rs | 23 ++++++++++++----------- 4 files changed, 36 insertions(+), 21 deletions(-) diff --git a/client/src/events.jsx b/client/src/events.jsx index 216af011..f088c057 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -91,7 +91,7 @@ function registerEvents(store) { store.dispatch(actions.setAnimTarget(null)); store.dispatch(actions.setAnimText(null)); store.dispatch(actions.setAnimFocus([])); - if (!sequence.includes('END_SKILL') + if (!sequence.includes('END_SKILL' && anims.animTarget) || ['Banish', 'Invert'].includes(removeTier(anims.animTarget.skill))) return cb(); return true; }, timeout); diff --git a/server/src/game.rs b/server/src/game.rs index 222ab0f6..b96d15ad 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -322,7 +322,7 @@ impl Game { return Err(err_msg("game not in skill phase")); } let mut game_state = self.clone(); - self.stack.retain(|s| game_state.construct_by_id(s.source_construct_id).unwrap().account == player_id); + self.stack.retain(|s| game_state.construct_by_id(s.source_construct_id).unwrap().account != player_id); return Ok(self); } diff --git a/server/src/item.rs b/server/src/item.rs index 6a1266c2..2242f23b 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -337,13 +337,27 @@ impl Item { } } - pub fn speed(&self) -> u64 { + pub fn base_speed(&self) -> u64 { match self { Item::Attack => 1, Item::Stun => 2, Item::Block => 3, Item::Buff | Item::Debuff => 4, + Item::Blue => 1, + Item::Green => 2, + Item::Red => 3, + _ => 0, + } + } + + pub fn speed(&self) -> u64 { + match self { + Item::Attack | + Item::Stun | + Item::Block | + Item::Buff | + Item::Debuff => 24 + self.base_speed(), _ => { let combos = get_combos(); let combo = combos.iter().find(|c| c.item == *self) @@ -355,17 +369,17 @@ impl Item { combo.components.iter().for_each(|unit| { colour_speed += match unit { - Item::Red => 3, - Item::Green => 2, - Item::Blue => 1, + Item::Red | + Item::Green | + Item::Blue => unit.base_speed(), _ => 0, }; skill_speed += match unit { - Item::Attack => 1, - Item::Stun => 2, - Item::Block => 3, + Item::Attack | + Item::Stun | + Item::Block | Item::Buff | - Item::Debuff => 4, + Item::Debuff => unit.base_speed(), _ => 0, }; if colour_speed == 0 && skill_speed == 0 { diff --git a/server/src/skill.rs b/server/src/skill.rs index e66ab6a4..4d5ba5d6 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -293,7 +293,7 @@ fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) -> let mut target = game.construct_by_id(target.id).unwrap().clone(); match event { - Event::Damage { amount, skill, mitigation: _, colour: _ } => { + Event::Damage { amount, skill, mitigation: _, colour: c } => { if target.affected(Effect::Electric) { let ConstructEffect { effect: _, duration: _, meta, tick: _ } = target.effects.iter() .find(|e| e.effect == Effect::Electric).unwrap().clone(); @@ -315,16 +315,17 @@ fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) -> _ => panic!("no absorb skill"), }; } - - if target.affected(Effect::Counter) { - let ConstructEffect { effect: _, duration: _, meta, tick: _ } = target.effects.iter() - .find(|e| e.effect == Effect::Counter).unwrap().clone(); - match meta { - Some(EffectMeta::Skill(s)) => { - resolutions = counter_attack(&mut target, &mut source, resolutions, s); - }, - _ => panic!("no counter skill"), - }; + if c == Colour::Red { + if target.affected(Effect::Counter) { + let ConstructEffect { effect: _, duration: _, meta, tick: _ } = target.effects.iter() + .find(|e| e.effect == Effect::Counter).unwrap().clone(); + match meta { + Some(EffectMeta::Skill(s)) => { + resolutions = counter_attack(&mut target, &mut source, resolutions, s); + }, + _ => panic!("no counter skill"), + }; + } } }, _ => (), From 67654cbbab8b49e7b453580663d2ac00e5b59094 Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 20 Sep 2019 15:40:53 +1000 Subject: [PATCH 11/14] use server calc speeds --- client/src/components/info.component.jsx | 7 ++----- client/src/utils.jsx | 14 -------------- server/src/item.rs | 5 +++++ 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index 372de462..32b059b3 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -3,7 +3,7 @@ const range = require('lodash/range'); const reactStringReplace = require('react-string-replace'); const { INFO } = require('./../constants'); -const { convertItem, removeTier, itemSpeed } = require('../utils'); +const { convertItem, removeTier } = require('../utils'); const shapes = require('./shapes'); function InfoComponent(args) { @@ -46,10 +46,7 @@ function InfoComponent(args) { : false; const itemRegEx = /(Red|Blue|Green)/; const itemSourceDescription = reactStringReplace(itemSourceInfo, itemRegEx, match => shapes[match]()); - const calcSpeed = itemSource.length - ? (24 + (itemSpeed(itemSource[0].components[0]) + itemSpeed(itemSource[0].components[1])) * itemSpeed(itemSource[0].components[2])) * 4 - : (24 + itemSpeed(info)) * 4; - const speed =
Speed {shapes.SpeedStat()} multiplier {calcSpeed}%
; + const speed =
Speed {shapes.SpeedStat()} multiplier {fullInfo.speed * 4}%
; const cooldown = fullInfo.cooldown ? `${fullInfo.cooldown} Turn delay` : null; return (
diff --git a/client/src/utils.jsx b/client/src/utils.jsx index ab3a6f4c..b829eb94 100644 --- a/client/src/utils.jsx +++ b/client/src/utils.jsx @@ -187,20 +187,6 @@ const removeTier = skill => { return skill; }; -function itemSpeed(item) { - switch (item) { - case 'Attack': return 1; - case 'Stun': return 2; - case 'Block': return 3; - case 'Buff': return 4; - case 'Debuff': return 4; - case 'Red': return 3; - case 'Green': return 2; - case 'Blue': return 1; - default: return 0; - } -} - function postData(url = '/', data = {}) { // Default options are marked with * return fetch(`/api${url}`, { diff --git a/server/src/item.rs b/server/src/item.rs index 2242f23b..581c6b5f 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -1455,6 +1455,7 @@ pub struct ItemInfo { pub spec: bool, pub values: Option, pub skill: bool, + pub speed: Option, pub cooldown: Cooldown, pub description: String, } @@ -1491,6 +1492,10 @@ pub fn item_info() -> ItemInfoCtr { }, skill: v.into_skill().is_some(), description: v.into_description(), + speed: match v.into_skill() { + Some(s) => Some(s.speed()), + None => None + }, cooldown: match v.into_skill() { Some(s) => s.base_cd(), None => None From 6e1a0a6ad2de1fed79f74816b6512c2e2c361dab Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 20 Sep 2019 16:14:12 +1000 Subject: [PATCH 12/14] set account id on fetch --- server/src/account.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/src/account.rs b/server/src/account.rs index 5eaeafd4..ed918a55 100644 --- a/server/src/account.rs +++ b/server/src/account.rs @@ -357,6 +357,10 @@ pub fn constructs(tx: &mut Transaction, account: &Account) -> Result>(); @@ -386,6 +390,10 @@ pub fn team(tx: &mut Transaction, account: &Account) -> Result, E }, } }) + .map(|mut sk| { + sk.account = account.id; + sk + }) .map(|sk| Construct::from_skeleton(&sk)) .collect::>(); From f6a4f874467ff4e920b1d640944e652ab88499b4 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 20 Sep 2019 16:23:45 +1000 Subject: [PATCH 13/14] itemspeed --- client/src/utils.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/client/src/utils.jsx b/client/src/utils.jsx index b829eb94..b78a2b44 100644 --- a/client/src/utils.jsx +++ b/client/src/utils.jsx @@ -250,6 +250,5 @@ module.exports = { TARGET_COLOURS, randomPoints, removeTier, - itemSpeed, match, }; From 1d778ecc17da2ca660590b280ebdebe0ec555877 Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 20 Sep 2019 16:44:14 +1000 Subject: [PATCH 14/14] null animTarget bug --- client/src/events.jsx | 4 ++-- client/src/utils.jsx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/events.jsx b/client/src/events.jsx index f088c057..17851207 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -87,12 +87,12 @@ function registerEvents(store) { ); } return setTimeout(() => { + const animSkill = anims.animTarget ? removeTier(anims.animTarget.skill) : false; store.dispatch(actions.setAnimSource(null)); store.dispatch(actions.setAnimTarget(null)); store.dispatch(actions.setAnimText(null)); store.dispatch(actions.setAnimFocus([])); - if (!sequence.includes('END_SKILL' && anims.animTarget) - || ['Banish', 'Invert'].includes(removeTier(anims.animTarget.skill))) return cb(); + if (!sequence.includes('END_SKILL') || (animSkill && ['Banish', 'Invert'].includes(animSkill))) return cb(); return true; }, timeout); }, err => { diff --git a/client/src/utils.jsx b/client/src/utils.jsx index b829eb94..b78a2b44 100644 --- a/client/src/utils.jsx +++ b/client/src/utils.jsx @@ -250,6 +250,5 @@ module.exports = { TARGET_COLOURS, randomPoints, removeTier, - itemSpeed, match, };