diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 39dcfe98549..014cf189df2 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -919,3 +919,12 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Currently fishing #define TRAIT_GONE_FISHING "fishing" + +/// Makes a species be better/worse at tackling depending on their wing's status +#define TRAIT_TACKLING_WINGED_ATTACKER "tacking_winged_attacker" + +/// Makes a species be frail and more likely to roll bad results if they hit a wall +#define TRAIT_TACKLING_FRAIL_ATTACKER "tackling_frail_attacker" + +/// Makes a species be better/worse at defending against tackling depending on their tail's status +#define TRAIT_TACKLING_TAILED_DEFENDER "tackling_tailed_defender" diff --git a/code/datums/components/tackle.dm b/code/datums/components/tackle.dm index f09638867ed..475257b9358 100644 --- a/code/datums/components/tackle.dm +++ b/code/datums/components/tackle.dm @@ -276,23 +276,23 @@ defense_mod -= round(leg_wounds * 0.5) if(ishuman(target)) - var/mob/living/carbon/human/T = target + var/mob/living/carbon/human/tackle_target = target - if(isnull(T.wear_suit) && isnull(T.w_uniform)) // who honestly puts all of their effort into tackling a naked guy? + if(isnull(tackle_target.wear_suit) && isnull(tackle_target.w_uniform)) // who honestly puts all of their effort into tackling a naked guy? defense_mod += 2 - if(T.mob_negates_gravity()) + if(tackle_target.mob_negates_gravity()) defense_mod += 1 - if(T.is_shove_knockdown_blocked()) // riot armor and such + if(tackle_target.is_shove_knockdown_blocked()) // riot armor and such defense_mod += 5 - if(T.is_holding_item_of_type(/obj/item/shield)) + if(tackle_target.is_holding_item_of_type(/obj/item/shield)) defense_mod += 2 - if(islizard(T)) - var/obj/item/organ/external/tail/el_tail = T.getorganslot(ORGAN_SLOT_EXTERNAL_TAIL) - if(!el_tail) // lizards without tails are off-balance - defense_mod -= 1 - else if(el_tail.wag_flags & WAG_WAGGING) // lizard tail wagging is robust and can swat away assailants! - defense_mod += 1 + + var/obj/item/organ/external/tail/lizard/el_tail = tackle_target.getorganslot(ORGAN_SLOT_EXTERNAL_TAIL) + if(HAS_TRAIT(tackle_target, TRAIT_TACKLING_TAILED_DEFENDER) && !el_tail) + defense_mod -= 1 + if(el_tail.wag_flags & WAG_WAGGING) // lizard tail wagging is robust and can swat away assailants! + defense_mod += 1 // OF-FENSE var/mob/living/carbon/sacker = parent @@ -309,6 +309,14 @@ if(HAS_TRAIT(sacker, TRAIT_GIANT)) attack_mod += 2 + if(HAS_TRAIT(sacker, TRAIT_TACKLING_WINGED_ATTACKER)) + var/obj/item/organ/external/wings/moth/sacker_moth_wing = sacker.getorganslot(ORGAN_SLOT_EXTERNAL_WINGS) + if(!sacker_moth_wing || sacker_moth_wing.burnt) + attack_mod -= 2 + var/obj/item/organ/external/wings/sacker_wing = sacker.getorganslot(ORGAN_SLOT_EXTERNAL_WINGS) + if(sacker_wing) + attack_mod += 2 + if(ishuman(target)) var/mob/living/carbon/human/S = sacker @@ -373,6 +381,9 @@ if(HAS_TRAIT(user, TRAIT_CLUMSY)) oopsie_mod += 6 //honk! + if(HAS_TRAIT(user, TRAIT_TACKLING_FRAIL_ATTACKER)) + oopsie_mod += 6 // flies don't take smacking into a window/wall easily + var/oopsie = rand(danger_zone, 100) if(oopsie >= 94 && oopsie_mod < 0) // good job avoiding getting paralyzed! gold star! to_chat(user, span_notice("You're really glad you're wearing protection!")) diff --git a/code/modules/mob/living/carbon/human/species_types/flypeople.dm b/code/modules/mob/living/carbon/human/species_types/flypeople.dm index 89516840aed..c172e603b48 100644 --- a/code/modules/mob/living/carbon/human/species_types/flypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/flypeople.dm @@ -6,6 +6,7 @@ species_traits = list(HAS_FLESH, HAS_BONE, TRAIT_ANTENNAE) inherent_traits = list( TRAIT_CAN_USE_FLIGHT_POTION, + TRAIT_TACKLING_FRAIL_ATTACKER, ) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG meat = /obj/item/food/meat/slab/human/mutant/fly diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index 871c2af2630..e5ec28fc6a8 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -7,6 +7,7 @@ species_traits = list(MUTCOLORS, EYECOLOR, LIPS, HAS_FLESH, HAS_BONE) inherent_traits = list( TRAIT_CAN_USE_FLIGHT_POTION, + TRAIT_TACKLING_TAILED_DEFENDER, ) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_REPTILE mutant_bodyparts = list("body_markings" = "None", "legs" = "Normal Legs") diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index ac810e819c5..f6cbba9fc17 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -6,6 +6,7 @@ species_traits = list(LIPS, HAS_FLESH, HAS_BONE, HAS_MARKINGS, TRAIT_ANTENNAE) inherent_traits = list( TRAIT_CAN_USE_FLIGHT_POTION, + TRAIT_TACKLING_WINGED_ATTACKER, ) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG mutant_bodyparts = list("moth_markings" = "None")