vbox demo generate random skill combos, disable part of broken curse anim
This commit is contained in:
parent
0c3cd46ce2
commit
188ae0de6a
@ -43,7 +43,7 @@ function Demo(args) {
|
|||||||
|
|
||||||
if (!demo || !itemInfo.items.length || account) return false;
|
if (!demo || !itemInfo.items.length || account) return false;
|
||||||
|
|
||||||
const { combiner, items, equipping, equipped, players } = demo;
|
const { combiner, items, equipping, equipped, players, combo } = demo;
|
||||||
|
|
||||||
const vboxDemo = () => {
|
const vboxDemo = () => {
|
||||||
function inventoryBtn(i, j) {
|
function inventoryBtn(i, j) {
|
||||||
@ -90,7 +90,7 @@ function Demo(args) {
|
|||||||
VBOX PHASE {shapes.Red()} {shapes.Green()} {shapes.Blue()}
|
VBOX PHASE {shapes.Red()} {shapes.Green()} {shapes.Blue()}
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p>
|
||||||
Combine the colour base items with skills and specialisations to build an array of powerful variants.
|
Combine colours with base skills and specialisations to build an array of powerful variants.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div> </div>
|
<div> </div>
|
||||||
@ -122,7 +122,7 @@ function Demo(args) {
|
|||||||
<ConstructAvatar construct={c} />
|
<ConstructAvatar construct={c} />
|
||||||
<div class="skills">
|
<div class="skills">
|
||||||
{equipped
|
{equipped
|
||||||
? <button>Strike</button>
|
? <button>{combo}</button>
|
||||||
: <button disabled={!equipping} class={btnClass}>SKILL</button>
|
: <button disabled={!equipping} class={btnClass}>SKILL</button>
|
||||||
}
|
}
|
||||||
<button disabled={!equipping} class={btnClass}>SKILL</button>
|
<button disabled={!equipping} class={btnClass}>SKILL</button>
|
||||||
|
|||||||
@ -234,39 +234,42 @@ function registerEvents(store) {
|
|||||||
|
|
||||||
function setDemo(d) {
|
function setDemo(d) {
|
||||||
|
|
||||||
const initial = {
|
const vboxDemo = {
|
||||||
players: d,
|
players: d,
|
||||||
combiner: [],
|
combiner: [],
|
||||||
items: ['Red', 'Red', 'Attack'],
|
|
||||||
equipped: false,
|
equipped: false,
|
||||||
equipping: false,
|
equipping: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const startDemo = () => {
|
const startDemo = () => {
|
||||||
const { account } = store.getState();
|
const { account, itemInfo } = store.getState();
|
||||||
if (account) return false;
|
if (account) return false;
|
||||||
store.dispatch(actions.setDemo(initial));
|
if (!itemInfo || itemInfo.items.length === 0) return setTimeout(startDemo, 500);
|
||||||
store.dispatch(actions.setAnimTarget(null));
|
store.dispatch(actions.setAnimTarget(null));
|
||||||
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0] }))), 500);
|
const bases = ['Attack', 'Stun', 'Buff', 'Debuff', 'Block'];
|
||||||
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0, 1] }))), 1000);
|
const combo = sample(itemInfo.combos.filter(i => bases.some(b => i.components.includes(b))));
|
||||||
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0, 1, 2] }))), 1500);
|
vboxDemo.combo = combo.item;
|
||||||
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [], items: ['Strike', '', ''] }))), 2500);
|
vboxDemo.items = combo.components;
|
||||||
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0], items: ['Strike', '', ''], equipping: true }))), 3500);
|
store.dispatch(actions.setDemo(vboxDemo));
|
||||||
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [], items: ['', '', ''], equipped: true, equipping: false }))), 4250);
|
|
||||||
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { items: ['', '', ''], equipped: true, equipping: false }))), 4250);
|
|
||||||
|
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, vboxDemo, { combiner: [0] }))), 500);
|
||||||
|
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, vboxDemo, { combiner: [0, 1] }))), 1000);
|
||||||
|
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, vboxDemo, { combiner: [0, 1, 2] }))), 1500);
|
||||||
|
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, vboxDemo, { combiner: [], items: [vboxDemo.combo, '', ''] }))), 2500);
|
||||||
|
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, vboxDemo, { combiner: [0], items: [vboxDemo.combo, '', ''], equipping: true }))), 3000);
|
||||||
|
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, vboxDemo, { combiner: [], items: ['', '', ''], equipped: true, equipping: false }))), 4000);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const { itemInfo } = store.getState();
|
|
||||||
return store.dispatch(actions.setAnimTarget({
|
return store.dispatch(actions.setAnimTarget({
|
||||||
skill: sample(itemInfo.items.filter(i => i.skill)).item,
|
skill: sample(itemInfo.items.filter(i => i.skill)).item,
|
||||||
constructId: d[1].constructs[0].id,
|
constructId: d[1].constructs[0].id,
|
||||||
player: false,
|
player: false,
|
||||||
direction: 0,
|
direction: 0,
|
||||||
}));
|
}));
|
||||||
}, 1000);
|
}, 500);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const { itemInfo } = store.getState();
|
|
||||||
return store.dispatch(actions.setAnimTarget({
|
return store.dispatch(actions.setAnimTarget({
|
||||||
skill: sample(itemInfo.items.filter(i => i.skill)).item,
|
skill: sample(itemInfo.items.filter(i => i.skill)).item,
|
||||||
constructId: d[1].constructs[1].id,
|
constructId: d[1].constructs[1].id,
|
||||||
@ -275,7 +278,7 @@ function registerEvents(store) {
|
|||||||
}));
|
}));
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
|
||||||
setTimeout(startDemo, 6000);
|
return setTimeout(startDemo, 5000);
|
||||||
};
|
};
|
||||||
|
|
||||||
startDemo();
|
startDemo();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user