mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 07:32:02 +00:00
Implements Maim / Maiming projectiles. (#3750)
This commit is contained in:
@@ -320,12 +320,9 @@
|
||||
muzzle_type = /obj/effect/projectile/trilaser/muzzle
|
||||
tracer_type = /obj/effect/projectile/trilaser/tracer
|
||||
impact_type = /obj/effect/projectile/trilaser/impact
|
||||
|
||||
maiming = 1
|
||||
maim_rate = 3
|
||||
/obj/item/projectile/beam/plasmacutter/on_impact(var/atom/A)
|
||||
strike_thing(A)
|
||||
. = ..()
|
||||
|
||||
/obj/item/projectile/beam/plasmacutter/proc/strike_thing(var/atom/A)
|
||||
if(istype(A, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = A
|
||||
if(prob(33))
|
||||
@@ -334,14 +331,4 @@
|
||||
else if(prob(88))
|
||||
M.emitter_blasts_taken += 2
|
||||
M.emitter_blasts_taken += 1
|
||||
|
||||
else if(istype(A, /mob/living))
|
||||
var/mob/living/L = A
|
||||
L.apply_damage(damage, BRUTE, def_zone)
|
||||
if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/ultimate_def_zone = check_zone(def_zone)
|
||||
if(H.has_organ(ultimate_def_zone))
|
||||
var/obj/item/organ/external/E = H.get_organ(ultimate_def_zone)
|
||||
if(E.damage > 15 && prob((3*E.damage)))
|
||||
E.droplimb(0,DROPLIMB_EDGE)
|
||||
. = ..()
|
||||
@@ -63,6 +63,17 @@
|
||||
var/hitscan = 0 // whether the projectile should be hitscan
|
||||
var/step_delay = 1 // the delay between iterations if not a hitscan projectile
|
||||
|
||||
//For Maim / Maiming.
|
||||
var/maiming = 0 //Enables special limb dismemberment calculation; used primarily for ranged weapons that can maim, but do not do brute damage.
|
||||
var/maim_rate = 0 //Factor that the recipiant will be maimed by the projectile (NOT OUT OF 100%.)
|
||||
var/clean_cut = 0 //Is the delimbning painful and unclean? Probably. Can be a function or proc, if you're doing something odd.
|
||||
var/maim_type = DROPLIMB_EDGE
|
||||
/*Does the projectile simply lop/tear the limb off, or does it vaporize it?
|
||||
Set maim_type to DROPLIMB_EDGE to chop off the limb
|
||||
set maim_type to DROPLIMB_BURN to vaporize it.
|
||||
set maim_type to DROPLIMB_BLUNT to gib (Explode/Hamburger) the limb.
|
||||
*/
|
||||
|
||||
// effect types to be used
|
||||
var/muzzle_type
|
||||
var/tracer_type
|
||||
@@ -75,24 +86,37 @@
|
||||
|
||||
//TODO: make it so this is called more reliably, instead of sometimes by bullet_act() and sometimes not
|
||||
/obj/item/projectile/proc/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null)
|
||||
if(blocked >= 100) return 0//Full block
|
||||
if(!isliving(target)) return 0
|
||||
if(isanimal(target)) return 0
|
||||
if(blocked >= 100)
|
||||
return 0//Full block
|
||||
if(!isliving(target))
|
||||
return 0
|
||||
if(isanimal(target))
|
||||
return 0
|
||||
|
||||
var/mob/living/L = target
|
||||
if (agony && ishuman(target))
|
||||
|
||||
if (ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/organ/external/organ = H.get_organ(def_zone)
|
||||
var/armor = H.getarmor_organ(organ, check_armour)
|
||||
agony = max(0, agony - armor)
|
||||
if(agony)
|
||||
agony = max(0, agony - armor)
|
||||
|
||||
L.apply_effects(stun, weaken, paralyze, 0, stutter, eyeblur, drowsy, agony, incinerate, blocked) // add in AGONY!
|
||||
//radiation protection is handled separately from other armour types.
|
||||
L.apply_effect(irradiate, IRRADIATE, L.getarmor(null, "rad"))
|
||||
/*
|
||||
Maim / Maiming check. Disembody a limb depending on several factors.
|
||||
|
||||
can_be_maimed and maim_bonus are defined on 'obj/item/organ/external'.
|
||||
*/
|
||||
if(organ.can_be_maimed && maiming)
|
||||
if(prob(maim_rate * (organ.get_damage() * organ.maim_bonus)))
|
||||
organ.droplimb(clean_cut,maim_type)
|
||||
L.apply_effects(stun, weaken, paralyze, 0, stutter, eyeblur, drowsy, agony, incinerate, blocked)
|
||||
L.apply_effect(irradiate, IRRADIATE, L.getarmor(null, "rad")) //radiation protection is handled separately from other armour types.
|
||||
return 1
|
||||
|
||||
//called when the projectile stops flying because it collided with something
|
||||
/obj/item/projectile/proc/on_impact(var/atom/A)
|
||||
impact_effect(effect_transform) // generate impact effect
|
||||
impact_effect(effect_transform) // generate an impact effect
|
||||
return
|
||||
|
||||
//Checks if the projectile is eligible for embedding. Not that it necessarily will.
|
||||
|
||||
@@ -135,6 +135,9 @@
|
||||
|
||||
/obj/item/projectile/bullet/pistol/strong //revolvers and matebas
|
||||
damage = 60
|
||||
maiming = 1
|
||||
maim_rate = 25
|
||||
maim_type = DROPLIMB_BLUNT
|
||||
|
||||
/obj/item/projectile/bullet/pistol/rubber //"rubber" bullets
|
||||
name = "rubber bullet"
|
||||
@@ -149,6 +152,8 @@
|
||||
/obj/item/projectile/bullet/shotgun
|
||||
name = "slug"
|
||||
damage = 60
|
||||
maiming = 1 //To prevent rando headgibbing, it uses the special headgib damage model. Don't get me wrong, it'll still kill the man, but could be cloned.
|
||||
maim_rate = 25
|
||||
|
||||
/obj/item/projectile/bullet/shotgun/beanbag //because beanbags are not bullets
|
||||
name = "beanbag"
|
||||
@@ -175,6 +180,9 @@
|
||||
pellets = 6
|
||||
range_step = 1
|
||||
spread_step = 10
|
||||
maiming = 1
|
||||
maim_rate = 1 //6% base chance of gib if all pellets hit. Likely to blow limbs at point blank. (As it should be.)
|
||||
maim_type = DROPLIMB_BLUNT
|
||||
|
||||
/* "Rifle" rounds */
|
||||
|
||||
@@ -199,6 +207,9 @@
|
||||
penetrating = 5
|
||||
armor_penetration = 80
|
||||
hitscan = 1 //so the PTR isn't useless as a sniper weapon
|
||||
maiming = 1
|
||||
maim_rate = 60
|
||||
maim_type = DROPLIMB_BLUNT
|
||||
|
||||
/obj/item/projectile/bullet/rifle/vintage
|
||||
name = "vintage bullet"
|
||||
|
||||
Reference in New Issue
Block a user