diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm index 6fbacc82a9e..4de1e47277f 100644 --- a/code/__DEFINES/genetics.dm +++ b/code/__DEFINES/genetics.dm @@ -84,6 +84,7 @@ #define COLOURBLIND "colorblind" #define MUTE "mute" #define DEAF "deaf" +#define WEAK "weak" //Nutrition levels for humans. No idea where else to put it #define NUTRITION_LEVEL_FAT 600 diff --git a/code/_globalvars/genetics.dm b/code/_globalvars/genetics.dm index 477afbcb3bd..68d81575f23 100644 --- a/code/_globalvars/genetics.dm +++ b/code/_globalvars/genetics.dm @@ -42,7 +42,7 @@ GLOBAL_VAR_INIT(fatblock, 0) GLOBAL_VAR_INIT(auld_imperial_block, 0) GLOBAL_VAR_INIT(swedeblock, 0) GLOBAL_VAR_INIT(scrambleblock, 0) -GLOBAL_VAR_INIT(strongblock, 0) +GLOBAL_VAR_INIT(weakblock, 0) GLOBAL_VAR_INIT(hornsblock, 0) GLOBAL_VAR_INIT(comicblock, 0) @@ -58,6 +58,7 @@ GLOBAL_VAR_INIT(empathblock, 0) GLOBAL_VAR_INIT(immolateblock, 0) GLOBAL_VAR_INIT(polymorphblock, 0) GLOBAL_VAR_INIT(silentfootstepsblock, 0) +GLOBAL_VAR_INIT(strongblock, 0) /////////////////////////////// // /vg/ Mutations diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index be4f5f35879..0bc63455205 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -264,3 +264,47 @@ garbled_message += message[i] message = garbled_message return message + +/datum/dna/gene/disability/weak + name = "Weak" + desc = "Делает мышцы цели более слабыми." + activation_message = "Вы чуствуете слабость в своих мышцах." + deactivation_message = "Похоже, ваши мышцы снова в норме." + instability = -GENE_INSTABILITY_MODERATE + +/datum/dna/gene/disability/weak/New() + ..() + block = GLOB.weakblock + +/datum/dna/gene/disability/weak/can_activate(mob/M, flags) + if(STRONG in M.mutations) + return FALSE + return ..() + +/datum/dna/gene/disability/weak/activate(mob/living/M, connected, flags) + ..() + change_strength(M, 1) + +/datum/dna/gene/disability/weak/deactivate(mob/living/M, connected, flags) + ..() + change_strength(M, -1) + +/datum/dna/gene/disability/weak/proc/change_strength(mob/living/M, modifier) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(isvulpkanin(H) || isdrask(H) || isunathi(H)) + H.dna.species.punchdamagelow -= (3 * modifier) + H.dna.species.punchdamagehigh -= (4 * modifier) + H.dna.species.strength_modifier -= (0.25 * modifier) + if(isunathi(H)) + var/datum/species/unathi/U = H.dna.species + U.tail_strength -= (0.25 * modifier) + return + if(ishumanbasic(H)) + H.dna.species.punchdamagelow -= (1 * modifier) + H.dna.species.punchdamagehigh -= (2 * modifier) + H.dna.species.strength_modifier -= (0.1 * modifier) + else + H.dna.species.punchdamagelow -= (2 * modifier) + H.dna.species.punchdamagehigh -= (3 * modifier) + H.dna.species.strength_modifier -= (0.15 * modifier) diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index f4b60658f02..0f96411c938 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -279,19 +279,6 @@ // USELESS SHIT // ////////////////// -// WAS: /datum/bioEffect/strong -/datum/dna/gene/disability/strong - // pretty sure this doesn't do jack shit, putting it here until it does - name = "Strong" - desc = "Enhances the subject's ability to build and retain heavy muscles." - activation_message = "You feel buff!" - deactivation_message = "You feel wimpy and weak." - mutation = STRONG - -/datum/dna/gene/disability/strong/New() - ..() - block = GLOB.strongblock - // WAS: /datum/bioEffect/horns /datum/dna/gene/disability/horns name = "Horns" diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 190d87ab6f6..20bea46e7e4 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -573,3 +573,50 @@ else if(prob(5) || M.mind?.assigned_role=="Chaplain") to_chat(M, "You sense someone intruding upon your thoughts...") +//////////////////////////////////////////////////////////////////////// + +// WAS: /datum/bioEffect/strong +/datum/dna/gene/basic/strong + name = "Strong" + desc = "Enhances the subject's ability to build and retain heavy muscles." + activation_messages = list("You feel buff!") + deactivation_messages = list("You feel wimpy and weak.") + instability = GENE_INSTABILITY_MAJOR + mutation = STRONG + +/datum/dna/gene/basic/strong/New() + ..() + block = GLOB.strongblock + +/datum/dna/gene/basic/strong/can_activate(mob/M, flags) + if(WEAK in M.mutations) + return FALSE + return ..() + +/datum/dna/gene/basic/strong/activate(mob/living/M, connected, flags) + ..() + change_strength(M, 1) + +/datum/dna/gene/basic/strong/deactivate(mob/living/M, connected, flags) + ..() + change_strength(M, -1) + +/datum/dna/gene/basic/strong/proc/change_strength(mob/living/M, modifier) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(isvulpkanin(H) || isdrask(H) || isunathi(H)) + H.dna.species.punchdamagelow += (1 * modifier) + H.dna.species.punchdamagehigh += (2 * modifier) + H.dna.species.strength_modifier += (0.1 * modifier) + if(isunathi(H)) + var/datum/species/unathi/U = H.dna.species + U.tail_strength += (0.25 * modifier) + return + if(ishumanbasic(H)) + H.dna.species.punchdamagelow += (3 * modifier) + H.dna.species.punchdamagehigh += (4 * modifier) + H.dna.species.strength_modifier += (0.25 * modifier) + else + H.dna.species.punchdamagelow += (2 * modifier) + H.dna.species.punchdamagehigh += (3 * modifier) + H.dna.species.strength_modifier += (0.15 * modifier) diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index f1fcba2a73e..099750df1a2 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -74,7 +74,7 @@ GLOB.fatblock = getAssignedBlock("FAT", numsToAssign) GLOB.swedeblock = getAssignedBlock("SWEDE", numsToAssign) GLOB.scrambleblock = getAssignedBlock("SCRAMBLE", numsToAssign) - GLOB.strongblock = getAssignedBlock("STRONG", numsToAssign, good=1) + GLOB.weakblock = getAssignedBlock("WEAK", numsToAssign) GLOB.hornsblock = getAssignedBlock("HORNS", numsToAssign) GLOB.comicblock = getAssignedBlock("COMIC", numsToAssign) @@ -89,6 +89,7 @@ GLOB.immolateblock = getAssignedBlock("IMMOLATE", numsToAssign) GLOB.empathblock = getAssignedBlock("EMPATH", numsToAssign, DNA_HARD_BOUNDS, good=1) GLOB.polymorphblock = getAssignedBlock("POLYMORPH", numsToAssign, DNA_HARDER_BOUNDS, good=1) + GLOB.strongblock = getAssignedBlock("STRONG", numsToAssign, DNA_HARDER_BOUNDS, good=1) // // /vg/ Blocks diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index a67fde41188..8dcd55fe2fa 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -72,6 +72,7 @@ var/punchdamagelow = 0 //lowest possible punch damage var/punchdamagehigh = 9 //highest possible punch damage var/punchstunthreshold = 9 //damage at which punches from this race will stun //yes it should be to the attacked race but it's not useful that way even if it's logical + var/strength_modifier = 1 //for now only used in resist/grab chances. Maybe sometime it will become more usefull var/obj_damage = 0 var/list/default_genes = list() diff --git a/code/modules/mob/living/carbon/human/species/unathi.dm b/code/modules/mob/living/carbon/human/species/unathi.dm index ea8498affbd..d57d1b04426 100644 --- a/code/modules/mob/living/carbon/human/species/unathi.dm +++ b/code/modules/mob/living/carbon/human/species/unathi.dm @@ -15,6 +15,7 @@ heatmod = 0.8 coldmod = 1.2 hunger_drain = 0.13 + var/tail_strength = 1 blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \ Uuosa-Eso system, which roughly translates to 'burning mother'.

Coming from a harsh, radioactive \ @@ -110,7 +111,8 @@ user.changeNext_move(CLICK_CD_MELEE) //User бьет С в Е. Сука... С - это цель. Е - это орган. user.visible_message("[user.declent_ru(NOMINATIVE)] хлещет хвостом [C.declent_ru(ACCUSATIVE)] по [E.declent_ru(DATIVE)]! ", "[pluralize_ru(user.gender,"Ты хлещешь","Вы хлещете")] хвостом [C.declent_ru(ACCUSATIVE)] по [E.declent_ru(DATIVE)]!") user.adjustStaminaLoss(15) - C.apply_damage(5, BRUTE, E) + var/datum/species/unathi/U = user.dna.species + C.apply_damage(5 * U.tail_strength, BRUTE, E) user.spin(20, 1) playsound(user.loc, 'sound/weapons/slash.ogg', 50, 0) add_attack_logs(user, C, "tail whipped") diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 6efd1f3538b..6b6c0885a9b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -836,15 +836,16 @@ resisting++ switch(G.state) if(GRAB_PASSIVE) - qdel(G) + if(prob(100 / get_grab_strength(G, src))) + qdel(G) if(GRAB_AGGRESSIVE) - if(prob(60)) + if(prob(60 / get_grab_strength(G, src))) visible_message("[src] has broken free of [G.assailant]'s grip!") qdel(G) if(GRAB_NECK) - if(prob(5)) + if(prob(5 / get_grab_strength(G, src))) visible_message("[src] has broken free of [G.assailant]'s headlock!") qdel(G) @@ -852,6 +853,15 @@ visible_message("[src] resists!") return 1 +/mob/living/proc/get_grab_strength(obj/item/grab/G, mob/living/M) + var/modifier = 0 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + modifier = G.strength / H.dna.species.strength_modifier + else + modifier = G.strength + return modifier + /mob/living/proc/resist_buckle() spawn(0) resist_muzzle() diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 5a2cd7682ed..23d2c014d09 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -18,6 +18,7 @@ var/allow_upgrade = 1 var/last_upgrade = 0 var/last_hit_zone = 0 + var/strength = 1 //how hard is it to get out of this grip // var/force_down //determines if the affecting mob will be pinned to the ground //disabled due to balance, kept for an example for any new things. var/dancing //determines if assailant and affecting keep looking at each other. Basically a wrestling position @@ -39,6 +40,10 @@ assailant = user affecting = victim + if(ishuman(user)) + var/mob/living/carbon/human/H = user + strength = H.dna.species.strength_modifier + if(affecting.anchored) qdel(src) return