mob
var
dead = 0
mob/verb/Attack()
var/mob/M
for(M in get_step(src,src.dir)) break
if(M)
var
/// FORMULAS START HERE ///
A = (src.strength-M.vitality/2)
R = (A*2)
C = rand(A,R)
D = (src.attack-M.defense)
damage = (D+C)
crit_damage = (damage*2)
/// FORMULARS END HERE ///
if(M.dead == 1)
return 0
if(M.dead == 0)
if(prob(((M.evasion*9.7)/src.accuracy)))
view() << "<small>[src] misses the [M].</small>"
return 0
if(prob(src.dexterity/(M.agility/3.7)))
M.hp-=crit_damage
view() << "<small><b>[src] hits [M] for [crit_damage]!</b></small>"
del(M)
else
M.hp-=damage
view() << "<small>[src] hits [M] for [damage]!</small>"
del(M)
mob
var
hp = 25
mp = 0
strength = 6
vitality = 2
agility = 5
dexterity = 4
spirit = 3
intelligence = 4
charisma = 5
attack = 20
defense = 15
accuracy = 10
evasion = 20
Problem description:
I'm kind of rusty at this um... How do I tell the verb to "return 0" if you're attemping to attack a PC?
if(istype(M,/mob/PC)) return 1
if(Test(src==1))