1. Aura of mirror image still stands if illusions die before their timeout. I think it would make more sense if it was removed earlier if the illusions also die earlier. It's still possible to give items to illusions by using the owner or another hero, and then they disappear forever after illusions' death. Maybe you could find a way to to make those items drop on the ground, while not screwing the cloning of the items on CloneStats function.
local integer sIdx
and
local integer tIdx
in switch method in Switch trigger are not being used at all.
2.
SelectUnit
in after method in Switch trigger is going to select the unit for all players, requires a local player block.
There's some strange bug with Mirror Image... (in VJASS, in Lua version didn't seem to happen) I don't know what causes it, only the signs when it breaks. The bug consists of one or more illusions not being illusions anymore. Thus, one of the signs is they can earn skill points. When the time life expires, they revive, like the real hero. Another sign is the illusion not being able to mimic the spells when cast. IsIllusion must be turning false at some point, or the custom value of the unit perhaps. I was unable to reproduce the problem consistently.
1. and 2. applies to the lua version as well.
Only lua version:
Lua:
Critical.chance[unit]
Critical.multiplier[unit]
Evasion.evasion[unit]
Evasion.miss[unit]
Evasion.neverMiss[unit]
Evasion.evasion[unit]
Evasion.miss[unit]
Evasion.neverMiss[unit]
SpellPower.flat[unit]
SpellPower.percent[unit]
LifeSteal.amount[unit]
SpellVamp.amount[unit]
These are all going to leak on illusion death in Mirror Image trigger since you're not nilling them. Technically you're doing this for every unit with RegisterUnitIndexEvent. You either could use weak keys, or filter the indexing by unit type, by creating a table as a container on top of script with the possible unit types as keys that use this spell. If the key in the container, then set those variables. Nonetheless, you have to nil those on illusions' death (and IsIllusion[unit]).
Lua:
Bladestorm = setmetatable({}, {})
local mt = getmetatable(Bladestorm)
mt.__index = mt
I know you do this a lot, it's your style, makes sense most of the time and that's fine. What I don't understand is its use here. I don't see it used anywhere except in Mimic script. Wouldn't it just be simpler by making it a boolean?
Once again, the spells are great as usual. Just mirror image being problematic at the moment and some minor things to fix.