Attack(mob/m as mob in oview(range))
set category = "Commands"
if(isnull(m))
return
var/mob/t = src
var/hit = (rand(t.speed * 10)) - (rand(m.speed * 10))
var/dmg = t.mindmg
if(hit > 0)
switch(t.physelem)
if("war")
dmg += round((rand(t.attack * t.war)) + (t.attack * t.war / 2))
switch(m.baselem)
if("dragon")
dmg -= round((rand(m.defense * m.dragon)) + (m.defense * m.dragon / 2))
if("wind")
dmg += round((rand(t.attack * t.wind)) + (t.attack * t.wind / 2))
switch(m.baselem)
if("dragon")
dmg -= round((rand(m.defense * m.dragon)) + (m.defense * m.dragon / 2))
if("mystic")
dmg += round((rand(t.attack * t.mystic)) + (t.attack * t.mystic / 2))
switch(m.baselem)
if("dragon")
dmg -= round((rand(m.defense * m.dragon)) + (m.defense * m.dragon / 2))
if("dark")
dmg += round((rand(t.attack * t.dark)) + (t.attack * t.dark / 2))
switch(m.baselem)
if("dragon")
dmg -= round((rand(m.defense * m.dragon)) + (m.defense * m.dragon / 2))
if(dmg < t.mindmg)
dmg = t.mindmg
DeathCheck(t,m)
Problem description:
Stated. Based on the base element, it's supposed to damage the player.
Attack(mob/m as mob in oview(src.range))