> Chips
Plants were introduced in version 3.0 of Leek Wars.
Plants behave much like bulbs, so it's best to be comfortable with those before reading on.
Just like bulbs, plants are summoned with the summon function. Like bulbs, plants are summons. For example, the isSummon function returns true when used on a plant. You can use getType to tell them apart. The one small addition is that the function can take a first parameter, which is the entity that woke your plant up (that entity can also be retrieved with the getPlantTrigger function).
function plantAI(triggerEntity) { say("Hello, I'm Fab.") // Oh no, not again?! say("Why did " + getName(triggerEntity) + " wake me up?") useChipOnCell(CHIP_POPCORN, getCell()) }
A basic AI function that politely introduces itself, displays the name of the entity that woke it up, and uses the Popcorn chip on itself.
> The difference between varieties is for information only, and doesn't exist in a fight
There are 2 varieties of plants.
PLANT_CORN)PLANT_CHILLI_PEPPER)PLANT_PROTOTAXITE)A static plant does nothing in particular. It's there: that's already something! You could use it, for example, to block an enemy leek that has only one empty cell next to it, or to hide behind it so it blocks the line of sight.
So technically, it doesn't need an AI. It's more like an obstacle with life points than an entity.
A plant with an awakening zone doesn't play (doesn't run its AI) during its own turn. It wakes up when another entity enters its awakening zone (given by getAwakeningZone) and runs its AI at that moment (yes, in the middle of the other entity's turn).
EFFECT_PUSH / EFFECT_ATTRACT / EFFECT_REPEL / EFFECT_INVERT wakes up the plant.EFFECT_INVERT doesn't wake it up.> Each awakening has its own operations counter, and the summoner then gets its own counter back, increased by what the plant spent.
When it is summoned, a plant gets the Rooted state (STATE_ROOTED). This means it can't move, nor be moved by EFFECT_PUSH, EFFECT_ATTRACT or EFFECT_REPEL. However, it can still swap positions with another entity if the EFFECT_INVERT effect is used on it, for example with the Inversion or Repotting chip.
Each type of plant has a predefined chip loadout that can't be changed (the Prototaxite has no loadout). The cooldown of a plant's chips goes down by 1 at each awakening (not at each turn).
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.