As mentioned before, the code itself is written in AdderScript. If you are not familiar with the language (very similar to Python), check out the official site.
The AI code can access 3 main API modules: 'Self', 'Enemy', and 'Match'.
Match
This module provide general data about the match itself:
Match.get_round_number()
Get current round number.
Match.get_rounds_left()
Get how many rounds left until end of fight.
Self
Provide data about your own bot and an API to choose the action for current round.
Note that once you call an action (like fire, reload etc) the code will exit and next lines of code will not execute.
Self.fire()
Fire your weapon (you must have loaded ammo for it to work).
Self.reload()
Load 1 bullet (required to fire weapon).
Self.heal()
Heal yourself for 1 HP (while bullets do 2 points of damage), but if you get hit while healing you suffer double damage.
Self.shield()
Use your shield (makes you immune for one round). Note that you have limited amount of shields to use.
Self.get_ammo()
Return how many loaded bullets you currently have.
Self.get_max_ammo()
Return the maximum amount of bullets you can load.
Self.get_hp()
Return how much HP (health points) you currently have.
Self.get_max_hp()
Return how much HP you have when your health is full.
Self.get_shields_left()
Return how many shields you got left to use.
Self.get_max_shields()
Return how many shields you can have in total (how many you start with).
Enemy
Provide data about your enemy bot.
'Enemy' module got the exact same API as 'Self', but without the functions to perform actions (eg without 'fire()', 'reload()', 'heal()' and 'shield()').