Cannibal health gain and victim digestion#924
Open
joel4848 wants to merge 8 commits intoCustom-Roles-for-TTT:devfrom
Open
Cannibal health gain and victim digestion#924joel4848 wants to merge 8 commits intoCustom-Roles-for-TTT:devfrom
joel4848 wants to merge 8 commits intoCustom-Roles-for-TTT:devfrom
Conversation
Malivil
requested changes
Mar 4, 2026
| if gainedhealthpercentage == 0 then | ||
| gainedhealth = 100 | ||
| else | ||
| gainedhealthunrounded = (gainedhealthpercentage / 100) * victimhealth |
Member
There was a problem hiding this comment.
Suggested change
| gainedhealthunrounded = (gainedhealthpercentage / 100) * victimhealth | |
| local gainedhealthunrounded = (gainedhealthpercentage / 100) * victimhealth |
|
|
||
| -- Cannibal health gain | ||
| if self.GainsHealthConVar:GetBool() then | ||
|
|
| if newcannibalhealth > cannibalhealth then | ||
| owner:SetHealth(newcannibalhealth) | ||
| end | ||
|
|
|
|
||
| -- Victim digestion | ||
| if self.DigestsVictimsConVar:GetBool() then | ||
|
|
| if self.DigestsVictimsConVar:GetBool() then | ||
|
|
||
| local digestiontime = self.DigestionTimeConVar:GetInt() | ||
|
|
|
|
||
| ttt_cannibal_gains_health 1 // Whether the Cannibal gains their victim's health when eating them | ||
| ttt_cannibal_gained_health_percentage 100 // What percentage of their victim's health the Cannibal gains (set to 0 to always gain a flat 100HP) | ||
| ttt_cannibal_digests_victims 1 // Whether the Cannibal digests and permanently kills their victims over time |
Member
There was a problem hiding this comment.
Suggested change
| ttt_cannibal_digests_victims 1 // Whether the Cannibal digests and permanently kills their victims over time | |
| ttt_cannibal_digestion_bones 1 // Whether the Cannibal digests and permanently kills their victims over time |
| ttt_cannibal_gained_health_percentage 100 // What percentage of their victim's health the Cannibal gains (set to 0 to always gain a flat 100HP) | ||
| ttt_cannibal_digests_victims 1 // Whether the Cannibal digests and permanently kills their victims over time | ||
| ttt_cannibal_digestion_time 30 // How long in seconds a victim takes to be digested when eaten (set to 0 for immediate digestion) | ||
| ttt_cannibal_does_poopy 1 // Whether the Cannibal poops themselves when a victim is digested |
Member
There was a problem hiding this comment.
Suggested change
| ttt_cannibal_does_poopy 1 // Whether the Cannibal poops themselves when a victim is digested | |
| ttt_cannibal_digestion_poop 1 // Whether the Cannibal drops poop when a victim is digested |
| ttt_cannibal_digests_victims 1 // Whether the Cannibal digests and permanently kills their victims over time | ||
| ttt_cannibal_digestion_time 30 // How long in seconds a victim takes to be digested when eaten (set to 0 for immediate digestion) | ||
| ttt_cannibal_does_poopy 1 // Whether the Cannibal poops themselves when a victim is digested | ||
| ttt_cannibal_does_poopy_noise 1 // Whether the Cannibal's poops produce an audible cue |
Member
There was a problem hiding this comment.
Suggested change
| ttt_cannibal_does_poopy_noise 1 // Whether the Cannibal's poops produce an audible cue | |
| ttt_cannibal_digestion_poop_sound 1 // Whether the Cannibal causes a sound when poop is dropped from a digested victim |
| ttt_cannibal_can_see_jesters 0 // Whether jesters are revealed (via head icons, color/icon on the scoreboard, etc.) to the Cannibal (Only applies if ttt_cannibal_is_independent is enabled) | ||
| ttt_cannibal_update_scoreboard 0 // Whether the Cannibal shows dead players as missing in action (Only applies if ttt_cannibal_is_independent is enabled) | ||
|
|
||
|
|
| @@ -765,6 +765,14 @@ ttt_cannibal_damage_penalty 0 // The fraction a Canniba | |||
| ttt_cannibal_can_see_jesters 0 // Whether jesters are revealed (via head icons, color/icon on the scoreboard, etc.) to the Cannibal (Only applies if ttt_cannibal_is_independent is enabled) | |||
| ttt_cannibal_update_scoreboard 0 // Whether the Cannibal shows dead players as missing in action (Only applies if ttt_cannibal_is_independent is enabled) | |||
|
|
|||
Malivil
requested changes
Mar 4, 2026
|
|
||
| html = html .. "<span style='display: block; margin-top: 10px;'>Eaten players are not dead, but they are <span style='color: rgb(" .. roleColor.r .. ", " .. roleColor.g .. ", " .. roleColor.b .. ")'>unable to do anything</span> except talk with other eaten players and spectate the " .. ROLE_STRINGS[ROLE_CANNIBAL] .. ".</span>" | ||
| if GetConVar("ttt_cannibal_digests_victims"):GetBool() then | ||
|
|
| html = html .. "<span style='display: block; margin-top: 10px;'>Eaten players are <span style='color: rgb(" .. roleColor.r .. ", " .. roleColor.g .. ", " .. roleColor.b .. ")'>digested and killed </span>" .. GetConVar("ttt_cannibal_digestion_time"):GetInt() .. " seconds after being eaten.</span>" | ||
|
|
||
| html = html .. "<span style='display: block; margin-top: 10px;'>If the " .. ROLE_STRINGS[ROLE_CANNIBAL] .. " dies, all undigested eaten players are <span style='color: rgb(" .. roleColor.r .. ", " .. roleColor.g .. ", " .. roleColor.b .. ")'>freed</span> at the position where the " .. ROLE_STRINGS[ROLE_CANNIBAL] .. " died.</span>" | ||
|
|
| html = html .. "<span style='display: block; margin-top: 10px;'>If the " .. ROLE_STRINGS[ROLE_CANNIBAL] .. " dies, all undigested eaten players are <span style='color: rgb(" .. roleColor.r .. ", " .. roleColor.g .. ", " .. roleColor.b .. ")'>freed</span> at the position where the " .. ROLE_STRINGS[ROLE_CANNIBAL] .. " died.</span>" | ||
|
|
||
| else | ||
|
|
| html = html .. "<span style='display: block; margin-top: 10px;'>Eaten players are not dead, but they are <span style='color: rgb(" .. roleColor.r .. ", " .. roleColor.g .. ", " .. roleColor.b .. ")'>unable to do anything</span> except talk with other eaten players and spectate the " .. ROLE_STRINGS[ROLE_CANNIBAL] .. ".</span>" | ||
|
|
||
| html = html .. "<span style='display: block; margin-top: 10px;'>If the " .. ROLE_STRINGS[ROLE_CANNIBAL] .. " dies, all eaten players are <span style='color: rgb(" .. roleColor.r .. ", " .. roleColor.g .. ", " .. roleColor.b .. ")'>freed</span> at the position where the " .. ROLE_STRINGS[ROLE_CANNIBAL] .. " died.</span>" | ||
|
|
Malivil
requested changes
Mar 4, 2026
| end | ||
|
|
||
| -- Victim digestion | ||
| if self.DigestsVictimsConVar:GetBool() then |
Member
There was a problem hiding this comment.
Suggested change
| if self.DigestsVictimsConVar:GetBool() then | |
| if self.DigestionConVar:GetBool() then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
Affected Issues
Checklist
plymeta:IsRoleAbilityDisabledused