Level 48

Level 48

> Tutorial by level

Unlocked weapons and chips

Puny Bulb Level 48

At level 48, you get a very special chip: the Puny Bulb. In Leek Wars, leeks can have summons, called "Bulbs".

The card of a bulb chip is a little different: it holds extra information about the bulb's characteristics and the chips it has.

The Puny Bulb has no weapons, but it has 4 chips that cannot be changed.

Summoning

If you tried using your bulb with useChip, you may have been surprised to see that it did nothing. Leek Wars is a programming game. You code your leek's AI, but also your bulbs' AI!

First, you need to create a function that will act as your bulb's AI, for example:

function bulbAI() { var summoner = getSummoner() say("Hi, I'm Fab.") moveToward(summoner) useChip(CHIP_PROTEIN, summoner) }

With this function, for example, your bulb will follow your leek to give it the Protein boost.

Inside the function, if you use getEntity, you will indeed get the bulb's ID, not your leek's. Functions that return information about "your leek" will return the bulb's information when they are called in a function that serves as a bulb's AI.

Finally, you need to summon your bulb with the summon function. For example:

summon(CHIP_PUNY_BULB, cell, bulbAI, "Fab")

Where "cell" is a cell where you can summon the bulb.

Note that you must pass the name of the function that will serve as the bulb's AI as a parameter, but without the parentheses.

Good to know: operations and global variables are shared between the summoner and its summons!

Level 45

Level 50