Fix typo in effect impact
This commit is contained in:
parent
a38dd73200
commit
a47c12281a
@ -22,17 +22,17 @@
|
||||
-- Params: { group_name = intensity multiplier, .. }
|
||||
late.register_impact_type({'player', 'mob'}, 'effects', {
|
||||
reset = function(impact)
|
||||
late.get_storage_for_targert(impact.target).modifiers = nil
|
||||
late.get_storage_for_target(impact.target).modifiers = nil
|
||||
end,
|
||||
update = function(impact)
|
||||
data = late.get_storage_for_targert(impact.target)
|
||||
local data = late.get_storage_for_target(impact.target)
|
||||
data.modifiers = {}
|
||||
|
||||
for _, params in pairs(impact.params) do
|
||||
for group, intensity in (impact.params) do
|
||||
for group, intensity in pairs(params) do
|
||||
if group ~= 'intensity' then
|
||||
data.modifiers[group] = (data.modifiers[group] or 1)
|
||||
* (1 - (intensity + 1) * impact.intensity)
|
||||
* (1 - (intensity + 1) * params.intensity)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -310,5 +310,3 @@ late.register_impact_type('player', 'vision', {
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user