isMagicDamage returns false for Indirect magic damage?
Ghostrider231 opened this issue ยท 2 comments
Minecraft version: 1.12.2
Wizardry version: 4.2.11
Question details:
This practically applies to any other mobs (modded ones too) that make use of the isMagicDamage()
Function in their damage code.
I've noticed that when using indirect magic spells (e.g. magic missile, firebolt, lightning disk, darkness orb and any other spell that shoots a projectile) on a mob like a witch takes the same amount of damage compared to a creeper/spider despite witches having an 85% resistance to magic.
(Unarmored zombies/husk have a natural 2 armor points, so I cannot compare that)
Another example is from a mod called Dungeon Mobs Reborn, which adds a ghost mob that can only be damaged by magic attacks. This mob also has isMagicDamage()
in their damage code. All of the ray type spells work on the ghost, but not projectile spells.
Ghost mob code from Dungeon mobs reborn:
https://github.com/Sunconure11/dungeon-mobs/blob/master/src/main/java/com/gw/dm/entity/EntityGhost.java
I was looking at your Magic Damage code and saw you mentioned about witches resisting 85% magic damage. Both Direct Damage and Indirect Damage.
Ok, I just noticed that Indirect Magic Damage has it's own class file, is it normal for mobs that make use of IsMagicDamage()
return false for indirect magic attacks?
Looks to me like the constructor in https://github.com/Electroblob77/Wizardry/blob/1.12.2/src/main/java/electroblob/wizardry/util/IndirectMagicDamage.java needs to duplicate a few more lines from
Wizardry/src/main/java/electroblob/wizardry/util/MagicDamage.java
Lines 121 to 123 in 27d53b4
This probably explains some of the weird type/damage issues people have been complaining about in compatibility with other mods.
That is indeed the problem, it was reported in #396 and is now fixed in my dev branch.