Closed James103 closed 4 years ago
This was something I had been thinking about over the past couple of days after our discussion in #17. Commit 34a127d45c94e37b36774ea925ef8bd5ab5155ce was a good start for lying the of the base mechanics needed to get this to work, but doesn't seem to be working correctly at the moment. I've taken a pause from this to address some bugs I missed in 1.3.2.
The idea would be as follows:
Per level of Famine, attacks drain some value of saturation per hit. If the player has no saturation, the floor of this value is instead deducted from their hunger. For example, say we're deducting 1.25 saturation per hit, we deduct one hunger point. The change from level 3 to 4 will be more drastic as we go from deducting floor(3.75) = 3 to floor(5) = 5 hunger per hit. The exact mechanics here are up for debate really. Maybe we take the ceiling instead, or perhaps we round it.
From there, give the attacked entity a weakness effect corresponding to how it is described on the wiki here, but only if the attacked entity is not a player. The only reason this is done is to give this enchantment a purpose in singleplayer, as it would be unlikely to encounter a mob with a Famine enchanted sword, yet this enchantment can be obtained through the enchanting table and would be completely useless to the player otherwise.
If the attacked entity is a player, and they have no hunger left, the Famine enchantment can increase the damage dealt by it's level (i.e. Famine V would increase damage on starving players by 5).
This new Famine enchantment makes it extremely potent in PVP, as players who aren't armed with Enchanted Iron Apples will find their hunger bar depleted; preventing them from running away, causing them to take starvation damage over time, and suffer additional damage per hit. And this is an uncommon enchantment. Ideally these effect would only apply if you weren't spam clicking as that would just break the enchantment entirely otherwise.
If the Famine enchantment sets a player's saturation or food level to 0, then would the excess damage carry over from saturation to hunger to health? Example: A player with 10 saturation and 20 food points is attacked by an entity using a sword enchanted with Famine level 32, for 40 food points worth of damage.
Example 2: A player with no saturation and 20 hunger is attacked by an entity using a sword enchanted with Famine level 3, for 3.75 food points of damage.
Perhaps the damage can overflow from saturation to hunger, but I'd like the bonus damage to only apply when a player is starving as the enchantment just seems to strong otherwise with no way to counter it. The point of an Iron Apple in a fight against a Famine Sword would be to keep your hunger up to prevent the opponent from getting the bonus damage, which becomes moot if the damage overflows.
I would like it if there was an option that allowed for the Famine enchantment to directly subtract from your food and saturation points (or add lots of exhaustion all at once) instead of going through the Hunger effect. Doing it that way would allow very high Famine enchantments to be more effective over shorter periods of time, increasing both the risk and reward and encouraging you to get more food points just in case of the rare mob with the very-high Famine level.
With the instant famine disabled, the Famine enchantment can only drain a maximum of 1.25 food points from a player per second, regardless of the enchantment level, and is ineffective if the player already has a Hunger effect level above 50.
With the instant famine enabled, the Famine enchantment drains 1.25 food points instantly (5.0 exhaustion) on every hit, per level of Famine. This can peak as high as 6 to 12 food points per second for Famine V.