mob
Bump(atom/A)
//Bump stuff. (Running into an enemy) Decides how many monsters in combat and other bump crap thats nessicary.
..()
var/mob/M = A
if(istype(M,/mob/monsters))
src.ran = 0
src.dead = 0
if(istype(A,/mob/monsters/Bosses))
amount = rand(2,4)
else if(src.monstersfighting == 0)
amount=rand(1,src.mobsinbattle)
src.monstersfighting = amount
else
if(!src.monstersfighting)
amount = rand(1,4)
src.monstersfighting = amount
else
amount = src.monstersfighting
monstergroup=list()
src.islocked = 1
M.islocked = 1
src.monstersinbattle = 0
for(var/index=1,index<=amount,index++)
var/mob/monsters/enemy=new M.type //Argh I break here.
src.monstersinbattle += 1
enemy.name = "[enemy.name][number2letter(index)]"
enemy.mhp += rand(-3,3);enemy.hp = enemy.mhp
src.monstergroup+=enemy
src.monstergroupnumber=src.monstergroup
src.monstersugot = src.monstergroup.len
monster_number="[M.name][plural(src,monstergroup)]"
monster_number2="[plural(src,monstergroup)]"
src.checkbattle = 0
MainBattle(src,M,monstergroup)
if(monstergroup.len == 0)del(A)
Problem description:
I haven't actually been working on my code in a while, but I know that this code was working fine until just now when I tried to test a new part of my battle system.
Apparently it gets to the first line of the for loop and just stops working. Period. As I said above, this code was working fine until now, and the last time I worked on it was about Beta 7 or 8, and I'm thinking maybe something that was changed is causing problems? I don't know but I have no idea why there's a problem all of a sudden.