From d118de169bc3107e4919db96d0b0a092a914cc5d Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Sat, 7 Dec 2024 17:44:26 -0500
Subject: [PATCH 01/18] Boom, headshot.
---
code/modules/hallucinations/effects/major.dm | 63 ++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index 0b5f4a45ba55..486ea038d9ee 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -408,3 +408,66 @@
if(images && images[1])
images[1].icon = 'icons/mob/alien.dmi'
images[1].icon_state = "alienh_pounce"
+
+/**
+ * # Hallucination - Sniper
+ *
+ * Fires a penetrator round at the target. On hit, knockdown + stam loss + hallucinated blood splatter for a bit.
+ */
+ /obj/effect/hallucination/sniper
+ duration = 15 SECONDS
+
+/obj/effect/hallucination/sniper/Initialize(mapload, mob/living/carbon/target)
+ . = ..()
+
+ // Find a start spot for the sniper bullet
+ var/list/possible_turfs = list()
+ for(var/turf/t in range(world.view + 5, target))
+ if (get_dist(t, target.loc) > world.view)
+ possible_turfs += t
+ if(!length(possible_turfs))
+ return
+
+ // Fire the bullet
+ var/turf/shot_loc = get_turf(pick(possible_turfs))
+ var/obj/item/projectile/bullet/sniper/penetrator/hallucination/bullet = new(shot_loc)
+ bullet.Angle = round(get_angle(src, target))
+ // Start flying
+ bullet.trajectory = new(bullet.x, bullet.y, bullet.z, bullet.pixel_x, bullet.pixel_y, bullet.Angle, SSprojectiles.global_pixel_speed)
+ bullet.last_projectile_move = world.time
+ bullet.has_been_fired = TRUE
+ target.playsound_local(shot_loc, 'sound/weapons/gunshots/gunshot_sniper.ogg', 50)
+
+/obj/item/projectile/bullet/sniper/penetrator/hallucination
+ damage_type = STAMINA
+ knockdown = 2
+
+/obj/item/projectile/bullet/sniper/penetrator/hallucination/on_hit(atom/target, blocked, hit_zone)
+ . = ..()
+ // Force blood splatter
+ var/turf/target_loca = get_turf(target)
+ var/mob/living/L = target
+ var/mob/living/carbon/human/H
+ var/splatter_dir = dir
+ if(starting)
+ splatter_dir = get_dir(starting, target_loca)
+ if(isalien(L))
+ new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(target_loca, splatter_dir)
+ else
+ var/blood_color = "#C80000"
+ if(ishuman(target))
+ H = target
+ blood_color = H.dna.species.blood_color
+ new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_loca, splatter_dir, blood_color)
+ if(prob(33))
+ var/list/shift = list("x" = 0, "y" = 0)
+ var/turf/step_over = get_step(target_loca, splatter_dir)
+
+ if(get_splatter_blockage(step_over, target, splatter_dir, target_loca)) //If you can't cross the tile or any of its relevant obstacles...
+ shift = pixel_shift_dir(splatter_dir) //Pixel shift the blood there instead (so you can't see wallsplatter through walls).
+ else
+ target_loca = step_over
+ L.add_splatter_floor(target_loca, shift_x = shift["x"], shift_y = shift["y"])
+ if(istype(H))
+ for(var/mob/living/carbon/human/M in step_over) //Bloody the mobs who're infront of the spray.
+ M.make_bloody_hands(H.get_blood_dna_list(), H.get_blood_color())
From 16aa1c7deb470cacddb23febf753bf5f3e9ecfaf Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Sat, 7 Dec 2024 19:12:24 -0500
Subject: [PATCH 02/18] If spacing
---
code/modules/hallucinations/effects/major.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index 486ea038d9ee..fc1fe1c2e8e2 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -423,7 +423,7 @@
// Find a start spot for the sniper bullet
var/list/possible_turfs = list()
for(var/turf/t in range(world.view + 5, target))
- if (get_dist(t, target.loc) > world.view)
+ if(get_dist(t, target.loc) > world.view)
possible_turfs += t
if(!length(possible_turfs))
return
From 2dd0cb59254685a5ae49797b62e0804a771ce963 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Sat, 7 Dec 2024 19:33:06 -0500
Subject: [PATCH 03/18] Actually adds the hallucination to the list
---
code/modules/hallucinations/hallucinations.dm | 1 +
1 file changed, 1 insertion(+)
diff --git a/code/modules/hallucinations/hallucinations.dm b/code/modules/hallucinations/hallucinations.dm
index 7e4a4917ada2..acb3e182d1bd 100644
--- a/code/modules/hallucinations/hallucinations.dm
+++ b/code/modules/hallucinations/hallucinations.dm
@@ -26,6 +26,7 @@ GLOBAL_LIST_INIT(hallucinations, list(
/obj/effect/hallucination/assault = 10,
/obj/effect/hallucination/terror_infestation = 10,
/obj/effect/hallucination/loose_energy_ball = 10,
+ /obj/effect/hallucination/sniper = 10,
)
))
From 3d3962140f456bf51d27d88910a3e2dcd30a5722 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Sat, 7 Dec 2024 21:23:58 -0500
Subject: [PATCH 04/18] Spacing, moved fire to async, images, second
hallucination for blood on hit
---
code/modules/hallucinations/effects/major.dm | 72 +++++++++-----------
1 file changed, 34 insertions(+), 38 deletions(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index fc1fe1c2e8e2..e887acd4693f 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -414,7 +414,7 @@
*
* Fires a penetrator round at the target. On hit, knockdown + stam loss + hallucinated blood splatter for a bit.
*/
- /obj/effect/hallucination/sniper
+/obj/effect/hallucination/sniper
duration = 15 SECONDS
/obj/effect/hallucination/sniper/Initialize(mapload, mob/living/carbon/target)
@@ -422,52 +422,48 @@
// Find a start spot for the sniper bullet
var/list/possible_turfs = list()
- for(var/turf/t in range(world.view + 5, target))
- if(get_dist(t, target.loc) > world.view)
- possible_turfs += t
+ for(var/turf/t in RANGE_TURFS(13, target.loc))
+ possible_turfs += t
if(!length(possible_turfs))
return
+ var/turf/shot_loc = get_turf(pick(possible_turfs))
+ INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/effect/hallucination/sniper, fire_bullet), shot_loc, target)
+/obj/effect/hallucination/sniper/proc/fire_bullet(turf/shot_loc, mob/living/carbon/target)
// Fire the bullet
- var/turf/shot_loc = get_turf(pick(possible_turfs))
var/obj/item/projectile/bullet/sniper/penetrator/hallucination/bullet = new(shot_loc)
- bullet.Angle = round(get_angle(src, target))
- // Start flying
- bullet.trajectory = new(bullet.x, bullet.y, bullet.z, bullet.pixel_x, bullet.pixel_y, bullet.Angle, SSprojectiles.global_pixel_speed)
- bullet.last_projectile_move = world.time
- bullet.has_been_fired = TRUE
- target.playsound_local(shot_loc, 'sound/weapons/gunshots/gunshot_sniper.ogg', 50)
+ bullet.hallucinator = target
+ bullet.fire(round(get_angle(src, target)))
+ if(target.client)
+ bullet.bullet_image = image(bullet.icon, bullet, bullet.icon_state, OBJ_LAYER, bullet.dir)
+ target.client.images.Add(bullet.bullet_image)
+ target.playsound_local(target.loc, 'sound/weapons/gunshots/gunshot_sniper.ogg', 50)
+
+/obj/effect/hallucination/sniper_bloodsplatter
+ duration = 15 SECONDS
+ icon = 'icons/effects/blood.dmi'
+ icon_state = "mfloor1"
+ plane = FLOOR_PLANE
+ color = "#A10808"
+
+/obj/effect/hallucination/sniper_bloodsplatter/Initialize(mapload, mob/living/carbon/target)
+ . = ..()
+ icon_state = pick("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
+ color = target.blood_color
/obj/item/projectile/bullet/sniper/penetrator/hallucination
damage_type = STAMINA
knockdown = 2
+ invisibility = 100 // You no see boolet
+ /// The hallucinator
+ var/mob/living/carbon/hallucinator = null
+ /// Handles only the victim seeing it
+ var/image/bullet_image = null
/obj/item/projectile/bullet/sniper/penetrator/hallucination/on_hit(atom/target, blocked, hit_zone)
+ if(!isliving(target))
+ return
+ if(target != hallucinator)
+ return
. = ..()
- // Force blood splatter
- var/turf/target_loca = get_turf(target)
- var/mob/living/L = target
- var/mob/living/carbon/human/H
- var/splatter_dir = dir
- if(starting)
- splatter_dir = get_dir(starting, target_loca)
- if(isalien(L))
- new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(target_loca, splatter_dir)
- else
- var/blood_color = "#C80000"
- if(ishuman(target))
- H = target
- blood_color = H.dna.species.blood_color
- new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_loca, splatter_dir, blood_color)
- if(prob(33))
- var/list/shift = list("x" = 0, "y" = 0)
- var/turf/step_over = get_step(target_loca, splatter_dir)
-
- if(get_splatter_blockage(step_over, target, splatter_dir, target_loca)) //If you can't cross the tile or any of its relevant obstacles...
- shift = pixel_shift_dir(splatter_dir) //Pixel shift the blood there instead (so you can't see wallsplatter through walls).
- else
- target_loca = step_over
- L.add_splatter_floor(target_loca, shift_x = shift["x"], shift_y = shift["y"])
- if(istype(H))
- for(var/mob/living/carbon/human/M in step_over) //Bloody the mobs who're infront of the spray.
- M.make_bloody_hands(H.get_blood_dna_list(), H.get_blood_color())
+ new /obj/effect/hallucination/sniper_bloodsplatter(src.loc, target)
From 8748d675f6fcc4a13032ba6cb218fb1b18f60633 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Sat, 7 Dec 2024 21:29:19 -0500
Subject: [PATCH 05/18] Invisibility define
---
code/modules/hallucinations/effects/major.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index e887acd4693f..a3abdc3b39d2 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -454,7 +454,7 @@
/obj/item/projectile/bullet/sniper/penetrator/hallucination
damage_type = STAMINA
knockdown = 2
- invisibility = 100 // You no see boolet
+ invisibility = INVISIBILITY_MAXIMUM // You no see boolet
/// The hallucinator
var/mob/living/carbon/hallucinator = null
/// Handles only the victim seeing it
From e27fb9f21517f6fbca18e2caa0355ff9108ed21c Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Sun, 8 Dec 2024 13:49:03 -0500
Subject: [PATCH 06/18] Bullet fires, image
---
code/modules/hallucinations/effects/major.dm | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index a3abdc3b39d2..bb4591a5b3d3 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -433,11 +433,25 @@
// Fire the bullet
var/obj/item/projectile/bullet/sniper/penetrator/hallucination/bullet = new(shot_loc)
bullet.hallucinator = target
- bullet.fire(round(get_angle(src, target)))
+
+ // Turn right away
+ var/matrix/M = new
+ var/angle = round(get_angle(shot_loc, target))
+ M.Turn(angle)
+ bullet.transform = M
+
+ // Handle who can see the bullet
if(target.client)
bullet.bullet_image = image(bullet.icon, bullet, bullet.icon_state, OBJ_LAYER, bullet.dir)
+ bullet.bullet_image.transform = M
target.client.images.Add(bullet.bullet_image)
+
+ // Start flying
+ bullet.trajectory = new(bullet.x, bullet.y, bullet.z, bullet.pixel_x, bullet.pixel_y, angle, SSprojectiles.global_pixel_speed)
+ bullet.last_projectile_move = world.time
+ bullet.has_been_fired = TRUE
target.playsound_local(target.loc, 'sound/weapons/gunshots/gunshot_sniper.ogg', 50)
+ START_PROCESSING(SSprojectiles, bullet)
/obj/effect/hallucination/sniper_bloodsplatter
duration = 15 SECONDS
@@ -453,7 +467,7 @@
/obj/item/projectile/bullet/sniper/penetrator/hallucination
damage_type = STAMINA
- knockdown = 2
+ knockdown = 2 SECONDS
invisibility = INVISIBILITY_MAXIMUM // You no see boolet
/// The hallucinator
var/mob/living/carbon/hallucinator = null
From 13d7baf2b6d3e895974642f80d0a69ae8233c910 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Sun, 8 Dec 2024 13:53:10 -0500
Subject: [PATCH 07/18] Hit messages
---
code/modules/hallucinations/effects/major.dm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index bb4591a5b3d3..298916750fd4 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -433,6 +433,8 @@
// Fire the bullet
var/obj/item/projectile/bullet/sniper/penetrator/hallucination/bullet = new(shot_loc)
bullet.hallucinator = target
+ bullet.def_zone = HEAD
+ bullet.suppressed = TRUE
// Turn right away
var/matrix/M = new
From 027f277bc68814a3089ed4a919e7890b25b5f8a6 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Sun, 8 Dec 2024 14:24:33 -0500
Subject: [PATCH 08/18] Boom, headshot
---
code/modules/hallucinations/effects/major.dm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index 298916750fd4..bcba7e906628 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -433,7 +433,7 @@
// Fire the bullet
var/obj/item/projectile/bullet/sniper/penetrator/hallucination/bullet = new(shot_loc)
bullet.hallucinator = target
- bullet.def_zone = HEAD
+ bullet.def_zone = BODY_ZONE_HEAD
bullet.suppressed = TRUE
// Turn right away
@@ -457,14 +457,14 @@
/obj/effect/hallucination/sniper_bloodsplatter
duration = 15 SECONDS
- icon = 'icons/effects/blood.dmi'
- icon_state = "mfloor1"
+ hallucination_icon = 'icons/effects/blood.dmi'
+ hallucination_icon_state = "mfloor1"
plane = FLOOR_PLANE
color = "#A10808"
/obj/effect/hallucination/sniper_bloodsplatter/Initialize(mapload, mob/living/carbon/target)
. = ..()
- icon_state = pick("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
+ hallucination_icon_state = pick("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
color = target.blood_color
/obj/item/projectile/bullet/sniper/penetrator/hallucination
From c63c577db8f74fde6ab278501477188f547c174e Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Mon, 9 Dec 2024 00:13:53 -0500
Subject: [PATCH 09/18] Blood splatter has color now
---
code/modules/hallucinations/effects/major.dm | 8 +++++---
code/modules/hallucinations/hallucinations.dm | 4 ++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index bcba7e906628..ea2d7956ba9c 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -459,13 +459,15 @@
duration = 15 SECONDS
hallucination_icon = 'icons/effects/blood.dmi'
hallucination_icon_state = "mfloor1"
- plane = FLOOR_PLANE
- color = "#A10808"
+ hallucination_color = "#A10808"
/obj/effect/hallucination/sniper_bloodsplatter/Initialize(mapload, mob/living/carbon/target)
+ var/list/b_data = target.get_blood_data(target.get_blood_id())
+ if(b_data && !isnull(b_data["blood_color"]))
+ hallucination_color = b_data["blood_color"]
. = ..()
hallucination_icon_state = pick("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
- color = target.blood_color
+
/obj/item/projectile/bullet/sniper/penetrator/hallucination
damage_type = STAMINA
diff --git a/code/modules/hallucinations/hallucinations.dm b/code/modules/hallucinations/hallucinations.dm
index acb3e182d1bd..f8802de95cc7 100644
--- a/code/modules/hallucinations/hallucinations.dm
+++ b/code/modules/hallucinations/hallucinations.dm
@@ -46,6 +46,8 @@ GLOBAL_LIST_INIT(hallucinations, list(
var/hallucination_icon_state
/// Hallucination override.
var/hallucination_override = FALSE
+ /// Hallucination color
+ var/hallucination_color
/// Hallucination layer.
var/hallucination_layer = MOB_LAYER
/// The mob that sees this hallucination.
@@ -63,6 +65,8 @@ GLOBAL_LIST_INIT(hallucinations, list(
target = hallucination_target
if(hallucination_icon && hallucination_icon_state)
var/image/I = image(hallucination_icon, hallucination_override ? src : get_turf(src), hallucination_icon_state)
+ if(hallucination_color)
+ I.color = hallucination_color
I.override = hallucination_override
I.layer = hallucination_layer
add_icon(I)
From 5a7ba36e3320598a78ce677581b1b09fc5cc9997 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Mon, 9 Dec 2024 19:19:19 -0500
Subject: [PATCH 10/18] Proc ref
---
code/modules/hallucinations/effects/major.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index ea2d7956ba9c..319c4193d2d8 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -427,7 +427,7 @@
if(!length(possible_turfs))
return
var/turf/shot_loc = get_turf(pick(possible_turfs))
- INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/effect/hallucination/sniper, fire_bullet), shot_loc, target)
+ fire_bullet(shot_loc, target)
/obj/effect/hallucination/sniper/proc/fire_bullet(turf/shot_loc, mob/living/carbon/target)
// Fire the bullet
From a6b49398e57a5703e9765a422f962da3ffb2dad1 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Mon, 9 Dec 2024 22:07:10 -0500
Subject: [PATCH 11/18] Damage and target fix
---
code/modules/hallucinations/effects/major.dm | 33 +++++++++++++++++---
1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index 319c4193d2d8..78ad295409d2 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -470,8 +470,7 @@
/obj/item/projectile/bullet/sniper/penetrator/hallucination
- damage_type = STAMINA
- knockdown = 2 SECONDS
+ nodamage = TRUE
invisibility = INVISIBILITY_MAXIMUM // You no see boolet
/// The hallucinator
var/mob/living/carbon/hallucinator = null
@@ -483,5 +482,31 @@
return
if(target != hallucinator)
return
- . = ..()
- new /obj/effect/hallucination/sniper_bloodsplatter(src.loc, target)
+ var/mob/living/hit_target = target
+ var/organ_hit_text = ""
+ if(hit_target.has_limbs)
+ organ_hit_text = " in \the [parse_zone(def_zone)]"
+ hit_target.playsound_local(loc, hitsound, 5, TRUE)
+ hit_target.apply_damage(60, STAMINA, def_zone)
+ hit_target.apply_effects(knockdown = 2 SECONDS)
+ new /obj/effect/hallucination/sniper_bloodsplatter(src.loc, hit_target)
+ to_chat(hit_target, "You're shot by \a [src][organ_hit_text]!")
+
+/obj/item/projectile/bullet/sniper/penetrator/hallucination/Bump(atom/A, yes)
+ if(!yes) // prevents double bumps.
+ return
+ var/turf/target_turf = get_turf(A)
+ prehit(A)
+ var/mob/living/hit_target = A
+ if(hit_target == hallucinator)
+ hit_target.bullet_act(src, def_zone)
+ var/permutation = -1
+ if(permutation == -1 || forcedodge) // the bullet passes through a dense object!
+ if(forcedodge)
+ forcedodge -= 1
+ loc = target_turf
+ if(A)
+ permutated.Add(A)
+ return 0
+ if(!isliving(A))
+ return 0
From 391b76a74f235d8177a39473ba2fcafe0f3c0e02 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Wed, 11 Dec 2024 01:38:59 -0500
Subject: [PATCH 12/18] More efficient bump check
---
code/modules/hallucinations/effects/major.dm | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index 78ad295409d2..ac56cf866731 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -500,13 +500,7 @@
var/mob/living/hit_target = A
if(hit_target == hallucinator)
hit_target.bullet_act(src, def_zone)
- var/permutation = -1
- if(permutation == -1 || forcedodge) // the bullet passes through a dense object!
- if(forcedodge)
- forcedodge -= 1
- loc = target_turf
- if(A)
- permutated.Add(A)
- return 0
- if(!isliving(A))
- return 0
+ loc = target_turf
+ if(A)
+ permutated.Add(A)
+ return 0
From 44eb7352a73bc9d3ac87f3383a070c3522de9d90 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Wed, 11 Dec 2024 11:30:15 -0500
Subject: [PATCH 13/18] Better List Appending
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
---
code/modules/hallucinations/effects/major.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index ac56cf866731..c4f48e3810ba 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -446,7 +446,7 @@
if(target.client)
bullet.bullet_image = image(bullet.icon, bullet, bullet.icon_state, OBJ_LAYER, bullet.dir)
bullet.bullet_image.transform = M
- target.client.images.Add(bullet.bullet_image)
+ target.client.images += bullet.bullet_image
// Start flying
bullet.trajectory = new(bullet.x, bullet.y, bullet.z, bullet.pixel_x, bullet.pixel_y, angle, SSprojectiles.global_pixel_speed)
From 7c43a483df1001dc64cbaff57a33fefb936ce4a3 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Wed, 11 Dec 2024 11:30:33 -0500
Subject: [PATCH 14/18] Better list appending
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
---
code/modules/hallucinations/effects/major.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index c4f48e3810ba..820e7e0f830e 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -502,5 +502,5 @@
hit_target.bullet_act(src, def_zone)
loc = target_turf
if(A)
- permutated.Add(A)
+ permutated += A
return 0
From 45d6efcae6ad15e011d47e810e863c4cc2a1d881 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Wed, 11 Dec 2024 11:30:57 -0500
Subject: [PATCH 15/18] Knockdowm application
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
---
code/modules/hallucinations/effects/major.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index 820e7e0f830e..344478c946f4 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -488,7 +488,7 @@
organ_hit_text = " in \the [parse_zone(def_zone)]"
hit_target.playsound_local(loc, hitsound, 5, TRUE)
hit_target.apply_damage(60, STAMINA, def_zone)
- hit_target.apply_effects(knockdown = 2 SECONDS)
+ hit_target.Knockdown(2 SECONDS)
new /obj/effect/hallucination/sniper_bloodsplatter(src.loc, hit_target)
to_chat(hit_target, "You're shot by \a [src][organ_hit_text]!")
From a7f1747cea5ee23102955addcaac0c6605dfa7c1 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Wed, 11 Dec 2024 11:31:15 -0500
Subject: [PATCH 16/18] Loc to turf
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
---
code/modules/hallucinations/effects/major.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index 344478c946f4..5e8d65386568 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -489,7 +489,7 @@
hit_target.playsound_local(loc, hitsound, 5, TRUE)
hit_target.apply_damage(60, STAMINA, def_zone)
hit_target.Knockdown(2 SECONDS)
- new /obj/effect/hallucination/sniper_bloodsplatter(src.loc, hit_target)
+ new /obj/effect/hallucination/sniper_bloodsplatter(get_turf(src), hit_target)
to_chat(hit_target, "You're shot by \a [src][organ_hit_text]!")
/obj/item/projectile/bullet/sniper/penetrator/hallucination/Bump(atom/A, yes)
From 5553aa139303887484ab8382dcc75b626d6e1f29 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Wed, 11 Dec 2024 19:19:41 -0500
Subject: [PATCH 17/18] Fixes knockdown
---
code/modules/hallucinations/effects/major.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index 5e8d65386568..7284dec707ff 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -488,7 +488,7 @@
organ_hit_text = " in \the [parse_zone(def_zone)]"
hit_target.playsound_local(loc, hitsound, 5, TRUE)
hit_target.apply_damage(60, STAMINA, def_zone)
- hit_target.Knockdown(2 SECONDS)
+ hit_target.apply_effects(knockdown = 2 SECONDS)
new /obj/effect/hallucination/sniper_bloodsplatter(get_turf(src), hit_target)
to_chat(hit_target, "You're shot by \a [src][organ_hit_text]!")
From 352abd50b910cfaef41bbd79a95703611890f8f5 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Fri, 13 Dec 2024 03:00:19 -0500
Subject: [PATCH 18/18] Proper knockdown
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
---
code/modules/hallucinations/effects/major.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm
index 7284dec707ff..e75d0376050e 100644
--- a/code/modules/hallucinations/effects/major.dm
+++ b/code/modules/hallucinations/effects/major.dm
@@ -488,7 +488,7 @@
organ_hit_text = " in \the [parse_zone(def_zone)]"
hit_target.playsound_local(loc, hitsound, 5, TRUE)
hit_target.apply_damage(60, STAMINA, def_zone)
- hit_target.apply_effects(knockdown = 2 SECONDS)
+ hit_target.KnockDown(2 SECONDS)
new /obj/effect/hallucination/sniper_bloodsplatter(get_turf(src), hit_target)
to_chat(hit_target, "You're shot by \a [src][organ_hit_text]!")