world
name = "New World"
turf = /turf/grass
mob
var
maxhealth
health
maxmagic
magic
strength
defence
mob
Login()
usr.icon = 'misc.dmi'
usr.icon_state = "player"
..()
turf
grass
icon = 'misc.dmi'
icon_state = "grass"
mob
player
icon = 'misc.dmi'
icon_state = "player"
maxhealth = 20
health = 20
maxmagic = 15
magic = 15
strength = 10
defence = 8
mob
baddie
icon = 'misc.dmi'
icon_state = "baddie"
maxhealth = 18
health = 18
maxmagic = 15
magic = 15
strength = 9
defence = 7
mob
verb
punch(mob/M as mob in oview(1))
var
damage = usr.strength - M.defence
if(damage <= 0)
usr << "[M] isn't affected by your attack"
else
M.health -= damage
usr << "Your hit [M] for [damage] health!"
Problem description:
This is a little project of mine, the above is all the code I've made in one little 'misc' code file.
My problem is when I 'punch' the 'baddie' it tells me im not hitting him.
Fire Away!