darkstar icon indicating copy to clipboard operation
darkstar copied to clipboard

BLU Magical Damage Spells Treated as attackType.PHYSICAL

Open ibm2431 opened this issue 4 years ago • 3 comments

I have:

  • [x] searched existing issues (http://github.com/darkstarproject/darkstar/issues/) to see if the issue I am posting has already been addressed or opened by another contributor
  • [x] checked the commit log to see if my issue has been resolved since my server was last updated

Client Version (type /ver in game) : n/a

Source Branch (master/stable) : master

Additional Information (Steps to reproduce/Expected behavior) :

Before I forget to publicly note this (again): Damage-dealing Blue Magic that goes through BlueFinalAdjustments is always treated as attackType.PHYSICAL, even if the damage type should be Magical.

Some examples of Blue Spells that should be treated as Magical - but aren't due to BlueFinalAdjustments - are:

Death Ray

https://github.com/DarkstarProject/darkstar/blob/master/scripts/globals/spells/bluemagic/death_ray.lua#L42

Ice Break

https://github.com/DarkstarProject/darkstar/blob/master/scripts/globals/spells/bluemagic/ice_break.lua#L50

Mind Blast

https://github.com/DarkstarProject/darkstar/blob/master/scripts/globals/spells/bluemagic/mind_blast.lua#L44

When they get into BlueFinalAdjustments, after calculating reductions due to Phalanx and Stoneskin, takeDamage is always called with attackType.PHYSICAL:

https://github.com/DarkstarProject/darkstar/blob/master/scripts/globals/bluemagic.lua#L232-L247

ibm2431 avatar Sep 22 '19 21:09 ibm2431

I can go through and audit/correct these.

I'm doing some refactors to BlueFinalAdjustments in https://github.com/DarkstarProject/darkstar/pull/6396 anyway.

This could be a good follow up.

mrhappyasthma avatar Jan 24 '20 08:01 mrhappyasthma

Looks like the same issue applies to Breath spells as well.

mrhappyasthma avatar Jan 24 '20 08:01 mrhappyasthma

This shouldn't affect too much though, from the looks of it. The attackType is only referenced in takeDamage to trigger an event. But no code seems to be listening for it.

https://github.com/DarkstarProject/darkstar/blob/b923615c2cbd5543b5baf16e6c5494cefcc3c089/src/map/entities/battleentity.cpp#L522

mrhappyasthma avatar Jan 24 '20 08:01 mrhappyasthma