CreateWeapon
var/_type
var/_element
var/obj/O
proc/CreateWeapon(Type,Element)
_type = Type
_element = Element
if(_type == "Sword" && _element == "Fire")
O.name = pick("Flame Saber","Firesoul Blade")
if(O.name == "Flame Saber")
O.Element = "Fire"
O.Element_Mod = 100 * (2.3/100)
world<<"[O.name] was created with [O.Element] element and [O.Element_Mod]% fire attack!"
if(O.name == "Firesoul Blade")
O.Element = "Fire"
O.Element_Mod = 100 * (3.2/100)
world<<"[O.name] was created with [O.Element] element and [O.Element_Mod]% fire attack!"
mob/verb/Create(obj/O)
CreateWeapon("Sword","Fire")
Problem description:
How do you use procs inside a datum?
I don't see the point on having this as a datum though, since you're really just setting up an object to be used (and storing it as a datum's variable for some reason)
You could move it to be an /obj/Weapon proc and just use that object directly.