Bulbs

Bulbs

> Chips

Bulbs are the summonses of Leek Wars. Leeks can summon bulbs to help them deal damage, heal, protect themselves, and many more.

In the marketplace, the bulb summoning chips are a little different. In fact, they present the characteristics of the bulb that will be summoned :

Invocation

If you have tried to use your bulb with useChip, you may have been surprised to see that this one did nothing. Leek Wars is a programming game. You code the AI of your leek, but also of your bulbs!

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

function bulbAI() { var summoner = getSummoner() say("Hi, do you need fish and chips ?") moveToward(summoner) useChip(CHIP_PROTEIN, summoner) }

For instance, with this function your bulb will follow your leek to give it the Protein boost.

In the function, if you use getEntity, you will get the bulb ID, not your leek ID. Functions returning informations about "your leek" will return the bulb's information if they are in a function that serves as an AI for a bulb.

Finally, you will need to invoke your bulb with the function summon. Like :

summon(CHIP_PUNY_BULB, celltoSummon, bulbAI)

Take note that the name of the function that will be used as the AI for the bulb must be passed as a parameter, but without the parentheses.

Caution : It is important to note that the function you give to your bulb is part of your AI. This means that your bulbs share your global variables and functions (cool!) but also your operations (not cool). Be careful not to exceed your operations in the AI of your summons.

It is possible to have up to 8 bulbs summoned at the same time in a team, see the constant SUMMON_LIMIT.

Bulb characteristics

Its characteristics are displayed as a range of values, for example "0 to 100 of Strength". This value depends on the summoner level of the bulb. A leek at level 1 will summon a bulb with the minimum characteristics. And a level 300 leek will summon a bulb with the maximum characteristics.

The relationship between the summoner's level and the characteristics is linear. That is to say, for "0 to 100 Strength", each time the leek goes up 3 levels, the bulb will gain 1 Strength. For example, at level 100, the bulb will have 33 Strength, at level 150, it will have 50 Strength and at level 200, it will have 66 Strength.

Note : As no bulb is unlocked at level 1, a bulb will never have the lowest stats listed on its sheet.

Between the two levels, the characteristics are calculated in a linear way, according to the following formula :

characteristic = floor(min + (max - min) * min(300, SummonerLevel) / 300)

If the summoner's level is 301, the characteristics are those of a level 300 summoner.

Thus, a level 48 summoner will summon a puny bulb with 50 + (300 - 50) * 48 / 300 = 50 + 250 * 0.16 = 90 life and 4 + (7 - 4) * 48 / 300 = 4 + 3 * 0.16 = 4.48 TP, i.e. 4 TP with floor function.

A Healing Bulb summoned by a level 301 will have 50 + (300 - 50) * 300 / 300 = 50 + 250 * 1 = 300 life and 4 + (7 - 4) * 300 / 300 = 4 + 3 * 1 = 7 TP.

Equipment

Each bulb has 4 to 8 different Chips that you cannot change. These are different depending on the bulb and have the same characteristics as a leek can have. You can immediately notice that a bulb cannot equip Weapons.

The recovery time of a bulb summoning chip is common to the team. This doesn't make any difference when playing solo, but when playing as a farmer or a team it means that you can't summon two bulbs of the same type in the same turn.