Swallowing - MysticSummoner/PCraft-Revorn-Wiki GitHub Wiki
Overview
Whenever a predator attacks something, as long as it is small enough for them to eat (normally at most 1.6 blocks wide and 2 blocks tall), they have a chance to eat their target. The actual chance of it being successful is a very dynamic system that has a lot of influencing factors that can increase or decrease its likelihood.
Swallow Threshold
Before anything else can be explained, the swallow threshold needs to be explained. Each pred will have a natural swallow threshold stat. In the case of a zombie, this is anywhere from 0%-5%. This stat simply decides what % of the target's health has to be missing in order for there to even be a chance for the target to be eaten. For instance, if a zombie had a health threshold of 5%, it would only have a chance to eat targets that are under 95% health.
Armor will naturally increase the target's health threshold by 1.5% per point of armor (30% at 20 armor points). So, if a full diamond or netherite player was attacked from the same zombie from the previous example (natural 5% swallow threshold), the total swallow threshold would be 35%, meaning the target player would need to be 65% health or lower for there to even be a chance to be swallowed.
Because of this, some predators (such as the Vinemaiden), can have a negative swallow threshold. This simply means that armor's effectiveness against the pred is taken away slightly. For example, a full diamond player with their extra 30% swallow threshold bonus, going up against a -12% swallow threshold vinemaiden, would have a combined 18% swallow threshold, much less than what their armor should have given them.
Delectable Scent will decrease the combined swallow threshold by 7.5% per level and Rotten Stench will increase it by 7.5% per level.
Combined swallow threshold values of 0 or less mean the pred always has a chance to eat their target.
Swallow Chance
Once the swallow threshold is met, it is first referenced against the predator's base swallow chance. This simply determines what the chance of being swallowed on a hit right at the swallow threshold would be. From there, there are two other factors that influence the swallow chance.
The first is the health modifier, this is a stat the predator will have, it simply determines how much the swallow chance increases for each 1% of health the target is under the health threshold by. If a target is 10% health under their health threshold and the predator trying to eat them has a health modifier for 1.25, it means that predator has a 12.5% increased chance to eat their target.
The second is the Delectable Scent and Rotten Stench effects. Delectable Scent increases the chance by 7.5% per level and Rotten Stench decreases the chance by 7.5% per level.
Pet Rallying
If a player is successfully eaten, any nearby pets than can will be immediately aggro'd onto their predators regardless of whether or not they were targeting another mobs previously.