mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-28 14:36:23 +01:00
Makes gurgle gains scale according to actual received damage.
-Fixes armored, synthetic, and otherwise resistant prey giving several times more nutrition than their squishy counterparts. -They will still take longer to digest, but what would ya expect for armor, at least the gains are at the correct level now. -Same for sleeperbellies. -Also made sleeperbelly gurgledamages non-hardcoded vars but there's no knob for them yet.
This commit is contained in:
@@ -126,18 +126,23 @@
|
||||
continue
|
||||
|
||||
// Deal digestion damage (and feed the pred)
|
||||
var/old_brute = M.getBruteLoss()
|
||||
var/old_burn = M.getFireLoss()
|
||||
M.adjustBruteLoss(digest_brute)
|
||||
M.adjustFireLoss(digest_burn)
|
||||
var/actual_brute = M.getBruteLoss() - old_brute
|
||||
var/actual_burn = M.getFireLoss() - old_burn
|
||||
var/damage_gain = actual_brute + actual_burn
|
||||
|
||||
var/offset = (1 + ((M.weight - 137) / 137)) // 130 pounds = .95 140 pounds = 1.02
|
||||
var/difference = owner.size_multiplier / M.size_multiplier
|
||||
if(isrobot(owner))
|
||||
var/mob/living/silicon/robot/R = owner
|
||||
R.cell.charge += 25*(digest_brute+digest_burn)
|
||||
R.cell.charge += 25*damage_gain
|
||||
if(offset) // If any different than default weight, multiply the % of offset.
|
||||
owner.nutrition += offset*(4.5*(digest_brute+digest_burn)/difference) //4.5 nutrition points per health point. Normal same size 100+100 health prey with average weight would give 900 points if the digestion was instant. With all the size/weight offset taxes plus over time oxyloss+hunger taxes deducted with non-instant digestion, this should be enough to not leave the pred starved.
|
||||
owner.nutrition += offset*(4.5*(damage_gain)/difference) //4.5 nutrition points per health point. Normal same size 100+100 health prey with average weight would give 900 points if the digestion was instant. With all the size/weight offset taxes plus over time oxyloss+hunger taxes deducted with non-instant digestion, this should be enough to not leave the pred starved.
|
||||
else
|
||||
owner.nutrition += 4.5*(digest_brute+digest_burn)/difference
|
||||
owner.nutrition += 4.5*(damage_gain)/difference
|
||||
|
||||
|
||||
//////////////////////////// DM_ABSORB ////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user