Files
CHOMPStation2/code/modules/projectiles/projectile/blob.dm
CHOMPStation2StaffMirrorBot 55d696e503 [MIRROR] next new to init (#10524)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-03-24 22:10:59 +01:00

77 lines
2.3 KiB
Plaintext

/obj/item/projectile/energy/blob //Not super strong.
name = "spore"
icon_state = "declone"
damage = 3
armor_penetration = 40
damage_type = BRUTE
check_armour = "melee"
pass_flags = PASSTABLE | PASSBLOB
fire_sound = 'sound/effects/slime_squish.ogg'
var/splatter = FALSE // Will this make a cloud of reagents?
var/splatter_volume = 5 // The volume of its chemical container, for said cloud of reagents.
var/list/my_chems = list(REAGENT_ID_MOLD)
/obj/item/projectile/energy/blob/splattering
splatter = TRUE
/obj/item/projectile/energy/blob/Initialize(mapload)
. = ..()
if(splatter)
create_reagents(splatter_volume)
ready_chemicals()
/obj/item/projectile/energy/blob/on_impact(var/atom/A)
if(splatter)
var/turf/location = get_turf(src)
var/datum/effect/effect/system/smoke_spread/chem/blob/S = new /datum/effect/effect/system/smoke_spread/chem/blob
S.attach(location)
S.set_up(reagents, rand(1, splatter_volume), 0, location)
playsound(location, 'sound/effects/slime_squish.ogg', 30, 1, -3)
spawn(0)
S.start()
..()
/obj/item/projectile/energy/blob/proc/ready_chemicals()
if(reagents)
var/reagent_vol = (round((splatter_volume / my_chems.len) * 100) / 100) //Cut it at the hundreds place, please.
for(var/reagent in my_chems)
reagents.add_reagent(reagent, reagent_vol)
/obj/item/projectile/energy/blob/toxic
damage_type = TOX
check_armour = "bio"
my_chems = list(REAGENT_ID_AMATOXIN)
/obj/item/projectile/energy/blob/toxic/splattering
splatter = TRUE
/obj/item/projectile/energy/blob/acid
damage_type = BURN
check_armour = "bio"
my_chems = list(REAGENT_ID_SACID, REAGENT_ID_MOLD)
/obj/item/projectile/energy/blob/acid/splattering
splatter = TRUE
/obj/item/projectile/energy/blob/combustible
splatter = TRUE
flammability = 0.25
my_chems = list(REAGENT_ID_FUEL, REAGENT_ID_MOLD)
/obj/item/projectile/energy/blob/freezing
my_chems = list(REAGENT_ID_FROSTOIL)
modifier_type_to_apply = /datum/modifier/chilled
modifier_duration = 0.25 MINUTE //CHOMPedit: Determined to be to long of a slowdown time.
/obj/item/projectile/energy/blob/freezing/splattering
splatter = TRUE
/obj/item/projectile/bullet/thorn
name = "spike"
icon_state = "SpearFlight"
damage = 20
damage_type = BIOACID
armor_penetration = 20
penetrating = 3
fire_sound = 'sound/effects/slime_squish.ogg'