> Community
This API lets you retrieve the whole course of a fight, as you can read it in the fight report, but encoded in JSON, which is hard to read if you don't know how to decode it. I will mainly focus on the fight.data.actions object of the response, which contains all the actions of the leeks.
actions is an array of "action" objects, an action being itself an array of elements, the first of which defines the type of the action. The possible types are defined by the following constants:
ACTION_START_FIGHT = 0 ACTION_USE_WEAPON_OLD = 1 ACTION_USE_CHIP_OLD = 2 ACTION_SET_WEAPON_OLD = 3 ACTION_END_FIGHT = 4 ACTION_PLAYER_DEAD = 5 ACTION_NEW_TURN = 6 ACTION_LEEK_TURN = 7 ACTION_END_TURN = 8 ACTION_SUMMON = 9 ACTION_MOVE_TO = 10 ACTION_USE_CHIP = 12 ACTION_SET_WEAPON = 13 ACTION_STACK_EFFECT = 14 ACTION_USE_WEAPON = 16 ACTION_TP_LOST = 100 ACTION_LIFE_LOST = 101 ACTION_MP_LOST = 102 ACTION_CARE = 103 ACTION_BOOST_VITA = 104 ACTION_RESURRECTION = 105 ACTION_NOVA_DAMAGE = 107 ACTION_DAMAGE_RETURN = 108 ACTION_LIFE_DAMAGE = 109 ACTION_POISON_DAMAGE = 110 ACTION_AFTEREFFECT = 111 ACTION_NOVA_VITALITY = 112 ACTION_SAY_OLD = 200 ACTION_LAMA = 201 ACTION_SHOW_OLD = 202 ACTION_SAY = 203 ACTION_SHOW = 205 ACTION_ADD_WEAPON_EFFECT = 301 ACTION_ADD_CHIP_EFFECT = 302 ACTION_REMOVE_EFFECT = 303 ACTION_UPDATE_EFFECT = 304 ADD_STACKED_EFFECT = 305 REDUCE_EFFECTS = 306 REMOVE_POISONS = 307 REMOVE_SHACKLES = 308 ACTION_BUG = 1002
This action must always be the first one in the list [action_type, leek, turn]
action_type : 0 leek: id of the leek that starts turn: turn number (always 1)
This action corresponded to the useWeapon or useWeaponOnCell functions until around June 10, 2022 (+/- 3 days) [action_type, launcher, cell, weapon, result, leeksID]
action_type : 1 launcher: id of the leek performing the action cell : targeted cell weapon : id of the weapon used, among the following values Pistol = 1 MachineGun = 2 DoubleGun = 3 Shotgun = 4 Magnum = 5 Laser = 6 GrenadeLauncher = 7 FlameThrower = 8 Destroyer = 9 Gazor = 10 Electrisor = 11 MLaser = 12 BLaser = 13 Katana = 14 Broadsword = 15 Axe = 16 result : result of the action (same values as those returned by the useWeapon or useWeaponOnCell functions) leeksID : array of the ids of the leeks hit by the weapon
This action corresponded to the useChip or useChipOnCell functions until around June 10, 2022 (+/- 3 days) [action_type, launcher, cell, chip, result, leeksID]
action_type : 2 launcher: id of the leek performing the action cell : targeted cell chip : id of the chip used, among the following values Bandage = 1 Cure = 2 Drip = 3 Regeneration = 4 Vaccine = 5 Shock = 6 Flash = 7 Lightning = 8 Spark = 9 Flame = 10 Meteorite = 11 Pebble = 12 Rock = 13 Rockfall = 14 Ice = 15 Stalactite = 16 Iceberg = 17 Shield = 18 Helmet = 19 Armor = 20 Wall = 21 Rampart = 22 Fortress = 23 Protein = 24 Steroid = 25 Doping = 26 Stretching = 27 WarmUp = 28 Reflexes = 29 LeatherBoots = 30 WingedBoots = 31 SevenLeagueBoots = 32 Motivation = 33 Adrenaline = 34 Rage = 35 Liberation = 36 Teleportation = 37 Armoring = 38 Inversion = 39 Remission = 47 Carapace = 48 DevilStrike = 50 Whip = 51 Loam = 52 Fertilizer = 53 Acceleration = 54 SlowDown = 55 BallAndChain = 56 Tranquilizer = 57 Soporific = 58 Fracture = 59 Solidification = 60 Venom = 61 Toxin = 62 Plague = 63 Thorn = 64 Mirror = 65 Ferocity = 66 Collar = 67 Bark = 68 Burning = 69 Antidote = 70 result : result of the action (same values as those returned by the useChip or useChipOnCell functions) leeksID : array of the ids of the leeks hit by the chip
This action corresponds to the setWeapon function, in the old format. [action_type, launcher, weapon]
action_type : 3 launcher: id of the leek performing the action weapon : id of the weapon to equip (see the possible values in [#ACTION_USE_WEAPON_OLD])
This action corresponds to the setWeapon function, in the current format. [action_type, weapon]
action_type : 13 weapon : type id of the weapon to equip, among the following values Pistol = 1 MachineGun = 2 DoubleGun = 3 Shotgun = 4 Magnum = 5 Laser = 6 GrenadeLauncher = 7 FlameThrower = 8 Destroyer = 9 Gazor = 10 Electrisor = 11 MLaser = 12 BLaser = 13 Katana = 14 Broadsword = 15 Axe = 16 JLaser = 17 IllicitGrenadeLauncher = 18 MysteriousElectrisor = 19 UnbridledGazor = 20 RevokedMLaser = 21 Rifle = 22 Rhino = 23 ExplorerRifle = 24 Lightninger = 25 PlutoniumBazooka = 26 Neutrino = 27 Bazooka = 29 DarkKatana = 32 EnhancedLightninger = 33 UnstableDestroyer = 34 Sword = 35 HeavySword = 36 Odachi = 37 Excalibur = 38 Scythe = 39 QuantumRifle = 40 DesertSaber = 41 SunSpear = 42
This action marks the end of the fight, but no longer seems to be used [action_type]
action_type : 4
This action marks the death of a leek (or a bulb) [action_type, entity]
action_type : 5 entity : id of the dead entity
This action marks the start of a new turn (absent for turn 1, where ACTION_START_FIGHT takes its place) [action_type, turn]
action_type : 6 turn : number of the turn that is starting
This action marks the start of a leek's turn [action_type, leek, tp, mp]
action_type : 7 leek : id of the leek tp : the leek's number of action points mp : the leek's number of movement points
This action marks the end of a leek's turn [action_type, leek, tp, mp]
action_type : 8 leek : id of the leek tp : the leek's number of action points mp : the leek's number of movement points
This action corresponds to summoning a bulb with the summon method [action_type, caster, summonID, cell, result]
action_type : 9 caster : id of the leek summonID : id of the summoned bulb cell : id of the cell where the bulb is summoned result : result of the action (same values as those returned by the summon function)
This action corresponds to a movement; it is always followed by an ACTION_MP_LOST action. [action_type, leek, cell, path]
action_type : 10 leek : id of the moving leek cell : the leek's destination cell path : array of the cells traveled through (including the destination cell)
This action corresponds to the useWeapon or useWeaponOnCell functions. It has been used since around June 10, 2022 (+/- 3 days) [action_type, cell, result] The weapon id is not part of this action: it is given separately by ACTION_SET_WEAPON.
action_type : 16 cell : targeted cell result : result of the action (same values as those returned by the useWeapon or useWeaponOnCell functions)
This action corresponds to the useChip or useChipOnCell functions. It has been used since around June 10, 2022 (+/- 3 days) [action_type, chip, cell, result]
action_type : 12 chip : id of the chip used, among the following values Bandage = 1 Cure = 2 Drip = 3 Regeneration = 4 Vaccine = 5 Shock = 6 Flash = 7 Lightning = 8 Spark = 9 Flame = 10 Meteorite = 11 Pebble = 12 Rock = 13 Rockfall = 14 Ice = 15 Stalactite = 16 Iceberg = 17 Shield = 18 Helmet = 19 Armor = 20 Wall = 21 Rampart = 22 Fortress = 23 Protein = 24 Steroid = 25 Doping = 26 Stretching = 27 WarmUp = 28 Reflexes = 29 LeatherBoots = 30 WingedBoots = 31 SevenLeagueBoots = 32 Motivation = 33 Adrenaline = 34 Rage = 35 Liberation = 36 Teleportation = 37 Armoring = 38 Inversion = 39 Remission = 47 Carapace = 48 DevilStrike = 50 Whip = 51 Loam = 52 Fertilizer = 53 Acceleration = 54 SlowDown = 55 BallAndChain = 56 Tranquilizer = 57 Soporific = 58 Fracture = 59 Solidification = 60 Venom = 61 Toxin = 62 Plague = 63 Thorn = 64 Mirror = 65 Ferocity = 66 Collar = 67 Bark = 68 Burning = 69 Antidote = 70 Punishment = 71 Covetousness = 72 Vampirization = 73 Precipitation = 74 Alteration = 75 Plasma = 76 WizardBulb = 77 Jump = 78 Covid = 79 Elevation = 80 Knowledge = 81 Wizardry = 82 Repotting = 83 Therapy = 84 Mutation = 85 Desintegration = 86 Transmutation = 87 Grapple = 88 BoxingGlove = 89 Corn = 90 ChilliPepper = 91 TacticianBulb = 92 SavantBulb = 93 Serum = 94 Crushing = 95 Brainwashing = 96 Arsenic = 97 Bramble = 98 Dome = 99 Manumission = 100 cell : targeted cell result : result of the action (same values as those returned by the useChip or useChipOnCell functions)
This action corresponds to the leek losing action points [action_type, leek, tp]
action_type : 100 leek : id of the leek losing TP tp : number of action points lost
This action corresponds to the leek losing life [action_type, leek, life, erosion]
action_type : 101 leek : id of the leek losing life life : number of life points lost erosion (optional) : max life points lost
This action corresponds to the leek losing movement points [action_type, leek, mp]
action_type : 102 leek : id of the leek losing MP mp : number of movement points lost
This action corresponds to the leek gaining life points [action_type, leek, life]
action_type : 103 leek : id of the leek gaining life life : number of life points gained
This action corresponds to the leek gaining max life [action_type, leek, life]
action_type : 104 leek : id of the leek receiving the boost life : number of max life points gained (vitality)
This action corresponds to the resurrection of a leek (or presumably of a bulb) [action_type, caster, target, cell, life, maxLife]
action_type : 105 caster : id of the leek casting the resurrection target : id of the leek being resurrected cell : id of the cell it is resurrected on life : life points of the resurrected leek maxLife : max life points of the resurrected leek
This action corresponds to the leek losing life because of a DAMAGE_RETURN effect [action_type, leek, life, erosion]
action_type : 108 leek : id of the leek losing life life : number of life points lost erosion (optional) : max life points lost
This action corresponds to the leek losing life because of a LIFE_DAMAGE effect [action_type, leek, life, erosion]
action_type : 109 leek : id of the leek losing life life : number of life points lost erosion (optional) : max life points lost
This action corresponds to the say function, used to send a message to your opponent (the speaking leek is the one whose turn it is). Before June 2022, it was ACTION_SAY_OLD (200), with the format [action_type, leek, message] [action_type, message]
action_type : 203 message : text of the message
This action corresponds to the leek whose turn it is displaying a llama as its message (before June 2022: [action_type, leek]) [action_type]
action_type : 201
This action corresponds to the show function, used to highlight a cell (the leek showing it is the one whose turn it is). Before June 2022, it was ACTION_SHOW_OLD (202), with the format [action_type, leek, cell, color] [action_type, cell, color]
action_type : 205 cell : id of the cell to show color : hexadecimal color code of the cell to show
This action corresponds to a weapon effect being added after an ACTION_USE_WEAPON action [action_type, weapon, id, caster, target, effect, value, duration, modifiers]
action_type : 301 weapon : id of the weapon, as defined by the WEAPON_ constants id : index of the added effect caster : id of the entity casting the effect target : id of the entity receiving the effect effect : id of the effect, among the following values DAMAGE = 1 HEAL = 2 BUFF_STRENGTH = 3 BUFF_AGILITY = 4 RELATIVE_SHIELD = 5 ABSOLUTE_SHIELD = 6 BUFF_MP = 7 BUFF_TP = 8 POISON = 13 SUMMON = 14 SHACKLE_MP = 17 SHACKLE_TP = 18 SHACKLE_STRENGTH = 19 DAMAGE_RETURN = 20 BUFF_RESISTANCE = 21 BUFF_WISDOM = 22 ANTIDOTE = 23 SHACKLE_MAGIC = 24 AFTEREFFECT = 25 VULNERABILITY = 26 value : value of the effect duration : duration of the effect modifiers (optional) : sum of the effect's modifiers (EFFECT_MODIFIER_ constants), absent if there are none
This action corresponds to a chip effect being added after an ACTION_USE_CHIP action [action_type, chip, id, caster, target, effect, value, duration, modifiers]
action_type : 302 chip : id of the chip, as defined by the CHIP_ constants id : index of the added effect caster : id of the entity casting the effect target : id of the entity receiving the effect effect : id of the effect (same values as for ACTION_ADD_WEAPON_EFFECT) value : value of the effect duration : duration of the effect modifiers (optional) : sum of the effect's modifiers (EFFECT_MODIFIER_ constants), absent if there are none
This action corresponds to an effect being removed after an action such as useChip(CHIP_ANTIDOTE) [action_type, id]
action_type : 303 id : index of the removed effect
This action corresponds to an effect being modified after an action such as useChip(CHIP_LIBERATION) [action_type, id, value]
action_type : 304 id : index of the modified effect value : new value of the effect
This action corresponds to an error [action_type, leek ]
action_type : 1002 leek : id of the leek that caused an error
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.