Merge pull request #11627 from kevinz000/combat_rework

"Unofficial" Combat Rework Part 3: Blocking/Parrying
This commit is contained in:
Lin
2020-06-12 16:39:11 -05:00
committed by GitHub
83 changed files with 2073 additions and 462 deletions

View File

@@ -53,6 +53,7 @@
..()
/obj/item/minigunpack/dropped(mob/user)
. = ..()
if(armed)
user.dropItemToGround(gun, TRUE)
@@ -125,6 +126,7 @@
return
/obj/item/gun/ballistic/minigun/dropped(mob/user)
. = ..()
if(ammo_pack)
ammo_pack.attach_gun(user)
else
@@ -144,4 +146,5 @@
. = ..()
/obj/item/gun/ballistic/minigun/dropped(mob/living/user)
. = ..()
ammo_pack.attach_gun(user)

View File

@@ -115,6 +115,7 @@
icon_state = "flatgun"
/obj/item/gun/ballistic/automatic/pistol/stickman/pickup(mob/living/user)
. = ..()
to_chat(user, "<span class='notice'>As you try to pick up [src], it slips out of your grip..</span>")
if(prob(50))
to_chat(user, "<span class='notice'>..and vanishes from your vision! Where the hell did it go?</span>")

View File

@@ -162,7 +162,15 @@
/obj/item/projectile/proc/prehit(atom/target)
return TRUE
/obj/item/projectile/proc/on_hit(atom/target, blocked = FALSE)
/**
* Called when we hit something.
*
* @params
* * target - what we hit
* * blocked - 0 to 100 percentage mitigation/block
* * def zone - where we hit if we hit a mob.
*/
/obj/item/projectile/proc/on_hit(atom/target, blocked = 0, def_zone)
if(fired_from)
SEND_SIGNAL(fired_from, COMSIG_PROJECTILE_ON_HIT, firer, target, Angle)
var/turf/target_loca = get_turf(target)