ID:195121
 
//Title: Sample Look Verb
//Credit to: Theodis
//Modified by: Jtgibson (updated for BYOND 3.0 and "enhanced")
//Contributed by: Jtgibson


mob
var/HP = 100
var/MaxHP = 100

mob/verb/look(O as obj|mob|turf in view())
if(ismob(O))
var/mob/mob = O

src << "You see [mob]."
if(mob.desc) src << mob.desc

switch(round((mob.HP/mob.MaxHP)*100))
if(0 to 19)
src << "[mob] is grievously wounded."
if(20 to 39)
src << "[mob] is seriously injured."
if(40 to 59)
src << "[mob] has some big cuts and bruises."
if(60 to 79)
src << "[mob] has some scratches."
if(80 to 99)
src << "[mob] is in good condition."
else
src << "[mob] is in perfect health."

else if(isobj(O))
var/obj/obj = O
src << "You look at [obj]."
if(obj.desc) src << obj.desc
else src << "It looks rather ordinary."

else if(isturf(O))
var/turf/turf = O
src << "You look at [turf]."
if(turf.desc) src << turf.desc
else src << "You see nothing special."