From aec14ffc8fd6c40c23a192d81bfad35cf16a77c6 Mon Sep 17 00:00:00 2001 From: GuillaumePrata <55374212+GuillaumePrata@users.noreply.github.com> Date: Thu, 1 Sep 2022 19:08:11 -0300 Subject: [PATCH] Wings and tails give anyone better tackling values. Moths and lizards that lose theirs will have worse values instead. (#69078) About The Pull Request Late and atomized version of #67791 with some extra changes. Changes are: 1 - Anyone with wings will have a +2 tackle offense (same as riot armor or gigantism mutation) 2 - Moths without or burnt wings will have -2 tackle offense (same as dwarfism or clumsy) 3 - Anyone with a lizard tail that is wagging it, will have 1+ tackle defense (same as being fat) 4 - Lizards without a tail will have -1 tackle defense (same as being slightly drunk) 5 - Fly people have a higher chance of breaking their spine after splatting themselves into a window/wall (+6 same as clumsy) Made 3 new traits and gave them to Lizards, Moths and Flypeople, swapped the old islizard to check for one of these traits instead. This way it is easier for anyone that reads these species' code to know that they have an unique interaction with our tackling system without having to dig into component code. And thanks for the suggestion Kapu. Why It's Good For The Game This makes Moths have an interesting round start niche as security and push them to behave differently than humans if they decide to opt into tackling. It is fun to steal flashbangs and exploit the weakness that Moth officers have right now, if moths are better at tackling and more likely to use it, it opens another thing you can exploit when engaging against security. The breakpoints for tackling are on windows of 2 so while it might look like a lot (Riot suit value), if I gave only 1 for moths they would have a 50% chance of being better than other species while tackling. Inconsistencies are not interesting on species. It would be quite annoying if plasmamen had a coin toss on being cold resistant or self igniting every time they engage with the system. The flypeople change is there just because the idea of a Fly officer smacking themselves into a window and breaking their spine is funny. And as was requested by maintainers, it now checks for anyone with wings and lizard tails for the tackle buff, go have your fun Frankstein builders and Officers that can get Xeno to give you a wing potion. Changelog cl Guillaume Prata balance: Anyone with wings or a wagging lizard tail will have a small bonus to their tacklling offense/defense. balance: Moths and lizards that lose their wings/tail will have worse tackling values instead. balance: Fly people don't take splatting themselves on windows/walls easily and have a higher chance to get a bad result from that. /cl --- code/__DEFINES/traits.dm | 9 +++++ code/datums/components/tackle.dm | 33 ++++++++++++------- .../carbon/human/species_types/flypeople.dm | 1 + .../human/species_types/lizardpeople.dm | 1 + .../carbon/human/species_types/mothmen.dm | 1 + 5 files changed, 34 insertions(+), 11 deletions(-) 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")