Round: 0/25
The goal of the game is to program an AI (using AdderScript) to defeat the house AI.
Every fight have 25 rounds, and in every round your bot can do one of the following actions:
The fight is over when one of the bots is left with 0 HP (red bar), or when 25 rounds pass (in which case the bot with more HP wins).
Bot Wars is a mini-game made by Ronen Ness to demonstrate AdderScript abilities.
All graphics and resources are the courtesy of some very talented artists that published their work under common creative and/or public license. Lets show them respect!
Most graphics are heavily modified by myself, feel free to use the modified versions for any purpose or seek out the originals from the credit links.
The following code is your enemy AI:
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'.
This module provide general data about the match itself:
Get current round number.
Get how many rounds left until end of fight.
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.
Fire your weapon (you must have loaded ammo for it to work).
Load 1 bullet (required to fire weapon).
Heal yourself for 1 HP (while bullets do 2 points of damage), but if you get hit while healing you suffer double damage.
Use your shield (makes you immune for one round). Note that you have limited amount of shields to use.
Return how many loaded bullets you currently have.
Return the maximum amount of bullets you can load.
Return how much HP (health points) you currently have.
Return how much HP you have when your health is full.
Return how many shields you got left to use.
Return how many shields you can have in total (how many you start with).
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()').