diff --git a/code/__DEFINES/~skyrat_defines/medical_defines.dm b/code/__DEFINES/~skyrat_defines/medical_defines.dm index 34fe88709c7..d7270aacad9 100644 --- a/code/__DEFINES/~skyrat_defines/medical_defines.dm +++ b/code/__DEFINES/~skyrat_defines/medical_defines.dm @@ -1,3 +1,8 @@ +//Deterministic bonus for bodypart wounding: +#define DAMAGED_BODYPART_BONUS_WOUNDING_BONUS 30 //After this threshold we dont get any wounding bonuses form damaged bodyparts +#define DAMAGED_BODYPART_BONUS_WOUNDING_THRESHOLD 0.5 //How much extra % of wounding dmg we'll have if a bodypart is damaged enough +#define DAMAGED_BODYPART_BONUS_WOUNDING_COEFF 15 //This is multiplied by the sustained damage %. Keep in mind the % limit //Currently: 15/0.5=7.5 + #define GAUZE_STAIN_BLOOD 1 #define GAUZE_STAIN_PUS 2 diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index c4e6925c58a..11761234929 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -306,6 +306,14 @@ // now we have our wounding_type and are ready to carry on with wounds and dealing the actual damage if(owner && wounding_dmg >= WOUND_MINIMUM_DAMAGE && wound_bonus != CANT_WOUND) //SKYRAT EDIT ADDITION - MEDICAL + //This makes it so the more damaged bodyparts are, the more likely they are to get wounds + //However, this bonus isn't applied when the object doesn't pass the initial wound threshold, nor is it when it already has enough wounding dmg + if(wounding_dmg < DAMAGED_BODYPART_BONUS_WOUNDING_BONUS) + var/damaged_percent = (brute_dam + burn_dam)/max_damage + if(damaged_percent > DAMAGED_BODYPART_BONUS_WOUNDING_THRESHOLD) + damaged_percent = DAMAGED_BODYPART_BONUS_WOUNDING_THRESHOLD + wounding_dmg = min(DAMAGED_BODYPART_BONUS_WOUNDING_BONUS, wounding_dmg+(damaged_percent*DAMAGED_BODYPART_BONUS_WOUNDING_COEFF)) + if(current_gauze) current_gauze.take_damage() if(current_splint)