mob/proc
Createclones()
var/mob/clone=new(src.loc)
clone.name = "[src.name]s Clone"
clone.icon=src.icon
clone.overlays=src.overlays
clone.father = "clone"
clone.mother = "[src.key]"
clone.owner = src
clone.Hpmax = src.Hpmax
clone.Hp = clone.Hpmax
clone.Str = src.Str
clone.Def = src.Def
clone.Sp = src.Sp
clone.Level = src.Level
clone.KO = 0
clone.move = 1
clone.CloneCycle()
mob/var
CControl = 150
Chakra = 100
follow
father
owner
mother
tmp/Clones
mob
verb
Copy()
set category = "Fighting"
if(usr.Chi <= 0)
usr << "Not enough Chi"
return
if(usr.CControl >= 101)
usr.Clones += 1
usr.Createclones()
if(usr.CControl <= 100)
usr.Chi -= 5
verb
DeleteSplitform()
set category = "Fighting"
for(var/mob/M in world)
if(M.father == "clone")
if(M.mother == "[usr.key]")
usr.Clones -= 1
del M
return
mob
proc
CloneCycle()
if (client || isDead())
return 1
spawn(lifecycle_dalay)
CloneCycle()
mob
var
lifecycle_dalay = 10
followblock = 0
mob
CloneCycle()
if (client || isDead())
return
var/action_taken
for (var/mob/other_mob in oview(9,src))
if(istype(other_mob, /mob/monsters/)||other_mob == follow)
step_towards(src, other_mob)
if(other_mob in oview(1,src))
Attack2(other_mob)
action_taken = 1
action_taken = 1
for (var/mob/other_mob in oview(15,src))
if(!action_taken&&!followblock&&!follow)
step_to(src, src.owner, 2)
if(action_taken)
spawn(lifecycle_dalay)
CloneCycle()
return
..()
mob
proc
Attack2(mob/M)
if(!M.KO)
if(src.KO==1)
return
var/damage = Str
M.TakeDamage2(src, damage)
else return
TakeDamage2(mob/attacker, damage)
if (attacker.client)
return
else
if(src.followblock == 0|1)
src.Hp -= damage
s_damage(src,damage,"red")
if(src.Hp <= 0)
src.DeathCheck(attacker)
Problem description:
I want to have it so this only attacks 1 person not a whole group at 1 time. like it does now...