From 6f578f0747936ba0b025722c116388e7fb5568e4 Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 4 Nov 2019 14:33:06 +1000 Subject: [PATCH 01/18] init --- client/assets/styles/vbox.less | 2 +- client/src/components/instance.constructs.jsx | 2 +- client/src/components/vbox.component.jsx | 50 +++++++------------ 3 files changed, 19 insertions(+), 35 deletions(-) diff --git a/client/assets/styles/vbox.less b/client/assets/styles/vbox.less index fe62f0a2..0e0f9526 100644 --- a/client/assets/styles/vbox.less +++ b/client/assets/styles/vbox.less @@ -83,7 +83,7 @@ &.highlight { color: black; background: @white; - border: 1px solid @white; + // border: 1px solid @white; (this bangs around the vbox) // overwrite the classes on white svg elements svg { diff --git a/client/src/components/instance.constructs.jsx b/client/src/components/instance.constructs.jsx index 1e010061..a17aa221 100644 --- a/client/src/components/instance.constructs.jsx +++ b/client/src/components/instance.constructs.jsx @@ -223,7 +223,7 @@ function Construct(props) { const classes = `instance-construct ${mobileVisible ? 'visible' : ''}`; const avatarMouseOver = e => hoverInfo(e, `constructAvatar ${construct.name}`); return ( -
+
ev.preventDefault()} onDrop={onClick}>

hoverInfo(e, `constructName ${construct.name}`)}>{construct.name}

hoverInfo(e, 'constructSkills')} > diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index c2c1a51a..68f6dc5e 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -194,8 +194,6 @@ class Vbox extends preact.Component { e.stopPropagation(); setItemEquip(null); setCombiner([]); - - if (selected) return clearVboxSelected(); setInfo(vbox.free[group][index]); return setVboxSelected([group, index]); } @@ -217,28 +215,18 @@ class Vbox extends preact.Component { const classes = `${v.toLowerCase()} ${selected ? 'highlight' : ''} ${comboHighlight}`; - if (shapes[v]) { - return ( + const vboxObject = shapes[v] ? shapes[v]() : v; + return ( + ); } @@ -334,26 +322,19 @@ class Vbox extends preact.Component { const highlighted = combiner.indexOf(i) > -1; const border = buttons[removeTier(v)] ? buttons[removeTier(v)]() : ''; const classes = `${highlighted ? 'highlight' : border} ${comboHighlight}`; - if (shapes[v]) { - return ( + + const invObject = shapes[v] ? shapes[v]() : v; + + return ( +
- ); - } - - return ( - +
); } @@ -408,7 +389,10 @@ class Vbox extends preact.Component {
e.stopPropagation()} - style={vboxSelecting || (itemUnequip.length) ? { cursor: 'pointer' } : null}> + style={vboxSelecting || (itemUnequip.length) ? { cursor: 'pointer' } : null} + onDragOver={ev => ev.preventDefault()} + onDrop={inventoryClick} + >

e.target.scrollIntoView(true)} From 61b57827e314e221e1068d450893aeb4d2ddb98b Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 4 Nov 2019 15:09:58 +1000 Subject: [PATCH 02/18] label --- client/src/components/vbox.component.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index 68f6dc5e..e9e8b8e7 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -326,7 +326,7 @@ class Vbox extends preact.Component { const invObject = shapes[v] ? shapes[v]() : v; return ( -
+
+ ); } From bb50037e0e99e7cf6f1c1e37a106bf7c17a1726b Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 4 Nov 2019 16:02:48 +1000 Subject: [PATCH 03/18] drag equipped items --- client/assets/styles/instance.less | 7 ++++ client/src/components/instance.constructs.jsx | 36 ++++++++++--------- client/src/components/vbox.component.jsx | 3 +- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/client/assets/styles/instance.less b/client/assets/styles/instance.less index 0f05fc8b..841993a8 100644 --- a/client/assets/styles/instance.less +++ b/client/assets/styles/instance.less @@ -203,6 +203,9 @@ button { height: 3em; } + label { + display: flex; + } } .specs { @@ -228,6 +231,10 @@ font-size: 75%; line-height: initial; } + + label { + display: flex; + } } .stats { diff --git a/client/src/components/instance.constructs.jsx b/client/src/components/instance.constructs.jsx index a17aa221..ed43f62e 100644 --- a/client/src/components/instance.constructs.jsx +++ b/client/src/components/instance.constructs.jsx @@ -153,15 +153,17 @@ function Construct(props) { const classes = `${equipping ? 'equipping' : ''} ${!skill ? 'empty' : ''} ${border()}`; return ( - + ); }); @@ -195,13 +197,15 @@ function Construct(props) { return ( - + ); }); diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index e9e8b8e7..14cf1108 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -306,7 +306,8 @@ class Vbox extends preact.Component { // removing const combinerIndex = combiner.indexOf(i); if (combinerIndex > -1) { - return combinerChange(without(combiner, i)); + return true; + // return combinerChange(without(combiner, i)); } combiner.push(i); From c036d97fbca4e53f73728b1854dd9b9dac19dfe9 Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 4 Nov 2019 17:29:21 +1100 Subject: [PATCH 04/18] v1.7.1 --- 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 9dbb0c00..081af9a1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.0 \ No newline at end of file +1.7.1 \ No newline at end of file diff --git a/acp/package.json b/acp/package.json index c90324b5..48ed247e 100644 --- a/acp/package.json +++ b/acp/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.7.0", + "version": "1.7.1", "description": "", "main": "index.js", "scripts": { diff --git a/client/package.json b/client/package.json index 40922a43..f446e92c 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.7.0", + "version": "1.7.1", "description": "", "main": "index.js", "scripts": { diff --git a/ops/package.json b/ops/package.json index 808951f4..876bd4cf 100755 --- a/ops/package.json +++ b/ops/package.json @@ -1,6 +1,6 @@ { "name": "mnml-ops", - "version": "1.7.0", + "version": "1.7.1", "description": "", "main": "index.js", "scripts": { diff --git a/server/Cargo.toml b/server/Cargo.toml index 52007285..40e26480 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml" -version = "1.7.0" +version = "1.7.1" authors = ["ntr "] [dependencies] From 64ec68d823588d42c54eb8895e1e3868104d02f0 Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 4 Nov 2019 16:35:28 +1000 Subject: [PATCH 05/18] fix recharge immunity bug --- server/src/skill.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/skill.rs b/server/src/skill.rs index 1f655e6d..313b21a3 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -1392,7 +1392,7 @@ fn sustain(source: &mut Construct, target: &mut Construct, mut results: Resoluti if red > 0 || blue > 0 { EventStages::PostOnly } else { EventStages::NoStages } } - _ => panic!("not recharge") + _ => EventStages::NoStages, }; results.push(Resolution::new(source, target).event(e).stages(stages)); @@ -1411,7 +1411,7 @@ fn intercept(source: &mut Construct, target: &mut Construct, mut results: Resolu if red > 0 || blue > 0 { EventStages::PostOnly } else { EventStages::NoStages } } - _ => panic!("not recharge") + _ => EventStages::NoStages, }; results.push(Resolution::new(source, target).event(e).stages(stages)); @@ -1712,8 +1712,8 @@ fn reflect(source: &mut Construct, target: &mut Construct, mut results: Resoluti Event::Recharge { red, blue, skill: _ } => { if red > 0 || blue > 0 { EventStages::PostOnly } else { EventStages::NoStages } - } - _ => panic!("not recharge") + }, + _ => EventStages::NoStages, }; results.push(Resolution::new(source, target).event(e).stages(stages)); return results;; @@ -1728,7 +1728,7 @@ fn recharge(source: &mut Construct, target: &mut Construct, mut results: Resolut if red > 0 || blue > 0 { EventStages::AllStages } else { EventStages::StartEnd } } - _ => panic!("not recharge") + _ => EventStages::NoStages, }; results.push(Resolution::new(source, target).event(e).stages(stages)); return results; From c3f28a3f1f0b8bf99d513d1ff31a8ff8f1475dac Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 4 Nov 2019 17:50:50 +1100 Subject: [PATCH 06/18] don't panic when recharge event isn't found --- server/src/skill.rs | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/server/src/skill.rs b/server/src/skill.rs index 1f655e6d..5884198a 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -831,13 +831,13 @@ impl Skill { // Buff base Skill::HybridBlast => 50, - + Skill::HasteStrike => 60, - + Skill::Intercept=> 80, Skill::InterceptPlus => 110, Skill::InterceptPlusPlus => 150, - + Skill::TriageTick=> 75, Skill::TriageTickPlus => 110, Skill::TriageTickPlusPlus => 140, @@ -1392,7 +1392,10 @@ fn sustain(source: &mut Construct, target: &mut Construct, mut results: Resoluti if red > 0 || blue > 0 { EventStages::PostOnly } else { EventStages::NoStages } } - _ => panic!("not recharge") + _ => { + warn!("no recharge event found {:?}", e); + return results; + } }; results.push(Resolution::new(source, target).event(e).stages(stages)); @@ -1411,7 +1414,10 @@ fn intercept(source: &mut Construct, target: &mut Construct, mut results: Resolu if red > 0 || blue > 0 { EventStages::PostOnly } else { EventStages::NoStages } } - _ => panic!("not recharge") + _ => { + warn!("no recharge event found {:?}", e); + return results; + } }; results.push(Resolution::new(source, target).event(e).stages(stages)); @@ -1713,7 +1719,10 @@ fn reflect(source: &mut Construct, target: &mut Construct, mut results: Resoluti if red > 0 || blue > 0 { EventStages::PostOnly } else { EventStages::NoStages } } - _ => panic!("not recharge") + _ => { + warn!("no recharge event found {:?}", e); + return results; + } }; results.push(Resolution::new(source, target).event(e).stages(stages)); return results;; @@ -1728,7 +1737,10 @@ fn recharge(source: &mut Construct, target: &mut Construct, mut results: Resolut if red > 0 || blue > 0 { EventStages::AllStages } else { EventStages::StartEnd } } - _ => panic!("not recharge") + _ => { + warn!("no recharge event found {:?}", e); + return results; + } }; results.push(Resolution::new(source, target).event(e).stages(stages)); return results; From 25b89da5c490f6a35f3181853ce05d4796709b3a Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 4 Nov 2019 18:00:40 +1100 Subject: [PATCH 07/18] fix buttons after curse and invert swap --- client/src/components/buttons.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/buttons.jsx b/client/src/components/buttons.jsx index c2f72b15..6cc063a9 100644 --- a/client/src/components/buttons.jsx +++ b/client/src/components/buttons.jsx @@ -31,9 +31,9 @@ module.exports = { // This will need to be edited if we change server recipes Restrict: () => 'red-border', Purge: () => 'green-border', Silence: () => 'blue-border', - Curse: () => 'red-green-border', + Invert: () => 'red-green-border', Decay: () => 'blue-green-border', - Invert: () => 'red-blue-border', + Curse: () => 'red-blue-border', // // Lifes Upgrades // LifeGG: () => 'green-border', From f0c0ce7dd1c892cb4b0ecf4981e9ee9714ff2c11 Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 4 Nov 2019 18:02:51 +1100 Subject: [PATCH 08/18] reminder msg --- client/src/components/buttons.jsx | 3 ++- server/src/item.rs | 45 +++++++++++++++++-------------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/client/src/components/buttons.jsx b/client/src/components/buttons.jsx index 6cc063a9..78232928 100644 --- a/client/src/components/buttons.jsx +++ b/client/src/components/buttons.jsx @@ -1,4 +1,5 @@ -module.exports = { // This will need to be edited if we change server recipes +// This will need to be edited if we change server recipes +module.exports = { // Attack Strike: () => 'red-border', Blast: () => 'blue-border', diff --git a/server/src/item.rs b/server/src/item.rs index 52b3bb8b..4d5604f0 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -620,70 +620,70 @@ impl Item { // Lifes Upgrades Item::LifeGG | Item::LifeGGPlus | - Item::LifeGGPlusPlus => format!("Increases construct GreenLife by {:?}. + Item::LifeGGPlusPlus => format!("Increases construct GreenLife by {:?}. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::LifeRR | Item::LifeRRPlus | - Item::LifeRRPlusPlus => format!("Increases construct RedLife by {:?}. + Item::LifeRRPlusPlus => format!("Increases construct RedLife by {:?}. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), - Item::LifeBB | - Item::LifeBBPlus | - Item::LifeBBPlusPlus => format!("Increases construct BlueLife by {:?}. + Item::LifeBB | + Item::LifeBBPlus | + Item::LifeBBPlusPlus => format!("Increases construct BlueLife by {:?}. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::LifeRG | Item::LifeRGPlus | - Item::LifeRGPlusPlus => format!("Increases construct RedLife and GreenLife by {:?}. + Item::LifeRGPlusPlus => format!("Increases construct RedLife and GreenLife by {:?}. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::LifeGB | Item::LifeGBPlus | - Item::LifeGBPlusPlus => format!("Increases construct GreenLife and BlueLife by {:?}. + Item::LifeGBPlusPlus => format!("Increases construct GreenLife and BlueLife by {:?}. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::LifeRB | Item::LifeRBPlus | - Item::LifeRBPlusPlus => format!("Increases construct RedLife and BlueLife by {:?}. + Item::LifeRBPlusPlus => format!("Increases construct RedLife and BlueLife by {:?}. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), // Power Upgrades - Item::PowerRR | - Item::PowerRRPlus | - Item::PowerRRPlusPlus => format!("Increases construct RedPower by {:?}%. + Item::PowerRR | + Item::PowerRRPlus | + Item::PowerRRPlusPlus => format!("Increases construct RedPower by {:?}%. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::PowerBB | Item::PowerBBPlus | - Item::PowerBBPlusPlus => format!("Increases construct BluePower by {:?}%. + Item::PowerBBPlusPlus => format!("Increases construct BluePower by {:?}%. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::PowerGG | Item::PowerGGPlus | - Item::PowerGGPlusPlus => format!("Increases construct GreenPower by {:?}%. + Item::PowerGGPlusPlus => format!("Increases construct GreenPower by {:?}%. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::PowerRG | Item::PowerRGPlus | - Item::PowerRGPlusPlus => format!("Increases construct GreenPower and RedPower by {:?}%. + Item::PowerRGPlusPlus => format!("Increases construct GreenPower and RedPower by {:?}%. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::PowerGB | Item::PowerGBPlus | - Item::PowerGBPlusPlus => format!("Increases construct GreenPower and BluePower by {:?}%. + Item::PowerGBPlusPlus => format!("Increases construct GreenPower and BluePower by {:?}%. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::PowerRB | Item::PowerRBPlus | - Item::PowerRBPlusPlus => format!("Increases construct RedPower and BluePower by {:?}%. + Item::PowerRBPlusPlus => format!("Increases construct RedPower and BluePower by {:?}%. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), @@ -705,7 +705,7 @@ impl Item { Item::SpeedGGPlusPlus | Item::SpeedRGPlusPlus | Item::SpeedGBPlusPlus | - Item::SpeedRBPlusPlus => format!("Increases construct SpeedStat by {:?}%. + Item::SpeedRBPlusPlus => format!("Increases construct SpeedStat by {:?}%. If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), @@ -796,7 +796,7 @@ impl Item { Item::Hybrid| Item::HybridPlus | Item::HybridPlusPlus => format!( - "Hybrid increases GreenPower by {:?}%. + "Hybrid increases GreenPower by {:?}%. Blue based Attack skills will blast again dealing {:?}% GreenPower as blue damage. Lasts {:?}T.", self.into_skill().unwrap().effect()[0].get_multiplier() - 100, @@ -823,7 +823,7 @@ impl Item { Item::Purge| Item::PurgePlus | Item::PurgePlusPlus => format!( - "Remove buffs from target construct. + "Remove buffs from target construct. Applies purge disabling target green skills for {:?}T.", self.into_skill().unwrap().effect()[0].get_duration()), @@ -836,7 +836,7 @@ impl Item { Item::Reflect| Item::ReflectPlus | Item::ReflectPlusPlus => format!( - "Reflect incoming blue skills to source. Lasts {:?}T. + "Reflect incoming blue skills to source. Lasts {:?}T. Recharges target BlueLife based on {:?}% BluePower.", self.into_skill().unwrap().effect()[0].get_duration(), self.into_skill().unwrap().multiplier()), @@ -943,6 +943,11 @@ impl Item { } } + // !!!!!! + // IF YOU CHANGE A COMBO + // BE SURE TO EDIT BUTTONS.JSX TOO + // !!!!!! + fn combo(&self) -> Vec { match self { Item::Intercept => vec![Item::Buff, Item::Red, Item::Red], From e29ce1e30cef39a71b4083af2e6f781661318b2c Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 4 Nov 2019 17:36:04 +1000 Subject: [PATCH 09/18] firefox drag --- client/src/components/instance.constructs.jsx | 5 ++++- client/src/components/vbox.component.jsx | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/components/instance.constructs.jsx b/client/src/components/instance.constructs.jsx index ed43f62e..d3844294 100644 --- a/client/src/components/instance.constructs.jsx +++ b/client/src/components/instance.constructs.jsx @@ -153,7 +153,10 @@ function Construct(props) { const classes = `${equipping ? 'equipping' : ''} ${!skill ? 'empty' : ''} ${border()}`; return ( -