- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Changes
Jump to navigation
Jump to search
mLine 199:
Line 199:
− +
− if selectInstallation == 'yes' then+
− return e._speed == 0+
− elseif selectInstallation == 'no' then +
− return e._speed ~= 0+
− else +
− return true
− end
− end
− +
− if selectBoss == 'yes' then+
− return e._back <= -11+
− elseif selectBoss == 'no' then +
− return e._back >= -10+
− else +
− return true
− end
− end
− +
− and e._hp -- skip unimplemented units+
optimize
local selectInstallation = stringKey('installation', context, n, ''):lower()
local selectInstallation = stringKey('installation', context, n, ''):lower()
local predInstallation = function(e)
local predInstallation = selectInstallation == 'yes' and
function(e) return e._speed == 0 end
or selectInstallation == 'no' and
function(e) return e._speed ~=0 end
or
function(e) return true end
local selectBoss = stringKey('boss', context, n, ''):lower()
local selectBoss = stringKey('boss', context, n, ''):lower()
local predBoss = function(e)
local predBoss = selectBoss == 'yes' and
function(e) return e._back <= -11 end
or selectBoss == 'no' and
function(e) return e._back >= -10 end
or
function(e) return true end
return Iterator.enemiesBy(context, n, function(e)
return Iterator.enemiesBy(context, n, function(e)
return (e:type() == type or type == 0)
return e._hp -- skip unimplemented units
and (e:type() == type or type == 0)
and predInstallation(e)
and predInstallation(e)
and predBoss(e)
and predBoss(e)