Initial Commit

This commit is contained in:
Tobba
2016-03-06 20:52:14 +01:00
commit b181d0b552
4325 changed files with 579453 additions and 0 deletions
@@ -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"