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 { for (let i = 2; i < 6; i += 1) { delete vbox.store.Colours[i]; } vbox.store.Skills = {}; vbox.store.Specs = {}; delete vbox.stash[0]; delete vbox.stash[1]; delete vbox.stash[2]; } } if (stage === 2) { if (!(vbox.stash[0] === 'Attack' && vbox.stash[1] === 'Attack' && vbox.stash[2] === 'Attack')) { stage += 1; } else { vbox.store.Colours = {}; vbox.store.Skills = {}; vbox.store.Specs = {}; delete vbox.stash[0]; delete vbox.stash[1]; } } if (stage === 3) { if (player.constructs[0].skills.length !== 0) { stage += 1; } else { vbox.store.Colours = {}; vbox.store.Skills = {}; vbox.store.Specs = {}; delete vbox.stash[0]; delete vbox.stash[1]; } } if (stage === 4) { if (!vbox.store.Specs[0] || vbox.bits < 24) { stage += 1; } else { vbox.store.Colours = {}; vbox.store.Skills = {}; delete vbox.store.Specs[1]; delete vbox.store.Specs[2]; delete vbox.stash[0]; delete vbox.stash[1]; } } if (stage === 5) { if (player.constructs[0].specs.length !== 0) { stage += 1; } else { vbox.store.Colours = {}; vbox.store.Skills = {}; vbox.store.Specs = {}; delete vbox.stash[0]; delete vbox.stash[1]; } } if (stage === 6) { if (player.constructs.every(c => c.skills.length !== 0)) { stage += 1; } else { vbox.store.Colours = {}; vbox.store.Skills = {}; vbox.store.Specs = {}; } } if (stage === 7) { if (vbox.bits < 25) { stage += 1; } else { vbox.store.Colours = {}; vbox.store.Skills = {}; vbox.store.Specs = {}; } } store.dispatch(actions.setTutorial(stage)); } function tutorialStage(tutorial, clearTutorial, instance) { if (!(instance.time_control === 'Practice' && instance.rounds.length === 1)) return false; const exit = () => clearTutorial(); const tutorialText = () => { if (tutorial === 1) { return (This is the VBOX Phase where you customise your team.
Buy the two colours from the store to continue.
You start the game with the Attack base skill item.
Create powerful combinations by combining colours with base items.
Select all three items to combine.
The first construct on your team is {constructOne}.
Skill items can be equipped to your constructs to be used in the combat phase.
Select your new skill from the stash and then click the flashing SKILL slot or the construct image to equip.
You can also buy specialisation items for your constructs.
Specialisation items increase stats including power, speed and life.
Buy the specialisation item from the store to continue.
Specialisation items increase the stats of your constructs.
They can be combined further with colours to optimise your team strategy.
Slect the item in the stash, once selected click the flashing SPEC slot to equip.
PRO TIP: While selecting an item in the shop, click on your construct to buy and equip in one step.
You have now created a construct with an upgraded skill and base spec.
Equip your other constructs {constructTwo} and {constructThree} with skills.
Ensure each construct has a single skill to continue.
PRO TIP: Select a skill or spec on a construct and click another construct to swap it.
Each round you start with 30 bits and a store full of different skills, specs and colours.
Bits are your currency for buying items.
You can refill the store by pressing the refill button for 2b.
Press the REFILL button to buy new items.
That completes the VBOX Tutorial.
Press the green READY button in the bottom right to progress to the GAME PHASE
or continue creating new items to upgrade your constructs further.