API return documentation

API return documentation

> Community

fight/get

This API allows you to retrieve the entire progress of a fight as it can be read in the fight report but in a format encoded in json, not very readable if you don't know how to decode it. I will focus mainly 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 itself being an array of elements, the first of which defines the type of action. The list of the different possible types is defined by the following constants:

ACTION_START_FIGHT = 0 ACTION_USE_WEAPON_OLD = 1 ACTION_USE_CHIP_OLD = 2 ACTION_SET_WEAPON = 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 = 200 ACTION_LAMA = 201 ACTION_SHOW = 202 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

##ACTION_START_FIGHT This action must always be the first in the list [action_type, leek, turn]

action_type: 0 leek: id of the leek which starts turn: turn number (always 1)

ACTION_USE_WEAPON_OLD

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 executing the action cell: targeted cell weapon: id of the weapon used among the following values Pistol = 1 MachineGun = 2 Double Gun = 3 Shotgun = 4 Magnum = 5 Lasers = 6 GrenadeLauncher = 7 FlameThrower = 8 Destroyer = 9 Gazor = 10 Electrisor = 11 MLaser = 12 BLaser = 13 Katana = 14 Broadsword = 15 Axis = 16 result: result of the action (same values as the return of the useWeapon or useWeaponOnCell functions) leeksID: table of ids of leeks hit by the weapon

ACTION_USE_CHIP_OLD

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 executing the action cell: targeted cell chip: id of the chip used among the following values Bandage = 1 Cure = 2 Drip = 3 Refresh = 4 Vaccine = 5 Shock = 6 Flash = 7 Lightning = 8 Spark = 9 Flame = 10 Meteorite = 11 Pebble = 12 Rock = 13 Rockfall = 14 Ice = 15 Icicle = 16 Iceberg = 17 Shield = 18 Helmet = 19 Armor = 20 Wall = 21 Rampart = 22 Fortress = 23 Protein = 24 steroid = 25 Dope = 26 Stretch = 27 Warm Up = 28 Reflexes = 29 Leather Boots = 30 WingedBoots = 31 SevenLeagueBoots = 32 Motivation = 33 Adrenaline = 34 Rabies = 35 Release = 36 Teleport = 37 Armor = 38 Reverse = 39 Discount = 47 Shell = 48 DevilStrike = 50 Whip = 51 Loam = 52 Fertilizer = 53 Acceleration = 54 SlowDown = 55 BallAndChain = 56 Tranquilizer = 57 Soporific = 58 Fracture = 59 Solidified = 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 the return of the useChip or useChipOnCell functions) leeksID: array of leek ids affected by the chip

##ACTION_SET_WEAPON This action corresponds to the setWeapon function [action_type, launcher, weapon]

action_type: 3 launcher: id of the leek executing the action weapon: id of the weapon to equip (see possible values in [#ACTION_USE_WEAPON])

ACTION_END_FIGHT

This action indicates the end of the fight, but no longer seems to be used [action_type]

action_type: 4

##ACTION_PLAYER_DEAD This action indicates the death of a leek (or a bulb) [action_type, entity]

action_type: 5 entity: id of the dead entity

##ACTION_NEW_TURN VS