mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-22 05:17:38 +01:00
Special Swords and amputation (#715)
changes: rscadd: "Chainswords now have an improved animation." rscadd: "Chainswords and energy blades can no longer get embedded in people." rscadd: "Chainswords and energy blades can now be used as surgical tools to amputate limbs. Chainswords are messy. Energy blades will cut clean and cauterize the wound" tweak: "Surgery messages about amputating bodyparts are now very noticeable" tweak: "Cauterising wounds with a welding tool is much more reliable. Cauterising with a cigarette is no longer effective." bugfix: "Fixed chainsword held sprite not updating when toggled"
This commit is contained in:
@@ -302,13 +302,15 @@ emp_act
|
||||
if (armor)
|
||||
damage /= armor+1
|
||||
|
||||
//blunt objects should really not be embedding in things unless a huge amount of force is involved
|
||||
var/embed_chance = weapon_sharp? damage/I.w_class : damage/(I.w_class*3)
|
||||
var/embed_threshold = weapon_sharp? 5*I.w_class : 15*I.w_class
|
||||
|
||||
//Sharp objects will always embed if they do enough damage.
|
||||
if((weapon_sharp && damage > (10*I.w_class)) || (damage > embed_threshold && prob(embed_chance)))
|
||||
affecting.embed(I)
|
||||
if (I.can_embed)//If this weapon is allowed to embed in people
|
||||
//blunt objects should really not be embedding in things unless a huge amount of force is involved
|
||||
var/embed_chance = weapon_sharp? damage/I.w_class : damage/(I.w_class*3)
|
||||
var/embed_threshold = weapon_sharp? 5*I.w_class : 15*I.w_class
|
||||
|
||||
//Sharp objects will always embed if they do enough damage.
|
||||
if((weapon_sharp && damage > (10*I.w_class)) || (damage > embed_threshold && prob(embed_chance)))
|
||||
affecting.embed(I)
|
||||
return 1
|
||||
|
||||
//this proc handles being hit by a thrown atom
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
/obj/item/weapon/scalpel/laser3 = 95, \
|
||||
/obj/item/weapon/scalpel/laser2 = 85, \
|
||||
/obj/item/weapon/scalpel/laser1 = 75, \
|
||||
/obj/item/weapon/melee/energy/sword = 5
|
||||
//Removed energy sword from here. with a 5% chance of success, it's a feature nobody ever used anyway
|
||||
//Energy swords amputate instead now
|
||||
)
|
||||
priority = 2
|
||||
min_duration = 90
|
||||
@@ -283,11 +284,11 @@
|
||||
target.apply_damage(12, BRUTE, affected, sharp=1)
|
||||
|
||||
/datum/surgery_step/generic/cauterize
|
||||
allowed_tools = list(
|
||||
allowed_tools = list(//Fixed these tool probabilities because they were dumb
|
||||
/obj/item/weapon/cautery = 100, \
|
||||
/obj/item/clothing/mask/smokable/cigarette = 75, \
|
||||
/obj/item/clothing/mask/smokable/cigarette = 25, \
|
||||
/obj/item/weapon/flame/lighter = 50, \
|
||||
/obj/item/weapon/weldingtool = 25
|
||||
/obj/item/weapon/weldingtool = 75
|
||||
)
|
||||
|
||||
min_duration = 70
|
||||
@@ -322,7 +323,9 @@
|
||||
/datum/surgery_step/generic/amputate
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/material/hatchet = 75
|
||||
/obj/item/weapon/melee/energy = 100, \
|
||||
/obj/item/weapon/melee/chainsword = 100, \
|
||||
/obj/item/weapon/material/hatchet = 55
|
||||
)
|
||||
|
||||
min_duration = 110
|
||||
@@ -336,20 +339,49 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
|
||||
if (istype(tool, /obj/item/weapon/melee/energy))
|
||||
var/obj/item/weapon/melee/energy/E = tool
|
||||
if (!E.active)
|
||||
user << "\red The energy blade is not turned on!"
|
||||
return 0
|
||||
|
||||
if (istype(tool, /obj/item/weapon/melee/chainsword))
|
||||
var/obj/item/weapon/melee/chainsword/E = tool
|
||||
if (!E.active)
|
||||
user << "\red The blades aren't spinning, you can't cut anything!"
|
||||
return 0
|
||||
|
||||
return !affected.cannot_amputate
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \
|
||||
"You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].")
|
||||
user.visible_message("<span class='danger'>[user] is beginning to amputate [target]'s [affected.name] with \the [tool].</span>" , \
|
||||
"<span class='danger'>You begin to cut through [target]'s [affected.amputation_point] with \the [tool].</span>")
|
||||
target.custom_pain("Your [affected.amputation_point] is being ripped apart!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].", \
|
||||
"\blue You amputate [target]'s [affected.name] with \the [tool].")
|
||||
affected.droplimb(1,DROPLIMB_EDGE)
|
||||
user.visible_message("<span class='danger'>[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].</span>", \
|
||||
"<span class='danger'>You amputate [target]'s [affected.name] with \the [tool].</span>")
|
||||
|
||||
var/clean = 1
|
||||
if (istype(tool, /obj/item/weapon/melee/chainsword))//Chainswords rip and tear, so the limb removal is not clean
|
||||
clean = 0
|
||||
|
||||
var/var/obj/item/organ/external/parent = affected.parent//Cache the parent organ of the limb before we sever it
|
||||
affected.droplimb(clean,DROPLIMB_EDGE)
|
||||
|
||||
if (istype(tool, /obj/item/weapon/melee/energy))//Code for energy weapons cauterising the cut
|
||||
spawn(1)
|
||||
affected = parent
|
||||
affected.open = 0//Close open wounds
|
||||
for (var/datum/wound/lost_limb/W in affected.wounds)
|
||||
W.disinfected = 1//Cleanse the wound of any germs
|
||||
W.autoheal_cutoff = INFINITY//Allow the wound to auto-heal, regardless of damage
|
||||
W.max_bleeding_stage = 0//Stop bleeding
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
Reference in New Issue
Block a user