mob
Monster
Green_Saiba_Man
name = "{NPC} Green Saibaman"
icon = 'npcs.dmi'
icon_state = "Saiba"
density = 1
dead = 0
safe = 0
PL = 5000
maxPL = 5000
HP = 100
maxHP = 1-0
speed = 50
str = 50
race = "Green Saibaman"
level = 20
KO = 0
zenni = 20
frozen = 0
var/cooldown = 0
exp = 100
maxexp = 100
var/mob/characters/Saiyan/P
New()
. = ..()
spawn()
Wander()
proc/Wander()
while(src)
var/Found = FALSE
for(P in oview(3))
step_towards(src,P)
Found = TRUE
break
if(Found != TRUE)
sleep(10)
sleep(10)
Bump(mob/M)
if(istype(M,/mob/characters/))
Attack2(M)
proc/Attack2(mob/M)
if(!M)
return
if(src.attack_lock == 1)
return
if(src.buku == 1)
return
if(M.buku == 1)
return
if(M == src)
src << "You cannot attack yourself!"
return
if(M.safe == 1)
src << "A force stops you from attacking [M]!"
return
if(M.dead == 1)
src << "They are dead, you cannot attack them!"
return
if(M.KO == 1)
src << "Finish them!"
return
// -- Saiba vs Player
var/attack_power = round(src.str + (src.PL / 100))
var/defence_power = M.defence
var/damage = attack_power - defence_power
var/crit = src.speed / 50
if(damage < 1)
damage = 1
if(M.type == /mob/characters/)
if(src.cooldown == 1)
return
else
// -- Defenders Speed > Attackers Speed
if(M.speed > src.speed)
// -- 15% Chance Attacker Hits
if(prob(15))
flick("attack",src)
view(4) << "<font color = red>[M] is just hit for [(damage / 2)] from [src]"
src.cooldown = 1
M.PL -= damage
M.DEATH()
spawn(15) src.cooldown = 0
return
else
// -- Attacker Misses Defender --
flick("attack",src)
flick("IT",M)
src.cooldown = 1
view(4) <<"<font color = green>[M] dodges [src]'s attack"
spawn(15) src.cooldown = 0
// Defenders Speed < Attackers Speed --
else
// -- Attacker scores a Critical Hit --
if(prob(crit))
flick("attack",src)
view(4) << "<font color = red><U>[M] recieves a Critical Hit for [damage] from [src]"
src.cooldown = 1
M.PL -= (damage * 2)
M.DEATH()
spawn(15) src.cooldown = 0
return
else
// -- Attacker hits Defender
flick("attack",src)
view(4) << "<font color = red>[M] is hit for [damage] from [src]"
src.cooldown = 1
M.PL -= damage
M.DEATH()
spawn(15) src.cooldown = 0
return
Problem description:
thats a lot of code... saibaman dont do anything !! I walk around him, begin attacking and nothing ! =[[