mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-22 03:26:21 +01:00
THE MINI FIST-PUNCH UPDATE (#4804)
* VARIOUS FISTICUFFS RELATED CODE CHANGES
This commit is contained in:
@@ -202,8 +202,10 @@
|
||||
var/fingerprint_chance = 0 //How likely the glove is to let fingerprints through
|
||||
var/obj/item/clothing/gloves/ring = null //Covered ring
|
||||
var/mob/living/carbon/human/wearer = null //Used for covered rings when dropping
|
||||
var/glove_level = 2 //What "layer" the glove is on
|
||||
var/overgloves = 0 //Used by gauntlets and arm_guards
|
||||
var/glove_level = 2 //What "layer" the glove is on
|
||||
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
|
||||
slot_flags = SLOT_GLOVES
|
||||
attack_verb = list("challenged")
|
||||
@@ -251,7 +253,7 @@
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
if(slot && slot == slot_gloves)
|
||||
if(istype(H.gloves, /obj/item/clothing/gloves/ring))
|
||||
if(H.gloves)
|
||||
ring = H.gloves
|
||||
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.")
|
||||
@@ -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.
|
||||
ring.forceMove(src)
|
||||
to_chat(user, "You slip \the [src] on over \the [src.ring].")
|
||||
if(!(flags & THICKMATERIAL))
|
||||
punch_force += ring.punch_force
|
||||
else
|
||||
ring = null
|
||||
|
||||
@@ -268,6 +272,7 @@
|
||||
if(ring) //Put the ring back on if the check fails.
|
||||
if(H.equip_to_slot_if_possible(ring, slot_gloves))
|
||||
src.ring = null
|
||||
punch_force = initial(punch_force)
|
||||
return 0
|
||||
|
||||
wearer = H //TODO clean this when magboots are cleaned
|
||||
@@ -284,6 +289,7 @@
|
||||
if(!H.equip_to_slot_if_possible(ring, slot_gloves))
|
||||
ring.forceMove(get_turf(src))
|
||||
src.ring = null
|
||||
punch_force = initial(punch_force)
|
||||
wearer = null
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
@@ -298,6 +304,7 @@
|
||||
siemens_coefficient = 1
|
||||
glove_level = 1
|
||||
fingerprint_chance = 100
|
||||
punch_force = 2
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//Head
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "These arm guards will protect your hands and arms."
|
||||
body_parts_covered = HANDS|ARMS
|
||||
overgloves = 1
|
||||
punch_force = 3
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
/obj/item/clothing/gloves/arm_guard/mob_can_equip(var/mob/living/carbon/human/H, slot)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
desc = "These gloves go over regular gloves."
|
||||
glove_level = 3
|
||||
overgloves = 1
|
||||
punch_force = 5
|
||||
var/obj/item/clothing/gloves/gloves = null //Undergloves
|
||||
|
||||
/obj/item/clothing/gloves/gauntlets/mob_can_equip(mob/user)
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
icon_state = "work"
|
||||
item_state = "wgloves"
|
||||
force = 5
|
||||
punch_force = 3
|
||||
siemens_coefficient = 0.75
|
||||
permeability_coefficient = 0.05
|
||||
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
|
||||
heat_protection = HANDS
|
||||
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
|
||||
|
||||
@@ -241,7 +241,14 @@
|
||||
return 0
|
||||
|
||||
var/real_damage = rand_damage
|
||||
var/hit_dam_type = attack.damage_type
|
||||
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
|
||||
rand_damage *= damage_multiplier
|
||||
if(HULK in H.mutations)
|
||||
@@ -255,7 +262,7 @@
|
||||
attack.apply_effects(H, src, armour, rand_damage, hit_zone)
|
||||
|
||||
// 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)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
|
||||
@@ -403,7 +410,7 @@
|
||||
return 0
|
||||
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
|
||||
|
||||
if(user == src)
|
||||
user.visible_message("\The [user] starts applying pressure to [TU.his] [organ.name]!", "You start applying pressure to your [organ.name]!")
|
||||
else
|
||||
|
||||
@@ -11,7 +11,7 @@ var/global/list/sparring_attack_cache = list()
|
||||
var/sharp = 0
|
||||
var/edge = 0
|
||||
|
||||
var/deal_halloss
|
||||
var/damage_type = BRUTE
|
||||
var/sparring_variant_type = /datum/unarmed_attack/light_strike
|
||||
|
||||
var/eye_attack_text
|
||||
@@ -131,7 +131,7 @@ var/global/list/sparring_attack_cache = list()
|
||||
/datum/unarmed_attack/punch/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
var/obj/item/organ/external/affecting = target.get_organ(zone)
|
||||
var/organ = affecting.name
|
||||
|
||||
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TT = gender_datums[target.get_visible_gender()]
|
||||
|
||||
@@ -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/
|
||||
|
||||
/datum/unarmed_attack/light_strike
|
||||
deal_halloss = 3
|
||||
attack_noun = list("tap","light strike")
|
||||
attack_verb = list("tapped", "lightly struck")
|
||||
damage = 2
|
||||
damage = 3
|
||||
damage_type = AGONY
|
||||
shredding = 0
|
||||
damage = 0
|
||||
sharp = 0
|
||||
|
||||
Reference in New Issue
Block a user