mirror of
https://github.com/goonstation/goonstation-2016.git
synced 2026-07-19 21:12:41 +01:00
Initial Commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/obj/item/artifact/activator_key
|
||||
// can activate any artifact simply by smacking it. very very rare
|
||||
name = "artifact activator key"
|
||||
associated_datum = /datum/artifact/activator_key
|
||||
var/universal = 1 // normally it only activates its own type, but sometimes it can do all
|
||||
var/activator = 1 // can also be a DEactivator key sometimes!
|
||||
module_research_no_diminish = 1
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
..()
|
||||
/*if (prob(10))
|
||||
src.universal = 1
|
||||
if (prob(10))
|
||||
src.activator = 0*/
|
||||
|
||||
/datum/artifact/activator_key
|
||||
associated_object = /obj/item/artifact/activator_key
|
||||
rarity_class = 4
|
||||
validtypes = list("ancient","martian","wizard","eldritch","precursor")
|
||||
automatic_activation = 1
|
||||
react_xray = list(12,80,95,8,"COMPLEX")
|
||||
examine_hint = "It kinda looks like it's supposed to be inserted into something."
|
||||
module_research = list("tools" = 20)
|
||||
module_research_insight = 5
|
||||
@@ -0,0 +1,130 @@
|
||||
/obj/item/artifact/attack_wand
|
||||
name = "artifact attack wand"
|
||||
associated_datum = /datum/artifact/attack_wand
|
||||
flags = FPRINT | CONDUCT | EXTRADELAY
|
||||
module_research_no_diminish = 1
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
|
||||
if (user.equipped() == src)
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/attack_wand/A = src.artifact
|
||||
if (!istype(A))
|
||||
return
|
||||
if (!A.activated)
|
||||
return
|
||||
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
|
||||
A.effect_click_tile(src,user,U)
|
||||
src.ArtifactFaultUsed(user)
|
||||
|
||||
/datum/artifact/attack_wand
|
||||
associated_object = /obj/item/artifact/attack_wand
|
||||
rarity_class = 3
|
||||
validtypes = list("wizard")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/force)
|
||||
react_xray = list(8,80,60,11,"COMPLEX")
|
||||
examine_hint = "It seems to have a handle you're supposed to hold it by."
|
||||
var/ready = 1
|
||||
var/cooldown = 180
|
||||
var/attack_type = null
|
||||
var/recharge_phrase = ""
|
||||
var/error_phrase = ""
|
||||
module_research = list("weapons" = 5, "energy" = 5, "tools" = 5)
|
||||
module_research_insight = 2
|
||||
|
||||
New()
|
||||
..()
|
||||
recharge_phrase = pick("crackles with static.","emits a quiet tone.","bristles with energy!","heats up.")
|
||||
error_phrase = pick("shudders briefly.","grows heavy for a moment.","emits a quiet buzz.","makes a small pop sound.")
|
||||
attack_type = pick("lightning","fire","ice","sonic")
|
||||
cooldown = rand(25,900)
|
||||
if (prob(5))
|
||||
cooldown = 0
|
||||
|
||||
effect_click_tile(var/obj/O,var/mob/living/user,var/turf/T)
|
||||
if (..())
|
||||
return
|
||||
if (!ready)
|
||||
return
|
||||
|
||||
ready = 0
|
||||
spawn(cooldown)
|
||||
if (O.loc == user)
|
||||
boutput(user, "<b>[O]</b> [recharge_phrase]")
|
||||
ready = 1
|
||||
|
||||
switch(attack_type)
|
||||
if("fire")
|
||||
playsound(T, "sound/effects/bamf.ogg", 50, 1, 0)
|
||||
fireflash(T, 2)
|
||||
|
||||
ArtifactLogs(user, T, O, "used", "creating fireball on target turf", 0) // Attack wands need special log handling (Convair880).
|
||||
|
||||
if("ice")
|
||||
playsound(T, "sound/effects/mag_iceburstlaunch.ogg", 50, 1, 0)
|
||||
for (var/turf/TT in range(T,2))
|
||||
if(locate(/obj/decal/icefloor) in TT.contents)
|
||||
continue
|
||||
var/obj/decal/icefloor/B = new /obj/decal/icefloor(TT)
|
||||
spawn(800)
|
||||
B.dispose()
|
||||
for (var/mob/living/M in range(T,2))
|
||||
if (M.bioHolder)
|
||||
if (!M.is_cold_resistant())
|
||||
new /obj/icecube(get_turf(M), M)
|
||||
|
||||
ArtifactLogs(user, M, O, "weapon", "trapping them in an ice cube", 0)
|
||||
|
||||
if("lightning")
|
||||
var/attack_amt = 0
|
||||
for (var/mob/living/M in range(T,1))
|
||||
|
||||
ArtifactLogs(user, M, O, "weapon", "zapping them with electricity", 0)
|
||||
|
||||
attack_amt = 1
|
||||
var/list/affected = DrawLine(M, user, /obj/line_obj/elec ,'icons/obj/projectiles.dmi',"WholeLghtn",1,1,"HalfStartLghtn","HalfEndLghtn",OBJ_LAYER,1,PreloadedIcon='icons/effects/LghtLine.dmi')
|
||||
for(var/obj/OB in affected)
|
||||
spawn(6)
|
||||
pool(OB)
|
||||
M.TakeDamage("chest", 0, 25)
|
||||
M.stunned += 5
|
||||
if (attack_amt)
|
||||
playsound(user, "sound/effects/elec_bigzap.ogg", 40, 1)
|
||||
else
|
||||
boutput(user, "<span style=\"color:red\"><b>[O]</b> crackles with electricity for a moment. Perhaps it couldn't find a target?</span>")
|
||||
|
||||
if("sonic")
|
||||
playsound(T, "sound/effects/screech.ogg", 100, 1, 0)
|
||||
particleMaster.SpawnSystem(new /datum/particleSystem/sonic_burst(T))
|
||||
|
||||
for (var/mob/living/M in all_hearers(world.view, T))
|
||||
if (isintangible(M))
|
||||
continue
|
||||
if (!M.ears_protected_from_sound())
|
||||
shake_camera(M, 10, 0)
|
||||
else
|
||||
continue
|
||||
|
||||
ArtifactLogs(user, M, O, "weapon", "inflicting ear damage", 0)
|
||||
|
||||
// Here used to be a C&P of what sonic powder does anyway (Convair880).
|
||||
var/datum/reagents/R = O.reagents
|
||||
|
||||
if (!R || !istype(R))
|
||||
R = new /datum/reagents(15)
|
||||
O.reagents = R
|
||||
R.my_atom = O
|
||||
else if (R && istype(R) && R.my_atom != O)
|
||||
R.my_atom = O
|
||||
|
||||
R.clear_reagents()
|
||||
if (R.maximum_volume < 15)
|
||||
R.maximum_volume = 15
|
||||
|
||||
R.add_reagent("sonicpowder_nofluff", 15, null, T0C + 200)
|
||||
R.temperature_react()
|
||||
|
||||
if (R.total_volume)
|
||||
R.clear_reagents()
|
||||
return
|
||||
@@ -0,0 +1,109 @@
|
||||
/obj/item/gun/energy/artifact
|
||||
// an energy gun, it shoots things as you might expect
|
||||
name = "artifact energy gun"
|
||||
icon = 'icons/obj/artifacts/artifactsitem.dmi'
|
||||
icon_state = "laser"
|
||||
force = 5.0
|
||||
artifact = 1
|
||||
is_syndicate = 1
|
||||
module_research_no_diminish = 1
|
||||
mat_changename = 0
|
||||
mat_changedesc = 0
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
var/datum/artifact/energygun/AS = new /datum/artifact/energygun(src)
|
||||
if (forceartitype)
|
||||
AS.validtypes = list("[forceartitype]")
|
||||
src.artifact = AS
|
||||
// The other three are normal for energy gun setup, so proceed as usual i guess
|
||||
cell = null
|
||||
|
||||
spawn(0)
|
||||
src.ArtifactSetup()
|
||||
var/datum/artifact/A = src.artifact
|
||||
cell = new/obj/item/ammo/power_cell/self_charging/artifact(src,A.artitype)
|
||||
src.ArtifactDevelopFault(15)
|
||||
|
||||
current_projectile = AS.bullet
|
||||
projectiles = list(src.current_projectile)
|
||||
cell.max_charge = max(cell.max_charge, current_projectile.cost)
|
||||
|
||||
examine()
|
||||
set src in oview()
|
||||
boutput(usr, "You have no idea what this thing is!")
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (istext(A.examine_hint))
|
||||
boutput(usr, "[A.examine_hint]")
|
||||
|
||||
UpdateName()
|
||||
src.name = "[name_prefix(null, 1)][src.real_name][name_suffix(null, 1)]"
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (src.Artifact_attackby(W,user))
|
||||
..()
|
||||
|
||||
process_ammo(var/mob/user)
|
||||
if(istype(user,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.cell)
|
||||
if(R.cell.charge >= src.robocharge)
|
||||
R.cell.charge -= src.robocharge
|
||||
return 1
|
||||
return 0
|
||||
else
|
||||
if(src.current_projectile)
|
||||
if(src.cell)
|
||||
if(src.cell.use(src.current_projectile.cost))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
shoot(var/target,var/start,var/mob/user)
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/energygun/A = src.artifact
|
||||
|
||||
if (!istype(A))
|
||||
return
|
||||
|
||||
if (!A.activated)
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
A.ReduceHealth(src)
|
||||
|
||||
src.ArtifactFaultUsed(user)
|
||||
return
|
||||
|
||||
/datum/artifact/energygun
|
||||
associated_object = /obj/item/gun/energy/artifact
|
||||
rarity_class = 2
|
||||
validtypes = list("ancient","eldritch","precursor")
|
||||
react_elec = list(0.02,0,5)
|
||||
react_xray = list(10,75,100,11,"CAVITY")
|
||||
var/integrity = 100
|
||||
var/integrity_loss = 5
|
||||
var/datum/projectile/artifact/bullet = null
|
||||
examine_hint = "It seems to have a handle you're supposed to hold it by."
|
||||
module_research = list("weapons" = 8, "energy" = 8)
|
||||
module_research_insight = 3
|
||||
|
||||
New()
|
||||
..()
|
||||
bullet = new/datum/projectile/artifact
|
||||
bullet.randomise()
|
||||
integrity = rand(50, 100)
|
||||
integrity_loss = rand(1, 7)
|
||||
react_xray[3] = integrity
|
||||
|
||||
proc/ReduceHealth(var/obj/item/gun/energy/artifact/O)
|
||||
var/prev_health = integrity
|
||||
integrity -= integrity_loss
|
||||
if (integrity <= 20 && prev_health > 20)
|
||||
O.visible_message("<span style=\"color:red\">[O] emits a terrible cracking noise.</span>")
|
||||
if (integrity <= 0)
|
||||
O.visible_message("<span style=\"color:red\">[O] crumbles into nothingness.</span>")
|
||||
qdel(O)
|
||||
react_xray[3] = integrity
|
||||
@@ -0,0 +1,56 @@
|
||||
/obj/item/ammo/power_cell/self_charging/artifact
|
||||
name = "artifact energy gun power cell"
|
||||
icon = 'icons/obj/artifacts/artifactsitemS.dmi'
|
||||
artifact = 1
|
||||
charge = 400.0
|
||||
max_charge = 400.0
|
||||
recharge_rate = 0.0
|
||||
module_research_no_diminish = 1
|
||||
mat_changename = 0
|
||||
mat_changedesc = 0
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
//src.artifact = new /datum/artifact/energyammo(src)
|
||||
var/datum/artifact/energyammo/A = new /datum/artifact/energyammo(src)
|
||||
if (forceartitype)
|
||||
A.validtypes = list("[forceartitype]")
|
||||
src.artifact = A
|
||||
spawn(0)
|
||||
src.ArtifactSetup()
|
||||
|
||||
src.max_charge = rand(5,100)
|
||||
src.max_charge *= 10
|
||||
A.react_elec[2] = src.max_charge
|
||||
src.recharge_rate = rand(5,60)
|
||||
..()
|
||||
|
||||
examine()
|
||||
set src in oview()
|
||||
boutput(usr, "You have no idea what this thing is!")
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (istext(A.examine_hint))
|
||||
boutput(usr, "[A.examine_hint]")
|
||||
|
||||
UpdateName()
|
||||
src.name = "[name_prefix(null, 1)][src.real_name][name_suffix(null, 1)]"
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (src.Artifact_attackby(W,user))
|
||||
..()
|
||||
|
||||
/datum/artifact/energyammo
|
||||
associated_object = /obj/item/ammo/power_cell/self_charging/artifact
|
||||
rarity_class = 0
|
||||
validtypes = list("ancient","eldritch","precursor")
|
||||
automatic_activation = 1
|
||||
react_elec = list("equal",0,0)
|
||||
react_xray = list(8,80,95,11,"SEGMENTED")
|
||||
examine_hint = "It kinda looks like it's supposed to be inserted into something."
|
||||
module_research = list("energy" = 15, "weapons" = 1, "miniaturization" = 15)
|
||||
module_research_insight = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
src.react_heat[2] = "VOLATILE REACTION DETECTED"
|
||||
@@ -0,0 +1,74 @@
|
||||
/obj/item/artifact/melee_weapon
|
||||
name = "artifact melee weapon"
|
||||
artifact = 1
|
||||
associated_datum = /datum/artifact/melee
|
||||
module_research_no_diminish = 1
|
||||
|
||||
attack(mob/M as mob, mob/user as mob)
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (A.activated)
|
||||
A.effect_melee_attack(src,user,M)
|
||||
src.ArtifactFaultUsed(user)
|
||||
src.ArtifactFaultUsed(M)
|
||||
else
|
||||
..()
|
||||
|
||||
/datum/artifact/melee
|
||||
associated_object = /obj/item/artifact/melee_weapon
|
||||
rarity_class = 2
|
||||
validtypes = list("ancient","martian","wizard","eldritch","precursor")
|
||||
react_xray = list(14,95,95,7,"DENSE")
|
||||
var/damtype = "brute"
|
||||
var/dmg_amount = 5
|
||||
var/stun_time = 0
|
||||
var/KO_time = 0
|
||||
var/deadly = 0
|
||||
var/sound/hitsound = null
|
||||
examine_hint = "It seems to have a handle you're supposed to hold it by."
|
||||
module_research = list("weapons" = 8, "miniaturization" = 8)
|
||||
module_research_insight = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
src.damtype = pick("brute", "fire", "toxin")
|
||||
src.dmg_amount = rand(3,6)
|
||||
src.dmg_amount *= rand(1,5)
|
||||
if (prob(5))
|
||||
src.dmg_amount *= rand(1,5)
|
||||
if (prob(40))
|
||||
src.stun_time = rand(3,12)
|
||||
if (prob(15))
|
||||
src.KO_time = rand(3,12)
|
||||
if (prob(1))
|
||||
src.deadly = 1
|
||||
src.hitsound = pick('sound/effects/bang.ogg','sound/effects/zhit.ogg','sound/effects/exlow.ogg','sound/effects/mag_magmisimpact.ogg','sound/effects/shieldhit2.ogg',
|
||||
'sound/effects/snap.ogg','sound/machines/mixer.ogg','sound/misc/meteorimpact.ogg','sound/weapons/ACgun2.ogg','sound/weapons/Egloves.ogg','sound/weapons/flashbang.ogg',
|
||||
'sound/weapons/grenade.ogg','sound/weapons/railgun.ogg')
|
||||
|
||||
effect_melee_attack(var/obj/O,var/mob/living/user,var/mob/living/target)
|
||||
if (..())
|
||||
return
|
||||
if (!istype(user,/mob/living/) || !istype(target,/mob/living/))
|
||||
return
|
||||
user.visible_message("<span style=\"color:red\"><b>[user.name]</b> attacks [target.name] with [O]!</span>")
|
||||
var/turf/T = get_turf(user)
|
||||
playsound(T, hitsound, 50, 1, -1)
|
||||
if (src.deadly)
|
||||
user.visible_message("<span style=\"color:red\"><b>[target] is utterly destroyed!</b></span>")
|
||||
target.gib()
|
||||
else
|
||||
switch(damtype)
|
||||
if ("brute")
|
||||
random_brute_damage(target, dmg_amount)
|
||||
if ("fire")
|
||||
random_burn_damage(target, dmg_amount)
|
||||
if ("toxin")
|
||||
if (ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.toxloss += rand(1, dmg_amount)
|
||||
if (src.stun_time)
|
||||
target.stunned = src.stun_time
|
||||
if (src.KO_time)
|
||||
target.paralysis = src.KO_time
|
||||
@@ -0,0 +1,34 @@
|
||||
/obj/item/artifact/mining_tool
|
||||
name = "artifact mining tool"
|
||||
artifact = 1
|
||||
associated_datum = /datum/artifact/mining
|
||||
var/dig_power = 1
|
||||
var/extrahit = 0
|
||||
var/dig_sound = 'sound/effects/exlow.ogg'
|
||||
// mining.dm line 373
|
||||
module_research_no_diminish = 1
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
..()
|
||||
src.dig_power = rand(1,5)
|
||||
if (prob(33))
|
||||
src.extrahit = rand(0,4)
|
||||
src.dig_sound = pick('sound/effects/exlow.ogg','sound/effects/mag_magmisimpact.ogg','sound/effects/shieldhit2.ogg')
|
||||
|
||||
examine()
|
||||
set src in oview()
|
||||
boutput(usr, "You have no idea what this thing is!")
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (istext(A.examine_hint))
|
||||
boutput(usr, "[A.examine_hint]")
|
||||
|
||||
/datum/artifact/mining
|
||||
associated_object = /obj/item/artifact/mining_tool
|
||||
rarity_class = 1
|
||||
validtypes = list("ancient","martian","wizard","eldritch","precursor")
|
||||
react_xray = list(12,80,95,5,"DENSE")
|
||||
examine_hint = "It seems to have a handle you're supposed to hold it by."
|
||||
module_research = list("mining" = 10, "engineering" = 5, "miniaturization" = 10)
|
||||
module_research_insight = 3
|
||||
@@ -0,0 +1,55 @@
|
||||
/obj/item/cell/artifact
|
||||
name = "artifact power cell"
|
||||
icon = 'icons/obj/artifacts/artifactsitemS.dmi'
|
||||
maxcharge = 10000
|
||||
genrate = 50
|
||||
specialicon = 1
|
||||
artifact = 1
|
||||
module_research_no_diminish = 1
|
||||
mat_changename = 0
|
||||
mat_changedesc = 0
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
//src.artifact = new /datum/artifact/powercell(src)
|
||||
var/datum/artifact/powercell/AS = new /datum/artifact/powercell(src)
|
||||
if (forceartitype)
|
||||
AS.validtypes = list("[forceartitype]")
|
||||
src.artifact = AS
|
||||
spawn(0)
|
||||
src.ArtifactSetup()
|
||||
var/datum/artifact/A = src.artifact
|
||||
src.maxcharge = rand(15,1000)
|
||||
src.maxcharge *= 100
|
||||
A.react_elec[2] = src.maxcharge
|
||||
..()
|
||||
|
||||
examine()
|
||||
set src in oview()
|
||||
boutput(usr, "You have no idea what this thing is!")
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (istext(A.examine_hint))
|
||||
boutput(usr, "[A.examine_hint]")
|
||||
|
||||
UpdateName()
|
||||
src.name = "[name_prefix(null, 1)][src.real_name][name_suffix(null, 1)]"
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (src.Artifact_attackby(W,user))
|
||||
..()
|
||||
|
||||
/datum/artifact/powercell
|
||||
associated_object = /obj/item/cell/artifact
|
||||
rarity_class = 1
|
||||
validtypes = list("ancient","martian","wizard","precursor")
|
||||
automatic_activation = 1
|
||||
react_elec = list("equal",0,10)
|
||||
react_xray = list(10,80,95,11,"SEGMENTED")
|
||||
examine_hint = "It kinda looks like it's supposed to be inserted into something."
|
||||
module_research = list("energy" = 15, "miniaturization" = 20)
|
||||
module_research_insight = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
src.react_heat[2] = "VOLATILE REACTION DETECTED"
|
||||
@@ -0,0 +1,79 @@
|
||||
/obj/item/artifact/teleport_wand
|
||||
name = "artifact teleport wand"
|
||||
artifact = 1
|
||||
associated_datum = /datum/artifact/telewand
|
||||
flags = FPRINT | CONDUCT | EXTRADELAY
|
||||
module_research_no_diminish = 1
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/telewand/A = src.artifact
|
||||
if (!istype(A))
|
||||
return
|
||||
|
||||
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
|
||||
//var/turf/T = get_turf(target)
|
||||
if (A.activated)
|
||||
if (A.can_teleport_here(U))
|
||||
A.effect_click_tile(src,user,U)
|
||||
else
|
||||
boutput(user, "<b>[src]</b> [A.error_phrase]")
|
||||
src.ArtifactFaultUsed(user)
|
||||
|
||||
/datum/artifact/telewand
|
||||
associated_object = /obj/item/artifact/teleport_wand
|
||||
rarity_class = 3
|
||||
validtypes = list("wizard","eldritch","precursor")
|
||||
react_xray = list(10,75,90,11,"ANOMALOUS")
|
||||
var/sound/wand_sound = 'sound/effects/mag_warp.ogg'
|
||||
var/on_cooldown = 0
|
||||
var/cooldown_delay = 0
|
||||
var/particle_color = "#000000"
|
||||
var/particle_sprite = ""
|
||||
var/recharge_phrase = ""
|
||||
var/error_phrase = ""
|
||||
examine_hint = "It seems to have a handle you're supposed to hold it by."
|
||||
module_research = list("energy" = 15, "engineering" = 3, "science" = 8)
|
||||
module_research_insight = 4
|
||||
|
||||
New()
|
||||
..()
|
||||
particle_color = copytext(rgb(rand(0,255), rand(0,255), rand(0,255)),1,0)
|
||||
particle_sprite = pick("8x8circle","8x8ring","8x8triangle","8x8square","8x8bubblegrid")
|
||||
wand_sound = pick('sound/effects/mag_warp.ogg','sound/effects/mag_teleport.ogg','sound/effects/mag_phase.ogg','sound/effects/teleport.ogg','sound/effects/warp2.ogg','sound/weapons/ACgun2.ogg',
|
||||
'sound/weapons/laserultra.ogg','sound/weapons/radxbow.ogg','sound/machines/ArtifactWiz1.ogg','sound/machines/ArtifactPre1.ogg','sound/machines/ArtifactAnc1.ogg','sound/machines/engine_alert3.ogg', 'sound/voice/wizard/BlinkLoud.ogg')
|
||||
recharge_phrase = pick("crackles with static.","emits a quiet tone.","shakes violently!","heats up.")
|
||||
error_phrase = pick("shudders briefly.","grows heavy for a moment.","emits a quiet buzz.","makes a small pop sound.")
|
||||
cooldown_delay = rand(1,20) * 10
|
||||
if (prob(5))
|
||||
cooldown_delay = 0
|
||||
|
||||
effect_click_tile(var/obj/O,var/mob/living/user,var/turf/T)
|
||||
if (..())
|
||||
return
|
||||
if (on_cooldown)
|
||||
return
|
||||
|
||||
on_cooldown = 1
|
||||
spawn(cooldown_delay)
|
||||
if (O.loc == user)
|
||||
boutput(user, "<b>[O]</b> [recharge_phrase]")
|
||||
on_cooldown = 0
|
||||
|
||||
user.set_loc(T)
|
||||
|
||||
var/turf/start_loc = get_turf(user)
|
||||
playsound(start_loc, wand_sound, 50, 1, -1)
|
||||
particleMaster.SpawnSystem(new /datum/particleSystem/tele_wand(T,particle_sprite,particle_color))
|
||||
return
|
||||
|
||||
proc/can_teleport_here(var/turf/T)
|
||||
if (!istype(T,/turf/simulated/floor/))
|
||||
return 0
|
||||
if (T.density)
|
||||
return 0
|
||||
for(var/atom/X in T.contents)
|
||||
if (X.density)
|
||||
return 0
|
||||
return 1
|
||||
@@ -0,0 +1,66 @@
|
||||
/obj/item/artifact/forcewall_wand
|
||||
name = "artifact forcewall wand"
|
||||
icon = 'icons/obj/artifacts/artifactsitem.dmi'
|
||||
artifact = 1
|
||||
associated_datum = /datum/artifact/wallwand
|
||||
module_research_no_diminish = 1
|
||||
|
||||
afterattack(atom/target, mob/user , flag)
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (A.activated)
|
||||
var/turf/T = get_turf(target)
|
||||
A.effect_click_tile(src,user,T)
|
||||
src.ArtifactFaultUsed(user)
|
||||
|
||||
/datum/artifact/wallwand
|
||||
associated_object = /obj/item/artifact/forcewall_wand
|
||||
rarity_class = 2
|
||||
validtypes = list("ancient","wizard","eldritch","precursor")
|
||||
react_xray = list(10,60,92,11,"COMPLEX")
|
||||
var/wall_duration = 5
|
||||
var/wall_size = 1
|
||||
var/icon_state = "shieldsparkles"
|
||||
var/sound/wand_sound = 'sound/effects/mag_forcewall.ogg'
|
||||
examine_hint = "It seems to have a handle you're supposed to hold it by."
|
||||
module_research = list("energy" = 10, "weapons" = 3, "miniaturization" = 5, "engineering" = 3, "tools" = 3)
|
||||
module_research_insight = 3
|
||||
|
||||
New()
|
||||
..()
|
||||
src.wall_duration = rand(3,30)
|
||||
src.wall_size = rand(1,4)
|
||||
if(prob(10))
|
||||
src.wall_size += rand(3,6)
|
||||
if(prob(5))
|
||||
src.wall_duration *= rand(2,5)
|
||||
src.icon_state = pick("shieldsparkles","empdisable","greenglow","enshield","energyorb","forcewall","meteor_shield")
|
||||
src.wand_sound = pick('sound/effects/mag_forcewall.ogg','sound/effects/mag_golem.ogg','sound/effects/mag_iceburstlaunch.ogg','sound/effects/bamf.ogg','sound/weapons/ACgun2.ogg')
|
||||
|
||||
effect_click_tile(var/obj/O,var/mob/living/user,var/turf/T)
|
||||
if (..())
|
||||
return
|
||||
if (!T)
|
||||
return
|
||||
var/wallloc
|
||||
playsound(user.loc, wand_sound, 50, 1, -1)
|
||||
if (user.dir == NORTH || user.dir == SOUTH)
|
||||
for(wallloc = T.x - (src.wall_size - 1),wallloc < T.x + src.wall_size,wallloc++)
|
||||
var/obj/forcefield/wand/FW = new /obj/forcefield/wand(locate(wallloc,T.y,T.z),src.wall_duration,src.icon_state)
|
||||
FW.icon_state = src.icon_state
|
||||
else
|
||||
for(wallloc = T.y - (src.wall_size - 1),wallloc < T.y + src.wall_size,wallloc++)
|
||||
var/obj/forcefield/wand/FW = new /obj/forcefield/wand(locate(T.x,wallloc,T.z),src.wall_duration,src.icon_state)
|
||||
FW.icon_state = src.icon_state
|
||||
|
||||
/obj/forcefield/wand
|
||||
name = "force field"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shieldsparkles"
|
||||
desc = "Some kind of strange energy barrier. You can't get past it."
|
||||
New(var/loc,var/duration,var/wallsprite)
|
||||
icon_state = wallsprite
|
||||
if (duration > 0)
|
||||
spawn(duration * 10)
|
||||
qdel(src)
|
||||
@@ -0,0 +1,51 @@
|
||||
/obj/item/reagent_containers/glass/wateringcan/artifact
|
||||
name = "artifact watering can"
|
||||
icon = 'icons/obj/artifacts/artifactsitem.dmi'
|
||||
desc = "You have no idea what this thing is!"
|
||||
artifact = 1
|
||||
module_research_no_diminish = 1
|
||||
mat_changename = 0
|
||||
mat_changedesc = 0
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
..()
|
||||
var/datum/artifact/watercan/AS = new /datum/artifact/watercan(src)
|
||||
if (forceartitype)
|
||||
AS.validtypes = list("[forceartitype]")
|
||||
src.artifact = AS
|
||||
spawn(0)
|
||||
src.ArtifactSetup()
|
||||
|
||||
var/capacity = rand(1,20)
|
||||
capacity *= 1000
|
||||
var/datum/reagents/R = new/datum/reagents(capacity)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("water", capacity / 2)
|
||||
R.add_reagent("saltpetre", capacity / 2)
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (src.Artifact_attackby(W,user))
|
||||
..()
|
||||
|
||||
examine()
|
||||
boutput(usr, "[desc]")
|
||||
return
|
||||
|
||||
UpdateName()
|
||||
src.name = "[name_prefix(null, 1)][src.real_name][name_suffix(null, 1)]"
|
||||
|
||||
/datum/artifact/watercan
|
||||
associated_object = /obj/item/reagent_containers/glass/wateringcan/artifact
|
||||
rarity_class = 1
|
||||
validtypes = list("martian","wizard","precursor")
|
||||
min_triggers = 0
|
||||
max_triggers = 0
|
||||
react_xray = list(2,90,15,11,"HOLLOW")
|
||||
module_research = list("medicine" = 5, "science" = 5, "miniaturization" = 15)
|
||||
module_research_insight = 3
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
src.react_heat[2] = "HIGH INTERNAL CONVECTION"
|
||||
@@ -0,0 +1,42 @@
|
||||
/obj/machinery/artifact/gravity_well_generator
|
||||
name = "artifact gravity well generator"
|
||||
associated_datum = /datum/artifact/gravity_well_generator
|
||||
|
||||
/datum/artifact/gravity_well_generator
|
||||
associated_object = /obj/machinery/artifact/gravity_well_generator
|
||||
rarity_class = 2
|
||||
validtypes = list("wizard","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch)
|
||||
activated = 0
|
||||
activ_text = "activates and begins to warp gravity around it!"
|
||||
deact_text = "shuts down, returning gravity to normal!"
|
||||
activ_sound = 'sound/effects/mag_warp.ogg'
|
||||
deact_sound = 'sound/effects/singsuck.ogg'
|
||||
react_xray = list(20,80,99,0,"ULTRADENSE")
|
||||
touch_descriptors = list("You seem to have a little difficulty taking your hand off its surface.")
|
||||
var/field_radius = 7
|
||||
var/gravity_type = 0 // push or pull?
|
||||
examine_hint = "It is covered in very conspicuous markings."
|
||||
|
||||
New()
|
||||
..()
|
||||
src.field_radius = rand(4,9) // well radius
|
||||
src.gravity_type = rand(0,1) // 0 for pull, 1 for push
|
||||
|
||||
effect_process(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
for (var/obj/V in orange(src.field_radius,O))
|
||||
if (V.anchored)
|
||||
continue
|
||||
|
||||
if (src.gravity_type)
|
||||
step_away(V,O)
|
||||
else
|
||||
step_towards(V,O)
|
||||
for (var/mob/living/M in orange(src.field_radius,O))
|
||||
if (src.gravity_type)
|
||||
step_away(M,O)
|
||||
else
|
||||
step_towards(M,O)
|
||||
@@ -0,0 +1,42 @@
|
||||
/obj/machinery/artifact/bio_damage_field_generator
|
||||
name = "artifact bio damage field generator"
|
||||
associated_datum = /datum/artifact/bio_damage_field_generator
|
||||
|
||||
/datum/artifact/bio_damage_field_generator
|
||||
associated_object = /obj/machinery/artifact/bio_damage_field_generator
|
||||
rarity_class = 3
|
||||
validtypes = list("martian","wizard","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch)
|
||||
activated = 0
|
||||
activ_text = "begins to radiate a strange energy field!"
|
||||
deact_text = "shuts down, causing the energy field to vanish!"
|
||||
react_xray = list(12,70,90,11,"COMPLEX")
|
||||
var/field_radius = 7
|
||||
var/field_type = 0 // 0 healing, 1 harming
|
||||
var/field_strength = 2
|
||||
|
||||
New()
|
||||
..()
|
||||
src.field_radius = rand(2,9) // field radius
|
||||
src.field_type = rand(0,1)
|
||||
src.field_strength = rand(1,5)
|
||||
var/harmprob = 33
|
||||
if (src.artitype == "eldritch")
|
||||
harmprob += 42 // total of 75% chance of it being nasty
|
||||
if (prob(harmprob))
|
||||
src.field_type = 1
|
||||
|
||||
if (src.field_type && src.artitype == "eldritch")
|
||||
src.field_strength *= 2
|
||||
|
||||
effect_process(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
for (var/mob/living/carbon/M in range(O,src.field_radius))
|
||||
if (src.field_type)
|
||||
random_brute_damage(M, src.field_strength)
|
||||
boutput(M, "<span style=\"color:red\">Waves of painful energy wrack your body!</span>")
|
||||
else
|
||||
M.HealDamage("All", src.field_strength, src.field_strength)
|
||||
boutput(M, "<span style=\"color:blue\">Waves of soothing energy wash over you!</span>")
|
||||
@@ -0,0 +1,46 @@
|
||||
/obj/machinery/artifact/heater
|
||||
name = "artifact heater"
|
||||
associated_datum = /datum/artifact/heater
|
||||
|
||||
/datum/artifact/heater
|
||||
associated_object = /obj/machinery/artifact/heater
|
||||
rarity_class = 2
|
||||
validtypes = list("ancient","martian","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/cold)
|
||||
activ_text = "begins to radiate air!"
|
||||
deact_text = "stops pumping out air."
|
||||
react_xray = list(10,85,80,5,"COMPLEX")
|
||||
var/heat_target = 310
|
||||
var/heat_amount = 40000
|
||||
examine_hint = "It is covered in very conspicuous markings."
|
||||
|
||||
post_setup()
|
||||
heat_target = rand(0,620)
|
||||
if (artitype == "eldritch" && prob(66))
|
||||
if (heat_target > 310)
|
||||
heat_target *= 2
|
||||
if (heat_target < 310 && heat_target != 0)
|
||||
heat_target /= 2
|
||||
heat_amount = rand(20000,60000)
|
||||
if (heat_target > 310)
|
||||
activ_text = "begins to radiate hot air!"
|
||||
deact_text = "stops pumping out hot air."
|
||||
if (heat_target < 310)
|
||||
activ_text = "begins to radiate cold air!"
|
||||
deact_text = "stops pumping out cold air."
|
||||
|
||||
effect_process(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
var/turf/simulated/L = get_turf(O)
|
||||
if(istype(L))
|
||||
var/datum/gas_mixture/env = L.return_air()
|
||||
if(env.temperature < (heat_target+T0C))
|
||||
var/transfer_moles = 0.25 * env.total_moles()
|
||||
var/datum/gas_mixture/removed = env.remove(transfer_moles)
|
||||
if(removed)
|
||||
var/heat_capacity = removed.heat_capacity()
|
||||
if(heat_capacity)
|
||||
removed.temperature = (removed.temperature*heat_capacity + heat_amount)/heat_capacity
|
||||
env.merge(removed)
|
||||
@@ -0,0 +1,73 @@
|
||||
/obj/machinery/artifact/noisy_thing
|
||||
name = "artifact noisy thing"
|
||||
associated_datum = /datum/artifact/noisy_thing
|
||||
|
||||
ArtifactDeactivated()
|
||||
return // hahaha nope
|
||||
|
||||
/datum/artifact/noisy_thing
|
||||
associated_object = /obj/machinery/artifact/noisy_thing
|
||||
rarity_class = 1
|
||||
validtypes = list("ancient","martian","wizard","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch,/datum/artifact_trigger/silicon_touch)
|
||||
activated = 0
|
||||
activ_text = "begins making horrible noises!"
|
||||
deact_text = "shuts down, falling silent. Thank god for that."
|
||||
react_xray = list(9,50,40,3,"TUBULAR")
|
||||
var/spamsound = 'sound/effects/screech2.ogg'
|
||||
var/harmful = 0
|
||||
var/evil = 0
|
||||
var/sound_pitch = 1
|
||||
var/times_to_play = 1
|
||||
var/list/sounds = list('sound/machines/fortune_greeting_broken.ogg','sound/machines/engine_highpower.ogg','sound/machines/engine_grump1.ogg','sound/machines/engine_alert1.ogg',
|
||||
'sound/machines/engine_alert2.ogg','sound/machines/engine_alert3.ogg','sound/machines/lavamoon_alarm1.ogg','sound/machines/lavamoon_plantalarm.ogg','sound/machines/pod_alarm.ogg',
|
||||
'sound/machines/printer_dotmatrix.ogg','sound/machines/printer_thermal.ogg','sound/machines/romhack1.ogg','sound/machines/satcrash.ogg','sound/machines/siren_generalquarters.ogg',
|
||||
'sound/machines/signal.ogg','sound/machines/ufo_move.ogg','sound/machines/modem.ogg','sound/ambience/ambimo1.ogg','sound/ambience/creaking_metal.ogg','sound/ambience/voidfx2.ogg','sound/ambience/precursorfx2.ogg')
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
..()
|
||||
src.react_heat[2] = "HIGH INTERNAL CONVECTION"
|
||||
src.spamsound = pick(sounds)
|
||||
src.sound_pitch = rand(2,20)
|
||||
src.sound_pitch /= 10
|
||||
src.times_to_play = rand(1,3)
|
||||
var/harmprob = 5
|
||||
if (src.artitype == "eldritch")
|
||||
harmprob += 20
|
||||
if (prob(harmprob))
|
||||
src.harmful = 1
|
||||
if (prob(1))
|
||||
evil = 1
|
||||
|
||||
effect_process(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
var/loops = src.times_to_play
|
||||
var/turf/T = get_turf(O)
|
||||
if (evil)
|
||||
for(var/X in src.sounds)
|
||||
playsound(T, X, 200, 1, 0, sound_pitch)
|
||||
else
|
||||
while (loops > 0)
|
||||
loops--
|
||||
playsound(T, src.spamsound, 200, 1, 0, sound_pitch)
|
||||
|
||||
if (src.harmful)
|
||||
for (var/mob/living/M in hearers(world.view, O))
|
||||
if (issilicon(M) || isintangible(M))
|
||||
continue
|
||||
if (!M.ears_protected_from_sound())
|
||||
boutput(M, "<span style=\"color:red\">The loud, horrible noises painfully batter your eardrums!</span>")
|
||||
else
|
||||
continue
|
||||
|
||||
var/weak = 0
|
||||
var/ear_damage = 2
|
||||
var/ear_tempdeaf = 4
|
||||
if (prob(10))
|
||||
weak = 2
|
||||
|
||||
M.apply_sonic_stun(weak, 0, 0, 0, 0, ear_damage, ear_tempdeaf)
|
||||
|
||||
return
|
||||
@@ -0,0 +1,51 @@
|
||||
/obj/machinery/artifact/plant_helper
|
||||
name = "artifact plant_helper"
|
||||
associated_datum = /datum/artifact/plant_helper
|
||||
|
||||
/datum/artifact/plant_helper
|
||||
associated_object = /obj/machinery/artifact/plant_helper
|
||||
rarity_class = 2
|
||||
validtypes = list("martian","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/carbon_touch)
|
||||
activated = 0
|
||||
activ_text = "begins to radiate a strange energy field!"
|
||||
deact_text = "shuts down, causing the energy field to vanish!"
|
||||
react_xray = list(9,45,85,11,"ORGANIC")
|
||||
var/field_radius = 7
|
||||
var/list/helpers = list("water") // make it a bit more modular
|
||||
|
||||
New()
|
||||
..()
|
||||
src.react_heat[2] = "SUPERFICIAL DAMAGE DETECTED"
|
||||
src.field_radius = rand(2,9) // field radius
|
||||
if (prob(80))
|
||||
src.helpers.Add("growth")
|
||||
if (prob(60))
|
||||
src.helpers.Add("health")
|
||||
if (prob(40))
|
||||
src.helpers.Add("weedkiller")
|
||||
if (prob(20))
|
||||
src.helpers.Add("mutation")
|
||||
|
||||
effect_process(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
for (var/obj/machinery/plantpot/P in range(O,src.field_radius))
|
||||
var/datum/plant/growing = P.current
|
||||
for (var/X in src.helpers)
|
||||
if (X == "water")
|
||||
var/wateramt = P.reagents.get_reagent_amount("water")
|
||||
if(wateramt > 200)
|
||||
P.reagents.remove_reagent("water", 1)
|
||||
if(wateramt < 100)
|
||||
P.reagents.add_reagent("water", 1)
|
||||
if (X == "growth" && growing)
|
||||
P.growth++
|
||||
if (X == "health" && growing)
|
||||
P.health++
|
||||
if (X == "weedkiller" && growing)
|
||||
if (growing.growthmode == "weed")
|
||||
P.health -= 3
|
||||
if (X == "mutation" && growing)
|
||||
if (prob(8))
|
||||
P.HYPmutateplant()
|
||||
@@ -0,0 +1,72 @@
|
||||
/obj/machinery/artifact/turret
|
||||
name = "artifact turret"
|
||||
associated_datum = /datum/artifact/turret
|
||||
|
||||
/datum/artifact/turret
|
||||
associated_object = /obj/machinery/artifact/turret
|
||||
rarity_class = 3
|
||||
validtypes = list("wizard","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch,/datum/artifact_trigger/silicon_touch)
|
||||
activated = 0
|
||||
activ_text = "uncovers an array of guns!"
|
||||
deact_text = "retracts the guns back into itself and falls quiet!"
|
||||
react_xray = list(9,40,80,8,"SEGMENTED")
|
||||
var/cycles_without_target = 0
|
||||
var/cycles_until_shutdown = 10
|
||||
var/capricious = 0
|
||||
var/shot_range = 3
|
||||
var/datum/projectile/artifact/bullet = null
|
||||
var/mob/living/friend = null
|
||||
var/mob/living/current_target = null
|
||||
examine_hint = "It is covered in very conspicuous markings."
|
||||
|
||||
New()
|
||||
bullet = new /datum/projectile/artifact
|
||||
shot_range = rand(2,6)
|
||||
if (prob(20))
|
||||
capricious = 1
|
||||
bullet.randomise()
|
||||
|
||||
effect_touch(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
if (src.capricious > -1)
|
||||
if (!src.friend || src.capricious)
|
||||
src.friend = user
|
||||
|
||||
effect_process(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
var/turf/T = get_turf(O)
|
||||
if (!current_target)
|
||||
var/list/valid_targets = list()
|
||||
for (var/mob/living/M in view(shot_range,O))
|
||||
if (!target_is_valid(M,O))
|
||||
continue
|
||||
valid_targets += M
|
||||
if (valid_targets.len > 0)
|
||||
current_target = pick(valid_targets)
|
||||
T.visible_message("<b>[O]</b> turns to face [current_target]!")
|
||||
cycles_without_target = 0
|
||||
else
|
||||
cycles_without_target++
|
||||
if (cycles_without_target >= cycles_until_shutdown)
|
||||
cycles_without_target = 0
|
||||
O.ArtifactDeactivated()
|
||||
else
|
||||
if (target_is_valid(current_target,O) && istype(bullet,/datum/projectile/artifact))
|
||||
shoot_projectile_ST(O, bullet, current_target)
|
||||
else
|
||||
current_target = null
|
||||
|
||||
proc/target_is_valid(var/mob/living/M,var/obj/O)
|
||||
if (!M || !O)
|
||||
return 0
|
||||
if (M.stat == 2)
|
||||
return 0
|
||||
if (M == friend)
|
||||
return 0
|
||||
if (get_dist(M,O) > shot_range)
|
||||
return 0
|
||||
return 1
|
||||
@@ -0,0 +1,223 @@
|
||||
// base
|
||||
|
||||
/datum/artifact/bomb
|
||||
associated_object = null
|
||||
rarity_class = 0
|
||||
validtypes = list("ancient","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/cold,/datum/artifact_trigger/radiation)
|
||||
react_xray = list(12,75,30,11,"COMPLEX")
|
||||
var/explode_delay = 600
|
||||
var/dud = 0
|
||||
var/warning_initial = "begins catastrophically overloading!"
|
||||
var/warning_final = "reaches critical energy levels!"
|
||||
var/text_disarmed = "goes quiet."
|
||||
var/text_dud = "sputters and rattles a bit, then falls quiet."
|
||||
var/flascustomization_first_color = "#FF0000"
|
||||
var/sound/alarm_initial = 'sound/machines/lavamoon_plantalarm.ogg'
|
||||
var/sound/alarm_final = 'sound/machines/engine_alert1.ogg'
|
||||
examine_hint = "It is covered in very conspicuous markings."
|
||||
|
||||
New()
|
||||
..()
|
||||
src.react_heat[2] = "VOLATILE REACTION DETECTED"
|
||||
if (artitype != "eldritch" && prob(5))
|
||||
dud = 1
|
||||
|
||||
effect_activate(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
if (explode_delay < 1)
|
||||
deploy_payload(O)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(O)
|
||||
|
||||
if (warning_initial)
|
||||
T.visible_message("<b>[O] [warning_initial]</b>")
|
||||
if (alarm_initial)
|
||||
playsound(T, alarm_initial, 50, 1, -1)
|
||||
|
||||
spawn(src.explode_delay)
|
||||
if (warning_final)
|
||||
T.visible_message("<b>[O] [warning_final]</b>")
|
||||
if (alarm_final)
|
||||
playsound(T, alarm_final, 50, 1, -1)
|
||||
animate_flash_color_fill(O,flascustomization_first_color,10,3)
|
||||
|
||||
spawn(30)
|
||||
if (src.activated)
|
||||
deploy_payload(O)
|
||||
else
|
||||
T.visible_message("<b>[O] [text_disarmed]")
|
||||
|
||||
proc/deploy_payload(var/obj/O)
|
||||
if (!O)
|
||||
return 1
|
||||
if (dud)
|
||||
var/turf/T = get_turf(O)
|
||||
T.visible_message("<b>[O] [text_dud]")
|
||||
O.ArtifactDeactivated()
|
||||
return 1
|
||||
|
||||
// Added (Convair880).
|
||||
ArtifactLogs(usr, null, O, "detonated", null, 1)
|
||||
|
||||
return 0
|
||||
|
||||
// regular explosives
|
||||
|
||||
/obj/artifact/bomb
|
||||
name = "artifact bomb"
|
||||
associated_datum = /datum/artifact/bomb/explosive
|
||||
|
||||
/datum/artifact/bomb/explosive
|
||||
associated_object = /obj/artifact/bomb
|
||||
rarity_class = 3
|
||||
var/exp_deva = 1
|
||||
var/exp_hevy = 2
|
||||
var/exp_lite = 3
|
||||
|
||||
New()
|
||||
..()
|
||||
src.exp_deva = rand(0,3)
|
||||
src.exp_hevy = rand(3,6)
|
||||
src.exp_lite = rand(6,9)
|
||||
|
||||
deploy_payload(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
explosion(O, O.loc, src.exp_deva, src.exp_hevy, src.exp_lite, src.exp_lite * 2)
|
||||
|
||||
O.ArtifactDestroyed()
|
||||
|
||||
/obj/artifact/bomb/devastating
|
||||
name = "artifact devastating bomb"
|
||||
associated_datum = /datum/artifact/bomb/explosive/devastating
|
||||
|
||||
/datum/artifact/bomb/explosive/devastating
|
||||
associated_object = /obj/artifact/bomb/devastating
|
||||
rarity_class = 4
|
||||
|
||||
New()
|
||||
..()
|
||||
src.exp_deva *= rand(3,5)
|
||||
src.exp_hevy *= rand(4,6)
|
||||
src.exp_lite *= rand(5,7)
|
||||
src.explode_delay *= 2
|
||||
|
||||
// black hole bomb
|
||||
|
||||
/obj/artifact/bomb/blackhole
|
||||
name = "artifact black hole bomb"
|
||||
associated_datum = /datum/artifact/bomb/blackhole
|
||||
|
||||
/datum/artifact/bomb/blackhole
|
||||
associated_object = /obj/artifact/bomb/blackhole
|
||||
rarity_class = 4
|
||||
react_xray = list(12,75,30,11,"ULTRADENSE")
|
||||
warning_initial = "begins intensifying its own gravity!"
|
||||
warning_final = "begins to collapse in on itself!"
|
||||
|
||||
deploy_payload(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
var/turf/T = get_turf(O)
|
||||
playsound(T, "sound/machines/satcrash.ogg", 100, 0, 3, 0.8)
|
||||
new /obj/bhole(O.loc,rand(100,300))
|
||||
|
||||
if (O)
|
||||
O.ArtifactDestroyed()
|
||||
|
||||
// chemical bombs
|
||||
|
||||
/obj/artifact/bomb/chemical
|
||||
name = "artifact chemical bomb"
|
||||
associated_datum = /datum/artifact/bomb/chemical
|
||||
|
||||
New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(10000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
/datum/artifact/bomb/chemical
|
||||
explode_delay = 0
|
||||
react_xray = list(5,65,20,11,"HOLLOW")
|
||||
validtypes = list("ancient","martian","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/heat,/datum/artifact_trigger/carbon_touch)
|
||||
var/payload_type = 0 // 0 for smoke, 1 for foam
|
||||
var/recharge_delay = 600
|
||||
var/list/payload_reagents = list()
|
||||
|
||||
post_setup()
|
||||
payload_type = rand(0,1)
|
||||
var/list/potential_reagents = list()
|
||||
switch(artitype)
|
||||
if ("ancient")
|
||||
// industrial heavy machinery kinda stuff
|
||||
potential_reagents = list("nanites","liquid plasma","mercury","lithium","plasma","radium","uranium","napalm",
|
||||
"thermite","fuel","acid","silicate","lube","cryostylane","oil")
|
||||
if ("martian")
|
||||
// medicine, some poisons, some gross stuff
|
||||
potential_reagents = list("charcoal","stypic_powder","salbutamol","anti_rad","silver_sulfadiazine","synaptizine",
|
||||
"omnizine","synthflesh","cyanide","sonambutril","toxin","neurotoxin","mutagen","fake_initropidril",
|
||||
"toxic_slurry","jenkem","space_fungus","blood","vomit","gvomit","urine","meat_slurry","grease")
|
||||
if ("eldritch")
|
||||
// all the worst stuff. all of it
|
||||
potential_reagents = list("chlorine","fluorine","lithium","mercury","plasma","radium","uranium","strange_reagent",
|
||||
"napalm","thermite","infernite","foof","fuel","blackpowder","acid","amanitin","coniine","cyanide","curare",
|
||||
"formaldehyde","lipolicide","initropidril","cholesterol","itching","pacid","pancuronium","polonium",
|
||||
"sodium_thiopental","sonambutril","sulfonal","toxin","venom","neurotoxin","mutagen","wolfsbane",
|
||||
"toxic_slurry","histamine","sarin")
|
||||
else
|
||||
// absolutely everything
|
||||
potential_reagents = all_functional_reagent_ids
|
||||
|
||||
if (potential_reagents.len > 0)
|
||||
var/looper = rand(2,8)
|
||||
while (looper > 0)
|
||||
looper--
|
||||
payload_reagents += pick(potential_reagents)
|
||||
|
||||
recharge_delay = rand(200,800)
|
||||
|
||||
deploy_payload(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
|
||||
var/list/reaction_reagents = list()
|
||||
|
||||
for (var/X in payload_reagents)
|
||||
reaction_reagents += X
|
||||
|
||||
if (payload_type)
|
||||
reaction_reagents += "fluorosurfactant"
|
||||
reaction_reagents += "water"
|
||||
else
|
||||
reaction_reagents += "potassium"
|
||||
reaction_reagents += "sugar"
|
||||
reaction_reagents += "phosphorus"
|
||||
|
||||
var/amountper = 0
|
||||
if (reaction_reagents.len > 0)
|
||||
amountper = round(O.reagents.maximum_volume / reaction_reagents.len)
|
||||
else
|
||||
amountper = 20
|
||||
|
||||
for (var/X in reaction_reagents)
|
||||
O.reagents.add_reagent(X,amountper)
|
||||
|
||||
if (payload_type)
|
||||
var/turf/location = get_turf(O)
|
||||
var/datum/effects/system/foam_spread/s = new()
|
||||
s.set_up(O.reagents.total_volume, location, O.reagents, 0)
|
||||
s.start()
|
||||
else
|
||||
smoke_reaction(O.reagents, 4, get_turf(O))
|
||||
|
||||
O.reagents.clear_reagents()
|
||||
|
||||
spawn(recharge_delay)
|
||||
if (O)
|
||||
O.ArtifactDeactivated()
|
||||
@@ -0,0 +1,62 @@
|
||||
/obj/artifact/borgifier
|
||||
name = "artifact human2cyborg converter"
|
||||
associated_datum = /datum/artifact/borgifier
|
||||
|
||||
/datum/artifact/borgifier
|
||||
associated_object = /obj/artifact/borgifier
|
||||
rarity_class = 3
|
||||
validtypes = list("ancient")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch)
|
||||
activated = 0
|
||||
react_xray = list(13,60,80,6,"COMPLEX")
|
||||
touch_descriptors = list("You seem to have a little difficulty taking your hand off its surface.")
|
||||
var/converting = 0
|
||||
var/list/work_sounds = list('sound/effects/bloody_stab.ogg','sound/effects/clang.ogg','sound/effects/airbridge_dpl.ogg','sound/effects/splat.ogg','sound/misc/loudcrunch2.ogg','sound/effects/attackblob.ogg')
|
||||
|
||||
effect_touch(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
if (!user)
|
||||
return
|
||||
if (converting)
|
||||
return
|
||||
if (istype(user,/mob/living/carbon/human/))
|
||||
O.visible_message("<span style=\"color:red\"><b>[O]</b> suddenly pulls [user.name] inside and slams shut!</span>")
|
||||
user.emote("scream")
|
||||
user.set_loc(O.loc)
|
||||
converting = 1
|
||||
var/loops = rand(10,20)
|
||||
while (loops > 0)
|
||||
loops--
|
||||
random_brute_damage(user, 15)
|
||||
user.paralysis = 5
|
||||
playsound(user.loc, pick(work_sounds), 50, 1, -1)
|
||||
sleep(4)
|
||||
|
||||
var/bdna = null // For forensics (Convair880).
|
||||
var/btype = null
|
||||
if (user.bioHolder.Uid && user.bioHolder.bloodType)
|
||||
bdna = user.bioHolder.Uid
|
||||
btype = user.bioHolder.bloodType
|
||||
var/turf/T = find_loc(user)
|
||||
gibs(T, null, null, bdna, btype)
|
||||
|
||||
ArtifactLogs(user, null, O, "touched", "robotizing user", 0) // Added (Convair880).
|
||||
|
||||
if (ismonkey(user))
|
||||
user.ghostize()
|
||||
var/robopath = pick(/obj/machinery/bot/guardbot,/obj/machinery/bot/secbot,
|
||||
/obj/machinery/bot/medbot,/obj/machinery/bot/firebot,/obj/machinery/bot/cleanbot,
|
||||
/obj/machinery/bot/floorbot)
|
||||
new robopath (T)
|
||||
qdel(user)
|
||||
else
|
||||
var/mob/living/carbon/human/M = user
|
||||
M.Robotize_MK2(1)
|
||||
score_cyborgsmade += 1
|
||||
converting = 0
|
||||
else if (istype(user,/mob/living/silicon/))
|
||||
boutput(user, "<span style=\"color:red\">An imperious voice rings out in your head... \"<b>HUNT BIOLOGICALS FOR UPGRADING\"</span>")
|
||||
else
|
||||
return
|
||||
@@ -0,0 +1,73 @@
|
||||
/obj/artifact/container
|
||||
name = "artifact sealed container"
|
||||
associated_datum = /datum/artifact/container
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
..()
|
||||
|
||||
ArtifactActivated(var/mob/living/user as mob)
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (A.activated)
|
||||
return
|
||||
A.activated = 1
|
||||
playsound(src.loc, A.activ_sound, 100, 1)
|
||||
src.overlays += A.fx_image
|
||||
src.visible_message("<b>[src] seems like it has something inside it...</b>")
|
||||
switch(rand(1,4))
|
||||
if(1)
|
||||
if(prob(5))
|
||||
new/obj/item/artifact/activator_key(src)
|
||||
else
|
||||
new/obj/item/cell/artifact(src)
|
||||
new/obj/item/cell/artifact(src)
|
||||
new/obj/item/cell/artifact(src)
|
||||
if(2)
|
||||
if(prob(5))
|
||||
new/obj/critter/domestic_bee/buddy(src)
|
||||
new/obj/item/clothing/suit/bee(src)
|
||||
else
|
||||
new/obj/critter/domestic_bee_larva(src)
|
||||
new/obj/critter/domestic_bee_larva(src)
|
||||
new/obj/critter/domestic_bee_larva(src)
|
||||
new/obj/critter/domestic_bee_larva(src)
|
||||
new/obj/critter/domestic_bee_larva(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
new/obj/item/gimmickbomb/owlclothes(src)
|
||||
new/obj/item/gimmickbomb/owlclothes(src)
|
||||
new/obj/item/gimmickbomb/owlclothes(src)
|
||||
new/obj/item/gimmickbomb/owlclothes(src)
|
||||
new/obj/item/gimmickbomb/owlclothes(src)
|
||||
else
|
||||
new/obj/item/gimmickbomb/owlclothes(src)
|
||||
if(4)
|
||||
new/obj/item/old_grenade/light_gimmick(src)
|
||||
|
||||
/datum/artifact/container
|
||||
associated_object = /obj/artifact/container
|
||||
rarity_class = 1
|
||||
validtypes = list("ancient","martian","wizard","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch,/datum/artifact_trigger/silicon_touch)
|
||||
activ_text = "deposits its contents on the ground."
|
||||
deact_text = "ceases functioning."
|
||||
react_xray = list(7,50,40,11,"HOLLOW")
|
||||
|
||||
New()
|
||||
..()
|
||||
src.react_heat[2] = "HIGH INTERNAL CONVECTION"
|
||||
|
||||
effect_touch(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
for(var/obj/I in O.contents)
|
||||
I.set_loc(O.loc)
|
||||
for(var/mob/N in viewers(O, null))
|
||||
N.flash(30)
|
||||
if(N.client)
|
||||
shake_camera(N, 6, 4)
|
||||
O.visible_message("<span style=\"color:red\"><b>With a blinding light [O] vanishes, leaving its contents behind.</b></span>")
|
||||
playsound(O.loc, "sound/effects/warp2.ogg", 50, 1)
|
||||
artifact_controls.artifacts -= src
|
||||
qdel(O)
|
||||
return
|
||||
@@ -0,0 +1,53 @@
|
||||
/obj/artifact/darkness_field
|
||||
name = "artifact darkness field"
|
||||
associated_datum = /datum/artifact/darkness_field
|
||||
|
||||
/datum/artifact/darkness_field
|
||||
associated_object = /obj/artifact/darkness_field
|
||||
rarity_class = 2
|
||||
max_triggers = 3
|
||||
validtypes = list("wizard","eldritch","precursor")
|
||||
react_xray = list(15,90,90,11,"NONE")
|
||||
var/field_radius = 0
|
||||
var/field_time = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
field_radius = rand(2,8)
|
||||
if (prob(1))
|
||||
field_radius *= 2
|
||||
field_time = rand(300,1800)
|
||||
|
||||
effect_activate(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
O.visible_message("<span style=\"color:red\"><b>[O]</b> emits a wave of absolute darkness!</span>")
|
||||
O.anchored = 1
|
||||
for(var/turf/T in circular_range(O,field_radius))
|
||||
new /obj/darkness_field(T,field_time)
|
||||
spawn(field_time)
|
||||
if (O)
|
||||
O.anchored = 0
|
||||
O.ArtifactDeactivated()
|
||||
return
|
||||
|
||||
/obj/darkness_field
|
||||
name = ""
|
||||
desc = ""
|
||||
alpha = 0
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
color = "#000000"
|
||||
blend_mode = 1
|
||||
anchored = 1
|
||||
density = 0
|
||||
opacity = 0
|
||||
layer = NOLIGHT_EFFECTS_LAYER_BASE
|
||||
mouse_opacity = 0
|
||||
|
||||
New(var/loc,var/duration)
|
||||
..()
|
||||
animate(src, time = 20, alpha = 255, easing = LINEAR_EASING)
|
||||
spawn(duration)
|
||||
animate(src, time = 20, alpha = 0, easing = LINEAR_EASING)
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
@@ -0,0 +1,55 @@
|
||||
/obj/artifact/forcefield_generator
|
||||
name = "artifact forcefield generator"
|
||||
associated_datum = /datum/artifact/forcefield_gen
|
||||
|
||||
/datum/artifact/forcefield_gen
|
||||
associated_object = /obj/artifact/forcefield_generator
|
||||
rarity_class = 1
|
||||
validtypes = list("wizard","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/carbon_touch,
|
||||
/datum/artifact_trigger/silicon_touch)
|
||||
activated = 0
|
||||
activ_text = "comes to life, projecting out a wall of force!"
|
||||
deact_text = "shuts down, causing the forcefield to vanish!"
|
||||
react_xray = list(13,60,95,11,"NONE")
|
||||
var/cooldown = 80
|
||||
var/field_radius = 3
|
||||
var/field_time = 80
|
||||
var/icon_state = "shieldsparkles"
|
||||
var/next_activate = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
src.icon_state = pick("shieldsparkles","empdisable","greenglow","enshield","energyorb","forcewall","meteor_shield")
|
||||
src.field_radius = rand(2,6) // forcefield radius
|
||||
src.field_time = rand(15,1500) // forcefield duration
|
||||
src.cooldown = rand(50, 1200)
|
||||
src.activ_sound = pick('sound/effects/mag_forcewall.ogg','sound/effects/mag_warp.ogg','sound/effects/MagShieldUp.ogg')
|
||||
src.deact_sound = pick('sound/effects/MagShieldDown.ogg','sound/effects/shielddown2.ogg','sound/effects/singsuck.ogg')
|
||||
|
||||
may_activate(var/obj/O)
|
||||
if (!..())
|
||||
return 0
|
||||
if (ticker.round_elapsed_ticks < next_activate)
|
||||
O.visible_message("<span style=\"color:red\">[O] emits a loud pop and lights up momentarily but nothing happens!</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
effect_activate(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
O.anchored = 1
|
||||
var/turf/Aloc = get_turf(O)
|
||||
var/list/forcefields = list()
|
||||
for (var/turf/T in range(field_radius,Aloc))
|
||||
if(get_dist(O,T) == field_radius)
|
||||
var/obj/forcefield/wand/FF = new /obj/forcefield/wand(T,0,src.icon_state)
|
||||
forcefields += FF
|
||||
spawn(field_time)
|
||||
for (var/obj/forcefield/F in forcefields)
|
||||
forcefields -= F
|
||||
qdel(F)
|
||||
next_activate = ticker.round_elapsed_ticks + cooldown
|
||||
if (O)
|
||||
O.ArtifactDeactivated()
|
||||
O.anchored = 0
|
||||
@@ -0,0 +1,54 @@
|
||||
/obj/artifact/healer_bio
|
||||
name = "artifact carbon healer"
|
||||
associated_datum = /datum/artifact/healer_bio
|
||||
|
||||
/datum/artifact/healer_bio
|
||||
associated_object = /obj/artifact/healer_bio
|
||||
rarity_class = 1
|
||||
validtypes = list("martian","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch)
|
||||
activated = 0
|
||||
activ_text = "begins to pulse softly."
|
||||
deact_text = "ceases pulsing."
|
||||
react_xray = list(11,70,90,9,"NONE")
|
||||
var/heal_amt = 20
|
||||
var/field_range = 0
|
||||
var/recharge_time = 600
|
||||
var/recharging = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
src.react_heat[2] = "SUPERFICIAL DAMAGE DETECTED"
|
||||
if(prob(20))
|
||||
src.field_range = rand(3,10) // range
|
||||
src.heal_amt = rand(5,75) // amount of healing
|
||||
src.recharge_time = rand(1,10) * 10
|
||||
if(prob(5))
|
||||
src.recharge_time = 0
|
||||
|
||||
effect_touch(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
if (!user)
|
||||
return
|
||||
var/turf/T = get_turf(O)
|
||||
if (recharging)
|
||||
boutput(user, "<span style=\"color:red\">The artifact pulses briefly, but nothing else happens.</span>")
|
||||
return
|
||||
if (recharge_time > 0)
|
||||
recharging = 1
|
||||
T.visible_message("<b>[O]</b> emits a wave of energy!")
|
||||
if(istype(user,/mob/living/carbon/))
|
||||
var/mob/living/carbon/C = user
|
||||
C.HealDamage("All", heal_amt, heal_amt)
|
||||
boutput(C, "<span style=\"color:blue\">Soothing energy saturates your body, making you feel refreshed and healthy.</span>")
|
||||
if (field_range > 0)
|
||||
for (var/mob/living/carbon/C in range(field_range,T))
|
||||
if (C == user)
|
||||
continue
|
||||
C.HealDamage("All", heal_amt, heal_amt)
|
||||
boutput(C, "<span style=\"color:blue\">Waves of soothing energy wash over you, making you feel refreshed and healthy.</span>")
|
||||
spawn(recharge_time)
|
||||
recharging = 0
|
||||
T.visible_message("<b>[O]</b> becomes energized.")
|
||||
@@ -0,0 +1,56 @@
|
||||
/obj/artifact/injector
|
||||
name = "artifact injector"
|
||||
associated_datum = /datum/artifact/injector
|
||||
|
||||
/datum/artifact/injector
|
||||
associated_object = /obj/artifact/injector
|
||||
rarity_class = 2
|
||||
validtypes = list("ancient","martian","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch,/datum/artifact_trigger/silicon_touch,
|
||||
/datum/artifact_trigger/cold)
|
||||
activ_text = "opens up, revealing an array of strange needles!"
|
||||
deact_text = "closes itself up."
|
||||
react_xray = list(8,60,75,11,"SEGMENTED")
|
||||
var/list/injection_reagents = list()
|
||||
var/injection_amount = 10
|
||||
|
||||
post_setup()
|
||||
var/list/potential_reagents = list()
|
||||
switch(artitype)
|
||||
if ("ancient")
|
||||
// industrial heavy machinery kinda stuff
|
||||
potential_reagents = list("nanites","liquid plasma","mercury","lithium","plasma","radium","uranium","cryostylane")
|
||||
if ("martian")
|
||||
// medicine, some poisons, some gross stuff
|
||||
potential_reagents = list("charcoal","salbutamol","anti_rad","synaptizine","omnizine","synthflesh",
|
||||
"cyanide","sonambutril","toxin","neurotoxin","mutagen","fake_initropidril",
|
||||
"toxic_slurry","space_fungus","blood","urine","meat_slurry")
|
||||
if ("eldritch")
|
||||
// all the worst stuff. all of it
|
||||
potential_reagents = list("chlorine","fluorine","lithium","mercury","plasma","radium","uranium","strange_reagent",
|
||||
"amanitin","coniine","cyanide","curare",
|
||||
"formaldehyde","lipolicide","initropidril","cholesterol","itching","pancuronium","polonium",
|
||||
"sodium_thiopental","sonambutril","sulfonal","toxin","venom","neurotoxin","mutagen","wolfsbane",
|
||||
"toxic_slurry","histamine","sarin")
|
||||
else
|
||||
// absolutely everything
|
||||
potential_reagents = all_functional_reagent_ids
|
||||
|
||||
if (potential_reagents.len > 0)
|
||||
var/looper = rand(1,3)
|
||||
while (looper > 0)
|
||||
looper--
|
||||
injection_reagents += pick(potential_reagents)
|
||||
|
||||
injection_amount = rand(3,25)
|
||||
|
||||
effect_touch(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
if (user.reagents && injection_reagents.len > 0)
|
||||
var/turf/T = get_turf(O)
|
||||
T.visible_message("<b>[O]</b> jabs [user] with a needle and injects something!")
|
||||
for (var/X in injection_reagents)
|
||||
ArtifactLogs(user, null, O, "touched by [user.real_name]", "injecting [X]", 0) // Added (Convair880).
|
||||
user.reagents.add_reagent(X,injection_amount)
|
||||
@@ -0,0 +1,44 @@
|
||||
/obj/artifact/lamp
|
||||
name = "artifact lamp"
|
||||
associated_datum = /datum/artifact/lamp
|
||||
var/light_brightness = 1
|
||||
var/light_R = 1
|
||||
var/light_G = 1
|
||||
var/light_B = 1
|
||||
var/datum/light/light
|
||||
|
||||
New()
|
||||
..()
|
||||
light_brightness = max(0.5, (rand(5, 20) / 10))
|
||||
light_R = rand(25,100) / 100
|
||||
light_G = rand(25,100) / 100
|
||||
light_B = rand(25,100) / 100
|
||||
light = new /datum/light/point
|
||||
light.set_brightness(light_brightness)
|
||||
light.set_color(light_R, light_G, light_B)
|
||||
light.attach(src)
|
||||
|
||||
/datum/artifact/lamp
|
||||
associated_object = /obj/artifact/lamp
|
||||
rarity_class = 1
|
||||
validtypes = list("martian","wizard","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch,/datum/artifact_trigger/silicon_touch,
|
||||
/datum/artifact_trigger/cold)
|
||||
activ_text = "begins to emit a steady light!"
|
||||
deact_text = "goes dark and quiet."
|
||||
react_xray = list(10,90,90,11,"NONE")
|
||||
|
||||
effect_activate(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
var/obj/artifact/lamp/L = O
|
||||
if (L.light)
|
||||
L.light.enable()
|
||||
|
||||
effect_deactivate(var/obj/O)
|
||||
if (..())
|
||||
return
|
||||
var/obj/artifact/lamp/L = O
|
||||
if (L.light)
|
||||
L.light.disable()
|
||||
@@ -0,0 +1,45 @@
|
||||
/obj/artifact/power_giver
|
||||
name = "artifact power giver"
|
||||
associated_datum = /datum/artifact/power_giver
|
||||
|
||||
/datum/artifact/power_giver
|
||||
associated_object = /obj/artifact/power_giver
|
||||
rarity_class = 3
|
||||
validtypes = list("martian","wizard","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch,/datum/artifact_trigger/silicon_touch,
|
||||
/datum/artifact_trigger/cold)
|
||||
activ_text = "begins glowing with an eerie light!"
|
||||
deact_text = "falls dark and quiet."
|
||||
react_xray = list(10,90,80,10,"NONE")
|
||||
var/power_granted = null
|
||||
var/power_time = 0
|
||||
var/recharge_time = 300
|
||||
var/ready = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
power_granted = pick("blind","mute","clumsy","fat","dwarf","fire_resist","cold_resist","resist_electric",
|
||||
"psy_resist","glowy","hulk","xray","horns","stinky","monkey","mattereater","jumpy","telepathy","empath",
|
||||
"immolate","eyebeams","melt")
|
||||
power_time = rand(30,180)
|
||||
if (prob(5))
|
||||
power_time = 0
|
||||
recharge_time = rand(100,600)
|
||||
if (prob(5))
|
||||
recharge_time = 0
|
||||
|
||||
effect_touch(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
if (!istype(user,/mob/living/carbon/))
|
||||
return
|
||||
if (user.bioHolder && ready)
|
||||
var/turf/T = get_turf(O)
|
||||
T.visible_message("<b>[O]</b> envelops [user] in a strange light!")
|
||||
user.bioHolder.AddEffect(power_granted,0,power_time)
|
||||
if (recharge_time > 0)
|
||||
ready = 0
|
||||
spawn(recharge_time)
|
||||
T.visible_message("<b>[O]</b> begins to glow again.")
|
||||
ready = 1
|
||||
@@ -0,0 +1,39 @@
|
||||
/obj/artifact/prison
|
||||
name = "artifact imprisoner"
|
||||
associated_datum = /datum/artifact/prison
|
||||
|
||||
/datum/artifact/prison
|
||||
associated_object = /obj/artifact/prison
|
||||
rarity_class = 2
|
||||
min_triggers = 2
|
||||
max_triggers = 2
|
||||
validtypes = list("ancient","martian","wizard","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/carbon_touch,/datum/artifact_trigger/silicon_touch)
|
||||
react_xray = list(15,90,90,11,"HOLLOW")
|
||||
touch_descriptors = list("You seem to have a little difficulty taking your hand off its surface.")
|
||||
var/mob/living/prisoner = null
|
||||
var/imprison_time = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
imprison_time = rand(50,1200)
|
||||
|
||||
effect_touch(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
if (!user)
|
||||
return
|
||||
if (prisoner)
|
||||
return
|
||||
if (istype(user,/mob/living/))
|
||||
O.visible_message("<span style=\"color:red\"><b>[O]</b> suddenly pulls [user.name] inside and slams shut!</span>")
|
||||
user.set_loc(O)
|
||||
prisoner = user
|
||||
spawn(imprison_time)
|
||||
for(var/obj/I in O.contents)
|
||||
I.set_loc(get_turf(O))
|
||||
prisoner.set_loc(get_turf(O))
|
||||
prisoner = null
|
||||
O.visible_message("<span style=\"color:red\"><b>[O]</b> releases [user.name] and shuts down!</span>")
|
||||
O.ArtifactDeactivated()
|
||||
return
|
||||
@@ -0,0 +1,31 @@
|
||||
/obj/artifact/teleport_recaller
|
||||
name = "artifact recaller"
|
||||
associated_datum = /datum/artifact/recaller
|
||||
|
||||
/datum/artifact/recaller
|
||||
associated_object = /obj/artifact/teleport_recaller
|
||||
rarity_class = 2
|
||||
validtypes = list("wizard","eldritch","precursor")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch,/datum/artifact_trigger/silicon_touch)
|
||||
activated = 0
|
||||
react_xray = list(15,75,90,3,"ANOMALOUS")
|
||||
var/recall_delay = 10
|
||||
|
||||
New()
|
||||
..()
|
||||
src.recall_delay = rand(2,600) // how long *10 it takes for the recall to happen
|
||||
src.recall_delay *= 10
|
||||
|
||||
effect_touch(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
if (!user)
|
||||
return
|
||||
|
||||
spawn(src.recall_delay)
|
||||
user.visible_message("<span style=\"color:red\"><b>[user]</b> is suddenly pulled through space!</span>")
|
||||
playsound(user.loc, "sound/effects/mag_warp.ogg", 50, 1, -1)
|
||||
var/turf/T = get_turf(O)
|
||||
if (T)
|
||||
user.set_loc(T)
|
||||
@@ -0,0 +1,92 @@
|
||||
/obj/artifact/wish_granter
|
||||
name = "artifact wish granter"
|
||||
associated_datum = /datum/artifact/wish_granter
|
||||
|
||||
/datum/artifact/wish_granter
|
||||
associated_object = /obj/artifact/wish_granter
|
||||
rarity_class = 4
|
||||
validtypes = list("wizard","eldritch")
|
||||
validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/cold)
|
||||
activ_text = "begins glowing with an enticing light!"
|
||||
deact_text = "falls dark and quiet."
|
||||
react_xray = list(666,666,666,11,"NONE")
|
||||
var/list/wish_granted = list()
|
||||
var/evil = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
if (prob(50))
|
||||
evil = 1
|
||||
|
||||
effect_touch(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
if (!istype(user,/mob/living/))
|
||||
return
|
||||
if (user.key in wish_granted)
|
||||
boutput(user, "<b>[O]</b> is silent.")
|
||||
return
|
||||
boutput(user, "<b>[O]</b> resonates, \"<big>I SHALL GRANT YOU ONE WISH...</big>\"")
|
||||
|
||||
var/list/wishes = list("I wish to become rich!","I wish for great power!")
|
||||
|
||||
var/wish = input("Make a wish?","[O]") as null|anything in wishes
|
||||
if (!wish)
|
||||
boutput(user, "You say nothing.")
|
||||
boutput(user, "<b>[O]</b> resonates, \"<big>YOU MAY RETURN LATER...</big>\"")
|
||||
return
|
||||
|
||||
wish_granted += user.key
|
||||
user.say(wish)
|
||||
sleep(5)
|
||||
boutput(user, "<b>[O]</b> resonates, \"<big>SO BE IT...</big>\"")
|
||||
playsound(O, "sound/effects/gong_rumble.ogg", 40, 1)
|
||||
O.visible_message("<span style=\"color:red\"><b>[O]</b> begins to charge up...</span>")
|
||||
sleep(30)
|
||||
if (prob(2))
|
||||
evil = !evil
|
||||
|
||||
if (evil)
|
||||
switch(wish)
|
||||
if("I wish to become rich!")
|
||||
O.visible_message("<span style=\"color:red\"><b>[O]</b> envelops [user] in a golden light!</span>")
|
||||
playsound(user, "sound/weapons/flashbang.ogg", 50, 1)
|
||||
for(var/mob/N in viewers(user, null))
|
||||
N.flash(30)
|
||||
if(N.client)
|
||||
shake_camera(N, 6, 4)
|
||||
user.desc = "A statue of someone very wealthy"
|
||||
user.become_gold_statue()
|
||||
|
||||
if("I wish for great power!")
|
||||
O.visible_message("<span style=\"color:red\"><b>[O] discharges a massive bolt of electricity!</b></span>")
|
||||
playsound(user, "sound/effects/elec_bigzap.ogg", 40, 1)
|
||||
var/list/affected = DrawLine(O,user,/obj/line_obj/elec,'icons/obj/projectiles.dmi',"WholeLghtn",1,1,"HalfStartLghtn","HalfEndLghtn",OBJ_LAYER,1,PreloadedIcon='icons/effects/LghtLine.dmi')
|
||||
for(var/obj/OB in affected)
|
||||
spawn(6)
|
||||
pool(OB)
|
||||
user.elecgib()
|
||||
else
|
||||
switch(wish)
|
||||
if("I wish to become rich!")
|
||||
O.visible_message("<span style=\"color:red\">A ton of money falls out of thin air! Woah!</span>")
|
||||
for(var/turf/T in range(user,3))
|
||||
if (T.density)
|
||||
continue
|
||||
new /obj/item/spacecash/million(T)
|
||||
|
||||
if("I wish for great power!")
|
||||
O.visible_message("<span style=\"color:red\"><b>[O]</b> envelops [user] in a brilliant light!</span>")
|
||||
if (ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if (H.bioHolder)
|
||||
H.bioHolder.RandomEffect("good")
|
||||
H.bioHolder.RandomEffect("good")
|
||||
H.bioHolder.RandomEffect("good")
|
||||
else if (istype(user,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if (istype(R.cell))
|
||||
R.cell.genrate = 100
|
||||
R.cell.maxcharge = 1000000
|
||||
R.cell.charge = R.cell.maxcharge
|
||||
@@ -0,0 +1,175 @@
|
||||
// MASTER DATUMS
|
||||
|
||||
/datum/artifact/
|
||||
var/associated_object = null
|
||||
var/rarity_class = 0
|
||||
|
||||
var/datum/artifact_origin/artitype = null
|
||||
var/list/validtypes = list("ancient","martian","wizard","eldritch","precursor")
|
||||
// During setup, artitype will be set from a pick() from within the validtypes list.
|
||||
// Keep it to only the five here or shit will probably get a bit weird. This allows us to exclude things that don't make
|
||||
// any sense such as martian robot builders or ancient robot plant seeds.
|
||||
|
||||
var/internal_name = null
|
||||
var/image/fx_image = null
|
||||
//var/image/effects_overlay = null
|
||||
var/obj/holder = null
|
||||
// These are automatically handled. They're used to make the artifact glow different colors.
|
||||
|
||||
var/activated = 0 // Is the artifact currently switched on?
|
||||
var/automatic_activation = 0 // Does the artifact switch itself on on spawn?
|
||||
var/activ_sound = null // What noise the artifact makes when it activates
|
||||
var/activ_text = null // What message the artifact transmits when it activates
|
||||
var/deact_sound = null // Guess.
|
||||
var/deact_text = null // No really, have a wild guess.
|
||||
var/scramblechance = 10 // how likely this artifact is to look like a type it isnt
|
||||
|
||||
var/list/faults = list() // Automatically handled
|
||||
var/list/fault_types = list() // this is set up based on the artifact's origin type
|
||||
|
||||
var/list/triggers = list()
|
||||
var/validtriggers = list(/datum/artifact_trigger/force,/datum/artifact_trigger/electric,/datum/artifact_trigger/heat,
|
||||
/datum/artifact_trigger/radiation,/datum/artifact_trigger/carbon_touch,/datum/artifact_trigger/silicon_touch)
|
||||
var/min_triggers = 1
|
||||
var/max_triggers = 1
|
||||
var/hint_text = "emits a faint noise."
|
||||
var/examine_hint = null
|
||||
|
||||
// These are used for module research
|
||||
var/list/module_research = list()
|
||||
var/module_research_insight = 1 // insight level into the origin of the artifact
|
||||
|
||||
var/health = 100
|
||||
// This is mostly used in the stimulus procs that deal with damaging the artifact and whatnot.
|
||||
// Once it hits 0 or below, the artifact is destroyed.
|
||||
|
||||
// these below are holders for data that will come back from the various artifact sensor test apparatus
|
||||
var/list/react_mpct = list(0,0)
|
||||
// Impact Pad - returns Vibration Amplitude, Vibration Frequency
|
||||
// react_mpct should be set up in the ArtifactSetup proc
|
||||
var/list/react_elec = list(0.1,0,0)
|
||||
// Electrobox - returns Returned Current, Circuit Capacity, Circuit Interference
|
||||
// react_elec should be set up in the item's New proc (NOT the datum's!)
|
||||
var/list/react_heat = list(1,"NONE")
|
||||
// Heat Plate - returns Artifact Temp, Heat Response, Cold Response, Details
|
||||
// react_heat - set up first var in ArtifactSetup, the rest in the individual datums
|
||||
var/list/react_xray = list(10,100,100,11,"NONE")
|
||||
// X-ray - returns Density, Structural Consistency, Structural Integrity, Response, Special Features
|
||||
// react_xray should be set as a variable on the artifact datum
|
||||
var/list/touch_descriptors = list()
|
||||
|
||||
proc/post_setup()
|
||||
return
|
||||
|
||||
proc/may_activate(var/obj/O)
|
||||
if (!O)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
// Added log entry calls here. See artifactprocs.dm for the proc (Convair880).
|
||||
proc/effect_activate(var/obj/O)
|
||||
if (!O)
|
||||
return 1
|
||||
O.add_fingerprint(usr)
|
||||
ArtifactLogs(usr, null, O, "activated", null, istype(src, /datum/artifact/bomb/) ? 1 : 0)
|
||||
return 0
|
||||
|
||||
proc/effect_deactivate(var/obj/O)
|
||||
if (!O)
|
||||
return 1
|
||||
O.add_fingerprint(usr)
|
||||
ArtifactLogs(usr, null, O, "deactivated", null, 0)
|
||||
return 0
|
||||
|
||||
proc/effect_process(var/obj/O)
|
||||
if (!O)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/effect_touch(var/obj/O,var/mob/living/user)
|
||||
if (!O || !user)
|
||||
return 1
|
||||
O.add_fingerprint(user)
|
||||
return 0
|
||||
|
||||
proc/effect_melee_attack(var/obj/O,var/mob/living/user,var/mob/living/target)
|
||||
if (!O || !user || !target)
|
||||
return 1
|
||||
O.add_fingerprint(user)
|
||||
ArtifactLogs(user, target, O, "weapon", null, 0)
|
||||
return 0
|
||||
|
||||
proc/effect_click_tile(var/obj/O,var/mob/living/user,var/turf/T)
|
||||
if (!O || !user || !T)
|
||||
return 1
|
||||
O.add_fingerprint(user)
|
||||
if (!istype(O, /obj/item/artifact/attack_wand)) // Special log handling required there.
|
||||
ArtifactLogs(user, T, O, "used", "triggering its effect on target turf", 0)
|
||||
return 0
|
||||
|
||||
proc/get_trigger_by_string(var/string)
|
||||
if (!istext(string))
|
||||
return null
|
||||
for (var/datum/artifact_trigger/AT in src.triggers)
|
||||
if (AT.stimulus_required == string)
|
||||
return AT
|
||||
return null
|
||||
|
||||
proc/get_trigger_by_path(var/path)
|
||||
if (!ispath(path))
|
||||
return null
|
||||
for (var/datum/artifact_trigger/AT in src.triggers)
|
||||
if (AT.type == path)
|
||||
return AT
|
||||
return null
|
||||
|
||||
// SPECIFIC DATUMS
|
||||
|
||||
/datum/artifact/art
|
||||
validtypes = list("ancient","martian","wizard","eldritch","precursor")
|
||||
activated = 0
|
||||
min_triggers = 0
|
||||
max_triggers = 0
|
||||
react_xray = list(10,100,100,11,"NONE")
|
||||
|
||||
// DATUMS USED BY ARTIFACTS
|
||||
|
||||
/datum/projectile/artifact
|
||||
name = "energy bolt"
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "u_laser"
|
||||
power = 75
|
||||
cost = 25
|
||||
dissipation_rate = 0
|
||||
dissipation_delay = 50
|
||||
ks_ratio = 1.0
|
||||
sname = "energy bolt"
|
||||
shot_sound = 'sound/weapons/Taser.ogg'
|
||||
shot_number = 1
|
||||
damage_type = D_PIERCING
|
||||
hit_ground_chance = 90
|
||||
window_pass = 0
|
||||
|
||||
on_hit(atom/hit)
|
||||
return
|
||||
|
||||
proc/randomise()
|
||||
icon_state = pick("spark","laser","ibeam","u_laser","phaser_heavy","phaser_light","phaser_med","phaser_ultra","blue_spark","disrupt","disrupt_lethal","radbolt","crescent",
|
||||
"goo","40mmgatling","elecorb","purple_orb","triple")
|
||||
src.shot_sound = pick('sound/weapons/Taser.ogg','sound/weapons/flaregun.ogg','sound/weapons/Laser.ogg','sound/weapons/laserheavy.ogg','sound/weapons/laserlight.ogg','sound/weapons/lasermed.ogg','sound/weapons/laserultra.ogg','sound/weapons/grenade.ogg','sound/weapons/rocket.ogg','sound/weapons/snipershot.ogg','sound/weapons/TaserOLD.ogg','sound/weapons/ACgun1.ogg','sound/weapons/ACgun2.ogg')
|
||||
var/namep1 = pick("neutrino","meson","photon","quark","disruptor","atomic","zero point","tachyon","plasma","quantum","neutron","baryon","hadron","electron","positron")
|
||||
var/namep2 = pick("bolt","ray","beam","wave","burst","blast","torpedo","missile","bomb","shard","stream","string")
|
||||
src.name = "[namep1] [namep2]"
|
||||
// Now randomise the damage type, power, energy cost and other fun stuff
|
||||
|
||||
src.damage_type = pick(D_KINETIC,D_PIERCING,D_SLASHING,D_ENERGY,D_BURNING,D_RADIOACTIVE,D_TOXIC)
|
||||
src.power = rand(2,50)
|
||||
src.dissipation_rate = rand(1,power)
|
||||
src.dissipation_delay = rand(1,10)
|
||||
src.ks_ratio = pick(0, 1, prob(10); (rand(0, 10000) / 10000))
|
||||
|
||||
src.cost = rand(50,150)
|
||||
if (prob(20))
|
||||
src.window_pass = 1
|
||||
// Rare chance of the gun firing several shots in a burst
|
||||
shot_number = pick(1, prob(25); 2, prob(5); 3, prob(1); 4)
|
||||
@@ -0,0 +1,436 @@
|
||||
// Artifact Infrastructure Procs
|
||||
|
||||
/obj/landmark/artifact
|
||||
name = "artifact spawner"
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x3"
|
||||
anchored = 1.0
|
||||
var/spawnchance = 100 // prob chance out of 100 to spawn artifact at game start
|
||||
var/spawnpath = null // if you want a landmark to spawn a specific artifact rather than a random one
|
||||
|
||||
/obj/landmark/artifact/seed
|
||||
name = "artifact seed spawner"
|
||||
spawnpath = /obj/item/seed/alien
|
||||
|
||||
/obj/landmark/artifact/cannabis_seed
|
||||
name = "cannabis seed spawner"
|
||||
spawnpath = /obj/item/seed/cannabis
|
||||
// not actually an artifact but eh seeds are behaving oddly
|
||||
|
||||
/proc/Artifact_Spawn(var/atom/T,var/forceartitype)
|
||||
if (!T)
|
||||
return
|
||||
if (!istype(T,/turf/) && !istype(T,/obj/))
|
||||
return
|
||||
|
||||
var/rarityroll = 1
|
||||
|
||||
switch(rand(1,100))
|
||||
if (63 to 88)
|
||||
rarityroll = 2
|
||||
// 1 in 25
|
||||
if (89 to 99)
|
||||
rarityroll = 3
|
||||
// 1 in 10
|
||||
if (100)
|
||||
rarityroll = 4
|
||||
// 1 in 100
|
||||
else
|
||||
rarityroll = 1
|
||||
// 1 in 62
|
||||
|
||||
var/list/selection_pool = list()
|
||||
|
||||
for (var/datum/artifact/A in artifact_controls.artifact_types)
|
||||
if (A.rarity_class != rarityroll)
|
||||
continue
|
||||
if (istext(forceartitype) && !forceartitype in A.validtypes)
|
||||
continue
|
||||
selection_pool += A
|
||||
|
||||
if (selection_pool.len < 1)
|
||||
return
|
||||
|
||||
var/datum/artifact/picked = pick(selection_pool)
|
||||
if (!istype(picked,/datum/artifact/))
|
||||
return
|
||||
|
||||
if (istext(forceartitype))
|
||||
new picked.associated_object(T,forceartitype)
|
||||
else
|
||||
new picked.associated_object(T)
|
||||
|
||||
/obj/proc/ArtifactSanityCheck()
|
||||
// This proc is called in any other proc or thing that uses the new artifact shit. If there was an improper artifact variable
|
||||
// involved when trying to do the new shit, it would probably spew errors fucking everywhere and generally be horrible so if
|
||||
// the sanity check detects that an artifact doesn't have the proper shit set up it'll just wipe out the artifact and stop
|
||||
// the rest of the proc from occurring.
|
||||
// This proc should be called in an if statement at the start of every artifact proc, since it returns 0 or 1.
|
||||
if (!src.artifact)
|
||||
return 0
|
||||
// if the artifact var isn't set at all, it's probably not an artifact so don't bother continuing
|
||||
if (!istype(src.artifact,/datum/artifact/))
|
||||
logTheThing("debug", null, null, "<b>I Said No/Artifact:</b> Invalid artifact variable in [src.type] at [showCoords(src.x, src.y, src.z)]")
|
||||
qdel(src) // wipes itself out since if it's processing it'd be calling procs it can't use again and again
|
||||
return 0 // uh oh, we've got a poorly set up artifact and now we need to stop the proc that called it!
|
||||
else
|
||||
return 1 // give the all clear
|
||||
|
||||
/obj/proc/ArtifactSetup()
|
||||
// This proc gets called in every artifact's New() proc, after src.artifact is turned from a 1 into its appropriate datum.
|
||||
//It scrambles the name and appearance of the artifact so we can't tell what it is on sight or cursory examination.
|
||||
// Could potentially go in /obj/New(), but...
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
A.holder = src
|
||||
|
||||
var/datum/artifact_origin/AO = artifact_controls.get_origin_from_string(pick(A.validtypes))
|
||||
if (!istype(AO,/datum/artifact_origin/))
|
||||
qdel(src)
|
||||
return
|
||||
A.artitype = AO
|
||||
// Refers to the artifact datum's list of origins it's allowed to be from and selects one at random. This way we can avoid
|
||||
// stuff that doesn't make sense like ancient robot plant seeds or eldritch healing devices
|
||||
|
||||
var/datum/artifact_origin/appearance = artifact_controls.get_origin_from_string(AO.name)
|
||||
if (prob(A.scramblechance))
|
||||
appearance = null
|
||||
// rare-ish chance of an artifact appearing to be a different origin, just to throw things off
|
||||
|
||||
if (!istype(appearance,/datum/artifact_origin/))
|
||||
var/list/all_origin_names = list()
|
||||
for (var/datum/artifact_origin/O in artifact_controls.artifact_origins)
|
||||
all_origin_names += O.name
|
||||
appearance = artifact_controls.get_origin_from_string(pick(all_origin_names))
|
||||
|
||||
var/name1 = pick(appearance.adjectives)
|
||||
var/name2 = "thingy"
|
||||
if (istype(src,/obj/item/))
|
||||
name2 = pick(appearance.nouns_small)
|
||||
else
|
||||
name2 = pick(appearance.nouns_large)
|
||||
|
||||
src.name = "[name1] [name2]"
|
||||
src:real_name = "[name1] [name2]"
|
||||
desc = "You have no idea what this thing is!"
|
||||
A.touch_descriptors |= appearance.touch_descriptors
|
||||
|
||||
src.icon_state = appearance.name + "-[rand(1,appearance.max_sprites)]"
|
||||
if (istype(src,/obj/item/))
|
||||
var/obj/item/I = src
|
||||
I.item_state = appearance.name
|
||||
|
||||
A.fx_image = image(src.icon, src.icon_state + "fx")
|
||||
A.fx_image.color = rgb(rand(AO.fx_red_min,AO.fx_red_max),rand(AO.fx_green_min,AO.fx_green_max),rand(AO.fx_blue_min,AO.fx_blue_max))
|
||||
|
||||
A.react_mpct[1] = AO.impact_reaction_one
|
||||
A.react_mpct[2] = AO.impact_reaction_two
|
||||
A.react_heat[1] = AO.heat_reaction_one
|
||||
A.activ_sound = pick(AO.activation_sounds)
|
||||
A.fault_types |= AO.fault_types
|
||||
A.internal_name = AO.generate_name()
|
||||
|
||||
ArtifactDevelopFault(10)
|
||||
|
||||
if (A.automatic_activation)
|
||||
src.ArtifactActivated()
|
||||
else
|
||||
var/list/valid_triggers = A.validtriggers
|
||||
var/trigger_amount = rand(A.min_triggers,A.max_triggers)
|
||||
var/selection = null
|
||||
while (trigger_amount > 0)
|
||||
trigger_amount--
|
||||
selection = pick(valid_triggers)
|
||||
if (ispath(selection))
|
||||
var/datum/artifact_trigger/AT = new selection
|
||||
A.triggers += AT
|
||||
valid_triggers -= selection
|
||||
|
||||
artifact_controls.artifacts += src
|
||||
A.post_setup()
|
||||
|
||||
/obj/proc/ArtifactActivated()
|
||||
if (!src)
|
||||
return
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return 1
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (A.activated)
|
||||
return 1
|
||||
if (A.triggers.len < 1 && !A.automatic_activation)
|
||||
return 1 // can't activate these ones at all by design
|
||||
if (!A.may_activate(src))
|
||||
return 1
|
||||
if (A.activ_sound)
|
||||
playsound(src.loc, A.activ_sound, 100, 1)
|
||||
if (A.activ_text)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<b>[src] [A.activ_text]</b>")
|
||||
A.activated = 1
|
||||
src.overlays += A.fx_image
|
||||
A.effect_activate(src)
|
||||
|
||||
/obj/proc/ArtifactDeactivated()
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (A.deact_sound)
|
||||
playsound(src.loc, A.deact_sound, 100, 1)
|
||||
if (A.deact_text)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<b>[src] [A.deact_text]</b>")
|
||||
A.activated = 0
|
||||
src.overlays = null
|
||||
A.effect_deactivate(src)
|
||||
|
||||
/obj/proc/Artifact_attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/cargotele)) // Re-added (Convair880).
|
||||
var/obj/item/cargotele/CT = W
|
||||
CT.cargoteleport(src, user)
|
||||
return
|
||||
|
||||
if (istype(user,/mob/living/silicon/robot))
|
||||
src.ArtifactStimulus("silitouch", 1)
|
||||
|
||||
if (istype(W,/obj/item/artifact/activator_key))
|
||||
var/obj/item/artifact/activator_key/ACT = W
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
if (!W.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
var/datum/artifact/K = ACT.artifact
|
||||
|
||||
if (K.activated)
|
||||
if (ACT.universal || A.artitype == K.artitype)
|
||||
if (ACT.activator && !A.activated)
|
||||
src.ArtifactActivated()
|
||||
else if (!ACT.activator && A.activated)
|
||||
src.ArtifactDeactivated()
|
||||
else
|
||||
..()
|
||||
|
||||
if (istype(W,/obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WELD = W
|
||||
if (WELD.welding)
|
||||
WELD.eyecheck(user)
|
||||
src.ArtifactStimulus("heat", 800)
|
||||
playsound(src.loc, "sound/items/Welder.ogg", 100, 1)
|
||||
src.visible_message("<span style=\"color:red\">[user.name] burns the artifact with [WELD]!</span>")
|
||||
return 0
|
||||
|
||||
if (istype(W,/obj/item/zippo))
|
||||
var/obj/item/zippo/ZIP = W
|
||||
if (ZIP.lit)
|
||||
src.ArtifactStimulus("heat", 400)
|
||||
src.visible_message("<span style=\"color:red\">[user.name] burns the artifact with [ZIP]!</span>")
|
||||
return 0
|
||||
|
||||
if(istype(W,/obj/item/baton))
|
||||
var/obj/item/baton/BAT = W
|
||||
if (BAT.can_stun(1, 1, user) == 1)
|
||||
src.ArtifactStimulus("force", BAT.force)
|
||||
src.ArtifactStimulus("elec", 1500)
|
||||
playsound(src.loc, "sound/weapons/Egloves.ogg", 100, 1)
|
||||
src.visible_message("<span style=\"color:red\">[user.name] beats the artifact with [BAT]!</span>")
|
||||
BAT.process_charges(-1, user)
|
||||
return 0
|
||||
|
||||
if (W.force)
|
||||
src.ArtifactStimulus("force", W.force)
|
||||
return 1
|
||||
|
||||
/obj/proc/ArtifactFaultUsed(var/mob/user)
|
||||
// This is for a tool/item artifact that you can use. If it has a fault, whoever is using it is basically rolling the dice
|
||||
// every time the thing is used (a check to see if rand(1,faultcount) hits 1 most of the time) and if they're unlucky, the
|
||||
// thing will deliver it's payload onto them.
|
||||
// There's also no reason this can't be used whoever the artifact is being used *ON*, also!
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
|
||||
var/datum/artifact/A = src.artifact
|
||||
|
||||
if (!A.faults.len)
|
||||
return // no faults, so dont waste any more time
|
||||
if (!A.activated)
|
||||
return // doesn't make a lot of sense for an inert artifact to go haywire
|
||||
var/halt = 0
|
||||
for (var/datum/artifact_fault/F in A.faults)
|
||||
if (prob(F.trigger_prob))
|
||||
if (F.halt_loop)
|
||||
halt = 1
|
||||
F.deploy(src,user)
|
||||
if (halt)
|
||||
break
|
||||
|
||||
/obj/proc/ArtifactStimulus(var/stimtype, var/strength = 0)
|
||||
// This is what will be used for most of the testing equipment stuff. Stimtype is what kind of stimulus the artifact is being
|
||||
// exposed to (such as brute force, high temperatures, electricity, etc) and strength is how powerful the stimulus is. This
|
||||
// one here is intended as a master proc with individual items calling back to this one and then rolling their own version of
|
||||
// it alongside this. This one mainly deals with accidentally damaging an artifact due to hitting it with a poor choice of
|
||||
// stimulus, such as hitting crystals with brute force and so forth.
|
||||
if (!stimtype)
|
||||
return
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
var/datum/artifact/A = src.artifact
|
||||
|
||||
// Possible stimuli = force, elec, radiate, heat
|
||||
switch(A.artitype)
|
||||
if("martian") // biotech, so anything that'd probably kill a living thing works on them too
|
||||
if(stimtype == "force")
|
||||
if (strength >= 30)
|
||||
T.visible_message("<span style=\"color:red\">[src] bruises from the impact!</span>")
|
||||
playsound(src.loc, "sound/effects/attackblob.ogg", 100, 1)
|
||||
ArtifactDevelopFault(33)
|
||||
src.ArtifactTakeDamage(strength / 1.5)
|
||||
if(stimtype == "elec")
|
||||
if (strength >= 3000) // max you can get from the electrobox is 5000
|
||||
if (prob(10))
|
||||
T.visible_message("<span style=\"color:red\">[src] seems to quiver in pain!</span>")
|
||||
src.ArtifactTakeDamage(strength / 1000)
|
||||
if(stimtype == "radiate")
|
||||
if (strength >= 6)
|
||||
ArtifactDevelopFault(50)
|
||||
if (strength >= 9)
|
||||
ArtifactDevelopFault(75)
|
||||
src.ArtifactTakeDamage(strength * 1.25)
|
||||
if("wizard") // these are big crystals, thus you probably shouldn't smack them around too hard!
|
||||
if(stimtype == "force")
|
||||
if (strength >= 20)
|
||||
T.visible_message("<span style=\"color:red\">[src] cracks and splinters!</span>")
|
||||
playsound(src.loc, "sound/misc/glass_step.ogg", 100, 1)
|
||||
ArtifactDevelopFault(80)
|
||||
src.ArtifactTakeDamage(strength * 1.5)
|
||||
|
||||
if (!src || !A)
|
||||
return
|
||||
|
||||
if (!A.activated)
|
||||
for (var/datum/artifact_trigger/AT in A.triggers)
|
||||
if (A.activated)
|
||||
break
|
||||
if (AT.stimulus_required == stimtype)
|
||||
if (AT.do_amount_check)
|
||||
if (AT.stimulus_type == ">=" && strength >= AT.stimulus_amount)
|
||||
src.ArtifactActivated()
|
||||
else if (AT.stimulus_type == "<=" && strength <= AT.stimulus_amount)
|
||||
src.ArtifactActivated()
|
||||
else if (AT.stimulus_type == "==" && strength == AT.stimulus_amount)
|
||||
src.ArtifactActivated()
|
||||
else
|
||||
if (istext(A.hint_text))
|
||||
if (strength >= AT.stimulus_amount - AT.hint_range && strength <= AT.stimulus_amount + AT.hint_range)
|
||||
if (prob(AT.hint_prob))
|
||||
T.visible_message("<b>[src]</b> [A.hint_text]")
|
||||
else
|
||||
src.ArtifactActivated()
|
||||
|
||||
/obj/proc/ArtifactTouched(mob/user as mob)
|
||||
if (istype(user,/mob/living/silicon/ai))
|
||||
return
|
||||
if (istype(user,/mob/dead/))
|
||||
return
|
||||
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (istype(A,/datum/artifact/))
|
||||
if (istype(user,/mob/living/carbon/))
|
||||
src.ArtifactStimulus("carbtouch", 1)
|
||||
if (istype(user,/mob/living/silicon/))
|
||||
src.ArtifactStimulus("silitouch", 1)
|
||||
src.ArtifactStimulus("force", 1)
|
||||
user.visible_message("<b>[user.name]</b> touches [src].")
|
||||
if (istype(src.artifact,/datum/artifact))
|
||||
if (A.touch_descriptors.len > 0)
|
||||
boutput(user, "[pick(A.touch_descriptors)]")
|
||||
else
|
||||
boutput(user, "You can't really tell how it feels.")
|
||||
if (A.activated)
|
||||
A.effect_touch(src,user)
|
||||
return
|
||||
|
||||
/obj/proc/ArtifactTakeDamage(var/dmg_amount)
|
||||
if (!src.ArtifactSanityCheck() || !isnum(dmg_amount))
|
||||
return
|
||||
|
||||
var/datum/artifact/A = src.artifact
|
||||
|
||||
A.health -= dmg_amount
|
||||
A.health = max(0,min(A.health,100))
|
||||
|
||||
if (A.health <= 0)
|
||||
src.ArtifactDestroyed()
|
||||
return
|
||||
|
||||
/obj/proc/ArtifactDestroyed()
|
||||
// Call this rather than straight Del() on an artifact if you want to destroy it. This way, artifacts can have their own
|
||||
// version of this for ones that will deliver a payload if broken.
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
|
||||
var/datum/artifact/A = src.artifact
|
||||
|
||||
ArtifactLogs(usr, null, src, "destroyed", null, 0)
|
||||
|
||||
artifact_controls.artifacts -= src
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if (istype(T,/turf/))
|
||||
switch(A.artitype)
|
||||
if("ancient")
|
||||
T.visible_message("<span style=\"color:red\"><B>[src] sparks and sputters violently before falling apart!</B></span>")
|
||||
if("martian")
|
||||
T.visible_message("<span style=\"color:red\"><B>[src] bursts open, and rapidly liquefies!</B></span>")
|
||||
if("wizard")
|
||||
T.visible_message("<span style=\"color:red\"><B>[src] shatters and disintegrates!</B></span>")
|
||||
if("eldritch")
|
||||
T.visible_message("<span style=\"color:red\"><B>[src] warps in on itself and vanishes!</B></span>")
|
||||
if("precursor")
|
||||
T.visible_message("<span style=\"color:red\"><B>[src] implodes, crushing itself into dust!</B></span>")
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/proc/ArtifactDevelopFault(var/faultprob)
|
||||
// This proc is used for randomly giving an artifact a fault. It's usually used in the New() proc of an artifact so that
|
||||
// newly spawned artifacts have a chance of being faulty by default, though this can also be called whenever an artifact is
|
||||
// damaged or otherwise poorly handled, so you could potentially turn a good artifact into a dangerous piece of shit if you
|
||||
// abuse it too much.
|
||||
// I'm probably going to change this one up to use a list of fault datum rather than some kind of variable, that way multiple
|
||||
// faults can be on one artifact.
|
||||
if (!isnum(faultprob))
|
||||
return
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
|
||||
if (A.artitype == "eldritch")
|
||||
faultprob *= 2 // eldritch artifacts fucking hate you and are twice as likely to go faulty
|
||||
faultprob = max(0,min(faultprob,100))
|
||||
|
||||
if (prob(faultprob) && A.fault_types.len)
|
||||
var/new_fault = pick(A.fault_types)
|
||||
if (ispath(new_fault))
|
||||
var/datum/artifact_fault/F = new new_fault(A)
|
||||
F.holder = A
|
||||
A.faults += F
|
||||
|
||||
// Added. Very little related to artifacts was logged (Convair880).
|
||||
/proc/ArtifactLogs(var/mob/user, var/mob/target, var/obj/O, var/type_of_action, var/special_addendum, var/trigger_alert = 0)
|
||||
if (!O || !istype(O.artifact, /datum/artifact) || !type_of_action)
|
||||
return
|
||||
|
||||
var/datum/artifact/A = O.artifact
|
||||
|
||||
if ((target && ismob(target)) && type_of_action == "weapon")
|
||||
logTheThing("combat", user, target, "attacks %target% with an active artifact ([A.type])[special_addendum ? ", [special_addendum]" : ""] at [log_loc(target)].")
|
||||
else
|
||||
logTheThing(type_of_action == "detonated" ? "bombing" : "station", user, target, "an artifact ([A.type]) was [type_of_action] [special_addendum ? "([special_addendum])" : ""] at [target && isturf(target) ? "[log_loc(target)]" : "[log_loc(O)]"].[type_of_action == "detonated" ? " Last touched by: [O.fingerprintslast ? "[O.fingerprintslast]" : "*null*"]" : ""]")
|
||||
|
||||
if (trigger_alert)
|
||||
message_admins("An artifact ([A.type]) was [type_of_action] [special_addendum ? "([special_addendum])" : ""] at [log_loc(O)]. Last touched by: [O.fingerprintslast ? "[O.fingerprintslast]" : "*null*"]")
|
||||
|
||||
return
|
||||
@@ -0,0 +1,331 @@
|
||||
/obj/artifact
|
||||
// a totally inert piece of shit that does nothing (alien art)
|
||||
// might as well use it as the category header for non-machinery artifacts just to be efficient
|
||||
name = "artifact large art piece"
|
||||
icon = 'icons/obj/artifacts/artifacts.dmi'
|
||||
icon_state = "wizard-1" // it's technically pointless to set this but it makes it easier to find in the dreammaker tree
|
||||
opacity = 0
|
||||
density = 1
|
||||
anchored = 0
|
||||
artifact = 1
|
||||
mat_changename = 0
|
||||
mat_changedesc = 0
|
||||
var/associated_datum = /datum/artifact/art
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
var/datum/artifact/AS = new src.associated_datum(src)
|
||||
if (forceartitype) AS.validtypes = list("[forceartitype]")
|
||||
src.artifact = AS
|
||||
|
||||
spawn(0)
|
||||
src.ArtifactSetup()
|
||||
|
||||
UpdateName()
|
||||
src.name = "[name_prefix(null, 1)][src.real_name][name_suffix(null, 1)]"
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
src.ArtifactTouched(user)
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (src.Artifact_attackby(W,user))
|
||||
..()
|
||||
|
||||
meteorhit(obj/O as obj)
|
||||
src.ArtifactStimulus("force", 60)
|
||||
..()
|
||||
|
||||
examine()
|
||||
set src in oview()
|
||||
boutput(usr, "You have no idea what this thing is!")
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (istext(A.examine_hint))
|
||||
boutput(usr, "[A.examine_hint]")
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
src.ArtifactStimulus("force", 200)
|
||||
src.ArtifactStimulus("heat", 500)
|
||||
if(2.0)
|
||||
src.ArtifactStimulus("force", 75)
|
||||
src.ArtifactStimulus("heat", 450)
|
||||
if(3.0)
|
||||
src.ArtifactStimulus("force", 25)
|
||||
src.ArtifactStimulus("heat", 380)
|
||||
return
|
||||
|
||||
reagent_act(reagent_id,volume)
|
||||
if (..())
|
||||
return
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
src.ArtifactStimulus(reagent_id, volume)
|
||||
switch(reagent_id)
|
||||
if("radium","porktonium")
|
||||
src.ArtifactStimulus("radiate", round(volume / 10))
|
||||
if("polonium","strange_reagent")
|
||||
src.ArtifactStimulus("radiate", round(volume / 5))
|
||||
if("uranium")
|
||||
src.ArtifactStimulus("radiate", round(volume / 2))
|
||||
if("dna_mutagen","mutagen","omega_mutagen")
|
||||
if (A.artitype == "martian")
|
||||
ArtifactDevelopFault(80)
|
||||
if("napalm","dbreath","el_diablo")
|
||||
src.ArtifactStimulus("heat", 310 + (volume * 5))
|
||||
if("infernite","foof","ghostchilijuice")
|
||||
src.ArtifactStimulus("heat", 310 + (volume * 10))
|
||||
if("cryostylane")
|
||||
src.ArtifactStimulus("heat", 310 - (volume * 10))
|
||||
if("acid")
|
||||
src.ArtifactTakeDamage(volume * 2)
|
||||
if("pacid")
|
||||
src.ArtifactTakeDamage(volume * 10)
|
||||
if("george_melonium")
|
||||
var/random_stimulus = pick("heat","force","radiate","elec")
|
||||
var/random_strength = 0
|
||||
switch(random_stimulus)
|
||||
if ("heat")
|
||||
random_strength = rand(200,400)
|
||||
if ("elec")
|
||||
random_strength = rand(5,5000)
|
||||
if ("force")
|
||||
random_strength = rand(3,30)
|
||||
if ("radiate")
|
||||
random_strength = rand(1,10)
|
||||
src.ArtifactStimulus(random_stimulus,random_strength)
|
||||
return
|
||||
|
||||
emp_act()
|
||||
src.ArtifactStimulus("elec", 800)
|
||||
src.ArtifactStimulus("radiate", 3)
|
||||
|
||||
blob_act(var/power)
|
||||
src.ArtifactStimulus("force", power)
|
||||
src.ArtifactStimulus("carbtouch", 1)
|
||||
|
||||
bullet_act(var/obj/projectile/P)
|
||||
if(src.material) src.material.triggerOnAttacked(src, P.shooter, src, (ismob(P.shooter) ? P.shooter:equipped() : P.shooter))
|
||||
for(var/atom/A in src)
|
||||
if(A.material)
|
||||
A.material.triggerOnAttacked(A, P.shooter, src, (ismob(P.shooter) ? P.shooter:equipped() : P.shooter))
|
||||
|
||||
switch (P.proj_data.damage_type)
|
||||
if(D_KINETIC,D_PIERCING,D_SLASHING)
|
||||
src.ArtifactStimulus("force", P.power)
|
||||
for (var/obj/machinery/networked/test_apparatus/impact_pad/I in src.loc.contents)
|
||||
I.impactpad_senseforce_shot(src, P)
|
||||
if(D_ENERGY)
|
||||
src.ArtifactStimulus("elec", P.power * 10)
|
||||
if(D_BURNING)
|
||||
src.ArtifactStimulus("heat", 310 + (P.power * 5))
|
||||
if(D_RADIOACTIVE)
|
||||
src.ArtifactStimulus("radiate", P.power)
|
||||
..()
|
||||
|
||||
Bumped(M as mob|obj)
|
||||
if (istype(M,/obj/item/))
|
||||
var/obj/item/ITM = M
|
||||
src.ArtifactStimulus("force", ITM.throwforce)
|
||||
for (var/obj/machinery/networked/test_apparatus/impact_pad/I in src.loc.contents)
|
||||
I.impactpad_senseforce(src, ITM)
|
||||
..()
|
||||
|
||||
/obj/machinery/artifact
|
||||
name = "artifact large art piece"
|
||||
icon = 'icons/obj/artifacts/artifacts.dmi'
|
||||
icon_state = "wizard-1" // it's technically pointless to set this but it makes it easier to find in the dreammaker tree
|
||||
opacity = 0
|
||||
density = 1
|
||||
anchored = 0
|
||||
artifact = 1
|
||||
mat_changename = 0
|
||||
mat_changedesc = 0
|
||||
var/associated_datum = /datum/artifact/art
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
..()
|
||||
var/datum/artifact/AS = new src.associated_datum(src)
|
||||
if (forceartitype)
|
||||
AS.validtypes = list("[forceartitype]")
|
||||
src.artifact = AS
|
||||
|
||||
spawn(0)
|
||||
src.ArtifactSetup()
|
||||
|
||||
examine()
|
||||
set src in oview()
|
||||
boutput(usr, "You have no idea what this thing is!")
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (istext(A.examine_hint))
|
||||
boutput(usr, "[A.examine_hint]")
|
||||
|
||||
UpdateName()
|
||||
src.name = "[name_prefix(null, 1)][src.real_name][name_suffix(null, 1)]"
|
||||
|
||||
process()
|
||||
..()
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
|
||||
if (A.activated)
|
||||
A.effect_process(src)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
src.ArtifactTouched(user)
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (src.Artifact_attackby(W,user))
|
||||
..()
|
||||
|
||||
meteorhit(obj/O as obj)
|
||||
src.ArtifactStimulus("force", 60)
|
||||
..()
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
src.ArtifactStimulus("force", 200)
|
||||
src.ArtifactStimulus("heat", 500)
|
||||
if(2.0)
|
||||
src.ArtifactStimulus("force", 75)
|
||||
src.ArtifactStimulus("heat", 450)
|
||||
if(3.0)
|
||||
src.ArtifactStimulus("force", 25)
|
||||
src.ArtifactStimulus("heat", 380)
|
||||
return
|
||||
|
||||
reagent_act(reagent_id,volume)
|
||||
if (..())
|
||||
return
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
src.ArtifactStimulus(reagent_id, volume)
|
||||
switch(reagent_id)
|
||||
if("radium","porktonium")
|
||||
src.ArtifactStimulus("radiate", round(volume / 10))
|
||||
if("polonium","strange_reagent")
|
||||
src.ArtifactStimulus("radiate", round(volume / 5))
|
||||
if("uranium")
|
||||
src.ArtifactStimulus("radiate", round(volume / 2))
|
||||
if("dna_mutagen","mutagen","omega_mutagen")
|
||||
if (A.artitype == "martian")
|
||||
ArtifactDevelopFault(80)
|
||||
if("napalm","dbreath","el_diablo")
|
||||
src.ArtifactStimulus("heat", 310 + (volume * 5))
|
||||
if("infernite","foof","ghostchilijuice")
|
||||
src.ArtifactStimulus("heat", 310 + (volume * 10))
|
||||
if("cryostylane")
|
||||
src.ArtifactStimulus("heat", 310 - (volume * 10))
|
||||
if("acid")
|
||||
src.ArtifactTakeDamage(volume * 2)
|
||||
if("pacid")
|
||||
src.ArtifactTakeDamage(volume * 10)
|
||||
if("george_melonium")
|
||||
var/random_stimulus = pick("heat","force","radiate","elec")
|
||||
var/random_strength = 0
|
||||
switch(random_stimulus)
|
||||
if ("heat")
|
||||
random_strength = rand(200,400)
|
||||
if ("elec")
|
||||
random_strength = rand(5,5000)
|
||||
if ("force")
|
||||
random_strength = rand(3,30)
|
||||
if ("radiate")
|
||||
random_strength = rand(1,10)
|
||||
src.ArtifactStimulus(random_stimulus,random_strength)
|
||||
return
|
||||
|
||||
emp_act()
|
||||
src.ArtifactStimulus("elec", 800)
|
||||
src.ArtifactStimulus("radiate", 3)
|
||||
|
||||
blob_act(var/power)
|
||||
src.ArtifactStimulus("force", power)
|
||||
src.ArtifactStimulus("carbtouch", 1)
|
||||
|
||||
bullet_act(var/obj/projectile/P)
|
||||
switch (P.proj_data.damage_type)
|
||||
if(D_KINETIC,D_PIERCING,D_SLASHING)
|
||||
src.ArtifactStimulus("force", P.power)
|
||||
if (istype(src.loc,/turf/))
|
||||
for (var/obj/machinery/networked/test_apparatus/impact_pad/I in src.loc.contents)
|
||||
I.impactpad_senseforce_shot(src, P)
|
||||
if(D_ENERGY)
|
||||
src.ArtifactStimulus("elec", P.power * 10)
|
||||
if(D_BURNING)
|
||||
src.ArtifactStimulus("heat", P.power * 5)
|
||||
if(D_RADIOACTIVE)
|
||||
src.ArtifactStimulus("radiate", P.power)
|
||||
..()
|
||||
|
||||
Bumped(M as mob|obj)
|
||||
if (istype(M,/obj/item/))
|
||||
var/obj/item/ITM = M
|
||||
src.ArtifactStimulus("force", ITM.throwforce)
|
||||
for (var/obj/machinery/networked/test_apparatus/impact_pad/I in src.loc.contents)
|
||||
I.impactpad_senseforce(src, ITM)
|
||||
..()
|
||||
|
||||
/obj/item/artifact
|
||||
name = "artifact small art piece"
|
||||
icon = 'icons/obj/artifacts/artifactsitem.dmi'
|
||||
icon_state = "wizard-1"
|
||||
artifact = 1
|
||||
mat_changename = 0
|
||||
mat_changedesc = 0
|
||||
var/associated_datum = /datum/artifact/art
|
||||
|
||||
New(var/loc, var/forceartitype)
|
||||
var/datum/artifact/AS = new src.associated_datum(src)
|
||||
if (forceartitype)
|
||||
AS.validtypes = list("[forceartitype]")
|
||||
src.artifact = AS
|
||||
|
||||
spawn(0)
|
||||
src.ArtifactSetup()
|
||||
|
||||
examine()
|
||||
set src in oview()
|
||||
boutput(usr, "You have no idea what this thing is!")
|
||||
if (!src.ArtifactSanityCheck())
|
||||
return
|
||||
var/datum/artifact/A = src.artifact
|
||||
if (istext(A.examine_hint))
|
||||
boutput(usr, "[A.examine_hint]")
|
||||
|
||||
UpdateName()
|
||||
src.name = "[name_prefix(null, 1)][src.real_name][name_suffix(null, 1)]"
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (src.Artifact_attackby(W,user))
|
||||
..()
|
||||
|
||||
/obj/artifact_spawner
|
||||
// pretty much entirely for debugging/gimmick use
|
||||
New(var/loc,var/forceartitype = null,var/cinematic = 0)
|
||||
var/turf/T = get_turf(src)
|
||||
if (cinematic)
|
||||
T.visible_message("<span style=\"color:red\"><b>An artifact suddenly warps into existance!</b></span>")
|
||||
playsound(T,"sound/effects/teleport.ogg",50,1)
|
||||
var/obj/decal/teleport_swirl/swirl = unpool(/obj/decal/teleport_swirl)
|
||||
swirl.set_loc(T)
|
||||
spawn(15)
|
||||
pool(swirl)
|
||||
Artifact_Spawn(T,forceartitype)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -0,0 +1,154 @@
|
||||
// FAULTS
|
||||
|
||||
/datum/artifact_fault
|
||||
// these are booby traps, self-defense mechanisms, hardware faults or just other nasty shit that can fuck you up when you
|
||||
// use the artifact for anything
|
||||
var/trigger_prob = 0
|
||||
var/tmp/datum/artifact/holder = null
|
||||
var/halt_loop = 0
|
||||
|
||||
proc/deploy(var/obj/O,var/mob/living/user)
|
||||
if (!O || !user)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/artifact_fault/burn
|
||||
// sets the victim on fire
|
||||
trigger_prob = 8
|
||||
var/burn_amount = 40
|
||||
|
||||
deploy(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
var/turf/T = get_turf(user)
|
||||
T.visible_message("<span style=\"color:red\">The [O.name] suddenly bursts into flames!</span>")
|
||||
user.update_burning(40)
|
||||
playsound(T, "sound/effects/bamf.ogg", 100, 1)
|
||||
|
||||
/datum/artifact_fault/irradiate
|
||||
// irradiates the victim
|
||||
trigger_prob = 8
|
||||
var/rads_amount = 20
|
||||
|
||||
deploy(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
boutput(user, "<span style=\"color:red\">You feel strange.</span>")
|
||||
user.irradiate(src.rads_amount)
|
||||
|
||||
/datum/artifact_fault/shutdown
|
||||
// deactivates the artifact
|
||||
trigger_prob = 10
|
||||
halt_loop = 1
|
||||
|
||||
deploy(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
var/turf/T = get_turf(O)
|
||||
T.visible_message("<span style=\"color:red\">The [O.name] suddenly deactivates!</span>")
|
||||
playsound(T, "sound/effects/shielddown2.ogg", 100, 1)
|
||||
O.ArtifactDeactivated()
|
||||
|
||||
/datum/artifact_fault/warp
|
||||
// warps the user off somewhere random
|
||||
trigger_prob = 15
|
||||
|
||||
deploy(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
var/turf/T = get_turf(O)
|
||||
T.visible_message("<span style=\"color:red\">The [O.name] warps [user.name] away!</span>")
|
||||
playsound(T, "sound/effects/mag_warp.ogg", 100, 1)
|
||||
user.set_loc(pick(wormholeturfs))
|
||||
|
||||
/datum/artifact_fault/murder
|
||||
// gibs the user
|
||||
trigger_prob = 1
|
||||
halt_loop = 1
|
||||
|
||||
deploy(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
if (istype(src,/obj/item/))
|
||||
var/obj/item/I = src
|
||||
if (I.loc == user)
|
||||
user.u_equip(I)
|
||||
I.dropped()
|
||||
var/turf/T = get_turf(O)
|
||||
T.visible_message("<span style=\"color:red\"><b>The [O.name] utterly annihilates [user.name]!</b></span>")
|
||||
playsound(T, "sound/effects/elec_bigzap.ogg", 100, 1)
|
||||
user.elecgib()
|
||||
|
||||
/datum/artifact_fault/explode
|
||||
// causes an explosion and destroys the artifact
|
||||
trigger_prob = 1
|
||||
halt_loop = 1
|
||||
|
||||
deploy(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
var/turf/T = get_turf(O)
|
||||
T.visible_message("<span style=\"color:red\">The [O.name] suddenly explodes!</span>")
|
||||
if (istype(src,/obj/item/))
|
||||
var/obj/item/I = src
|
||||
user.u_equip(I)
|
||||
I.dropped()
|
||||
explosion(O, T, 1, 2, 4, 8)
|
||||
O.ArtifactDestroyed()
|
||||
|
||||
/datum/artifact_fault/zap
|
||||
// electrocutes the user
|
||||
trigger_prob = 6
|
||||
|
||||
deploy(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
var/turf/T = get_turf(O)
|
||||
T.visible_message("<span style=\"color:red\"><b>[user.name]</b> is shocked by a surge of energy from [O.name]!</span>")
|
||||
var/datum/effects/system/spark_spread/s = unpool(/datum/effects/system/spark_spread)
|
||||
s.set_up(4, 1, user)
|
||||
s.start()
|
||||
user.stunned += 15
|
||||
user.weakened += 15
|
||||
user.stuttering += 30
|
||||
|
||||
/datum/artifact_fault/messager
|
||||
trigger_prob = 30
|
||||
var/text_style = null
|
||||
var/list/messages = list()
|
||||
|
||||
deploy(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
if (messages.len < 1)
|
||||
return
|
||||
switch(text_style)
|
||||
if ("small")
|
||||
boutput(user, "<small>[pick(messages)]</small>")
|
||||
if ("big")
|
||||
boutput(user, "<big>[pick(messages)]</big>")
|
||||
if ("red")
|
||||
boutput(user, "<span style=\"color:red\">[pick(messages)]</span>")
|
||||
if ("blue")
|
||||
boutput(user, "<span style=\"color:blue\">[pick(messages)]</span>")
|
||||
else
|
||||
boutput(user, "[pick(messages)]")
|
||||
|
||||
/datum/artifact_fault/messager/creepy_whispers
|
||||
text_style = "small"
|
||||
messages = list("its your fault","theyre going to get you","no escape","youre going to die here","no hope",
|
||||
"die","stop","give up","no","theyre watching you","theres nothing you can do","you have failed","run","i see you",
|
||||
"surrender","its hopeless","you are in hell","its all lies","hate","there is only despair","your heart will stop",
|
||||
"they will all forget you","they have abandoned you","please stop","no one will mourn you")
|
||||
|
||||
/datum/artifact_fault/poison
|
||||
trigger_prob = 8
|
||||
var/poison_type = "toxin"
|
||||
var/poison_amount = 10
|
||||
|
||||
deploy(var/obj/O,var/mob/living/user)
|
||||
if (..())
|
||||
return
|
||||
boutput(user, "<span style=\"color:red\">The [O.name] stings you!</span>")
|
||||
if (user.reagents)
|
||||
user.reagents.add_reagent(poison_type,poison_amount)
|
||||
@@ -0,0 +1,73 @@
|
||||
// TRIGGERS
|
||||
|
||||
/datum/artifact_trigger
|
||||
var/stimulus_required = null
|
||||
var/do_amount_check = 1
|
||||
var/stimulus_amount = null
|
||||
var/stimulus_type = ">="
|
||||
var/hint_range = 0
|
||||
var/hint_prob = 33
|
||||
|
||||
/datum/artifact_trigger/carbon_touch
|
||||
// touched by a carbon lifeform
|
||||
stimulus_required = "carbtouch"
|
||||
do_amount_check = 0
|
||||
|
||||
/datum/artifact_trigger/silicon_touch
|
||||
// touched by a silicon lifeform
|
||||
stimulus_required = "silitouch"
|
||||
do_amount_check = 0
|
||||
|
||||
/datum/artifact_trigger/force
|
||||
stimulus_required = "force"
|
||||
hint_range = 20
|
||||
hint_prob = 75
|
||||
|
||||
New()
|
||||
stimulus_amount = rand(3,30)
|
||||
|
||||
/datum/artifact_trigger/heat
|
||||
stimulus_required = "heat"
|
||||
hint_range = 20
|
||||
|
||||
New()
|
||||
stimulus_amount = rand(320,400)
|
||||
|
||||
/datum/artifact_trigger/cold
|
||||
stimulus_required = "heat"
|
||||
stimulus_type = "<="
|
||||
hint_range = 20
|
||||
|
||||
New()
|
||||
stimulus_amount = rand(200,300)
|
||||
|
||||
/datum/artifact_trigger/radiation
|
||||
stimulus_required = "radiate"
|
||||
hint_range = 2
|
||||
hint_prob = 75
|
||||
|
||||
New()
|
||||
stimulus_type = pick(">=","<=")
|
||||
stimulus_amount = rand(1,10)
|
||||
|
||||
/datum/artifact_trigger/electric
|
||||
stimulus_required = "elec"
|
||||
hint_range = 500
|
||||
hint_prob = 66
|
||||
|
||||
New()
|
||||
stimulus_type = pick(">=","<=")
|
||||
stimulus_amount = rand(5,5000)
|
||||
|
||||
/datum/artifact_trigger/reagent
|
||||
stimulus_required = "reagent"
|
||||
// can just use the above var as the required reagent field really
|
||||
stimulus_type = ">="
|
||||
hint_range = 50
|
||||
hint_prob = 100
|
||||
|
||||
New()
|
||||
stimulus_amount = rand(10,100)
|
||||
|
||||
/datum/artifact_trigger/reagent/blood
|
||||
stimulus_required = "blood"
|
||||
Reference in New Issue
Block a user