mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
Script fixes and new effects.
Cleaned up unneeded requires in some scripts Fixed Second Wind Added new effect scripts Added bard song scripts that mostly work
This commit is contained in:
parent
ace4dfe58f
commit
c442dc9ecd
72 changed files with 524 additions and 171 deletions
15
data/scripts/effects/covered.lua
Normal file
15
data/scripts/effects/covered.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
require("battleUtils")
|
||||
|
||||
--If person who cast cover is within 8y, change the action's target to them
|
||||
--Not sure what attacks are valid. It only says "melee attacks", unsure if that includes weaponskills and abilities or just auto attacks
|
||||
--Right now this will probably be really buggy, since Covered is not necessarily the first effect that will activate on the target
|
||||
|
||||
--Really need to do more research on this, figure out how it interacts with multi-hit attacks, aoe attacks (if those count as melee ever?), etc.
|
||||
--If it redirects the whole attack instead of a single hit, we might need a new that activates while iterating over targets.
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
if not skill.isRanged then
|
||||
if effect.GetSource().IsAlive() and getDistanceBetweenActors(effect.GetSource(), target) <= 8 then
|
||||
target = effect.GetSource();
|
||||
end
|
||||
end
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue