feature/spell-constraints #32

Merged
PeaAshMeter merged 11 commits from feature/spell-constraints into main 2026-03-18 05:11:55 +03:00
Showing only changes of commit 0d2ed101d6 - Show all commits

View File

@ -11,6 +11,7 @@ local task = require 'lib.utils.task'
local spell = require 'lib.spell.spell'
local targetTest = require 'lib.spell.target_test'
local Query = require "lib.spell.target_query"
local easing = require "lib.utils.easing"
local walk = setmetatable({
--- @type Deque
@ -89,17 +90,12 @@ local regenerateMana = spell.new {
Tree.behaviors.positioned.new(caster:has(Tree.behaviors.positioned).position + Vec3 { 0.5, 0.5 }),
}
local flash = function(callback)
light:has(Tree.behaviors.light):animateColor(Vec3 {})(
function()
light:die()
callback()
end
)
end
return task.wait {
flash,
task.chain(task.tween(light:has(Tree.behaviors.light) --[[@as LightBehavior]],
{ intensity = 1, color = Vec3 {} }, 1000, easing.easeInCubic), function()
light:die()
return task.fromValue()
end),
sprite:animate("hurt")
}
end