Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warding Pheromones rework #877

Merged
merged 11 commits into from
Dec 28, 2024
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/species/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
damage = victim.modify_by_armor(damage, blocked, penetration, def_zone)

if(victim.protection_aura)
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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/pain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 (2-1+1), -80 for Commanders (3-1+1)

painloss += reagent_pain_modifier

Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/damage_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
else
damage = modify_by_armor(damage, blocked, penetration, def_zone)

// WARDING PHEROMONES EFFECT
if(warding_aura)
damage *= (1 - warding_aura * 0.025) // %damage decrease per level. Max base level is 6 (king)

if(!damage) //no damage
return FALSE

Expand Down
4 changes: 0 additions & 4 deletions code/modules/mob/living/carbon/xenomorph/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading