Skip to content

Commit

Permalink
Weapon jump attack bug fix (#1982)
Browse files Browse the repository at this point in the history
* fluid sac bug fix

* Additional checks
  • Loading branch information
Halonexus authored Mar 9, 2024
1 parent c31c5f1 commit c106fe7
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 2 deletions.
8 changes: 7 additions & 1 deletion code/game/objects/items/ego_weapons/he.dm
Original file line number Diff line number Diff line change
Expand Up @@ -894,9 +894,15 @@
animate(user, alpha = 1,pixel_x = 0, pixel_z = 16, time = 0.1 SECONDS)
user.pixel_z = 16
sleep(0.5 SECONDS)
if(QDELETED(user))
return
else if(QDELETED(A) || !can_see(user, A, dash_range))
animate(user, alpha = 255,pixel_x = 0, pixel_z = -16, time = 0.1 SECONDS)
user.pixel_z = 0
return
for(var/i in 2 to get_dist(user, A))
step_towards(user,A)
if((get_dist(user, A) < 2))
if(get_dist(user, A) < 2)
JumpAttack(A,user)
to_chat(user, span_warning("You jump towards [A]!"))
animate(user, alpha = 255,pixel_x = 0, pixel_z = -16, time = 0.1 SECONDS)
Expand Down
14 changes: 14 additions & 0 deletions code/game/objects/items/ego_weapons/waw.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,12 @@
animate(user, alpha = 1,pixel_x = 0, pixel_z = 16, time = 0.1 SECONDS)
user.pixel_z = 16
sleep(0.5 SECONDS)
if(QDELETED(user))
return
else if(QDELETED(A) || !can_see(user, A, dash_range))
animate(user, alpha = 255,pixel_x = 0, pixel_z = -16, time = 0.1 SECONDS)
user.pixel_z = 0
return
for(var/i in 2 to get_dist(user, A))
step_towards(user,A)
if((get_dist(user, A) < 2))
Expand Down Expand Up @@ -1999,11 +2005,19 @@
if(combo == 4)
can_attack = FALSE
sleep(0.5 SECONDS)
if(QDELETED(user))
return
playsound(get_turf(src), 'sound/abnormalities/piscinemermaid/waterjump.ogg', 20, 0, 3)
animate(user, alpha = 1,pixel_x = 0, pixel_z = -16, time = 0.1 SECONDS)
user.pixel_z = -16
sleep(0.5 SECONDS)
can_attack = TRUE
if(QDELETED(user))
return
else if(QDELETED(A) || user.z != A.z)
animate(user, alpha = 255,pixel_x = 0, pixel_z = 16, time = 0.1 SECONDS)
user.pixel_z = 0
return
for(var/i in 2 to get_dist(user, A))
step_towards(user,A)
if((get_dist(user, A) < 2))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,13 @@
user.Stun(30 SECONDS)
step_towards(user, src)
sleep(0.3 SECONDS)
if(QDELETED(user))
return TRUE
step_towards(user, src)
new /obj/effect/temp_visual/censored(get_turf(src))
sleep(0.3 SECONDS)
if(QDELETED(user))
return TRUE
playsound(src, 'sound/abnormalities/censored/sacrifice.ogg', 45, FALSE, 10)
if(status_flags & GODMODE) //If CENSORED is still contained within this small time frame
datum_reference.qliphoth_change(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@
user.Stun(30 SECONDS)
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
src.hugging = FALSE
last_worker = null
return
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
src.hugging = FALSE
last_worker = null
return
src.buckle_mob(user, force = TRUE, check_loc = FALSE)
src.icon_state = "teddy_hug"
src.visible_message(span_warning("[src] hugs [user]!"))
Expand All @@ -57,6 +65,11 @@
user.adjustOxyLoss(10, updating_health=TRUE, forced=TRUE)
time_strangled++
SLEEP_CHECK_DEATH(1 SECONDS)
if(QDELETED(user))
src.hugging = FALSE
last_worker = null
src.icon_state = "teddy"
return
src.unbuckle_mob(user, force=TRUE)
src.icon_state = "teddy"
src.visible_message(span_warning("[src] drops [user] to the ground!"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
playsound(src, 'sound/abnormalities/ichthys/jump.ogg', 50, FALSE, 4)
var/turf/target_turf = get_turf(target)
SLEEP_CHECK_DEATH(1 SECONDS)
forceMove(target_turf) //look out, someone is rushing you!
if(target_turf)
forceMove(target_turf) //look out, someone is rushing you!
playsound(src, jump_sound, 50, FALSE, 4)
animate(src, alpha = 255,pixel_x = 0, pixel_z = -16, time = 0.1 SECONDS)
src.pixel_z = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,20 @@
user.Stun(3 SECONDS)
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
user.attack_animal(src)
sleep(0.2 SECONDS)
if(QDELETED(user))
return
user.attack_animal(src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
to_chat(user, span_userdanger("[src] stabs you!"))
user.apply_damage(3000, PALE_DAMAGE, null, user.run_armor_check(null, PALE_DAMAGE), spread_damage = TRUE)
playsound(user, 'sound/weapons/fixer/generic/nail1.ogg', 100, FALSE, 4)
Expand Down
16 changes: 16 additions & 0 deletions code/modules/mob/living/simple_animal/abnormality/he/norinori.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,28 @@
user.Stun(3 SECONDS)
step_towards(user, src)
SLEEP_CHECK_DEATH(0.5 SECONDS)
if(QDELETED(user))
attack_sound = initial(attack_sound)
icon_state = IsContained() ? initial(icon_state) : icon_aggro
return
step_towards(user, src)
SLEEP_CHECK_DEATH(0.5 SECONDS)
if(QDELETED(user))
attack_sound = initial(attack_sound)
icon_state = IsContained() ? initial(icon_state) : icon_aggro
return
user.attack_animal(src)
SLEEP_CHECK_DEATH(0.2 SECONDS)
if(QDELETED(user))
attack_sound = initial(attack_sound)
icon_state = IsContained() ? initial(icon_state) : icon_aggro
return
user.attack_animal(src)
SLEEP_CHECK_DEATH(0.5 SECONDS)
if(QDELETED(user))
attack_sound = initial(attack_sound)
icon_state = IsContained() ? initial(icon_state) : icon_aggro
return
user.visible_message(span_warning("[src] mutilates [user]!"), span_userdanger("[src] mutilates you!"))
user.apply_damage(3000, RED_DAMAGE, null, user.run_armor_check(null, RED_DAMAGE), spread_damage = TRUE)
playsound(user, 'sound/abnormalities/helper/attack.ogg', 100, FALSE, 4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
user.Stun(30 SECONDS)
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
animate(user, alpha = 0,pixel_x = 0, pixel_z = 16, time = 3 SECONDS)
to_chat(user, span_userdanger("You will make it to the top, no matter what!"))
QDEL_IN(user, 3.5 SECONDS)
Expand All @@ -57,13 +61,25 @@
user.Stun(3 SECONDS)
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
work_damage_amount = 7
climbing = FALSE
return
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
work_damage_amount = 7
climbing = FALSE
return
to_chat(user, span_userdanger("You start to climb!"))
animate(user, alpha = 1,pixel_x = 0, pixel_z = 16, time = 3 SECONDS)
user.pixel_z = 16
user.Stun(10 SECONDS)
sleep(6 SECONDS)
if(QDELETED(user))
work_damage_amount = 7
climbing = FALSE
return
var/datum/ego_gifts/giant/BWJEG = new
BWJEG.datum_reference = datum_reference
user.Apply_Gift(BWJEG)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@
user.Stun(30 SECONDS)
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
user.dust()
visible_message(span_warning("[src] drags [user] into itself!"))
playsound(get_turf(src),'sound/effects/wounds/blood2.ogg')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
user.Stun(5 SECONDS)
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return FALSE
step_towards(user, src)
sleep(0.5 SECONDS)
return TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,12 @@
user.Stun(3 SECONDS)
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
step_towards(user, src)
sleep(1.5 SECONDS)
if(QDELETED(user))
return
user.visible_message(span_warning("You feel a stinging pain in your chest, is that...blood?!"))
playsound(get_turf(src), 'sound/abnormalities/fairy_longlegs/attack.ogg', 50, 1)
user.apply_damage(100, RED_DAMAGE, null, user.run_armor_check(null, RED_DAMAGE), spread_damage = TRUE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,16 @@
user.Stun(5 SECONDS)
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
step_towards(user, src)
sleep(0.5 SECONDS)
if(QDELETED(user))
return
to_chat(user, span_userdanger("That was tough work, time for a break."))
buckle_mob(user)
update_icon()
Expand Down

0 comments on commit c106fe7

Please sign in to comment.