Hooks are functions defined in the AI's code that the fight generator calls at specific moments.
Hooks are entirely optional.
Called at the start of the fight, before the first turn, this function lets you change the leek's equipment with setLoadout depending on the type of fight, for example to adapt to a boss or an arena.
This function can access the leek's characteristics, the map and some information about the other entities, but not their characteristics: enemies can also change their equipment in their own beforeFight!
The function runs before globals are initialized, and their value is overwritten on turn 1. However, you can write persistently to static attributes.
You have one more core than the leek at your disposal. Operations are reset on turn 1: beforeFight has its own operation count.
A restat potion is only consumed if the loadout takes capital points away from a characteristic compared to the leek's last fight: chaining fights with the same loadout only costs one. To change only weapons, chips and components, without touching the capital or consuming a potion, pass false as the second parameter of setLoadout.
Example:
Called at the end of the fight, after the last turn, this function lets you find out who won with getWinner, so you can store it in the registers.
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.