verb
ExampleSkillOne(mob/T as mob in oview(1)) //Skill #1
var/damage = [fancy calculations] //A variable "damage" that holds the power of this particular skill
usr.Attack(T)
T.DeadCheck()
ExampleSkillTwo(mob/T as mob in oview(1)) //Skill #2
var/damage = [different calculations] //A variable "damage" for this skill
usr.Attack(T)
T.DeadCheck()
proc
Attack(mob/T)
//this is where the damage calculation would go
usr << "The attack hit [T] for [damage] damage."
T << "You were hit by [usr] for [damage] damage."
DeadCheck()
if (hp <= 0)
view() << "[src] has fallen in combat!"
del(src)
Problem description:
The idea is to set a variable "damage" for each skill, and then have the verb call the Attack proc to determine how much damage is done. However, no matter which way I try to make it work, I can't get the Attack proc to recognize the "damage" variable.
I'm not the greatest coder on BYOND, so there's probably something simple that I'm missing here, but searching the forum and browsing the Blue Book hasn't helped. Any help would be much appreciated.
Instead, you should be creating a new object type for all attacks, giving it a damage variable, and deriving specific attacks from that. For a quick example: