THE MINI FIST-PUNCH UPDATE (#4804)

* VARIOUS FISTICUFFS RELATED CODE CHANGES
This commit is contained in:
Anewbe
2018-02-13 01:17:35 -06:00
committed by Atermonera
parent 534a588a6a
commit 51d425b1b8
13 changed files with 77 additions and 22 deletions

View File

@@ -416,7 +416,7 @@
/datum/category_item/autolathe/arms/knuckledusters /datum/category_item/autolathe/arms/knuckledusters
name = "knuckle dusters" name = "knuckle dusters"
path =/obj/item/weapon/material/knuckledusters path =/obj/item/clothing/gloves/knuckledusters
hidden = 1 hidden = 1
/datum/category_item/autolathe/arms/tacknife /datum/category_item/autolathe/arms/tacknife

View File

@@ -8,17 +8,6 @@
force_divisor = 0.3 // 18 with hardness 60 (steel) force_divisor = 0.3 // 18 with hardness 60 (steel)
attack_verb = list("jabbed","stabbed","ripped") attack_verb = list("jabbed","stabbed","ripped")
/obj/item/weapon/material/knuckledusters
name = "knuckle dusters"
desc = "A pair of brass knuckles. Generally used to enhance the user's punches."
icon_state = "knuckledusters"
gender = PLURAL
w_class = ITEMSIZE_SMALL
force_divisor = 0.63
dulled_divisor = 0.75 //It's a heavy bit of metal
attack_verb = list("punched", "beaten", "struck")
applies_material_colour = 0
/obj/item/weapon/material/knife/machete/hatchet /obj/item/weapon/material/knife/machete/hatchet
name = "hatchet" name = "hatchet"
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood." desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."

View File

@@ -214,7 +214,7 @@
prob(6);/obj/item/weapon/material/butterflyhandle, prob(6);/obj/item/weapon/material/butterflyhandle,
prob(6);/obj/item/weapon/material/wirerod, prob(6);/obj/item/weapon/material/wirerod,
prob(2);/obj/item/weapon/material/butterfly/switchblade, prob(2);/obj/item/weapon/material/butterfly/switchblade,
prob(2);/obj/item/weapon/material/knuckledusters, prob(2);/obj/item/clothing/gloves/knuckledusters,
prob(1);/obj/item/weapon/material/knife/tacknife, prob(1);/obj/item/weapon/material/knife/tacknife,
prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc, prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc,
prob(1);/obj/item/weapon/beartrap, prob(1);/obj/item/weapon/beartrap,

View File

@@ -202,8 +202,10 @@
var/fingerprint_chance = 0 //How likely the glove is to let fingerprints through var/fingerprint_chance = 0 //How likely the glove is to let fingerprints through
var/obj/item/clothing/gloves/ring = null //Covered ring var/obj/item/clothing/gloves/ring = null //Covered ring
var/mob/living/carbon/human/wearer = null //Used for covered rings when dropping var/mob/living/carbon/human/wearer = null //Used for covered rings when dropping
var/glove_level = 2 //What "layer" the glove is on var/glove_level = 2 //What "layer" the glove is on
var/overgloves = 0 //Used by gauntlets and arm_guards var/overgloves = 0 //Used by gauntlets and arm_guards
var/punch_force = 0 //How much damage do these gloves add to a punch?
var/punch_damtype = BRUTE //What type of damage does this make fists be?
body_parts_covered = HANDS body_parts_covered = HANDS
slot_flags = SLOT_GLOVES slot_flags = SLOT_GLOVES
attack_verb = list("challenged") attack_verb = list("challenged")
@@ -251,7 +253,7 @@
var/mob/living/carbon/human/H = user var/mob/living/carbon/human/H = user
if(slot && slot == slot_gloves) if(slot && slot == slot_gloves)
if(istype(H.gloves, /obj/item/clothing/gloves/ring)) if(H.gloves)
ring = H.gloves ring = H.gloves
if(ring.glove_level >= src.glove_level) if(ring.glove_level >= src.glove_level)
to_chat(user, "You are unable to wear \the [src] as \the [H.gloves] are in the way.") to_chat(user, "You are unable to wear \the [src] as \the [H.gloves] are in the way.")
@@ -261,6 +263,8 @@
H.drop_from_inventory(ring) //Remove the ring (or other under-glove item in the hand slot?) so you can put on the gloves. H.drop_from_inventory(ring) //Remove the ring (or other under-glove item in the hand slot?) so you can put on the gloves.
ring.forceMove(src) ring.forceMove(src)
to_chat(user, "You slip \the [src] on over \the [src.ring].") to_chat(user, "You slip \the [src] on over \the [src.ring].")
if(!(flags & THICKMATERIAL))
punch_force += ring.punch_force
else else
ring = null ring = null
@@ -268,6 +272,7 @@
if(ring) //Put the ring back on if the check fails. if(ring) //Put the ring back on if the check fails.
if(H.equip_to_slot_if_possible(ring, slot_gloves)) if(H.equip_to_slot_if_possible(ring, slot_gloves))
src.ring = null src.ring = null
punch_force = initial(punch_force)
return 0 return 0
wearer = H //TODO clean this when magboots are cleaned wearer = H //TODO clean this when magboots are cleaned
@@ -284,6 +289,7 @@
if(!H.equip_to_slot_if_possible(ring, slot_gloves)) if(!H.equip_to_slot_if_possible(ring, slot_gloves))
ring.forceMove(get_turf(src)) ring.forceMove(get_turf(src))
src.ring = null src.ring = null
punch_force = initial(punch_force)
wearer = null wearer = null
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
@@ -298,6 +304,7 @@
siemens_coefficient = 1 siemens_coefficient = 1
glove_level = 1 glove_level = 1
fingerprint_chance = 100 fingerprint_chance = 100
punch_force = 2
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
//Head //Head

View File

@@ -3,6 +3,7 @@
desc = "These arm guards will protect your hands and arms." desc = "These arm guards will protect your hands and arms."
body_parts_covered = HANDS|ARMS body_parts_covered = HANDS|ARMS
overgloves = 1 overgloves = 1
punch_force = 3
w_class = ITEMSIZE_NORMAL w_class = ITEMSIZE_NORMAL
/obj/item/clothing/gloves/arm_guard/mob_can_equip(var/mob/living/carbon/human/H, slot) /obj/item/clothing/gloves/arm_guard/mob_can_equip(var/mob/living/carbon/human/H, slot)

View File

@@ -11,6 +11,7 @@
desc = "These gloves go over regular gloves." desc = "These gloves go over regular gloves."
glove_level = 3 glove_level = 3
overgloves = 1 overgloves = 1
punch_force = 5
var/obj/item/clothing/gloves/gloves = null //Undergloves var/obj/item/clothing/gloves/gloves = null //Undergloves
/obj/item/clothing/gloves/gauntlets/mob_can_equip(mob/user) /obj/item/clothing/gloves/gauntlets/mob_can_equip(mob/user)

View File

@@ -95,6 +95,7 @@
icon_state = "work" icon_state = "work"
item_state = "wgloves" item_state = "wgloves"
force = 5 force = 5
punch_force = 3
siemens_coefficient = 0.75 siemens_coefficient = 0.75
permeability_coefficient = 0.05 permeability_coefficient = 0.05
armor = list(melee = 30, bullet = 10, laser = 10, energy = 15, bomb = 20, bio = 0, rad = 0) armor = list(melee = 30, bullet = 10, laser = 10, energy = 15, bomb = 20, bio = 0, rad = 0)
@@ -114,3 +115,15 @@
min_cold_protection_temperature = GLOVES_MIN_COLD_PROTECTION_TEMPERATURE min_cold_protection_temperature = GLOVES_MIN_COLD_PROTECTION_TEMPERATURE
heat_protection = HANDS heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE max_heat_protection_temperature = GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE
/obj/item/clothing/gloves/knuckledusters
name = "knuckle dusters"
desc = "A pair of brass knuckles. Generally used to enhance the user's punches."
icon_state = "knuckledusters"
attack_verb = list("punched", "beaten", "struck")
flags = THICKMATERIAL // Stops rings from increasing hit strength
siemens_coefficient = 1
fingerprint_chance = 100
overgloves = 1
force = 5
punch_force = 5

View File

@@ -241,7 +241,14 @@
return 0 return 0
var/real_damage = rand_damage var/real_damage = rand_damage
var/hit_dam_type = attack.damage_type
real_damage += attack.get_unarmed_damage(H) real_damage += attack.get_unarmed_damage(H)
if(H.gloves && istype(H.gloves, /obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = H.gloves
real_damage += G.punch_force
hit_dam_type = G.punch_damtype
if(H.pulling_punches) //SO IT IS DECREED: PULLING PUNCHES WILL PREVENT THE ACTUAL DAMAGE FROM RINGS AND KNUCKLES, BUT NOT THE ADDED PAIN
hit_dam_type = AGONY
real_damage *= damage_multiplier real_damage *= damage_multiplier
rand_damage *= damage_multiplier rand_damage *= damage_multiplier
if(HULK in H.mutations) if(HULK in H.mutations)
@@ -255,7 +262,7 @@
attack.apply_effects(H, src, armour, rand_damage, hit_zone) attack.apply_effects(H, src, armour, rand_damage, hit_zone)
// Finally, apply damage to target // Finally, apply damage to target
apply_damage(real_damage, (attack.deal_halloss ? HALLOSS : BRUTE), hit_zone, armour, soaked, sharp=attack.sharp, edge=attack.edge) apply_damage(real_damage, hit_dam_type, hit_zone, armour, soaked, sharp=attack.sharp, edge=attack.edge)
if(I_DISARM) if(I_DISARM)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>") M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")

View File

@@ -11,7 +11,7 @@ var/global/list/sparring_attack_cache = list()
var/sharp = 0 var/sharp = 0
var/edge = 0 var/edge = 0
var/deal_halloss var/damage_type = BRUTE
var/sparring_variant_type = /datum/unarmed_attack/light_strike var/sparring_variant_type = /datum/unarmed_attack/light_strike
var/eye_attack_text var/eye_attack_text
@@ -258,10 +258,10 @@ var/global/list/sparring_attack_cache = list()
if(5) user.visible_message("<span class='danger'>[pick("[user] landed a powerful stomp on", "[user] stomped down hard on", "[user] slammed [TU.his] [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>") //Devastated lol. No. We want to say that the stomp was powerful or forceful, not that it /wrought devastation/ if(5) user.visible_message("<span class='danger'>[pick("[user] landed a powerful stomp on", "[user] stomped down hard on", "[user] slammed [TU.his] [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>") //Devastated lol. No. We want to say that the stomp was powerful or forceful, not that it /wrought devastation/
/datum/unarmed_attack/light_strike /datum/unarmed_attack/light_strike
deal_halloss = 3
attack_noun = list("tap","light strike") attack_noun = list("tap","light strike")
attack_verb = list("tapped", "lightly struck") attack_verb = list("tapped", "lightly struck")
damage = 2 damage = 3
damage_type = AGONY
shredding = 0 shredding = 0
damage = 0 damage = 0
sharp = 0 sharp = 0

View File

@@ -0,0 +1,37 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: Anewbe
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- tweak: "RINGS AND CERTAIN GLOVES INCREASE PUNCHING DAMAGE."
- tweak: "BRASS KNUCKLES HAVE BEEN TURNED INTO GLOVES AND REBALANCED. THEY DO LESS DAMAGE PER HIT BECAUSE IT'S HARD TO DISARM A PAIR OF GLOVES."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB