r
This commit is contained in:
@@ -162,11 +162,13 @@
|
||||
tryfinish(user)
|
||||
|
||||
/obj/structure/anvil/proc/tryfinish(mob/user)
|
||||
var/artifactchance = (1+(user.mind.get_skill_level(/datum/skill/level/dorfy/blacksmithing)/4))/2500
|
||||
var/artifact = prob(artifactchance)
|
||||
var/finalfailchance = outrightfailchance
|
||||
if(user.mind.skill_holder)
|
||||
var/skillmod = user.mind.get_skill_level(/datum/skill/level/dorfy/blacksmithing)/10 + 1
|
||||
finalfailchance = max(0, finalfailchance / skillmod) //lv 2 gives 20% less to fail, 3 30%, etc
|
||||
if(currentsteps > 10 || (rng && prob(finalfailchance)))
|
||||
if(currentsteps > 10 || (rng && prob(finalfailchance)) || artifact)
|
||||
to_chat(user, "<span class='warning'?You overwork the metal, causing it to turn into useless slag!</span>")
|
||||
var/turf/T = get_turf(user)
|
||||
workpiece_state = FALSE
|
||||
@@ -183,8 +185,14 @@
|
||||
var/obj/item/smithing/create = smithrecipes[stepsdone]
|
||||
var/obj/item/smithing/finisheditem = new create(T)
|
||||
to_chat(user, "You finish your [finisheditem]!")
|
||||
if(artifact)
|
||||
to_chat(user, "It is an artifact, a creation whose legacy shall live on forevermore.") //todo: SSblackbox
|
||||
currentquality = max(currentquality, 2)
|
||||
finisheditem.quality = currentquality * 3//this is insane i know it's 1/2500 for most of the time and 0.8% at best
|
||||
finisheditem.artifact = TRUE
|
||||
else
|
||||
finisheditem.quality = min(currentquality, itemqualitymax)
|
||||
workpiece_state = FALSE
|
||||
finisheditem.quality = min(currentquality, itemqualitymax)
|
||||
finisheditem.set_custom_materials(workpiece_material)
|
||||
currentquality = anvilquality
|
||||
stepsdone = ""
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/quality = 0 //quality. Changed by the smithing process.
|
||||
var/obj/item/finishingitem = /obj/item/stick //What this item needs to be hit by to create finalitem
|
||||
var/obj/item/finalitem
|
||||
var/artifact = FALSE
|
||||
|
||||
/obj/item/ingot
|
||||
name = "ingot"
|
||||
@@ -118,11 +119,31 @@
|
||||
var/datum/material/mat = custom_materials[1]
|
||||
finalitem.set_custom_materials(custom_materials)
|
||||
mat = mat.name
|
||||
finalitem.name = "[qualname] [mat] [initial(finalitem.name)]"
|
||||
finalitem.desc = "A [qualname] [initial(finalitem.name)]."
|
||||
if(artifact)
|
||||
dwarfyartifact(finalitem, mat)
|
||||
else
|
||||
finalitem.name = "[qualname] [mat] [initial(finalitem.name)]"
|
||||
finalitem.desc = "A [qualname] [initial(finalitem.name)]."
|
||||
finalitem.forceMove(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/smithing/proc/dwarfyartifact(var/obj/item/finalitem, var/mat)
|
||||
var/finaldesc = "A [initial(finalitem.name)] made of [mat], all craftsmanship is of the highest quality. "
|
||||
switch(pick(1,2,3,4,5))
|
||||
if(1)
|
||||
finaldesc += "It is encrusted with [pick("","synthetic ","multi-faceted ","magical ","sparkling ") + pick("rubies","emeralds","jade","opals","lapiz lazuli")]."
|
||||
if(2)
|
||||
finaldesc += "is laced with studs of [pick("gold","silver","aluminium","titanium")]."
|
||||
if(3)
|
||||
finaldesc += "is encircled with bands of [pick("durasteel","metallic hydrogen","ferritic-alloy","plasteel","duranium")]."
|
||||
if(4)
|
||||
finaldesc += "menaces with spikes of [pick("ytterbium","uranium","white pearl","black steel")]."
|
||||
if(5)
|
||||
finaldesc += "It is encrusted with [pick("","synthetic ","multi-faceted ","magical ","sparkling ") + pick("rubies","emeralds","jade","opals","lapiz lazuli")],laced with studs of [pick("gold","silver","aluminium","titanium")], encircled with bands of [pick("durasteel","metallic hydrogen","ferritic-alloy","plasteel","duranium")] and menaces with spikes of [pick("ytterbium","uranium","white pearl","black steel")]."
|
||||
finalitem.desc = finaldesc
|
||||
finalitem.name = pick("Delersibnir", "Nekolangrir", "Zanoreshik","Öntakrítin", "Nogzatan", "Vunomam", "Nazushagsaldôbar", "Sergeb", "Zafaldastot", "Vudnis", "Dostust", "Shotom", "Mugshith", "Angzak", "Oltud", "Deleratîs", "Nökornomal") //one of these is literally BLOOD POOL CREATE.iirc its Nazushagsaldôbar.
|
||||
|
||||
/obj/item/smithing/hammerhead
|
||||
name = "smithed hammer head"
|
||||
finalitem = /obj/item/melee/smith/hammer
|
||||
|
||||
Reference in New Issue
Block a user