mob
Bump(mob/src)
if(istype(src,/turf))
return
if(istype(src,/mob/Black_Queen))
src.hp-=1
world << "<font size=3>Black queen is under attack!"
blackcheck()
if(istype(src,/mob/Red_Queen))
src.hp-=1
world << "<font size=3>Red queen is under attack!"
redcheck()
else
usr<<"You attacked [usr]!"
usr.hp-=1
src<<"[src] attacked you!"
I tried doing else fi and it does'nt work.That's as close as I can get it.This is what happens when I log into as red and attack queen.
Red queen is under attack!
Red queen is under attack!
Red queen is under attack!
Red queen is under attack!
Red queen is under attack!
Red queen is under attack!
About it..Now with black..
Black queen is under attack!
You attacked CodingSkillz!
Black queen is under attack!
You attacked CodingSkillz!
Black queen is under attack!
CodingSkillz has killed the black queen,Reds win!
There are a couple of ways to fix your loop. Maybe the simplest would be to use a switch() statement based on type.