const preact = require('preact'); 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'; return (
); } } return false; } function tutorialShouldDisableEquip(tutorial, iter, instance, construct) { return tutorial && tutorial === 6 && iter === 0 && construct.skills.length !== 0 && instance.time_control === 'Practice' && instance.rounds.length === 1; } function tutorialVbox(player, store, tutorial) { let stage = tutorial; const { vbox } = player; if (stage === 1) { if (vbox.bits < 29) { stage += 1; } else { vbox.free[0] = vbox.free[0].slice(0, 2); vbox.free[1] = []; vbox.free[2] = []; vbox.bound.fill(null, 0, 3); } } if (stage === 2) { if (!(vbox.bound.slice(0, 3).every(i => i === 'Attack') && vbox.bound.length >= 3)) { stage += 1; } else { vbox.free[0] = vbox.free[0].slice(0, 2); vbox.free[1] = []; vbox.free[2] = []; vbox.bound.fill(null, 1, 3); } } if (stage === 3) { if (player.constructs[0].skills.length !== 0) { stage += 1; } else { vbox.free[0] = vbox.free[0].slice(0, 2); vbox.free[1] = []; vbox.free[2] = []; vbox.bound.fill(null, 0, 2); } } if (stage === 4) { if (!vbox.free[2][0] || vbox.bits < 24) { stage += 1; } else { vbox.free[0] = []; vbox.free[1] = []; vbox.free[2] = vbox.free[2].slice(0, 1); vbox.bound.fill(null, 0, 2); } } if (stage === 5) { if (player.constructs[0].specs.length !== 0) { stage += 1; } else { vbox.free[0] = []; vbox.free[1] = []; vbox.free[2] = vbox.free[2].slice(0, 1); vbox.bound.fill(null, 0, 2); } } if (stage === 6) { if (player.constructs.every(c => c.skills.length !== 0)) { stage += 1; } else { vbox.free[0] = []; vbox.free[1] = []; vbox.free[2] = []; } } if (stage === 7) { if (vbox.bits < 25) { stage += 1; } else { vbox.free[0] = []; vbox.free[1] = []; vbox.free[2] = []; } } store.dispatch(actions.setTutorial(stage)); } function tutorialStage(tutorial, ws, clearTutorial, instance) { if (!(instance.time_control === 'Practice' && instance.rounds.length === 1)) return false; const exit = () => { clearTutorial(); localStorage.setItem('tutorial-complete', true); ws.sendInstanceState(instance.id); }; const tutorialText = () => { if (tutorial === 1) { return (Welcome to the vbox phase tutorial.
Colours are used to create powerful combinations with base items.
Buy the two colours from the vbox to continue.
In a normal game you start with three base Attack skill items.
The Attack item can be combined with colours to create a new skill.
Select the Attack item along with two colours.
Once selected press COMBINE to create a new combo.
The first construct on your team is {constructOne}.
Skill items can be equipped to your constructs to be used in the combat phase.
Click the newly combined skill item in the top right of the inventory.
Once selected click the construct SKILL slot to equip the skill.
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 to continue.
Equipping specialisation items will increase the stats of your constructs.
These can also be combined with colours for further specialisation.
Click the specialisation item in the top right of the inventory.
Once selected click the construct SPEC slot to equip the specialisation.
You have now created a construct with an upgraded skill and base spec.
The goal is to create three powerful constructs for combat.
Equip your other constructs {constructTwo} and {constructThree} with the Attack skill.
Ensure each construct has a single skill to continue.
Each round you start with a vbox full of different skills, specs and colours.
Bits are your currency for buying skills, specs and colours from the vbox.
Colours cost 1b, Skills cost 2b and specs cost 3b.
You can refill the vbox by pressing the refill button for 2b.
After each combat round you get more bits to further upgrade your team.
Press the REFILL button to get a new vbox and continue.
You've completed the tutorial! Try to create more skill and spec combinations.
You can unequip skills and specs back into the inventory by double clicking.
Reclaim can be used to refund the cost of items in your inventory.