From 86604ba8427d28ea912a25a5fc3df77be72cd242 Mon Sep 17 00:00:00 2001 From: "jaja4429+git@gmail.com" Date: Thu, 26 Dec 2024 12:49:17 +0100 Subject: [PATCH 01/10] draft --- code/modules/mob/living/carbon/human/species/_species.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 52f09ed27e3..c7b5f8e741e 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -202,7 +202,7 @@ else damage = victim.modify_by_armor(damage, blocked, penetration, def_zone) - if(victim.protection_aura) + if(victim.protection_aura) //MARKER damage = round(damage * ((20 - victim.protection_aura) / 20)) if(!damage) From 05dda1422d5484d11e8e6aa5a9b2e4c303b51817 Mon Sep 17 00:00:00 2001 From: "jaja4429+git@gmail.com" Date: Thu, 26 Dec 2024 13:23:48 +0100 Subject: [PATCH 02/10] small_refactor --- code/modules/mob/living/carbon/human/species/_species.dm | 2 +- code/modules/mob/living/carbon/pain.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index c7b5f8e741e..1b40e869682 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -203,7 +203,7 @@ damage = victim.modify_by_armor(damage, blocked, penetration, def_zone) if(victim.protection_aura) //MARKER - damage = round(damage * ((20 - victim.protection_aura) / 20)) + damage = round(damage * (1 - victim.protection_aura*0.05)) //10% for SLs, 15% for commanders if(!damage) return FALSE diff --git a/code/modules/mob/living/carbon/pain.dm b/code/modules/mob/living/carbon/pain.dm index 2f74b07919f..cfa3bbb0e23 100644 --- a/code/modules/mob/living/carbon/pain.dm +++ b/code/modules/mob/living/carbon/pain.dm @@ -66,7 +66,7 @@ painloss += O.damage * 1.5 if(M.protection_aura) - painloss -= 20 + M.protection_aura * 20 //-40 pain for SLs, -80 for Commanders + painloss -= 20*(1 + M.protection_aura) //-60 pain for SLs, -80 for Commanders painloss += reagent_pain_modifier From 1771b5aae2292b7e6ecf75c6c194b0dc74d08874 Mon Sep 17 00:00:00 2001 From: "jaja4429+git@gmail.com" Date: Thu, 26 Dec 2024 14:38:43 +0100 Subject: [PATCH 03/10] formulas --- code/modules/mob/living/carbon/human/species/_species.dm | 2 +- code/modules/mob/living/carbon/xenomorph/damage_procs.dm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 1b40e869682..163fc7d8c0c 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -202,7 +202,7 @@ else damage = victim.modify_by_armor(damage, blocked, penetration, def_zone) - if(victim.protection_aura) //MARKER + if(victim.protection_aura) damage = round(damage * (1 - victim.protection_aura*0.05)) //10% for SLs, 15% for commanders if(!damage) diff --git a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm index df6e2761f49..21a03a5653f 100644 --- a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm @@ -6,6 +6,7 @@ return ..() /mob/living/carbon/xenomorph/modify_by_armor(damage_amount, armor_type, penetration, def_zone, attack_dir) + //Warding pheromones used to change soft armor, but now change the damage directly in apply_damage var/hard_armor_remaining = get_hard_armor(armor_type, def_zone) var/effective_penetration = max(0, penetration - hard_armor_remaining) @@ -66,6 +67,11 @@ else damage = modify_by_armor(damage, blocked, penetration, def_zone) + // WARDING PHEROMONES EFFECT + if(warding_aura) + var/effect_per_aura_level = 0.03 // %damage decrease per level. Max base level is 6, but can be increases from upgrades + damage = damage * (1 - warding_aura*effect_per_aura_level) + if(!damage) //no damage return FALSE From d242d8ae56a28b129b9745454e81e00ffb1557f8 Mon Sep 17 00:00:00 2001 From: "jaja4429+git@gmail.com" Date: Thu, 26 Dec 2024 14:48:26 +0100 Subject: [PATCH 04/10] old_effect_removed --- code/modules/mob/living/carbon/xenomorph/life.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/life.dm b/code/modules/mob/living/carbon/xenomorph/life.dm index c095d9b3ddc..578016f9344 100644 --- a/code/modules/mob/living/carbon/xenomorph/life.dm +++ b/code/modules/mob/living/carbon/xenomorph/life.dm @@ -165,11 +165,7 @@ set_frenzy_aura(received_auras[AURA_XENO_FRENZY] || 0) if(warding_aura != (received_auras[AURA_XENO_WARDING] || 0)) - if(warding_aura) //If either the new or old warding is 0, we can skip adjusting armor for it. - soft_armor = soft_armor.modifyAllRatings(-warding_aura * 2.5) warding_aura = received_auras[AURA_XENO_WARDING] || 0 - if(warding_aura) - soft_armor = soft_armor.modifyAllRatings(warding_aura * 2.5) recovery_aura = received_auras[AURA_XENO_RECOVERY] || 0 From 2f7a04026f43e0d7281d12fffb1eee9b0dd9e56c Mon Sep 17 00:00:00 2001 From: RUTGMC4429 <102372528+RUTGMC4429@users.noreply.github.com> Date: Thu, 26 Dec 2024 15:32:44 +0100 Subject: [PATCH 05/10] Update code/modules/mob/living/carbon/human/species/_species.dm Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com> Signed-off-by: RUTGMC4429 <102372528+RUTGMC4429@users.noreply.github.com> --- code/modules/mob/living/carbon/human/species/_species.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 163fc7d8c0c..3716fb29daa 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -203,7 +203,7 @@ damage = victim.modify_by_armor(damage, blocked, penetration, def_zone) if(victim.protection_aura) - damage = round(damage * (1 - victim.protection_aura*0.05)) //10% for SLs, 15% for commanders + damage = round(damage * (1 - victim.protection_aura * 0.05)) //10% for SLs, 15% for commanders if(!damage) return FALSE From b6d2df040d30cfcfea582ed58dcdb94658688ba7 Mon Sep 17 00:00:00 2001 From: RUTGMC4429 <102372528+RUTGMC4429@users.noreply.github.com> Date: Thu, 26 Dec 2024 15:33:27 +0100 Subject: [PATCH 06/10] Update code/modules/mob/living/carbon/xenomorph/damage_procs.dm Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com> Signed-off-by: RUTGMC4429 <102372528+RUTGMC4429@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/damage_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm index 21a03a5653f..8dddc5b5b0f 100644 --- a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm @@ -70,7 +70,7 @@ // WARDING PHEROMONES EFFECT if(warding_aura) var/effect_per_aura_level = 0.03 // %damage decrease per level. Max base level is 6, but can be increases from upgrades - damage = damage * (1 - warding_aura*effect_per_aura_level) + damage *= (1 - warding_aura * effect_per_aura_level) if(!damage) //no damage return FALSE From 22f0898069e880a80238c0b678d8347e693b14ce Mon Sep 17 00:00:00 2001 From: "jaja4429+git@gmail.com" Date: Thu, 26 Dec 2024 21:53:46 +0100 Subject: [PATCH 07/10] final --- code/modules/mob/living/carbon/pain.dm | 2 +- code/modules/mob/living/carbon/xenomorph/damage_procs.dm | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/pain.dm b/code/modules/mob/living/carbon/pain.dm index cfa3bbb0e23..2bf7808eeb5 100644 --- a/code/modules/mob/living/carbon/pain.dm +++ b/code/modules/mob/living/carbon/pain.dm @@ -66,7 +66,7 @@ painloss += O.damage * 1.5 if(M.protection_aura) - painloss -= 20*(1 + M.protection_aura) //-60 pain for SLs, -80 for Commanders + painloss -= 20 * (1 + M.protection_aura) //-60 pain for SLs (2-1+1), -80 for Commanders (3-1+1) painloss += reagent_pain_modifier diff --git a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm index 21a03a5653f..2549e30e299 100644 --- a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm @@ -6,7 +6,6 @@ return ..() /mob/living/carbon/xenomorph/modify_by_armor(damage_amount, armor_type, penetration, def_zone, attack_dir) - //Warding pheromones used to change soft armor, but now change the damage directly in apply_damage var/hard_armor_remaining = get_hard_armor(armor_type, def_zone) var/effective_penetration = max(0, penetration - hard_armor_remaining) @@ -69,8 +68,7 @@ // WARDING PHEROMONES EFFECT if(warding_aura) - var/effect_per_aura_level = 0.03 // %damage decrease per level. Max base level is 6, but can be increases from upgrades - damage = damage * (1 - warding_aura*effect_per_aura_level) + damage = damage * (1 - warding_aura*0.03) // %damage decrease per level. Max base level is 6 (king) if(!damage) //no damage return FALSE From eaabcb52f2b5fa2a256fa771a324226f7897d66b Mon Sep 17 00:00:00 2001 From: "jaja4429+git@gmail.com" Date: Thu, 26 Dec 2024 21:55:06 +0100 Subject: [PATCH 08/10] final_2 --- code/modules/mob/living/carbon/xenomorph/damage_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm index 2549e30e299..4a7f62cccba 100644 --- a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm @@ -68,7 +68,7 @@ // WARDING PHEROMONES EFFECT if(warding_aura) - damage = damage * (1 - warding_aura*0.03) // %damage decrease per level. Max base level is 6 (king) + damage *= (1 - warding_aura*0.03) // %damage decrease per level. Max base level is 6 (king) if(!damage) //no damage return FALSE From e48346230bc584f290b7fd85bac96ccc940d33d4 Mon Sep 17 00:00:00 2001 From: "jaja4429+git@gmail.com" Date: Thu, 26 Dec 2024 22:00:38 +0100 Subject: [PATCH 09/10] correct_number --- code/modules/mob/living/carbon/xenomorph/damage_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm index 4a7f62cccba..ddf483fa8c8 100644 --- a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm @@ -68,7 +68,7 @@ // WARDING PHEROMONES EFFECT if(warding_aura) - damage *= (1 - warding_aura*0.03) // %damage decrease per level. Max base level is 6 (king) + damage *= (1 - warding_aura*0.025) // %damage decrease per level. Max base level is 6 (king) if(!damage) //no damage return FALSE From c9a153f5f7b53b5a9c91073114b2cc7cd585b284 Mon Sep 17 00:00:00 2001 From: Helg2 <93882977+Helg2@users.noreply.github.com> Date: Thu, 26 Dec 2024 23:06:26 +0200 Subject: [PATCH 10/10] Update code/modules/mob/living/carbon/xenomorph/damage_procs.dm Signed-off-by: Helg2 <93882977+Helg2@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/damage_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm index ddf483fa8c8..b747e0fcadb 100644 --- a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm @@ -68,7 +68,7 @@ // WARDING PHEROMONES EFFECT if(warding_aura) - damage *= (1 - warding_aura*0.025) // %damage decrease per level. Max base level is 6 (king) + damage *= (1 - warding_aura * 0.025) // %damage decrease per level. Max base level is 6 (king) if(!damage) //no damage return FALSE