[MIRROR] modifies how punchdamage is handled (#11198)

Co-authored-by: Zammy <49600480+zeskorion@users.noreply.github.com>
Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-07-20 06:19:46 +02:00
committed by GitHub
co-authored by Zammy Selis Cameron Lennox Kashargul
parent f3d777e4a6
commit 2832b36fce
7 changed files with 75 additions and 11 deletions
@@ -83,7 +83,8 @@
span_warning("You successfully rip your [wear_suit.name].")
)
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!", "RAAAAAAAARGH!", "HNNNNNNNNNGGGGGGH!", "GWAAAAAAAARRRHHH!", "AAAAAAARRRGH!" ))
if(HULK in mutations)
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!", "RAAAAAAAARGH!", "HNNNNNNNNNGGGGGGH!", "GWAAAAAAAARRRHHH!", "AAAAAAARRRGH!" ))
qdel(wear_suit)
wear_suit = null
@@ -372,6 +372,8 @@
var/grab_power_self = 0 //NYI - Used Downstream
var/waking_speed = 1 //NYI - Used Downstream
var/lightweight_light = 0 //NYI - Used Downstream
var/unarmed_bonus = 0 //do you have stronger unarmed attacks?
var/shredding = FALSE //do you shred when attacking? Affects escaping restraints, and punching normally unpunchable things
/datum/species/proc/update_attack_types()
unarmed_attacks = list()
@@ -623,7 +625,8 @@
if(!ignore_intent && H.a_intent != I_HURT)
return 0
if(shredding)
return 1
for(var/datum/unarmed_attack/attack in unarmed_attacks)
if(!attack.is_usable(H))
continue
@@ -169,7 +169,7 @@
/datum/unarmed_attack/claws/chimera //special feral attack that gets stronger as they get angrier
/datum/unarmed_attack/claws/chimera/get_unarmed_damage(var/mob/living/carbon/human/user)
return user.get_feralness()/5
return user.species.unarmed_bonus + (user.get_feralness()/5)
/datum/unarmed_attack/claws/chimera/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armour,var/attack_damage,var/zone)
..()
@@ -28,6 +28,55 @@
banned_species = list(SPECIES_ALRAUNE, SPECIES_SHADEKIN_CREW, SPECIES_TESHARI, SPECIES_TAJARAN, SPECIES_DIONA, SPECIES_UNATHI, SPECIES_VASILISSAN, SPECIES_XENOCHIMERA, SPECIES_VOX) //i assume if a dev made your base slowdown different then you shouldn't have this.
excludes = list(/datum/trait/positive/speed_fast) // olympic sprinters don't naruto run
/datum/trait/positive/punchdamage
name = "Strong Attacks"
desc = "Your unarmed attacks deal more damage. (+5 per attack)"
cost = 1
custom_only = FALSE
hidden = FALSE //Disabled on Virgo. //CHOMPEdit
var_changes = list("unarmed_bonus" = 5)
excludes = list(/datum/trait/positive/punchdamageplus)
banned_species = list(SPECIES_TESHARI)
/datum/trait/positive/punchdamageplus
name = "Crushing Attacks"
desc = "Your unarmed attacks deal high damage. (+10 per attack)"
cost = 2
custom_only = FALSE
hidden = FALSE //Disabled on Virgo. //CHOMPEdit
var_changes = list("unarmed_bonus" = 10)
excludes = list(/datum/trait/positive/punchdamage)
banned_species = list(SPECIES_TESHARI, SPECIES_VOX)
/datum/trait/positive/shredding_attacks //Variant of plus
name = "Shredding Attacks"
desc = "Your unarmed attacks can break windows, APCs, deal massive damage to synthetics, and you can break out of restraints 24 times faster."
cost = 6
custom_only = FALSE
hidden = TRUE
var_changes = list("shredding" = TRUE)
banned_species = list(SPECIES_TESHARI, SPECIES_VOX)
/datum/trait/positive/strength //combine effects of hardy + strong punches, for if someone wants a generally "strong" character. Exists for the purposes of the trait limit
name = "High Strength"
desc = "Your unarmed attacks deal more damage (+5), and you can carry heavy equipment with 50% less slowdown."
cost = 2
custom_only = FALSE
hidden = FALSE //Disabled on Virgo. //CHOMPEdit
var_changes = list("unarmed_bonus" = 5, "item_slowdown_mod" = 0.5)
excludes = list(/datum/trait/positive/punchdamage, /datum/trait/positive/hardy, /datum/trait/positive/hardy_plus, /datum/trait/positive/speed_fast) //CHOMPEdit
banned_species = list(SPECIES_ALRAUNE, SPECIES_TESHARI, SPECIES_UNATHI, SPECIES_DIONA, SPECIES_PROMETHEAN, SPECIES_PROTEAN)
/datum/trait/positive/strengthplus //see above comment
name = "Inhuman Strength"
desc = "You are unreasonably strong. Your unarmed attacks do high damage (+10), you experience much less slowdown from heavy equipment (75% less)."
cost = 4
custom_only = FALSE
hidden = FALSE //Disabled on Virgo. //CHOMPEdit
var_changes = list("unarmed_bonus" = 10, "item_slowdown_mod" = 0.25)
excludes = list(/datum/trait/positive/punchdamage, /datum/trait/positive/hardy, /datum/trait/positive/punchdamageplus, /datum/trait/positive/hardy_plus, /datum/trait/positive/speed_fast) //CHOMPEdit
banned_species = list(SPECIES_ALRAUNE, SPECIES_TESHARI, SPECIES_UNATHI, SPECIES_DIONA, SPECIES_PROMETHEAN, SPECIES_PROTEAN, SPECIES_VOX)
/datum/trait/positive/hardy
name = "Hardy"
desc = "Allows you to carry heavy equipment with less slowdown."
@@ -38,8 +38,8 @@
return FALSE
/datum/unarmed_attack/proc/get_unarmed_damage()
return damage
/datum/unarmed_attack/proc/get_unarmed_damage(var/mob/living/carbon/human/user)
return damage + user.species.unarmed_bonus
/datum/unarmed_attack/proc/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armour,var/attack_damage,var/zone)
@@ -213,8 +213,8 @@
/datum/unarmed_attack/kick/get_unarmed_damage(var/mob/living/carbon/human/user)
var/obj/item/clothing/shoes = user.shoes
if(!istype(shoes))
return damage
return damage + (shoes ? shoes.force : 0)
return user.species.unarmed_bonus + damage
return user.species.unarmed_bonus + damage + (shoes ? shoes.force : 0)
/datum/unarmed_attack/kick/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)
@@ -260,7 +260,7 @@
/datum/unarmed_attack/stomp/get_unarmed_damage(var/mob/living/carbon/human/user)
var/obj/item/clothing/shoes = user.shoes
return damage + (shoes ? shoes.force : 0)
return user.species.unarmed_bonus + damage + (shoes ? shoes.force : 0)
/datum/unarmed_attack/stomp/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)
+13 -2
View File
@@ -46,13 +46,24 @@
if(I_HURT)
var/armor = run_armor_check(def_zone = null, attack_flag = "melee")
if(ishuman(L)) //VOREStation EDIT START Is it a human?
if(ishuman(L))
var/mob/living/carbon/human/attacker = L //We are a human!
var/datum/unarmed_attack/attack = attacker.get_unarmed_attack(src, BP_TORSO) //What attack are we using? Also, just default to attacking the chest.
var/rand_damage = rand(1, 5) //Like normal human attacks, let's randomize the damage...
var/real_damage = rand_damage //Let's go ahead and start calculating our damage.
var/hit_dam_type = attack.damage_type //Let's get the type of damage. Brute? Burn? Defined by the unarmed_attack.
real_damage += attack.get_unarmed_damage(attacker) //Add the damage that their special attack has. Some have 0. Some have 15.
if(attacker.gloves && attack.is_punch)
if(istype(attacker.gloves, /obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = attacker.gloves
real_damage += G.punch_force
hit_dam_type = G.punch_damtype
else if(istype(attacker.gloves, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/G = attacker.gloves
real_damage += G.punch_force
hit_dam_type = G.punch_damtype
if(HULK in attacker.mutations)
real_damage *= 2
if(real_damage <= damage_threshold)
L.visible_message(span_warning("\The [L] uselessly hits \the [src]!"))
L.do_attack_animation(src)
@@ -60,7 +71,7 @@
apply_damage(damage = real_damage, damagetype = hit_dam_type, def_zone = null, blocked = armor, blocked = resistance, sharp = FALSE, edge = FALSE, used_weapon = null)
L.visible_message(span_warning("\The [L] [pick(attack.attack_verb)] \the [src]!"))
L.do_attack_animation(src)
return //VOREStation EDIT END
return
apply_damage(damage = harm_intent_damage, damagetype = BRUTE, def_zone = null, blocked = armor, blocked = resistance, sharp = FALSE, edge = FALSE, used_weapon = null) //VOREStation EDIT Somebody set this to burn instead of brute.
L.visible_message(span_warning("\The [L] [response_harm] \the [src]!"))
L.do_attack_animation(src)
@@ -2,7 +2,7 @@
damage = 3
/datum/unarmed_attack/punch/chimera/get_unarmed_damage(var/mob/living/carbon/human/user)
return damage + user.get_feralness() / 5
return damage + user.species.unarmed_bonus + (user.get_feralness() / 5)
/datum/unarmed_attack/punch/chimera/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armour,var/attack_damage,var/zone)
..()