Droids Mechanics - siggame/MegaMinerAI-13 GitHub Wiki
DROID Mechanics
IN PROGRESS...
GOAL
Destroy the enemy hangar. This is done by destroying the 5x5 area of tiles on a players side of the field.
FIELD SCRAP
When a unit dies, it leaves an amount of scrap on the tile that it died on. This amount is dependent only on the type of the unit.
At the end of every turn, all scrap is added to a players metal supply. This is done by splitting the field vertically down the center. Scrap on a tile is added to the metal of the owner of the hangar on that tile's half of the field.
METAL
Metal is used to buy droids and deploy structures.
At the beginning of a player's turn, a constant amount of metal is given to them.
METAL CAP
At the end of a turn any excess metal is removed from a players metal
ASSEMBLING UNITS
On a player's turn, they may choose to 'assemble' a droid on a hanger or destroyed hanger tile.
Assembling a droid requires the player to spend an amount of metal dependent on the type of unit being assembled.
UNIT CAP
A player may only have a certain number of droids on the field at any one time.
Walls do not count towards a player's droid count.
Turrets do count towards a player's droid count.
Hacked droids count toward's the player who assembled that droid's droid count.
ORBITAL DROP
On a player's turn they may choose to drop a wall/turret at any location on the field. Dropping a wall requires the player to spend a certain amount of metal.
At the moment the wall/turret is deployed from orbit, the targeted tile is marked as a wall/turret, however the wall cannot be attacked until the wall/turret has landed.
Droids may move onto a tile that is marked for drop.
The amount of time required for the wall to land is dependent on the distance from the deploying player's edge of the field. The further away, the more turns before it lands.
When a wall/turret lands, any droid on the landing tile is instantly destroyed.
WALL CAP
A player may only have a certain number of walls on the field.
Droids
All droids have a few common values.
- Owner - The player who created the droid. (0 for player 1, 1 for player 2)
- HealthLeft - When this reaches zero, the droid dies.
- Armor - The more a droid has of this, the less damage the unit takes to its health.
- Speed - Number of tiles this unit can cross in a turn.
- Range - Maximum Manhattan distance between droid and target.
- Hackets - A counter representing the amount a droid has been hacked.
- HackedTurnsLeft - The number of turns left before a hacked unit returns to its original owner.
- Scrapworth - The amount of scrap dropped by this droid when it dies.
Engineer
Heals allied droids and structures.
When an engineer operates on an allied droid/turret, the armor on that droid/turret is increased by the engineer's attack strength.
When an engineer operates on a wall, the wall's health is increased by the engineer's attack strength.
Hacker
Increases Hackets on enemy units.
Hacking
When a hacker attacks an enemy unit, it adds 1? Hacket to that unit.
A hacker cannot attack a hacked unit?
When a unit accumulates a certain number of hackets, that unit becomes 'Hacked', losing all hackets.
This also sets HackedTurnsLeft to a certain number.
A player may control their opponent's droid if and only if that droid's HackedTurnsLeft is greater than zero.
Likewise, a player may not control their own droid if that droid's HackedTurnsLeft is greater than zero.
After every turn, all droid's HackedTurnsLeft are decremented by 1.
When a hacked droid's HackedTurnsLeft reach 0, that unit is no longer 'Hacked.' (This may also restore the units health and or armor value)