Enchanting lifesteal

Started by MatosPoljca on

Topic category: Help with modding (Java Edition)

Last seen on 15:46, 18. Jan 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Enchanting lifesteal

I'm trying to make a lifesteal enchantment, but it won't work. This is my proc:

 

So basically, when you critically hit a unit, it checks if you have lifesteal and then sets your health to your current health + 15 or 30% of the item's damage, depending on lifesteal level. But It does nothing xd.

Last seen on 20:29, 28. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think I know why it is not…
Wed, 12/07/2022 - 17:37

I think I know why it is not working:
These Global Trigger where it check if you deal Damage like "Before Entity get hurts", "Player deals critical hit"and "Entity attacked" is the Event/Target Entity the Entity that being attacked and the Source Entity is the Entity that attacks the Target.

Also if you want to check if the Attacker has Enchantment you'll need to replace all Event/Target Entity Blocks with Source Entity Blocks.

If something is unclear just comment it here :)

Last seen on 15:46, 18. Jan 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well, it works now, but not…
Fri, 12/09/2022 - 08:11

Well, it works now, but not how I want it to. Seems like "item damage" isn't item's attack damage but rather how damaged the item is, so that number is around 2000 for new netherite items, and 15% of that is a lot more than a full health bar... So every hit is insta full health. How do I check for item's stats or damage done to entity? It would be best if I could return the value of how much damage the attack dealt so that I heal less against heavily armored entities.

Last seen on 20:29, 28. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In these Global Triggers you…
Fri, 12/09/2022 - 09:38

In these Global Triggers you should see available dependencies.
There is a Number dependency called amount. If you make an number dependency that can be found in the Category "Advanced". The Block has dependencyName as a name and has the color of the normal number blocks. in There just write 'amount' exactly like I write without the quotes. But this is not available for critical hit Global Trigger. Instead there is a 'damagemodifier' event. But what you can could is to heal 15% of the Current Health of the Enemy.

If you want I can make you an Procedure Template for you that adds exactly the Lifesteal Enchantment. (I will make it because I need to visualize it :) )

Last seen on 15:46, 18. Jan 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If I cannot return the value…
Fri, 12/09/2022 - 12:19

If I cannot return the value of item's attack damage, then I'll just make the enchatment give flat health (0.5 heart for lvl 1 and 1 heart for lvl 2 for example). That should suffice I guess... Would be broken on spamming tho, so I will have to give it a cooldown too.

Last seen on 20:29, 28. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also you're Percentage…
Fri, 12/09/2022 - 16:05

Also you're Percentage Calculation is wrong.

Example: 20/100*15 - It means 15% of 20

And you could make an Percentage Chance.

In the Math Category there is an Block called "Number between 'min' and 'max'" with this you can make easily an Percentage Chance.

Last seen on 20:29, 28. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you use Entity Attacked…
Fri, 12/09/2022 - 16:07

If you use Entity Attacked or Befor Entity is Hurt Global Trigger you can use the amount dependency and you can make the 15% of the Damage as Life Steal.

Last seen on 15:46, 18. Jan 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I do not know how :(
Sun, 12/11/2022 - 15:17

I do not know how :(

Last seen on 20:29, 28. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I found a way how to…
Mon, 12/12/2022 - 17:59

I found a way how to implement your Idea with the Life Steal that uses the amount of Damage to gain 15% of the Damage you dealt.

I'm testing it currently at the moment where I'm writing it.

Last seen on 15:46, 18. Jan 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So @SparkleArts did you find…
Tue, 05/02/2023 - 13:21

So @SparkleArts did you find a way for it to work?

Last seen on 20:29, 28. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here is a Picture:The Heal…
Tue, 05/02/2023 - 15:02

Here is a Picture:


The Heal Procedure Block is Block of a Plugin called Forge Plus that I'm working on. I will release the first version of it in the near future.