@@ -0,0 +1,192 @@
|
||||
/obj/item/projectile/beam
|
||||
name = "laser"
|
||||
icon_state = "laser"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 20
|
||||
light_range = 2
|
||||
damage_type = BURN
|
||||
hitsound = 'sound/weapons/sear.ogg'
|
||||
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
|
||||
flag = "laser"
|
||||
eyeblur = 2
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
|
||||
light_color = LIGHT_COLOR_RED
|
||||
ricochets_max = 50 //Honk!
|
||||
ricochet_chance = 80
|
||||
is_reflectable = TRUE
|
||||
|
||||
/obj/item/projectile/beam/laser
|
||||
tracer_type = /obj/effect/projectile/tracer/laser
|
||||
muzzle_type = /obj/effect/projectile/muzzle/laser
|
||||
impact_type = /obj/effect/projectile/impact/laser
|
||||
|
||||
/obj/item/projectile/beam/laser/heavylaser
|
||||
name = "heavy laser"
|
||||
icon_state = "heavylaser"
|
||||
damage = 40
|
||||
tracer_type = /obj/effect/projectile/tracer/heavy_laser
|
||||
muzzle_type = /obj/effect/projectile/muzzle/heavy_laser
|
||||
impact_type = /obj/effect/projectile/impact/heavy_laser
|
||||
|
||||
/obj/item/projectile/beam/laser/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.IgniteMob()
|
||||
else if(isturf(target))
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser/wall
|
||||
|
||||
/obj/item/projectile/beam/weak
|
||||
damage = 15
|
||||
|
||||
/obj/item/projectile/beam/weak/penetrator
|
||||
armour_penetration = 50
|
||||
|
||||
/obj/item/projectile/beam/practice
|
||||
name = "practice laser"
|
||||
damage = 0
|
||||
nodamage = 1
|
||||
|
||||
/obj/item/projectile/beam/scatter
|
||||
name = "laser pellet"
|
||||
icon_state = "scatterlaser"
|
||||
damage = 5
|
||||
|
||||
/obj/item/projectile/beam/xray
|
||||
name = "\improper X-ray beam"
|
||||
icon_state = "xray"
|
||||
damage = 15
|
||||
irradiate = 300
|
||||
range = 15
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSCLOSEDTURF
|
||||
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
tracer_type = /obj/effect/projectile/tracer/xray
|
||||
muzzle_type = /obj/effect/projectile/muzzle/xray
|
||||
impact_type = /obj/effect/projectile/impact/xray
|
||||
|
||||
/obj/item/projectile/beam/disabler
|
||||
name = "disabler beam"
|
||||
icon_state = "omnilaser"
|
||||
damage = 24 // Citadel change for balance from 36
|
||||
damage_type = STAMINA
|
||||
flag = "energy"
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
eyeblur = 0
|
||||
speed = 0.7
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
tracer_type = /obj/effect/projectile/tracer/disabler
|
||||
muzzle_type = /obj/effect/projectile/muzzle/disabler
|
||||
impact_type = /obj/effect/projectile/impact/disabler
|
||||
|
||||
/obj/item/projectile/beam/pulse
|
||||
name = "pulse"
|
||||
icon_state = "u_laser"
|
||||
damage = 50
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
tracer_type = /obj/effect/projectile/tracer/pulse
|
||||
muzzle_type = /obj/effect/projectile/muzzle/pulse
|
||||
impact_type = /obj/effect/projectile/impact/pulse
|
||||
|
||||
/obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if (!QDELETED(target) && (isturf(target) || istype(target, /obj/structure/)))
|
||||
target.ex_act(EXPLODE_HEAVY)
|
||||
|
||||
/obj/item/projectile/beam/pulse/shotgun
|
||||
damage = 40
|
||||
|
||||
/obj/item/projectile/beam/pulse/heavy
|
||||
name = "heavy pulse laser"
|
||||
icon_state = "pulse1_bl"
|
||||
var/life = 20
|
||||
|
||||
/obj/item/projectile/beam/pulse/heavy/on_hit(atom/target, blocked = FALSE)
|
||||
life -= 10
|
||||
if(life > 0)
|
||||
. = -1
|
||||
..()
|
||||
|
||||
/obj/item/projectile/beam/emitter
|
||||
name = "emitter beam"
|
||||
icon_state = "emitter"
|
||||
damage = 30
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/item/projectile/beam/emitter/singularity_pull()
|
||||
return //don't want the emitters to miss
|
||||
|
||||
/obj/item/projectile/beam/lasertag
|
||||
name = "laser tag beam"
|
||||
icon_state = "omnilaser"
|
||||
hitsound = null
|
||||
damage = 0
|
||||
damage_type = STAMINA
|
||||
flag = "laser"
|
||||
var/suit_types = list(/obj/item/clothing/suit/redtag, /obj/item/clothing/suit/bluetag)
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/item/projectile/beam/lasertag/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/M = target
|
||||
if(istype(M.wear_suit))
|
||||
if(M.wear_suit.type in suit_types)
|
||||
M.adjustStaminaLoss(34)
|
||||
|
||||
/obj/item/projectile/beam/lasertag/redtag
|
||||
icon_state = "laser"
|
||||
suit_types = list(/obj/item/clothing/suit/bluetag)
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
|
||||
light_color = LIGHT_COLOR_RED
|
||||
tracer_type = /obj/effect/projectile/tracer/laser
|
||||
muzzle_type = /obj/effect/projectile/muzzle/laser
|
||||
impact_type = /obj/effect/projectile/impact/laser
|
||||
|
||||
/obj/item/projectile/beam/lasertag/redtag/hitscan
|
||||
hitscan = TRUE
|
||||
|
||||
/obj/item/projectile/beam/lasertag/redtag/hitscan/holy
|
||||
name = "lasrifle beam"
|
||||
damage = 0.1
|
||||
damage_type = BURN
|
||||
|
||||
/obj/item/projectile/beam/lasertag/bluetag
|
||||
icon_state = "bluelaser"
|
||||
suit_types = list(/obj/item/clothing/suit/redtag)
|
||||
tracer_type = /obj/effect/projectile/tracer/laser/blue
|
||||
muzzle_type = /obj/effect/projectile/muzzle/laser/blue
|
||||
impact_type = /obj/effect/projectile/impact/laser/blue
|
||||
|
||||
/obj/item/projectile/beam/lasertag/bluetag/hitscan
|
||||
hitscan = TRUE
|
||||
|
||||
/obj/item/projectile/beam/instakill
|
||||
name = "instagib laser"
|
||||
icon_state = "purple_laser"
|
||||
damage = 200
|
||||
damage_type = BURN
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
|
||||
light_color = LIGHT_COLOR_PURPLE
|
||||
|
||||
/obj/item/projectile/beam/instakill/blue
|
||||
icon_state = "blue_laser"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/item/projectile/beam/instakill/red
|
||||
icon_state = "red_laser"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/projectile/beam/instakill/on_hit(atom/target)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.visible_message("<span class='danger'>[M] explodes into a shower of gibs!</span>")
|
||||
M.gib()
|
||||
@@ -0,0 +1,71 @@
|
||||
// 7.62x38mmR (Nagant Revolver)
|
||||
|
||||
/obj/item/projectile/bullet/n762
|
||||
name = "7.62x38mmR bullet"
|
||||
damage = 60
|
||||
|
||||
// .50AE (Desert Eagle)
|
||||
|
||||
/obj/item/projectile/bullet/a50AE
|
||||
name = ".50AE bullet"
|
||||
damage = 60
|
||||
|
||||
// .38 (Detective's Gun)
|
||||
|
||||
/obj/item/projectile/bullet/c38
|
||||
name = ".38 bullet"
|
||||
damage = 25
|
||||
|
||||
/obj/item/projectile/bullet/c38/rubber
|
||||
name = ".38 rubber bullet"
|
||||
damage = 15
|
||||
stamina = 48
|
||||
|
||||
/obj/item/projectile/bullet/c38/trac
|
||||
name = ".38 TRAC bullet"
|
||||
damage = 10
|
||||
|
||||
/obj/item/projectile/bullet/c38/trac/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
var/mob/living/carbon/M = target
|
||||
var/obj/item/implant/tracking/c38/imp
|
||||
for(var/obj/item/implant/tracking/c38/TI in M.implants) //checks if the target already contains a tracking implant
|
||||
imp = TI
|
||||
return
|
||||
if(!imp)
|
||||
imp = new /obj/item/implant/tracking/c38(M)
|
||||
imp.implant(M)
|
||||
|
||||
/obj/item/projectile/bullet/c38/hotshot //similar to incendiary bullets, but do not leave a flaming trail
|
||||
name = ".38 Hot Shot bullet"
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/c38/hotshot/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.adjust_fire_stacks(6)
|
||||
M.IgniteMob()
|
||||
|
||||
/obj/item/projectile/bullet/c38/iceblox //see /obj/item/projectile/temp for the original code
|
||||
name = ".38 Iceblox bullet"
|
||||
damage = 20
|
||||
var/temperature = 100
|
||||
|
||||
/obj/item/projectile/bullet/c38/iceblox/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
var/mob/living/M = target
|
||||
M.adjust_bodytemperature(((100-blocked)/100)*(temperature - M.bodytemperature))
|
||||
|
||||
|
||||
// .357 (Syndie Revolver)
|
||||
|
||||
/obj/item/projectile/bullet/a357
|
||||
name = ".357 bullet"
|
||||
damage = 60
|
||||
|
||||
/obj/item/projectile/bullet/a357/ap
|
||||
name = ".357 armor-piercing bullet"
|
||||
damage = 45
|
||||
armour_penetration = 45
|
||||
@@ -0,0 +1,69 @@
|
||||
// .45 (M1911 & C20r)
|
||||
|
||||
/obj/item/projectile/bullet/c45
|
||||
name = ".45 bullet"
|
||||
damage = 20
|
||||
stamina = 65
|
||||
|
||||
/obj/item/projectile/bullet/c45_nostamina
|
||||
name = ".45 bullet"
|
||||
damage = 30
|
||||
|
||||
/obj/item/projectile/bullet/c45_cleaning
|
||||
name = ".45 bullet"
|
||||
damage = 24
|
||||
stamina = 10
|
||||
|
||||
/obj/item/projectile/bullet/c45_cleaning/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
var/turf/T = get_turf(target)
|
||||
SEND_SIGNAL(T, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
for(var/A in T)
|
||||
if(is_cleanable(A))
|
||||
qdel(A)
|
||||
else if(isitem(A))
|
||||
var/obj/item/cleaned_item = A
|
||||
SEND_SIGNAL(cleaned_item, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_item.clean_blood()
|
||||
if(ismob(cleaned_item.loc))
|
||||
var/mob/M = cleaned_item.loc
|
||||
M.regenerate_icons()
|
||||
else if(ishuman(A))
|
||||
var/mob/living/carbon/human/cleaned_human = A
|
||||
if(cleaned_human.lying)
|
||||
if(cleaned_human.head)
|
||||
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.head.clean_blood()
|
||||
cleaned_human.update_inv_head()
|
||||
if(cleaned_human.wear_suit)
|
||||
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.wear_suit.clean_blood()
|
||||
cleaned_human.update_inv_wear_suit()
|
||||
else if(cleaned_human.w_uniform)
|
||||
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.w_uniform.clean_blood()
|
||||
cleaned_human.update_inv_w_uniform()
|
||||
if(cleaned_human.shoes)
|
||||
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.shoes.clean_blood()
|
||||
cleaned_human.update_inv_shoes()
|
||||
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.clean_blood()
|
||||
cleaned_human.wash_cream()
|
||||
cleaned_human.regenerate_icons()
|
||||
|
||||
// 4.6x30mm (Autorifles)
|
||||
|
||||
/obj/item/projectile/bullet/c46x30mm
|
||||
name = "4.6x30mm bullet"
|
||||
damage = 15
|
||||
|
||||
/obj/item/projectile/bullet/c46x30mm_ap
|
||||
name = "4.6x30mm armor-piercing bullet"
|
||||
damage = 12.5
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/c46x30mm
|
||||
name = "4.6x30mm incendiary bullet"
|
||||
damage = 7.5
|
||||
fire_stacks = 1
|
||||
@@ -0,0 +1,46 @@
|
||||
// .50 (Sniper)
|
||||
|
||||
/obj/item/projectile/bullet/p50
|
||||
name =".50 bullet"
|
||||
speed = 0.4
|
||||
damage = 70
|
||||
knockdown = 100
|
||||
dismemberment = 50
|
||||
armour_penetration = 50
|
||||
var/breakthings = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/p50/on_hit(atom/target, blocked = 0)
|
||||
if(isobj(target) && (blocked != 100) && breakthings)
|
||||
var/obj/O = target
|
||||
O.take_damage(80, BRUTE, "bullet", FALSE)
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/p50/soporific
|
||||
name =".50 soporific bullet"
|
||||
armour_penetration = 0
|
||||
damage = 0
|
||||
dismemberment = 0
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/p50/soporific/on_hit(atom/target, blocked = FALSE)
|
||||
if((blocked != 100) && isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.Sleeping(400)
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/p50/penetrator
|
||||
name =".50 penetrator bullet"
|
||||
icon_state = "gauss"
|
||||
name = "penetrator round"
|
||||
damage = 60
|
||||
forcedodge = TRUE
|
||||
dismemberment = 0 //It goes through you cleanly.
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/p50/penetrator/shuttle //Nukeop Shuttle Variety
|
||||
icon_state = "gaussstrong"
|
||||
damage = 25
|
||||
speed = 0.3
|
||||
range = 16
|
||||
@@ -0,0 +1,29 @@
|
||||
//Nuclear particle projectile - a deadly side effect of fusion
|
||||
/obj/item/projectile/energy/nuclear_particle
|
||||
name = "nuclear particle"
|
||||
icon_state = "nuclear_particle"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
flag = "rad"
|
||||
irradiate = 5000
|
||||
speed = 0.4
|
||||
hitsound = 'sound/weapons/emitter2.ogg'
|
||||
impact_type = /obj/effect/projectile/impact/xray
|
||||
var/static/list/particle_colors = list(
|
||||
"red" = "#FF0000",
|
||||
"blue" = "#00FF00",
|
||||
"green" = "#0000FF",
|
||||
"yellow" = "#FFFF00",
|
||||
"cyan" = "#00FFFF",
|
||||
"purple" = "#FF00FF"
|
||||
)
|
||||
|
||||
/obj/item/projectile/energy/nuclear_particle/Initialize()
|
||||
. = ..()
|
||||
//Random color time!
|
||||
var/our_color = pick(particle_colors)
|
||||
add_atom_colour(particle_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
set_light(4, 3, particle_colors[our_color]) //Range of 4, brightness of 3 - Same range as a flashlight
|
||||
|
||||
/atom/proc/fire_nuclear_particle(angle = rand(0,360)) //used by fusion to fire random nuclear particles. Fires one particle in a random direction.
|
||||
var/obj/item/projectile/energy/nuclear_particle/P = new /obj/item/projectile/energy/nuclear_particle(src)
|
||||
P.fire(angle)
|
||||
@@ -0,0 +1,34 @@
|
||||
/obj/item/projectile/energy/electrode
|
||||
name = "electrode"
|
||||
icon_state = "spark"
|
||||
color = "#FFFF00"
|
||||
nodamage = 1
|
||||
knockdown = 60
|
||||
knockdown_stamoverride = 36
|
||||
knockdown_stam_max = 50
|
||||
stutter = 5
|
||||
jitter = 20
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 7
|
||||
tracer_type = /obj/effect/projectile/tracer/stun
|
||||
muzzle_type = /obj/effect/projectile/muzzle/stun
|
||||
impact_type = /obj/effect/projectile/impact/stun
|
||||
var/tase_duration = 50
|
||||
|
||||
/obj/item/projectile/energy/electrode/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - burst into sparks!
|
||||
do_sparks(1, TRUE, src)
|
||||
else if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "tased", /datum/mood_event/tased)
|
||||
SEND_SIGNAL(C, COMSIG_LIVING_MINOR_SHOCK)
|
||||
if(C.dna && C.dna.check_mutation(HULK))
|
||||
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
|
||||
else if((C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE))
|
||||
C.apply_status_effect(STATUS_EFFECT_TASED, tase_duration)
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5)
|
||||
|
||||
/obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
@@ -0,0 +1,510 @@
|
||||
/obj/item/projectile/magic
|
||||
name = "bolt of nothing"
|
||||
icon_state = "energy"
|
||||
damage = 0
|
||||
damage_type = OXY
|
||||
nodamage = 1
|
||||
armour_penetration = 100
|
||||
flag = "magic"
|
||||
|
||||
/obj/item/projectile/magic/death
|
||||
name = "bolt of death"
|
||||
icon_state = "pulse1_bl"
|
||||
|
||||
/obj/item/projectile/magic/death/on_hit(target)
|
||||
. = ..()
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
return
|
||||
M.death(0)
|
||||
|
||||
/obj/item/projectile/magic/resurrection
|
||||
name = "bolt of resurrection"
|
||||
icon_state = "ion"
|
||||
damage = 0
|
||||
damage_type = OXY
|
||||
nodamage = 1
|
||||
|
||||
/obj/item/projectile/magic/resurrection/on_hit(mob/living/carbon/target)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
if(target.hellbound)
|
||||
return
|
||||
if(target.anti_magic_check())
|
||||
target.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
return
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.regenerate_limbs()
|
||||
C.regenerate_organs()
|
||||
if(target.revive(full_heal = 1))
|
||||
target.grab_ghost(force = TRUE) // even suicides
|
||||
to_chat(target, "<span class='notice'>You rise with a start, you're alive!!!</span>")
|
||||
else if(target.stat != DEAD)
|
||||
to_chat(target, "<span class='notice'>You feel great!</span>")
|
||||
|
||||
/obj/item/projectile/magic/teleport
|
||||
name = "bolt of teleportation"
|
||||
icon_state = "bluespace"
|
||||
damage = 0
|
||||
damage_type = OXY
|
||||
nodamage = 1
|
||||
var/inner_tele_radius = 0
|
||||
var/outer_tele_radius = 6
|
||||
|
||||
/obj/item/projectile/magic/teleport/on_hit(mob/target)
|
||||
. = ..()
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] fizzles on contact with [target]!</span>")
|
||||
return
|
||||
var/teleammount = 0
|
||||
var/teleloc = target
|
||||
if(!isturf(target))
|
||||
teleloc = target.loc
|
||||
for(var/atom/movable/stuff in teleloc)
|
||||
if(!stuff.anchored && stuff.loc)
|
||||
if(do_teleport(stuff, stuff, 10, channel = TELEPORT_CHANNEL_MAGIC))
|
||||
teleammount++
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(max(round(4 - teleammount),0), stuff.loc) //Smoke drops off if a lot of stuff is moved for the sake of sanity
|
||||
smoke.start()
|
||||
|
||||
/obj/item/projectile/magic/door
|
||||
name = "bolt of door creation"
|
||||
icon_state = "energy"
|
||||
damage = 0
|
||||
damage_type = OXY
|
||||
nodamage = 1
|
||||
var/list/door_types = list(/obj/structure/mineral_door/wood, /obj/structure/mineral_door/iron, /obj/structure/mineral_door/silver, /obj/structure/mineral_door/gold, /obj/structure/mineral_door/uranium, /obj/structure/mineral_door/sandstone, /obj/structure/mineral_door/transparent/plasma, /obj/structure/mineral_door/transparent/diamond)
|
||||
|
||||
/obj/item/projectile/magic/door/on_hit(atom/target)
|
||||
. = ..()
|
||||
if(istype(target, /obj/machinery/door))
|
||||
OpenDoor(target)
|
||||
else
|
||||
var/turf/T = get_turf(target)
|
||||
if(isclosedturf(T) && !isindestructiblewall(T))
|
||||
CreateDoor(T)
|
||||
|
||||
/obj/item/projectile/magic/door/proc/CreateDoor(turf/T)
|
||||
var/door_type = pick(door_types)
|
||||
var/obj/structure/mineral_door/D = new door_type(T)
|
||||
T.ChangeTurf(/turf/open/floor/plating)
|
||||
D.Open()
|
||||
|
||||
/obj/item/projectile/magic/door/proc/OpenDoor(var/obj/machinery/door/D)
|
||||
if(istype(D, /obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/A = D
|
||||
A.locked = FALSE
|
||||
D.open()
|
||||
|
||||
/obj/item/projectile/magic/change
|
||||
name = "bolt of change"
|
||||
icon_state = "ice_1"
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
nodamage = 1
|
||||
|
||||
/obj/item/projectile/magic/change/on_hit(atom/change)
|
||||
. = ..()
|
||||
if(ismob(change))
|
||||
var/mob/M = change
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] fizzles on contact with [M]!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
wabbajack(change)
|
||||
qdel(src)
|
||||
|
||||
/proc/wabbajack(mob/living/M)
|
||||
if(!istype(M) || M.stat == DEAD || M.notransform || (GODMODE & M.status_flags))
|
||||
return
|
||||
|
||||
M.notransform = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
M.cut_overlays()
|
||||
M.invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
var/list/contents = M.contents.Copy()
|
||||
|
||||
if(iscyborg(M))
|
||||
var/mob/living/silicon/robot/Robot = M
|
||||
if(Robot.mmi)
|
||||
qdel(Robot.mmi)
|
||||
Robot.notify_ai(NEW_BORG)
|
||||
else
|
||||
for(var/obj/item/W in contents)
|
||||
if(!M.dropItemToGround(W))
|
||||
qdel(W)
|
||||
|
||||
var/mob/living/new_mob
|
||||
|
||||
var/randomize = pick("monkey","robot","slime","xeno","humanoid","animal")
|
||||
switch(randomize)
|
||||
if("monkey")
|
||||
new_mob = new /mob/living/carbon/monkey(M.loc)
|
||||
|
||||
if("robot")
|
||||
var/robot = pick(200;/mob/living/silicon/robot,
|
||||
/mob/living/silicon/robot/modules/syndicate,
|
||||
/mob/living/silicon/robot/modules/syndicate/medical,
|
||||
/mob/living/silicon/robot/modules/syndicate/saboteur,
|
||||
200;/mob/living/simple_animal/drone/polymorphed)
|
||||
new_mob = new robot(M.loc)
|
||||
if(issilicon(new_mob))
|
||||
new_mob.gender = M.gender
|
||||
new_mob.invisibility = 0
|
||||
new_mob.job = "Cyborg"
|
||||
var/mob/living/silicon/robot/Robot = new_mob
|
||||
Robot.lawupdate = FALSE
|
||||
Robot.connected_ai = null
|
||||
Robot.mmi.transfer_identity(M) //Does not transfer key/client.
|
||||
Robot.clear_inherent_laws(0)
|
||||
Robot.clear_zeroth_law(0)
|
||||
|
||||
if("slime")
|
||||
new_mob = new /mob/living/simple_animal/slime/random(M.loc)
|
||||
|
||||
if("xeno")
|
||||
var/Xe
|
||||
if(M.ckey)
|
||||
Xe = pick(/mob/living/carbon/alien/humanoid/hunter,/mob/living/carbon/alien/humanoid/sentinel)
|
||||
else
|
||||
Xe = pick(/mob/living/carbon/alien/humanoid/hunter,/mob/living/simple_animal/hostile/alien/sentinel)
|
||||
new_mob = new Xe(M.loc)
|
||||
|
||||
if("animal")
|
||||
var/path = pick(/mob/living/simple_animal/hostile/carp,
|
||||
/mob/living/simple_animal/hostile/bear,
|
||||
/mob/living/simple_animal/hostile/mushroom,
|
||||
/mob/living/simple_animal/hostile/statue,
|
||||
/mob/living/simple_animal/hostile/retaliate/bat,
|
||||
/mob/living/simple_animal/hostile/retaliate/goat,
|
||||
/mob/living/simple_animal/hostile/killertomato,
|
||||
/mob/living/simple_animal/hostile/poison/giant_spider,
|
||||
/mob/living/simple_animal/hostile/poison/giant_spider/hunter,
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/independent,
|
||||
/mob/living/simple_animal/hostile/carp/ranged,
|
||||
/mob/living/simple_animal/hostile/carp/ranged/chaos,
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher,
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/beast,
|
||||
/mob/living/simple_animal/hostile/headcrab,
|
||||
/mob/living/simple_animal/hostile/morph,
|
||||
/mob/living/simple_animal/hostile/stickman,
|
||||
/mob/living/simple_animal/hostile/stickman/dog,
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/lesser,
|
||||
/mob/living/simple_animal/hostile/gorilla,
|
||||
/mob/living/simple_animal/parrot,
|
||||
/mob/living/simple_animal/pet/dog/corgi,
|
||||
/mob/living/simple_animal/crab,
|
||||
/mob/living/simple_animal/pet/dog/pug,
|
||||
/mob/living/simple_animal/pet/cat,
|
||||
/mob/living/simple_animal/mouse,
|
||||
/mob/living/simple_animal/chicken,
|
||||
/mob/living/simple_animal/cow,
|
||||
/mob/living/simple_animal/hostile/lizard,
|
||||
/mob/living/simple_animal/pet/fox,
|
||||
/mob/living/simple_animal/butterfly,
|
||||
/mob/living/simple_animal/pet/cat/cak,
|
||||
/mob/living/simple_animal/chick)
|
||||
new_mob = new path(M.loc)
|
||||
|
||||
if("humanoid")
|
||||
if(prob(50))
|
||||
new_mob = new /mob/living/carbon/human(M.loc)
|
||||
else
|
||||
var/hooman = pick(subtypesof(/mob/living/carbon/human/species))
|
||||
new_mob =new hooman(M.loc)
|
||||
|
||||
var/datum/preferences/A = new() //Randomize appearance for the human
|
||||
A.copy_to(new_mob, FALSE)
|
||||
|
||||
var/mob/living/carbon/human/H = new_mob
|
||||
H.update_body()
|
||||
H.update_hair()
|
||||
H.update_body_parts()
|
||||
H.dna.update_dna_identity()
|
||||
|
||||
if(!new_mob)
|
||||
return
|
||||
new_mob.grant_language(/datum/language/common)
|
||||
|
||||
// Some forms can still wear some items
|
||||
for(var/obj/item/W in contents)
|
||||
new_mob.equip_to_appropriate_slot(W)
|
||||
|
||||
M.log_message("became [new_mob.real_name]", LOG_ATTACK, color="orange")
|
||||
|
||||
new_mob.a_intent = INTENT_HARM
|
||||
|
||||
M.wabbajack_act(new_mob)
|
||||
|
||||
to_chat(new_mob, "<span class='warning'>Your form morphs into that of a [randomize].</span>")
|
||||
|
||||
var/poly_msg = CONFIG_GET(keyed_list/policy)["polymorph"]
|
||||
if(poly_msg)
|
||||
to_chat(new_mob, poly_msg)
|
||||
|
||||
M.transfer_observers_to(new_mob)
|
||||
|
||||
qdel(M)
|
||||
return new_mob
|
||||
|
||||
/obj/item/projectile/magic/animate
|
||||
name = "bolt of animation"
|
||||
icon_state = "red_1"
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
nodamage = 1
|
||||
|
||||
/obj/item/projectile/magic/animate/on_hit(atom/target, blocked = FALSE)
|
||||
target.animate_atom_living(firer)
|
||||
..()
|
||||
|
||||
/atom/proc/animate_atom_living(var/mob/living/owner = null)
|
||||
if((isitem(src) || isstructure(src)) && !is_type_in_list(src, GLOB.protected_objects))
|
||||
if(istype(src, /obj/structure/statue/petrified))
|
||||
var/obj/structure/statue/petrified/P = src
|
||||
if(P.petrified_mob)
|
||||
var/mob/living/L = P.petrified_mob
|
||||
var/mob/living/simple_animal/hostile/statue/S = new(P.loc, owner)
|
||||
S.name = "statue of [L.name]"
|
||||
if(owner)
|
||||
S.faction = list("[REF(owner)]")
|
||||
S.icon = P.icon
|
||||
S.icon_state = P.icon_state
|
||||
S.copy_overlays(P, TRUE)
|
||||
S.color = P.color
|
||||
S.atom_colours = P.atom_colours.Copy()
|
||||
if(L.mind)
|
||||
L.mind.transfer_to(S)
|
||||
if(owner)
|
||||
to_chat(S, "<span class='userdanger'>You are an animate statue. You cannot move when monitored, but are nearly invincible and deadly when unobserved! Do not harm [owner], your creator.</span>")
|
||||
P.forceMove(S)
|
||||
return
|
||||
else
|
||||
var/obj/O = src
|
||||
if(istype(O, /obj/item/gun))
|
||||
new /mob/living/simple_animal/hostile/mimic/copy/ranged(loc, src, owner)
|
||||
else
|
||||
new /mob/living/simple_animal/hostile/mimic/copy(loc, src, owner)
|
||||
|
||||
else if(istype(src, /mob/living/simple_animal/hostile/mimic/copy))
|
||||
// Change our allegiance!
|
||||
var/mob/living/simple_animal/hostile/mimic/copy/C = src
|
||||
if(owner)
|
||||
C.ChangeOwner(owner)
|
||||
|
||||
/obj/item/projectile/magic/spellblade
|
||||
name = "blade energy"
|
||||
icon_state = "lavastaff"
|
||||
damage = 15
|
||||
damage_type = BURN
|
||||
flag = "magic"
|
||||
dismemberment = 50
|
||||
nodamage = 0
|
||||
|
||||
/obj/item/projectile/magic/spellblade/on_hit(target)
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/projectile/magic/arcane_barrage
|
||||
name = "arcane bolt"
|
||||
icon_state = "arcane_barrage"
|
||||
damage = 20
|
||||
damage_type = BURN
|
||||
nodamage = 0
|
||||
armour_penetration = 0
|
||||
flag = "magic"
|
||||
hitsound = 'sound/weapons/barragespellhit.ogg'
|
||||
|
||||
/obj/item/projectile/magic/arcane_barrage/on_hit(target)
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/item/projectile/magic/locker
|
||||
name = "locker bolt"
|
||||
icon_state = "locker"
|
||||
nodamage = TRUE
|
||||
flag = "magic"
|
||||
var/weld = TRUE
|
||||
var/created = FALSE //prevents creation of more then one locker if it has multiple hits
|
||||
var/locker_suck = TRUE
|
||||
|
||||
/obj/item/projectile/magic/locker/prehit(atom/A)
|
||||
if(ismob(A) && locker_suck)
|
||||
var/mob/M = A
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [A]!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
if(M.anchored)
|
||||
return ..()
|
||||
M.forceMove(src)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/magic/locker/on_hit(target)
|
||||
if(created)
|
||||
return ..()
|
||||
var/obj/structure/closet/decay/C = new(get_turf(src))
|
||||
if(LAZYLEN(contents))
|
||||
for(var/atom/movable/AM in contents)
|
||||
C.insert(AM)
|
||||
C.welded = weld
|
||||
C.update_icon()
|
||||
created = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/magic/locker/Destroy()
|
||||
locker_suck = FALSE
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.forceMove(get_turf(src))
|
||||
. = ..()
|
||||
|
||||
/obj/structure/closet/decay
|
||||
breakout_time = 600
|
||||
icon_welded = null
|
||||
var/magic_icon = "cursed"
|
||||
var/weakened_icon = "decursed"
|
||||
var/auto_destroy = TRUE
|
||||
|
||||
/obj/structure/closet/decay/Initialize()
|
||||
. = ..()
|
||||
if(auto_destroy)
|
||||
addtimer(CALLBACK(src, .proc/bust_open), 5 MINUTES)
|
||||
addtimer(CALLBACK(src, .proc/magicly_lock), 5)
|
||||
|
||||
/obj/structure/closet/decay/proc/magicly_lock()
|
||||
if(!welded)
|
||||
return
|
||||
icon_state = magic_icon
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/decay/after_weld(weld_state)
|
||||
if(weld_state)
|
||||
unmagify()
|
||||
|
||||
/obj/structure/closet/decay/proc/decay()
|
||||
animate(src, alpha = 0, time = 30)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, src), 30)
|
||||
|
||||
/obj/structure/closet/decay/open(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(icon_state == magic_icon) //check if we used the magic icon at all before giving it the lesser magic icon
|
||||
unmagify()
|
||||
else
|
||||
addtimer(CALLBACK(src, .proc/decay), 15 SECONDS)
|
||||
|
||||
/obj/structure/closet/decay/proc/unmagify()
|
||||
icon_state = weakened_icon
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, .proc/decay), 15 SECONDS)
|
||||
icon_welded = "welded"
|
||||
|
||||
/obj/item/projectile/magic/aoe
|
||||
name = "Area Bolt"
|
||||
desc = "What the fuck does this do?!"
|
||||
damage = 0
|
||||
var/proxdet = TRUE
|
||||
|
||||
/obj/item/projectile/magic/aoe/Range()
|
||||
if(proxdet)
|
||||
for(var/mob/living/L in range(1, get_turf(src)))
|
||||
if(L.stat != DEAD && L != firer && !L.anti_magic_check())
|
||||
return Bump(L)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/projectile/magic/aoe/lightning
|
||||
name = "lightning bolt"
|
||||
icon_state = "tesla_projectile" //Better sprites are REALLY needed and appreciated!~
|
||||
damage = 15
|
||||
damage_type = BURN
|
||||
nodamage = 0
|
||||
speed = 0.3
|
||||
flag = "magic"
|
||||
|
||||
var/tesla_power = 20000
|
||||
var/tesla_range = 15
|
||||
var/tesla_flags = TESLA_MOB_DAMAGE | TESLA_MOB_STUN | TESLA_OBJ_DAMAGE
|
||||
var/chain
|
||||
var/mob/living/caster
|
||||
|
||||
/obj/item/projectile/magic/aoe/lightning/fire(setAngle)
|
||||
if(caster)
|
||||
chain = caster.Beam(src, icon_state = "lightning[rand(1, 12)]", time = INFINITY, maxdistance = INFINITY)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/magic/aoe/lightning/on_hit(target)
|
||||
. = ..()
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
visible_message("<span class='warning'>[src] fizzles on contact with [target]!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
tesla_zap(src, tesla_range, tesla_power, tesla_flags)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/magic/aoe/lightning/Destroy()
|
||||
qdel(chain)
|
||||
. = ..()
|
||||
|
||||
/obj/item/projectile/magic/aoe/fireball
|
||||
name = "bolt of fireball"
|
||||
icon_state = "fireball"
|
||||
damage = 10
|
||||
damage_type = BRUTE
|
||||
nodamage = 0
|
||||
|
||||
//explosion values
|
||||
var/exp_heavy = 0
|
||||
var/exp_light = 2
|
||||
var/exp_flash = 3
|
||||
var/exp_fire = 2
|
||||
|
||||
/obj/item/projectile/magic/aoe/fireball/on_hit(target)
|
||||
. = ..()
|
||||
if(ismob(target))
|
||||
var/mob/living/M = target
|
||||
if(M.anti_magic_check())
|
||||
visible_message("<span class='warning'>[src] vanishes into smoke on contact with [target]!</span>")
|
||||
return
|
||||
M.take_overall_damage(0,10) //between this 10 burn, the 10 brute, the explosion brute, and the onfire burn, your at about 65 damage if you stop drop and roll immediately
|
||||
var/turf/T = get_turf(target)
|
||||
explosion(T, -1, exp_heavy, exp_light, exp_flash, 0, flame_range = exp_fire)
|
||||
|
||||
/obj/item/projectile/magic/aoe/fireball/infernal
|
||||
name = "infernal fireball"
|
||||
exp_heavy = -1
|
||||
exp_light = -1
|
||||
exp_flash = 4
|
||||
exp_fire= 5
|
||||
|
||||
/obj/item/projectile/magic/aoe/fireball/infernal/on_hit(target)
|
||||
. = ..()
|
||||
if(ismob(target))
|
||||
var/mob/living/M = target
|
||||
if(M.anti_magic_check())
|
||||
return
|
||||
var/turf/T = get_turf(target)
|
||||
for(var/i=0, i<50, i+=10)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/explosion, T, -1, exp_heavy, exp_light, exp_flash, FALSE, FALSE, exp_fire), i)
|
||||
@@ -0,0 +1,14 @@
|
||||
/obj/item/projectile/bullet/neurotoxin
|
||||
name = "neurotoxin spit"
|
||||
icon_state = "neurotoxin"
|
||||
damage = 5
|
||||
damage_type = TOX
|
||||
|
||||
/obj/item/projectile/bullet/neurotoxin/on_hit(atom/target, blocked = FALSE)
|
||||
if(isalien(target))
|
||||
knockdown = 0
|
||||
nodamage = TRUE
|
||||
else if(iscarbon(target))
|
||||
var/mob/living/L = target
|
||||
L.Knockdown(100, TRUE, FALSE, 30, 25)
|
||||
return ..()
|
||||
Reference in New Issue
Block a user