ID:150001
 
how do i make it so my damage*power/M.defense i tryed this and irt errored
1) stop making a DBZ game.

2) Your lucky im in a good mood

try var/damage=usr.power*usr.ihatedbz/usr.whatever
In response to Air _King
He's not making aDBZ game.
mob/var
hp = 50
power = 4
defense = 3
canattack = 1
mob/proc/Damage(var/target as mob,var/amount = 0 as num)
if(amount < 1) return
if(amount > target.hp) amount = target.hp
target.hp -= damage
return damage
mob/verb/Attack(mob/M as mob in get_step(src,NORTH))
if(!src.canattack) return
if(M.hp+20 < src.hp)
src << "[M] is too weak for you to attack him."
return
else
var/damagedealt = Damage(M,src.power/M.defense)
M.icon += rgb(damagedealt,0,0)
src.canattack = 0
spawn(damagedealt) src.canattack = 1
mob/New()
src.hp += rand(0,10)
src.power += rand(0,2)
src.defense += rand(0,1)
..()
AddHp()
AddStats()
mob/proc/AddHp()
src.hp += rand(1,2)
spawn(10) AddHp()
mob/proc/AddStats()
var/powerplus = rand(0,1)
var/defplus = rand(0,2)
src.power += powerplus
src.defense += defplus
var/spawntime = powerplus + defplus
spawn(spawntime*10+1) AddStats()

That should work!
In response to Air _King
just so you know im not making a dbz game and i feal it as an insalt for you saying that
In response to Air _King
and the problem is that doesnt use the enemys defense thats all my defense, heres what im using it for:
slash(mob/M as mob in oview(1))
set category = "Attack"
if (M.HP <= 0) //if M's HP are at or below 0...
usr << "[M] is already dead!"
else //otherwise...
var/damage = rand(1,5)
usr << "You Slash [M]![damage*power]"
oview(2) << "[usr] slashed [M]![damage*power]"
M.HP -= damage*power
M.DeathCheck()
i need that to be able to check enemys defense and thusly decress the damage done
In response to Nadrew
I reckon that misunderstanding is a result of Scoobert's really bad DBZer-class writing. Maybe if he wrote more legibly, people would be more inclined to help him as well as understanding what he's trying to get across.