PDA

View Full Version : 'Skip' Effects don't work



Ken L
January 7th, 2018, 18:50
Because there's a bug in the script manager_effect_35E.lua:



function onEffectActorStartTurn(nodeActor, nodeEffect)
local sEffName = DB.getValue(nodeEffect, "label", "");
local aEffectComps = EffectManager.parseEffect(sEffName);
for _,sEffectComp in ipairs(aEffectComps) do
local rEffectComp = parseEffectComp(sEffectComp);
-- Conditionals
if rEffectComp.type == "IFT" then
break;
elseif rEffectComp.type == "IF" then
local rActor = ActorManager.getActorFromCT(nodeActor);
if not checkConditional(rActor, nodeEffect, rEffectComp.remainder) then
break;
end

-- Ongoing damage, fast healing and regeneration
elseif rEffectComp.type == "DMGO" or rEffectComp.type == "FHEAL" or rEffectComp.type == "REGEN" then
if nActive == 2 then
DB.setValue(nodeEffect, "isactive", "number", 1);
else
applyOngoingDamageAdjustment(nodeActor, nodeEffect, rEffectComp);
end
end
end
end



nActive isn't defined, it seems this bug has been here for quite some time; easy fix.



function onEffectActorStartTurn(nodeActor, nodeEffect)
local sEffName = DB.getValue(nodeEffect, "label", "");
local aEffectComps = EffectManager.parseEffect(sEffName);
for _,sEffectComp in ipairs(aEffectComps) do
local rEffectComp = parseEffectComp(sEffectComp);
-- Conditionals
if rEffectComp.type == "IFT" then
break;
elseif rEffectComp.type == "IF" then
local rActor = ActorManager.getActorFromCT(nodeActor);
if not checkConditional(rActor, nodeEffect, rEffectComp.remainder) then
break;
end

-- Ongoing damage, fast healing and regeneration
elseif rEffectComp.type == "DMGO" or rEffectComp.type == "FHEAL" or rEffectComp.type == "REGEN" then
local nActive = DB.getValue(nodeEffect, "isactive", 0);
if nActive == 2 then
DB.setValue(nodeEffect, "isactive", "number", 1);
else
applyOngoingDamageAdjustment(nodeActor, nodeEffect, rEffectComp);
end
end
end
end


Reason this is relevant: Regen wasn't properly being suppressed. Took me a moment to realize it was an FG rule-set problem.

LordEntrails
January 7th, 2018, 21:32
Regen is reported to be fixed in the beta release. Haven't tested it, I ***-u-me it's this issue.

Moon Wizard
January 11th, 2018, 03:22
Thanks for reporting. It was already fixed in v3.3.4; but I appreciate the report and specifics so I could double-check.

Regards,
JPG