Magic

Magic

190k Downloads

Option to aggro mobs on you when they are hit with a spell.

mibby opened this issue ยท 8 comments

commented

Would it be possible to aggro mobs to you when you hit them with a spell? As currently they just seem to ignore you while taking the damage from afar. This makes magic easily exploitable in arenas such as the mob arena.

commented

Magic mobs will now attack the player that is hurting them most, and I added an Aggro action so I think this is about as taken care of as I am likely to do. I don't plan on changing vanilla mob behavior, or adding the Aggo action to every spell, though, so that part would be up to you.

commented

Nothing in Magic will do that, other than damage should make them attack you. Generally does for me.

Might be something in MobArena, don't know.

commented

Suggest in the interim you nerf all spell ranges to 24 blocks.

I'll take a look at this when I can, but I am basically relying on vanilla mechanics here which (from what I've always seen) target a player anytime the player damages a mob.

If that doesn't appear to be working anymore for whatever reason I will add an aggro feature (probably off by default, don't generally like messing with vanilla mechanics) but this won't happen anytime real soon.

commented

You may need to increase entity activation ranges in spigot.yml, or maybe reduce range of spells. Not really sure but I don't generally see this issue myself. I'll keep an eye out for it, though I think if anything it'd be a MobArena feature to force mobs to attack when damaged if that's needed.

commented

I'm testing Magic outside of the MobArena. My entity activation range is 24 blocks for monsters. I stand ~15 or so blocks away from the mob in survival so it doesn't naturally aggro on me due to range, then hit it with a magic spell. It does not move towards me.

commented

Maybe. It's just thrown potions- you don't happen to have any plugins (anti-cheat, maybe) that might be messing with thrown potion damage, do you?

commented

Perhaps it has to do with the custom magic damage rather than direct vanilla damage / hit?

commented

I did some experiments here. What I saw:

  1. Zombies will chase me, no matter what, if I get within 30 blocks or so of them. I don't have to hit them or anything.
  2. Skeletons target me when I get fairly close, doesn't seem as long-range as zombies
  3. Creepers don't chase me or seem to notice me at all, even when I damage them, until I'm within 5 blocks or so.
  4. This behavior is all identical if I'm using arrows or spells, doesn't seem to matter.
  5. Using the only API available, Creature.setTarget and cancelling the untarget event, makes no difference for creepers.

Were you seeing zombies and skeletons not chase players? I'm not seeing that at all, though creeper behavior is really odd- no matter what I do they won't chase me until I get within explosion range, basically.

Given what you said here:

I stand ~15 or so blocks away from the mob in survival so it doesn't naturally aggro on me due to range

We are definitely seeing different behaviors. May be due to activation ranges in spigot.yml, or maybe other plugins. If I see a zombie, it chases me.