@@ -167,33 +167,26 @@ function calcs.createActiveSkill(activeEffect, supportList, actor, socketGroup,
167167
168168 for _ , supportEffect in ipairs (supportList ) do
169169 -- Pass 2: Add all compatible supports
170+ local grantedSupportEffect
170171 if supportEffect .gemData then
171172 for _ , grantedEffect in ipairs (supportEffect .gemData .grantedEffectList ) do
172- if grantedEffect .support then
173- if calcLib .canGrantedEffectSupportActiveSkill (grantedEffect , activeSkill ) then
174- t_insert (activeSkill .effectList , supportEffect )
175- if supportEffect .isSupporting and activeEffect .srcInstance then
176- supportEffect .isSupporting [activeEffect .srcInstance ] = true
177- end
178- if grantedEffect .addFlags and not summonSkill then
179- -- Support skill adds flags to supported skills (eg. Remote Mine adds 'mine')
180- for k in pairs (grantedEffect .addFlags ) do
181- skillFlags [k ] = true
182- end
183- end
184- end
173+ if grantedEffect and grantedEffect .support and calcLib .canGrantedEffectSupportActiveSkill (grantedEffect , activeSkill ) then
174+ grantedSupportEffect = grantedEffect
175+ break
185176 end
186177 end
187- if calcLib .canGrantedEffectSupportActiveSkill (supportEffect .grantedEffect , activeSkill ) then
188- t_insert (activeSkill .effectList , supportEffect )
189- if supportEffect .isSupporting and activeEffect .srcInstance then
190- supportEffect .isSupporting [activeEffect .srcInstance ] = true
191- end
192- if supportEffect .grantedEffect .addFlags and not summonSkill then
193- -- Support skill adds flags to supported skills (eg. Remote Mine adds 'mine')
194- for k in pairs (supportEffect .grantedEffect .addFlags ) do
195- skillFlags [k ] = true
196- end
178+ elseif calcLib .canGrantedEffectSupportActiveSkill (supportEffect .grantedEffect , activeSkill ) then
179+ grantedSupportEffect = supportEffect .grantedEffect
180+ end
181+ if grantedSupportEffect then
182+ t_insert (activeSkill .effectList , supportEffect )
183+ if supportEffect .isSupporting and activeEffect .srcInstance then
184+ supportEffect .isSupporting [activeEffect .srcInstance ] = true
185+ end
186+ if grantedSupportEffect .addFlags and not summonSkill then
187+ -- Support skill adds flags to supported skills (eg. Remote Mine adds 'mine')
188+ for k in pairs (grantedSupportEffect .addFlags ) do
189+ skillFlags [k ] = true
197190 end
198191 end
199192 end
0 commit comments