var
lifecycle_delay = 10
movement_probability = 50
dam2=0
amt=0
spd=0
spd2=0
Move()
if (isDead())
return 0
return ..()
proc
Attack(mob/attacker)
if(istype(src, /mob/other))
usr << "<font color=red>You Cant"
else
if(src.npp == 0|1)
attacker.amt = attacker.strength
src.amt = src.Defense
// flick("attack",attacker)
attacker.amt -= src.amt
if(attacker.amt >= 0)
attacker.dam2 = attacker.amt
attacker.spd = attacker.Speed
src.spd = src.Speed
src.spd -= attacker.spd
if(src.spd >= 10 && src.spd <= 100)
attacker.random = rand(1,25)
if(attacker.random == 2)
view(6)<<"<font color = blue>[attacker.name] trys to punch [src] but misses</font>"
flick("attack",attacker)
if(attacker.random == 10)
view(6)<<"<font color = blue>[attacker.name] trys to punch [src] but barly hits</font>"
flick("attack",attacker)
attacker.dam2 /= 2
src.powerlevel -= attacker.dam2
else
view(6)<<"<font color = blue>[attacker.name] punches [src] in the face</font>"
flick("attack",attacker)
src.powerlevel -= attacker.dam2
if(src.spd >= 100 && src.spd <= 1000)
attacker.random = rand(1,15)
if(attacker.random == 2)
view(6)<<"<font color = blue>[attacker.name] trys to kick [src] but misses</font>"
flick("attack",attacker)
if(attacker.random == 10)
view(6)<<"<font color = blue>[attacker.name] trys to kick [src] and almost misses</font>"
flick("attack",attacker)
attacker.dam2 /= 2
src.powerlevel -= attacker.dam2
else
view(6)<<"<font color = blue>[attacker.name] kicks [src] on the arm</font>"
flick("attack",attacker)
src.powerlevel -= attacker.dam2
if(src.spd >= 1000 && src.spd <= 10000)
attacker.random = rand(1,10)
if(attacker.random == 2)
view(6)<<"<font color = blue>[attacker.name] trys to punch [src] but misses</font>"
flick("attack",attacker)
if(attacker.random == 10)
view(6)<<"<font color = blue>[attacker.name] trys to punch [src] but barely touches him</font>"
flick("attack",attacker)
attacker.dam2 /= 2
src.powerlevel -= attacker.dam2
else
view(6)<<"<font color = blue>[attacker.name] punches [src] in the stomach</font>"
flick("attack",attacker)
src.powerlevel -= attacker.dam2
if(src.spd >= 10000)
attacker.random = rand(1,3)
if(attacker.random == 2)
view(6)<<"<font color = blue>[attacker.name] trys to kick [src] but misses</font>"
flick("attack",attacker)
if(attacker.random == 3)
view(6)<<"<font color = blue>[attacker.name] trys to kick [src] in the face but misses and hits the arm</font>"
flick("attack",attacker)
attacker.dam2 /= 2
src.powerlevel -= attacker.dam2
else
view(6)<<"<font color = blue>[attacker.name] kicks [src] in the face</font>"
flick("attack",attacker)
src.powerlevel -= attacker.dam2
src.Die()
Problem description:im getting the runtime error
runtime error: Cannot read null.strength
proc name: Attack (/mob/proc/Attack)
source file: battle_system.dm,22
usr: Seam (/mob/characters/saiyajin)
src: Seam (/mob/characters/saiyajin)
call stack:
Seam (/mob/characters/saiyajin): Attack(null)
Seam (/mob/characters/saiyajin): Attack(the saibaman