mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
modifies how punchdamage is handled (#17910)
* modifies how punchdamage is handled sets simplemobs to receive punchdamage with proper modifications adds punchdamage traits * forgot to modify stomps * non-hulks no longer yell over common when breaking cuffs * oop! didnt save that * disables for virgo --------- Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
@@ -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()
|
||||
@@ -622,7 +624,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)
|
||||
..()
|
||||
|
||||
@@ -27,6 +27,44 @@
|
||||
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"
|
||||
cost = 2
|
||||
custom_only = FALSE
|
||||
hidden = TRUE //Disabled on Virgo.
|
||||
var_changes = list("unarmed_bonus" = 5)
|
||||
banned_species = list(SPECIES_TESHARI)
|
||||
|
||||
/datum/trait/positive/punchdamageplus
|
||||
name = "Crushing Attacks"
|
||||
desc = "Your unarmed attacks deal high damage, and you're capable of escaping most restraints"
|
||||
cost = 6
|
||||
custom_only = FALSE
|
||||
hidden = TRUE //Disabled on Virgo.
|
||||
var_changes = list("unarmed_bonus" = 10, "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, and you can carry heavy equipment with less slowdown."
|
||||
cost = 3
|
||||
custom_only = FALSE
|
||||
hidden = TRUE //Disabled on Virgo.
|
||||
var_changes = list("unarmed_bonus" = 5, "item_slowdown_mod" = 0.5)
|
||||
excludes = list(/datum/trait/positive/punchdamage, /datum/trait/positive/hardy)
|
||||
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, you experience almost no slowdown from heavy equipment, and you can escape most restraints with ease."
|
||||
cost = 8
|
||||
custom_only = FALSE
|
||||
hidden = TRUE //Disabled on Virgo.
|
||||
var_changes = list("unarmed_bonus" = 10, "shredding" = TRUE, "item_slowdown_mod" = 0.25)
|
||||
excludes = list(/datum/trait/positive/punchdamage, /datum/trait/positive/hardy, /datum/trait/positive/punchdamageplus, /datum/trait/positive/hardy_plus)
|
||||
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)
|
||||
|
||||
@@ -43,13 +43,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)
|
||||
@@ -57,7 +68,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)
|
||||
|
||||
Reference in New Issue
Block a user