mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Cult magic attacks and attacks on stun mark can now be blocked by shields (#25771)
* cult attacks and hands blocked by shields * logic fix attempt 1 * old shit * Update code/game/gamemodes/cult/blood_magic.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Signed-off-by: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> * Update code/game/gamemodes/cult/cult_items.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Signed-off-by: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> --------- Signed-off-by: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
M.lastattackerckey = user.ckey
|
||||
|
||||
user.do_attack_animation(M)
|
||||
. = M.attacked_by(src, user, def_zone)
|
||||
. = !M.attacked_by(src, user, def_zone)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
@@ -438,6 +438,11 @@
|
||||
uses = 0
|
||||
qdel(src)
|
||||
return
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
|
||||
playsound(M, 'sound/weapons/genhit.ogg', 50, TRUE)
|
||||
return TRUE
|
||||
add_attack_logs(user, M, "used a cult spell ([src]) on")
|
||||
M.lastattacker = user.real_name
|
||||
|
||||
|
||||
@@ -45,11 +45,17 @@
|
||||
else
|
||||
user.adjustBruteLoss(rand(force/2, force))
|
||||
return
|
||||
if(!IS_CULTIST(target))
|
||||
var/datum/status_effect/cult_stun_mark/S = target.has_status_effect(STATUS_EFFECT_CULT_STUN)
|
||||
if(S)
|
||||
S.trigger()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/melee/cultblade/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
if(!proximity_flag)
|
||||
return
|
||||
if(!isliving(target))
|
||||
return
|
||||
var/mob/living/living_target = target
|
||||
var/datum/status_effect/cult_stun_mark/S = living_target.has_status_effect(STATUS_EFFECT_CULT_STUN)
|
||||
S?.trigger()
|
||||
|
||||
/obj/item/melee/cultblade/pickup(mob/living/user)
|
||||
. = ..()
|
||||
@@ -580,35 +586,40 @@
|
||||
|
||||
/obj/item/cult_spear/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
var/turf/T = get_turf(hit_atom)
|
||||
if(isliving(hit_atom))
|
||||
var/mob/living/L = hit_atom
|
||||
if(IS_CULTIST(L))
|
||||
playsound(src, 'sound/weapons/throwtap.ogg', 50)
|
||||
if(!L.restrained() && L.put_in_active_hand(src))
|
||||
L.visible_message("<span class='warning'>[L] catches [src] out of the air!</span>")
|
||||
else
|
||||
L.visible_message("<span class='warning'>[src] bounces off of [L], as if repelled by an unseen force!</span>")
|
||||
else if(!..())
|
||||
if(L.null_rod_check())
|
||||
return
|
||||
var/datum/status_effect/cult_stun_mark/S = L.has_status_effect(STATUS_EFFECT_CULT_STUN)
|
||||
if(S)
|
||||
S.trigger()
|
||||
else
|
||||
L.KnockDown(10 SECONDS)
|
||||
L.apply_damage(60, STAMINA)
|
||||
L.apply_status_effect(STATUS_EFFECT_CULT_STUN)
|
||||
L.flash_eyes(1, TRUE)
|
||||
if(issilicon(L))
|
||||
L.emp_act(EMP_HEAVY)
|
||||
else if(iscarbon(L))
|
||||
L.Silence(6 SECONDS)
|
||||
L.Stuttering(16 SECONDS)
|
||||
L.CultSlur(20 SECONDS)
|
||||
L.Jitter(16 SECONDS)
|
||||
break_spear(T)
|
||||
else
|
||||
if(!isliving(hit_atom))
|
||||
..()
|
||||
return
|
||||
|
||||
var/mob/living/L = hit_atom
|
||||
if(IS_CULTIST(L))
|
||||
playsound(src, 'sound/weapons/throwtap.ogg', 50)
|
||||
if(!L.restrained() && L.put_in_active_hand(src))
|
||||
L.visible_message("<span class='warning'>[L] catches [src] out of the air!</span>")
|
||||
else
|
||||
L.visible_message("<span class='warning'>[src] bounces off of [L], as if repelled by an unseen force!</span>")
|
||||
return
|
||||
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(L.null_rod_check())
|
||||
return
|
||||
var/datum/status_effect/cult_stun_mark/S = L.has_status_effect(STATUS_EFFECT_CULT_STUN)
|
||||
if(S)
|
||||
S.trigger()
|
||||
else
|
||||
L.KnockDown(10 SECONDS)
|
||||
L.apply_damage(60, STAMINA)
|
||||
L.apply_status_effect(STATUS_EFFECT_CULT_STUN)
|
||||
L.flash_eyes(1, TRUE)
|
||||
if(issilicon(L))
|
||||
L.emp_act(EMP_HEAVY)
|
||||
else if(iscarbon(L))
|
||||
L.Silence(6 SECONDS)
|
||||
L.Stuttering(16 SECONDS)
|
||||
L.CultSlur(20 SECONDS)
|
||||
L.Jitter(16 SECONDS)
|
||||
break_spear(T)
|
||||
|
||||
/obj/item/cult_spear/proc/break_spear(turf/T)
|
||||
if(!T)
|
||||
@@ -620,9 +631,14 @@
|
||||
playsound(T, 'sound/effects/glassbr3.ogg', 100)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/cult_spear/attack(mob/living/M, mob/living/user, def_zone)
|
||||
/obj/item/cult_spear/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
var/datum/status_effect/cult_stun_mark/S = M.has_status_effect(STATUS_EFFECT_CULT_STUN)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
if(!isliving(target))
|
||||
return
|
||||
var/mob/living/living_target = target
|
||||
var/datum/status_effect/cult_stun_mark/S = living_target.has_status_effect(STATUS_EFFECT_CULT_STUN)
|
||||
if(S && HAS_TRAIT(src, TRAIT_WIELDED))
|
||||
S.trigger()
|
||||
|
||||
|
||||
@@ -43,10 +43,6 @@
|
||||
M.reagents.del_reagent("holywater")
|
||||
add_attack_logs(user, M, "Hit with [src], removing the holy water from them")
|
||||
return FALSE
|
||||
else
|
||||
var/datum/status_effect/cult_stun_mark/S = M.has_status_effect(STATUS_EFFECT_CULT_STUN)
|
||||
if(S)
|
||||
S.trigger()
|
||||
. = ..()
|
||||
|
||||
/obj/item/melee/cultblade/dagger/attack_self(mob/user)
|
||||
|
||||
@@ -570,6 +570,7 @@ emp_act
|
||||
update_inv_w_uniform()
|
||||
|
||||
dna.species.spec_attacked_by(I, user, affecting, user.a_intent, src)
|
||||
return TRUE
|
||||
|
||||
//this proc handles being hit by a thrown atom
|
||||
/mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
|
||||
|
||||
Reference in New Issue
Block a user