From 032308fb9d0fd3bbe6d03efcf710b525a6bcf198 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Fri, 5 Dec 2014 18:01:01 -0500 Subject: [PATCH] Fixes #7213 restoring unarmed damage to previous values, adjusts unarmed attack logs. Unarmed attack messages no longer assume every attack verb ends with -ed. --- .../living/carbon/human/human_attackhand.dm | 18 ++++++++- .../mob/living/carbon/human/species.dm | 6 +-- .../mob/living/carbon/human/unarmed_attack.dm | 40 +++++++++---------- 3 files changed, 40 insertions(+), 24 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 90efe34a47d..086a1ef0aa4 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -101,7 +101,7 @@ if(!attack.is_usable(H)) return 0 - var/damage = rand(1, attack.damage) + var/damage = rand(1, 5) + attack.damage var/block = 0 var/accurate = 0 var/hit_zone = H.zone_sel.selecting @@ -128,6 +128,22 @@ var/miss_type = 0 var/attack_message if(!accurate) + /* + This is kind of convoluted, but it seems to break down like this: + (note that the chance to miss is exaggerated here since ran_zone() might roll "chest" + + If aiming for chest: + 80% chance you hit your target + 17% chance you hit a random zone + 3% chance you miss + + If aiming for something else: + 68% chance you hit your target + 17% chance you hit a random zone + 15% chance you miss + + Why don't we just use get_zone_with_miss_chance() ??? + */ if(prob(80)) hit_zone = ran_zone(hit_zone) if(prob(15) && hit_zone != "chest") // Missed! diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index c15ef31be70..67eb8f86e09 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -222,7 +222,7 @@ language = "Sinta'unathi" tail = "sogtail" unarmed_type = /datum/unarmed_attack/claws - secondary_unarmed_type = /datum/unarmed_attack/bite/strong + secondary_unarmed_type = /datum/unarmed_attack/bite/sharp primitive = /mob/living/carbon/monkey/unathi darksight = 3 gluttonous = 1 @@ -250,7 +250,7 @@ language = "Siik'tajr" tail = "tajtail" unarmed_type = /datum/unarmed_attack/claws - secondary_unarmed_type = /datum/unarmed_attack/bite/eye_tooth + secondary_unarmed_type = /datum/unarmed_attack/bite/sharp darksight = 8 cold_level_1 = 200 //Default 260 @@ -546,4 +546,4 @@ if(slot_w_uniform in equip_slots) equip_slots |= slot_tie - equip_slots |= slot_legcuffed \ No newline at end of file + equip_slots |= slot_legcuffed diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm index 7e17ea5ed75..b96d9b6fdb5 100644 --- a/code/modules/mob/living/carbon/human/unarmed_attack.dm +++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm @@ -35,7 +35,7 @@ switch(zone) // strong punches can have effects depending on where they hit if("head", "mouth", "eyes") // Induce blurriness - target.visible_message("[target] stares blankly for a few moments.", "You see stars.") + target.visible_message("[target] looks dazed.", "You see stars.") target.apply_effect(attack_damage*2, EYE_BLUR, armour) if("l_arm", "l_hand") if (target.l_hand) @@ -49,7 +49,7 @@ target.drop_r_hand() if("chest") if(!target.lying) - target.visible_message("[pick("[target] was sent flying backward a few metres!", "[target] staggers back from the impact!")]") + target.visible_message("[pick("[target] was sent flying backward!", "[target] staggers back from the impact!")]") var/turf/T = step(src, get_dir(get_turf(user), get_turf(target))) if(T.density) // This will need to be expanded to check for structures etc. target.visible_message("[target] slams into [T]!") @@ -76,15 +76,15 @@ playsound(user.loc, attack_sound, 25, 1, -1) /datum/unarmed_attack/bite - attack_verb = list("bite") // 'x has biteed y', needs work. + attack_verb = list("bit") attack_sound = 'sound/weapons/bite.ogg' shredding = 0 - damage = 3 + damage = 0 sharp = 0 edge = 0 -/datum/unarmed_attack/bite/eye_tooth - attack_verb = list("bite") // 'x has biteed y', needs work. +/datum/unarmed_attack/bite/sharp //eye teeth + attack_verb = list("bit", "chomped on") attack_sound = 'sound/weapons/bite.ogg' shredding = 0 damage = 5 @@ -97,9 +97,9 @@ return 1 /datum/unarmed_attack/punch - attack_verb = list("punch") + attack_verb = list("punched") attack_noun = list("fist") - damage = 3 + damage = 0 /datum/unarmed_attack/punch/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage) var/skill = user.skills["combat"] @@ -109,7 +109,7 @@ if(!skill) skill = 1 if(target == user) - user.visible_message("[user] [pick(attack_verb)]ed \himself in the [organ]!") + user.visible_message("[user] [pick(attack_verb)] \himself in the [organ]!") return 0 if(!target.lying) @@ -124,8 +124,8 @@ // -- UPPER BODY -- // switch(attack_damage) if(1 to 2) user.visible_message("[user] slapped [target]'s [organ]!") - if(3 to 4) user.visible_message("[user] [findtext(zone, "hand")?"[pick(attack_verb)]ed":pick("[pick(attack_verb)]ed", "shoulders")] [target] in \his [organ]!") - if(5) user.visible_message("[user] rammed \his [pick(attack_noun)] into [target]'s [organ]!") + if(3 to 4) user.visible_message("[user] [pick(attack_verb)] [target] in \his [organ]!") + if(5) user.visible_message("[user] slams \his [pick(attack_noun)] into [target]'s [organ]!") if("groin", "l_leg", "r_leg") // -- LOWER BODY -- // switch(attack_damage) @@ -138,18 +138,18 @@ if(1 to 4) user.visible_message("[user] kicked [target] in \his [organ]!") if(5) user.visible_message("[user] stomped down hard on [target]'s [organ]!") else if (user.loc != target.loc) - user.visible_message("[user] [pick("stomped down hard on", "kicked against", "gave a strong kick against", "rams their foot into")] [target]'s [organ]!") + user.visible_message("[user] [pick("stomped down hard on", "kicked against", "gave a strong kick against", "slams their foot into")] [target]'s [organ]!") else user.visible_message("[user] [pick("punched", "threw a punch", "struck", "slapped", "rammed their [pick(attack_noun)] into")] [target]'s [organ]!") /datum/unarmed_attack/diona - attack_verb = list("lash", "bludgeon") + attack_verb = list("lashed", "bludgeoned") attack_noun = list("tendril") damage = 5 /datum/unarmed_attack/claws - attack_verb = list("scratch", "claw", "goug") + attack_verb = list("scratched", "clawed", "slashed") attack_noun = list("claws") attack_sound = 'sound/weapons/slice.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' @@ -165,7 +165,7 @@ attack_damage = Clamp(attack_damage, 1, 5) if(target == user) - user.visible_message("[user] [pick(attack_verb)]ed \himself in the [affecting.display_name]!") + user.visible_message("[user] [pick(attack_verb)] \himself in the [affecting.display_name]!") return 0 switch(zone) @@ -173,14 +173,14 @@ // ----- HEAD ----- // switch(damage) if(1 to 2) user.visible_message("[user] scratched [target] across \his cheek!") - if(3 to 4) user.visible_message("[user] [pick(attack_verb)]ed [pick("", "the side of")][target] [pick("head", "neck")][pick("", " with spread [pick(attack_noun)]")]!") - if(5) user.visible_message("[user] [pick(attack_verb)]ed [target] across \his face!") + if(3 to 4) user.visible_message("[user] [pick(attack_verb)] [target]'s [pick("head", "neck")] [pick("", "", "", "with spread [pick(attack_noun)]")]!") + if(5) user.visible_message("[pick("[user] [pick(attack_verb)] [target] across \his face!", "[user] rakes \his [pick(attack_noun)] across [target]'s face!")]") if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_leg", "l_foot", "r_foot") // ----- BODY ----- // switch(damage) if(1 to 2) user.visible_message("[user] scratched [target]'s [affecting.display_name]!") - if(3 to 4) user.visible_message("[user] [pick(attack_verb)]ed [pick("", "the side of")][target]'s [affecting.display_name]!") - if(5) user.visible_message("[user] digs \his [pick(attack_noun)] deep into [target]'s [affecting.display_name]!") + if(3 to 4) user.visible_message("[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.display_name]!") + if(5) user.visible_message("[user] tears \his [pick(attack_noun)] deep into [target]'s [affecting.display_name]!") /datum/unarmed_attack/claws/strong attack_verb = list("slash") @@ -190,4 +190,4 @@ /datum/unarmed_attack/bite/strong attack_verb = list("maul") damage = 15 - shredding = 1 \ No newline at end of file + shredding = 1