Started by
Lord Makishi
on
Topic category: Help with Minecraft modding (Java Edition)
Hey there! I have been trying to make a critical hit system in Mcreator, that has a chance to deal a critical hit when attacking, based on the crit-chance of the attacker minus the crit resistance of the attacked. I also made crit-dmg, which is damage added on top of the attackers damage based on the crit-dmg of the attacker minus the crit-def of the attacked. And while all this sounds logic in theory, in practice it totally doesn't work for me. I don't know if it's the formula I'm using or not but I'm concerned that it doesn't work. Could anyone help me please?
Thanks in advance!
Edited by Lord Makishi on Tue, 01/10/2023 - 18:49
2 advices
do it with player lifetime variables
typically crit is 150% or 200% of normal damage, if you don't have any coding experience, the easisest way to do it is; apply +2 strength potion levels to achieve the crit damage effect for 3 ticks in the when player hits entity.
@masterkostas Thanks for the advices! The only reason i used scoreboards instead of global variables, is because I thought they only apply to players and not other mobs. And while the strength effect is a good idea, I do still want it with a certain percentage since I'm also trying to add armor sets that boost these crit stats, similar to many RPG games I've played.