Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates dismemberment/delimbing and weapon sharpness #12050

Merged
merged 9 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,10 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
#define BLOCKING_HUNTER (1<<3) //is the item more suited to fighting fauna?

// Object/Item sharpness
#define IS_BLUNT 0
#define IS_SHARP 1
#define IS_SHARP_ACCURATE 2
#define BLUNT 0 //Can only remove limbs if they're easy to remove
#define SHARP 1 //Can only remove limbs if target is dead
#define SHARP_DISMEMBER 2 //Can only remove limbs if the limb is already disabled
#define SHARP_DISMEMBER_EASY 3 //Has a chance equal to weapon force to remove limb on every attack, in some cases taking them off in one swing

//! ### His Grace.
#define HIS_GRACE_SATIATED 0 //! He hungers not. If bloodthirst is set to this, His Grace is asleep.
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/clown_ops/clown_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
hitsound = null
attack_verb_on = list("slips")
clumsy_check = FALSE
sharpness = IS_BLUNT
sharpness = BLUNT
sword_color = "yellow"
heat = 0
light_color = "#ffff00"
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/flags_cover = 0
/// Used to define how hot it's flame will be when lit. Used it igniters, lighters, flares, candles, etc.
var/heat = 0
/// IS_BLUNT | IS_SHARP | IS_SHARP_ACCURATE Used to define whether the item is sharp or blunt. IS_SHARP is used if the item is supposed to be able to cut open things. See _DEFINES/combat.dm
var/sharpness = IS_BLUNT
/// BLUNT | SHARP | SHARP_DISMEMBER | SHARP_DISMEMBER_EASY Used to define whether the item is sharp or blunt. SHARP is used if the item is supposed to be able to cut open things. See _DEFINES/combat.dm
var/sharpness = BLUNT
//this multiplies an attacks force for secondary effects like attacking blocking implements, dismemberment, and knocking a target silly
var/attack_weight = 1

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/chainsaw.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
attack_verb_continuous = list("saws", "tears", "lacerates", "cuts", "chops", "dices")
attack_verb_simple = list("saw", "tear", "lacerate", "cut", "chop", "dice")
hitsound = "swing_hit"
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER
bleed_force = BLEED_DEEP_WOUND
actions_types = list(/datum/action/item_action/startchainsaw)
var/on = FALSE
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/cosmetics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
attack_verb_continuous = list("slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts")
attack_verb_simple = list("slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_SURFACE
tool_behaviour = TOOL_SCALPEL
else
Expand All @@ -288,7 +288,7 @@
attack_verb_continuous = list("stubs", "pokes")
attack_verb_simple = list("stub", "poke")
hitsound = 'sound/weapons/genhit.ogg'
sharpness = IS_BLUNT
sharpness = BLUNT
bleed_force = 0
tool_behaviour = null

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/dualsaber.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
if(user.dna.check_mutation(HULK))
to_chat(user, "<span class='warning'>You lack the grace to wield this!</span>")
return COMPONENT_TWOHANDED_BLOCK_WIELD
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER_EASY
bleed_force = BLEED_DEEP_WOUND
w_class = w_class_on
hitsound = 'sound/weapons/blade1.ogg'
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/fireaxe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
attack_verb_continuous = list("attacks", "chops", "cleaves", "tears", "lacerates", "cuts")
attack_verb_simple = list("attack", "chop", "cleave", "tear", "lacerate", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER
bleed_force = BLEED_CUT
max_integrity = 200
armor_type = /datum/armor/item_fireaxe
Expand Down
22 changes: 11 additions & 11 deletions code/game/objects/items/holy_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
block_flags = BLOCKING_NASTY | BLOCKING_ACTIVE
block_level = 1
block_power = 30
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER
bleed_force = BLEED_CUT
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb_continuous = list("attacks", "slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts")
Expand Down Expand Up @@ -456,7 +456,7 @@
block_power = 15
block_flags = BLOCKING_ACTIVE | BLOCKING_NASTY
slot_flags = ITEM_SLOT_BACK
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER
bleed_force = BLEED_CUT
attack_verb_continuous = list("chops", "slices", "cuts", "reaps")
attack_verb_simple = list("chop", "slice", "cut", "reap")
Expand Down Expand Up @@ -579,7 +579,7 @@
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
w_class = WEIGHT_CLASS_HUGE
item_flags = ABSTRACT | ISWEAPON
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER
bleed_force = BLEED_CUT
attack_verb_continuous = list("saws", "tears", "lacerates", "cuts", "chops", "dices")
attack_verb_simple = list("saw", "tear", "lacerate", "cut", "chop", "dice")
Expand All @@ -605,7 +605,7 @@
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
worn_icon_state = "render"
hitsound = 'sound/items/bikehorn.ogg'
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_CUT
attack_verb_continuous = list("attacks", "slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts")
attack_verb_simple = list("attack", "slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut")
Expand Down Expand Up @@ -659,7 +659,7 @@
throw_speed = 4
throw_range = 7
throwforce = 30
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_CUT
attack_verb_continuous = list("enlightens", "redpills")
attack_verb_simple = list("enlighten", "redpill")
Expand All @@ -675,7 +675,7 @@
slot_flags = null
item_flags = ABSTRACT | ISWEAPON
w_class = WEIGHT_CLASS_HUGE
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER
bleed_force = BLEED_CUT

/obj/item/nullrod/armblade/Initialize(mapload)
Expand Down Expand Up @@ -718,7 +718,7 @@
force = 14
block_power = 40
slot_flags = ITEM_SLOT_BACK
sharpness = IS_BLUNT
sharpness = BLUNT
hitsound = "swing_hit"
attack_verb_continuous = list("smashes", "slams", "whacks", "thwacks")
attack_verb_simple = list("smash", "slam", "whack", "thwack")
Expand All @@ -737,7 +737,7 @@
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
w_class = WEIGHT_CLASS_HUGE
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_CUT
slot_flags = null
hitsound = 'sound/weapons/bladeslice.ogg'
Expand Down Expand Up @@ -773,7 +773,7 @@
attack_verb_continuous = list("pokes", "impales", "pierces", "jabs")
attack_verb_simple = list("poke", "impale", "pierce", "jab")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_CUT

/obj/item/nullrod/egyptian
Expand Down Expand Up @@ -816,7 +816,7 @@
icon = 'icons/obj/clockwork_objects.dmi'
slot_flags = ITEM_SLOT_BELT
armour_penetration = 10
sharpness = IS_SHARP_ACCURATE
sharpness = SHARP
bleed_force = BLEED_CUT
w_class = WEIGHT_CLASS_BULKY
attack_verb_continuous = list("stabs", "pokes", "slashes", "clocks")
Expand All @@ -836,7 +836,7 @@
throw_speed = 3
throw_range = 6
tool_behaviour = TOOL_KNIFE
sharpness = IS_SHARP_ACCURATE
sharpness = SHARP
w_class = WEIGHT_CLASS_SMALL

/obj/item/nullrod/rainbow_knife/afterattack(atom/O, mob/user, proximity)
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/knives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
custom_materials = list(/datum/material/iron=12000)
attack_verb_continuous = list("slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts")
attack_verb_simple = list("slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut")
sharpness = IS_SHARP_ACCURATE
sharpness = SHARP
bleed_force = BLEED_CUT
armor_type = /datum/armor/item_knife
var/bayonet = FALSE //Can this be attached to a gun?
Expand Down Expand Up @@ -76,6 +76,7 @@
attack_verb_simple = list("cleave", "slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut")
w_class = WEIGHT_CLASS_NORMAL
custom_price = 60
sharpness = SHARP_DISMEMBER //This is a big boy knife

/obj/item/knife/hunting
name = "hunting knife"
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/items/melee/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
attack_verb_off = list("taps", "pokes")
throw_speed = 3
throw_range = 5
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER_EASY
bleed_force_on = BLEED_DEEP_WOUND
embedding = list("embed_chance" = 200, "armour_block" = 60, "max_pain_mult" = 15)
armour_penetration = 35
Expand Down Expand Up @@ -139,7 +139,7 @@
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
sword_color = null //stops icon from breaking when turned on.
w_class = WEIGHT_CLASS_NORMAL
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER_EASY
bleed_force_on = BLEED_DEEP_WOUND
light_color = "#40ceff"
tool_behaviour = TOOL_SAW
Expand Down Expand Up @@ -170,7 +170,7 @@
sword_color = null //stops icon from breaking when turned on.
hitcost = 75 //Costs more than a standard cyborg esword
w_class = WEIGHT_CLASS_NORMAL
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER_EASY
bleed_force_on = BLEED_DEEP_WOUND
light_color = "#40ceff"
tool_behaviour = TOOL_SAW
Expand Down Expand Up @@ -268,7 +268,7 @@
throw_range = 1
w_class = WEIGHT_CLASS_BULKY//So you can't hide it in your pocket or some such.
var/datum/effect_system/spark_spread/spark_system
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER_EASY
bleed_force_on = BLEED_DEEP_WOUND

//Most of the other special functions are handled in their own files. aka special snowflake code so kewl
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/melee/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb_continuous = list("attacks", "slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts")
attack_verb_simple = list("attack", "slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut")
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER
bleed_force = BLEED_CUT

/obj/item/melee/synthetic_arm_blade/Initialize(mapload)
Expand All @@ -70,7 +70,7 @@
throwforce = 10
w_class = WEIGHT_CLASS_BULKY
armour_penetration = 75
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER
bleed_force = BLEED_CUT
attack_verb_continuous = list("slashes", "cuts")
attack_verb_simple = list("slash", "cut")
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/melee/transforming.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/melee/transforming
sharpness = IS_SHARP
sharpness = SHARP_DISMEMBER
bleed_force = 0
var/active = FALSE
var/force_on = 30 //force when active
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/mop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@
throw_speed = 4
attack_verb_continuous = list("mops", "stabs", "shanks", "jousts")
attack_verb_simple = list("mop", "stab", "shank", "joust")
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_SURFACE
embedding = list("armour_block" = 40)
2 changes: 1 addition & 1 deletion code/game/objects/items/pitchfork.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
attack_verb_continuous = list("attacks", "impales", "pierces")
attack_verb_simple = list("attack", "impale", "pierce")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_CUT
max_integrity = 200
armor_type = /datum/armor/item_pitchfork
Expand Down
5 changes: 1 addition & 4 deletions code/game/objects/items/sharpener.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
var/increment = 4
var/max = 30
var/prefix = "sharpened"
var/requires_sharpness = 1


/obj/item/sharpener/attackby(obj/item/I, mob/user, params)
Expand All @@ -18,7 +17,7 @@
if(I.force >= max || I.throwforce >= max)//no esword sharpening
to_chat(user, "<span class='warning'>[I] is much too powerful to sharpen further!</span>")
return
if(requires_sharpness && !I.is_sharp())
if(!I.is_sharp())
to_chat(user, "<span class='warning'>You can only sharpen items that are already sharp, such as knives!</span>")
return
if(istype(I, /obj/item/melee/transforming/energy))
Expand All @@ -39,7 +38,6 @@
I.force = clamp(I.force + increment, 0, max)
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
playsound(src, 'sound/items/unsheath.ogg', 25, 1)
I.sharpness = IS_SHARP_ACCURATE
I.bleed_force *= 1.1
I.throwforce = clamp(I.throwforce + increment, 0, max)
I.name = "[prefix] [I.name]"
Expand All @@ -54,4 +52,3 @@
increment = 200
max = 200
prefix = "super-sharpened"
requires_sharpness = 0
2 changes: 1 addition & 1 deletion code/game/objects/items/shields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
transparent = TRUE

/obj/item/shield/riot/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/melee) && W.sharpness == IS_BLUNT)
if(istype(W, /obj/item/melee) && W.sharpness == BLUNT)
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/spear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb_continuous = list("attacks", "pokes", "jabs", "tears", "lacerates", "gores")
attack_verb_simple = list("attack", "poke", "jab", "tear", "lacerate", "gore")
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_CUT
max_integrity = 200
armor_type = /datum/armor/item_spear
Expand Down Expand Up @@ -201,7 +201,7 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/item/spear/explosive)
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb_continuous = list("attacks", "pokes", "jabs", "tears", "lacerates", "gores")
attack_verb_simple = list("attack", "poke", "jab", "tear", "lacerate", "gore")
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_CUT

/obj/item/spear/bamboospear/ComponentInitialize()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/stacks/sheets/mineral/glass.dm
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
resistance_flags = ACID_PROOF
armor_type = /datum/armor/item_shard
max_integrity = 40
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_SURFACE
var/icon_prefix
embedding = list("embed_chance" = 65)
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@

/obj/item/dualsaber/toy/on_wield(obj/item/source, mob/living/carbon/user)
. = ..()
sharpness = IS_BLUNT
sharpness = BLUNT
bleed_force = 0

/obj/item/dualsaber/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
Expand Down Expand Up @@ -459,7 +459,7 @@
hitsound = 'sound/weapons/bladeslice.ogg'
block_flags = BLOCKING_ACTIVE | BLOCKING_PROJECTILE //if it some how gets block level, katanas block projectiles for the meme
item_flags = ISWEAPON
sharpness = IS_SHARP
sharpness = SHARP
bleed_force = BLEED_SURFACE

/*
Expand Down Expand Up @@ -1173,7 +1173,7 @@
card_throwforce = 12
card_throw_speed = 6
embedding = list("pain_mult" = 1, "embed_chance" = 80, "max_damage_mult" = 8, "fall_chance" = 0, "embed_chance_turf_mod" = 15, "armour_block" = 60) //less painful than throwing stars
card_sharpness = IS_SHARP
card_sharpness = SHARP
bleed_force = BLEED_SURFACE
card_throw_range = 7
card_attack_verb_continuous = list("attacks", "slices", "dices", "slashes", "cuts")
Expand Down
Loading
Loading