#define DEBUG
mob
var
HP = 30 //declares a new variable called HP, with a value of 30
Wealth
icon = 'person.dmi'
icon_state = "male"
verb
attack(mob/M as mob in oview(1)) //attack a mob within 1 tile of you
usr << "You attack [M]!" //send this message to the usr
oview() << "[usr] attacks [M]!" //send this message to everybody else
var/damage = rand(1,10) //assign a random # to a new variable
world << "[damage] damage!" //tell the damage to the world
M.HP -= damage //take away the damage from M
M.DeathCheck() //check for death with a proc
Say(msg as text)
view() << "[usr] says: [msg]"
OOC(msg as text)
world << "[usr] OOC: [msg]"
Emote(msg as text)
world << "*[usr] [msg]*"
Whisper(msg as text)
oview(3) << "[usr] whispers: ]msg]"
obj
gold //define a "gold" prototype, which is a kind of obj
icon = 'Gold.dmi' //set the default icon
icon_state = "Gold"
turf
icon = 'turfs.dmi'
Grass
icon_state = "grass"
Water
icon_state = "water"
density = 1
Path
icon_state = "Path"
Wall
icon_state = "wall"
density = 1
Roof
icon_state = "roof"
density = 1
Cliff
icon_state = "cliff"
density = 1
Cliff2
icon_state = "cliff2"
density = 1
Water2
icon_state = "Water2"
density = 1
Rock
icon_state = "rock"
density = 1
mob
proc
DeathCheck() //checks to see if an attack is deadly
if (HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //do the death messaging
Del()
var/obj/gold/G = new(loc) //create a new obj from the gold blueprint
G.amount = rand(1,100) //set its amount variable randomly
..() //call the parent
icon = 'person.dmi' //makes it so all mobs will be created with the person icon
bug //new prototype
icon = 'Bug.dmi' //override the parent's icon, which was 'person.dmi'
icon_state = "Bug"
Login()
icon_state = gender //when a player logs in, make their icon's state
..() //the gender of their key. Then call the parent!
attack(mob/M as mob in oview(1))
if (M.HP <= 0) //if M's HP are at or below 0...
usr << "[M] is already dead!"
else //otherwise...
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/damage = rand(1,10)
world << "[damage] damage!"
M.HP -= damage
M.DeathCheck()
DeathCheck()
if (HP <= 0)
world << "[src] dies!"
del(src) //delete whatever just died
obj
gold
icon = 'gold.dmi'
var
amount
verb
get() //obj/gold/verb/get()
set src in view(1) //src must be close
usr << "You pick up [amount] gold."
usr.wealth += amount //add to usr.wealth
del(src) //delete the gold
Problem description:
I have an error saying:
Inconsistent indentation and it refers to
bug //new prototype
icon = 'Bug.dmi' //override the parent's icon, which was 'person.dmi'
icon_state = "Bug"