Merge pull request #11476 from kevinz000/shield_refactor
Completely overhauls how blocking, shields, reflecting, and anything in between is handled. Has some small gameplay effects.
This commit is contained in:
@@ -90,9 +90,10 @@
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 15, 125, 0, hitsound)
|
||||
|
||||
/obj/item/gun/magic/staff/spellblade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0
|
||||
/obj/item/gun/magic/staff/spellblade/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
// Do not block projectiles.
|
||||
if(attack_type & ATTACK_TYPE_PROJECTILE)
|
||||
return BLOCK_NONE
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/magic/staff/locker
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/atom/movable/firer = null//Who shot it
|
||||
var/atom/fired_from = null // the atom that the projectile was fired from (gun, turret) var/suppressed = FALSE //Attack message
|
||||
var/suppressed = FALSE //Attack message
|
||||
var/candink = FALSE //Can this projectile play the dink sound when hitting the head? var/yo = null
|
||||
var/candink = FALSE //Can this projectile play the dink sound when hitting the head?
|
||||
var/yo = null
|
||||
var/xo = null
|
||||
var/atom/original = null // the original target clicked
|
||||
@@ -695,3 +695,9 @@
|
||||
|
||||
/obj/item/projectile/experience_pressure_difference()
|
||||
return
|
||||
|
||||
/////// MISC HELPERS ////////
|
||||
/// Is this atom reflectable with ""standardized"" reflection methods like you know eshields and deswords and similar
|
||||
/proc/is_energy_reflectable_projectile(atom/A)
|
||||
var/obj/item/projectile/P = A
|
||||
return istype(P) && P.is_reflectable
|
||||
|
||||
Reference in New Issue
Block a user