setLoadout(any loadout, [boolean changeStats]) → boolean success
Applies a loadout for this fight only, without changing the leek's persistent equipment. To be used only in beforeFight() (see Fight hooks). If the name does not exist or if setLoadout is called outside of beforeFight(), the function returns false and a warning is added to the report. loadout can also be a loadout built in code, in the getLoadout format (see getInventory). With a name as with an object, each leek gets its own copy of every item: what the farmer's other leeks already wear is skipped with a warning, and copies go to the leeks in the order their beforeFight() runs.
// This function is called automatically before turn 1
function beforeFight() {
// Choose one of the loadouts defined on the leek's page
setLoadout("my_loadout"); //applies the loadout "my_loadout" and consumes a restat potion if its capital allocation requires it
}
// This function is called automatically before turn 1
function beforeFight() {
// Choose one of the loadouts defined on the leek's page
Fight.me.setLoadout("my_loadout") // applies the loadout "my_loadout" and consumes a restat potion if its capital allocation requires it
}
// In TypeScript and JavaScript, hooks are only called if the AI defines turn()
function turn() {
// ...
}
# This function is called automatically before turn 1
def beforeFight():
# Choose one of the loadouts defined on the leek's page
Fight.me.setLoadout("my_loadout") # applies the loadout "my_loadout" and consumes a restat potion if its capital allocation requires it
# In Python, hooks are only called if the AI defines turn()
def turn():
pass
weapons, chips, components and stats, in the getLoadout format (items by id or by name). Without a stats key, only the equipment changes, with no potion.true by default). With false, only weapons, chips and components change: the leek keeps its capital allocation and no restat potion is consumed. With true, a potion is consumed if the loadout's allocation takes capital away from a characteristic compared to the leek's last fight; without a potion, or if the loadout requires more capital than the leek has, the allocation is not applied (as with false) and a warning is added to the report.true if the loadout was applied, false otherwise.Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.