{range(0, 9).map(i => inventoryBtn(vbox.bound[i], i))}
{combinerBtn()}
@@ -434,11 +421,15 @@ class Vbox extends preact.Component {
// EVERYTHING
//
function hoverInfo(e, newInfo) {
- e.stopPropagation();
+ if (shopSelect.find(c => c[0])) return true;
+ if (stashSelect.length !== 0) {
+ const base = stashSelect.find(c => !['Red', 'Blue', 'Green'].includes(vbox.bound[c]));
+ if (base || base === 0) return true;
+ }
return setInfo(newInfo);
}
- const classes = `vbox`;
+ const classes = 'vbox';
return (
{vboxElement()}
diff --git a/client/src/events.jsx b/client/src/events.jsx
index ab634d98..02c6af1e 100644
--- a/client/src/events.jsx
+++ b/client/src/events.jsx
@@ -157,11 +157,6 @@ function registerEvents(store) {
store.dispatch(actions.setShop(v));
}
- function clearCombiner() {
- store.dispatch(actions.setInfo([]));
- store.dispatch(actions.setCombiner([]));
- }
-
function clearConstructRename() {
store.dispatch(actions.setConstructRename(null));
}
@@ -184,14 +179,12 @@ function registerEvents(store) {
}
function clearInstance() {
- store.dispatch(actions.setCombiner([]));
store.dispatch(actions.setReclaiming(false));
store.dispatch(actions.setActiveSkill(null));
store.dispatch(actions.setInfo(null));
- store.dispatch(actions.setItemEquip(null));
store.dispatch(actions.setItemUnequip([]));
store.dispatch(actions.setVboxHighlight([]));
- store.dispatch(actions.setVboxSelected([]));
+ store.dispatch(actions.setVboxSelected({ shopSelect: [], stashSelect: [] }));
}
function setAccountInstances(v) {
@@ -345,7 +338,6 @@ function registerEvents(store) {
window.addEventListener('hashchange', urlHashChange, false);
return {
- clearCombiner,
clearConstructRename,
clearInfo,
clearInstance,
diff --git a/client/src/keyboard.jsx b/client/src/keyboard.jsx
index e037be18..bb525d47 100644
--- a/client/src/keyboard.jsx
+++ b/client/src/keyboard.jsx
@@ -6,14 +6,12 @@ function setupKeys(store) {
key.unbind('esc');
key('esc', () => document.activeElement.blur());
- key('esc', () => store.dispatch(actions.setCombiner([])));
key('esc', () => store.dispatch(actions.setReclaiming(false)));
key('esc', () => store.dispatch(actions.setActiveSkill(null)));
key('esc', () => store.dispatch(actions.setInfo(null)));
- key('esc', () => store.dispatch(actions.setItemEquip(null)));
key('esc', () => store.dispatch(actions.setItemUnequip([])));
key('esc', () => store.dispatch(actions.setVboxHighlight([])));
- key('esc', () => store.dispatch(actions.setVboxSelected([])));
+ key('esc', () => store.dispatch(actions.setVboxSelected({ shopSelect: [], stashSelect: [] })));
key('esc', () => store.dispatch(actions.setMtxActive(null)));
}
diff --git a/client/src/reducers.jsx b/client/src/reducers.jsx
index c9479f56..1bda4dc7 100644
--- a/client/src/reducers.jsx
+++ b/client/src/reducers.jsx
@@ -26,7 +26,6 @@ module.exports = {
chatShow: createReducer(null, 'SET_CHAT_SHOW'),
chatWheel: createReducer([], 'SET_CHAT_WHEEL'),
- combiner: createReducer([], 'SET_COMBINER'),
constructs: createReducer([], 'SET_CONSTRUCTS'),
constructEditId: createReducer(null, 'SET_CONSTRUCT_EDIT_ID'),
constructRename: createReducer(null, 'SET_CONSTRUCT_RENAME'),
@@ -39,7 +38,6 @@ module.exports = {
instance: createReducer(null, 'SET_INSTANCE'),
instanceChat: createReducer(null, 'SET_INSTANCE_CHAT'),
instances: createReducer([], 'SET_INSTANCES'),
- itemEquip: createReducer(null, 'SET_ITEM_EQUIP'),
itemInfo: createReducer({ combos: [], items: [] }, 'SET_ITEM_INFO'),
itemUnequip: createReducer([], 'SET_ITEM_UNEQUIP'),
mtxActive: createReducer(null, 'SET_MTX_ACTIVE'),
@@ -59,7 +57,7 @@ module.exports = {
tutorial: createReducer(1, 'SET_TUTORIAL'),
tutorialGame: createReducer(1, 'SET_TUTORIAL_GAME'),
- vboxSelected: createReducer([], 'SET_VBOX_SELECTED'),
+ vboxSelected: createReducer({ shopSelect: [], stashSelect: [] }, 'SET_VBOX_SELECTED'),
ws: createReducer(null, 'SET_WS'),
};
diff --git a/client/src/socket.jsx b/client/src/socket.jsx
index 959bfc30..a9ec07ba 100644
--- a/client/src/socket.jsx
+++ b/client/src/socket.jsx
@@ -107,8 +107,8 @@ function createSocket(events) {
events.clearInstance();
}
- function sendVboxCombine(instanceId, indices) {
- send(['VboxCombine', { instance_id: instanceId, indices }]);
+ function sendVboxCombine(instanceId, invIndicies, vboxIndicies) {
+ send(['VboxCombine', { instance_id: instanceId, inv_indices: invIndicies, vbox_indices: vboxIndicies }]);
events.clearInstance();
}
@@ -138,6 +138,11 @@ function createSocket(events) {
events.setActiveSkill(null);
}
+ function sendGameConcede(gameId) {
+ send(['GameConcede', { game_id: gameId }]);
+ events.setActiveSkill(null);
+ }
+
function sendGameTarget(gameId, constructId, skillId) {
send(['GameTarget', { game_id: gameId, construct_id: constructId, skill_id: skillId }]);
events.setActiveSkill(null);
@@ -391,6 +396,7 @@ function createSocket(events) {
sendGameSkill,
sendGameSkillClear,
sendGameOfferDraw,
+ sendGameConcede,
sendGameTarget,
sendInstanceAbandon,
diff --git a/client/src/tutorial.utils.jsx b/client/src/tutorial.utils.jsx
index b3569b26..78013698 100644
--- a/client/src/tutorial.utils.jsx
+++ b/client/src/tutorial.utils.jsx
@@ -4,7 +4,7 @@ const actions = require('./actions');
function tutorialConstructDisplay(player, instance, tutorial, i) {
if (instance.time_control === 'Practice' && instance.rounds.length === 1 && tutorial && tutorial < 6) {
if (tutorial <= 2 || (tutorial > 2 && i > 0)) {
- const classes = `instance-construct`;
+ const classes = 'instance-construct';
return (
);
}
}
@@ -21,7 +21,7 @@ function tutorialVbox(player, store, tutorial) {
let stage = tutorial;
const { vbox } = player;
if (stage === 1) {
- if (vbox.bits < 17) {
+ if (vbox.bits < 29) {
stage += 1;
} else {
vbox.free[0] = vbox.free[0].slice(0, 2);
@@ -54,7 +54,7 @@ function tutorialVbox(player, store, tutorial) {
}
if (stage === 4) {
- if (!vbox.free[2][0] || vbox.bits < 12) {
+ if (!vbox.free[2][0] || vbox.bits < 24) {
stage += 1;
} else {
vbox.free[0] = [];
@@ -86,7 +86,7 @@ function tutorialVbox(player, store, tutorial) {
}
if (stage === 7) {
- if (vbox.bits < 13) {
+ if (vbox.bits < 25) {
stage += 1;
} else {
vbox.free[0] = [];
@@ -112,9 +112,8 @@ function tutorialStage(tutorial, ws, clearTutorial, instance) {
Tutorial
Welcome to the vbox phase tutorial.
-
Colours are used to create powerful combinations.
-
Buy two colours from the vbox by double clicking.
- You can also click the colour once and then click the inventory.
+
Colours are used to create powerful combinations with base items.
+
Buy the two colours from the vbox to continue.
);
}
@@ -151,8 +150,7 @@ function tutorialStage(tutorial, ws, clearTutorial, instance) {
Tutorial
You can also buy specialisation items for your constructs.
Specialisation items increase stats including power, speed and life.
-
Buy the specialisation item from the vbox by double clicking.
- You can also click the specialisation once and then click the inventory.
+
Buy the specialisation item from the vbox to continue.
);
}
diff --git a/ops/package.json b/ops/package.json
index 654b3f8e..09284594 100644
--- a/ops/package.json
+++ b/ops/package.json
@@ -1,6 +1,6 @@
{
"name": "mnml-ops",
- "version": "1.8.3",
+ "version": "1.9.0",
"description": "",
"main": "index.js",
"scripts": {
diff --git a/server/Cargo.toml b/server/Cargo.toml
index 46acb90a..bed06eaa 100644
--- a/server/Cargo.toml
+++ b/server/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mnml"
-version = "1.8.3"
+version = "1.9.0"
authors = ["ntr