mob/arch
icon = 'archer.dmi'
mob/arch/verb
Attack(mob/M in oview(4))
if(M in oview(2))
usr << "[M] is too close to you!"
if(usr.dead == 1)
return 0
if(M.team == usr.team && freeforall == 0)
usr << "[M] is on your team!"
return 0
if(M.dead == 1)
return 0
if(usr.turn >= 1)
if(M.weak == 1)
var/a = rand(1,5)
if(a > 4)
M.weak = 0
world << "[M] recovers from weakness"
else
world << "[M] is Weak!"
var/a = rand(1,usr.maxstr)
if(usr.weak == 1)
a -= 1
M.hp -= a
world << "[usr] attacks [M] for [a] dmg"
if(M.hp <= 0)
world << "[M] Dies!"
M.dead = 1
usr.kills += 1
M.turn = 0
M.icon_state = "dead"
if(M.dlug == 1)
M.hp = 20
M.maxstr = M.omaxstr
usr.turn -= 1
Problem description:
Dusk (/mob/arch): Attack(Rick (/mob/arch))
runtime error: type mismatch
proc name: Attack (/mob/arch/verb/Attack)
usr: Dusk (/mob/arch)
src: Dusk (/mob/arch)
call stack:
Dusk (/mob/arch): Attack(Rick (/mob/arch))
this happens and prevents the attack, what is wrong with it?