ID:141062
 
Code:
mob/Bump(mob/src)
for(var/mob/npcs/FemaleBug/V in world)
for(var/mob/M in world)
if(istype(src,/turf))
del V
if(istype(src,/mob))
if(V.original==M)
if(V.Class=="Female")
src.buggedby=M
src.femalebug=1
del V
if(V.Class=="Dome")
var/chkpowroll=usr.ChkPow*0.2
var/strroll=usr.Str*0.3
var/chkpowroll2=strroll+chkpowroll
var/chkpowroll3=chkpowroll2/2
var/chkroll1=V.ChkRes*0.08
var/chkroll2=usr.ChkPow*1.4
var/chkdamageroll=chkroll2-chkroll1
src.HP-=chkpowroll3
src.MP-=chkdamageroll


Problem description: This code here checks for a female bug's collision. If the bug's class is female, then it sticks to the person it collides with(femalebug=1), and defines that the user was the one who did this(buggedby). This works. But, when I get to the second part, involving a dome class, it doesn't seem to detect collision. When you summon these dome class bugs, they fly toward whatever has a female bug(this works, they all move toward the person), but they don't lose health or chakra(HP or MP).

Why are you looping through every mob in the world?

Twice?

Why do you have an argument for the verb called "src" which is just going to cause confusion as it's already a VERY IMPORTANT varible?

Why are you using usr when there are already two variables describing the two mobs involved: src (the mob doing the bumping) and whatever the argument is (the mob being bumped, which you've also decided to call src for some reason).

Why are you expecting V - which is every FemaleBug in the world - to be anything but "Female"?