> Tutorial by level
Puny Bulb Level 48
Reaching level 48, you can buy a new kind of chip, the Puny Bulb. This chip is required for your leek to summon an allied entity called Bulbs.
Looking at a bulb's card in the market, you will notice that it shows information about its characteristic (points that will be available in skills).
A Puny Bulb has no weapon, but he got 4 chips that cannot be exchanged.
If you tried to use your Bulb with useChip, you would notice that your bulb will not take any action. Leek Wars is a coding game, you need to code also your bulb's AI.
First step
You need to code a function that will be used as AI by your Bulb, example below:
function PunyBulbAI() { var summoner = getSummoner(); say("Hey, my name is Bob"); moveToward(summoner); useChip(CHIP_PROTEIN, summoner); }
This function will make your bulb follow the leek that summoned it and cast Protein on him.
Important: in a bulb function, if you use getEntity, you will get the ID number of the bulb and not your leek's ID. Any function sending back information on "your leek" will diplay information on the bulb. That's why [getSummoner] is used in the code to find out the leek that summoned the bulb.
Second step
Now you need to call your bulb on the field using the summon function, like this:
summon(CHIP_PUNY_BULB, cell, PunyBulbAI);
"cell" being a position suitable to summon the bulb on it (empty and in the right range). Note: the AI that your bulb will execute is a parameter of this function and is NOT followed by parantheses.
Good to know: operations and global variables are shared between a leek and its summons.
Level 45
Level 50
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.