feature/effects #37

Manually merged
neckrat merged 64 commits from feature/effects into main 2026-05-06 10:19:49 +03:00
Showing only changes of commit a9f8816c8e - Show all commits

View File

@ -30,7 +30,10 @@ function behavior:addEffect(effect, stacks, intensity)
-- проверяем эффект на возможности суммирования (aka противоречия) -- проверяем эффект на возможности суммирования (aka противоречия)
for i, ef in ipairs(self.effectsPriority) do for i, ef in ipairs(self.effectsPriority) do
if ef == effect then if ef == effect then
self.effectsProperties[ef] = { stacks = stacks, intensity = intensity } self.effectsProperties[ef] = {
stacks = stacks + self.effectsProperties[ef].stacks,
intensity = intensity
}
local task1 = effect:afterBirth(self.owner, intensity) local task1 = effect:afterBirth(self.owner, intensity)
if task1 then if task1 then
task1(function() end) task1(function() end)
@ -45,7 +48,10 @@ function behavior:addEffect(effect, stacks, intensity)
end end
self.effectsPriority[#self.effectsPriority + 1] = effect self.effectsPriority[#self.effectsPriority + 1] = effect
self.effectsProperties[effect] = { stacks = stacks, intensity = intensity } self.effectsProperties[effect] = {
stacks = stacks,
intensity = intensity
}
print("[Effects]: мы применили эффект!!") print("[Effects]: мы применили эффект!!")
local task1 = effect:afterBirth(self.owner, intensity) local task1 = effect:afterBirth(self.owner, intensity)
if task1 then if task1 then