NewBattle(var/list/Side1,var/list/Side2)
if(Side1.len&&Side2.len)
side1 = Side1
side2 = Side2
else
for(var/mob/M in battle)
M<<"<font color = red><font size = 1>Error: No members in side 1 aborting"
return
SideTurns(var/list/Side1,var/list/Side2)
if(turn == Side1)
turn = Side2
if(turn == Side2)
turn = Side1
Turns(var/list/Side)
turn = (turn % battle.len) + 1
var/mob/Attacker = battle[turn]
if(!Attacker.hp)
Turns(Side)
else
Fight(Attacker)
Since This is just the games skeleton (no map or icons yet)
I wanted to know if this was a suitable turn based battle system (most of the idea came from Popisfizzy)
Tell me what you think..
Found a few bugs and fixed them.
If your turn is 1, that proc/verb will end with 1, no matter what.
Solution:
- Else if()
Or, the most "un-robust" one
- Switch the order of those if()