It is actually too long for vm, so I will post it here again:
So, there are three AI players involved here. Neutral passive, brown, and light blue. I will explain the system in three chunks.
1. Neutral passive
There needs to be X amount of neutral passive units roaming between three regions during the day time. They will be an equal number of male villager, female villager, and child. If one is killed, they should be replaced by another of the same kind after about 30 seconds. They should all roam between areas A, B, and C. They only roam during the day and are deleted each night and replaced in the morning by new units (or same units if that makes coding easier, just thinking of leaks).
2. Light Blue
There will be several shops on the map that sell units. All units sold by these shops should go under player light blues control. When first bought, they should go into a storage region on the map and be visible but not be moving.
Light blue is allied with players 1-8 BUT hostile to player Brown. Players should not share vision with light blue BUT they should be able to see the region where light blues units are stored at all times (except for the werewolf player. The werewolf player is a random player chosen by an array variable at the beginning of the game). Each night, light blues units should patrol the same three areas as the neutral passive units. Each morning, the units should be transported back to their storage space. Killed units are not replaced.
If Light Blue has no more unit space (food limitation) a message of some sort should be played if players 1-8 try to buy a unit.
3. Brown
Brown is hostile to all players except for neutral passives and the 'werewolf player'. Brown units should also be stored in a region when not in use. This region is visible at all times only to the 'werewolf player'. Brown units should be created by a custom spell. Below is what the spell needs.
a. Brown casts a spell on target unit.
b. When a unit dies from this skill an icon (any is fine for now) is placed over its corpse.
c. After 15 seconds the corpse becomes a brown unit.
d. The resulting unit should be different for different types of units (eg different unit for killing a footman and a knight).
The werewolf should not share vision with any units created this way (can make them a different color than brown if needed to make this work).