further to #704, use the existing function to both filter and sort link amps, so (in theory) combinations of rare+very rare are handled correctly
This commit is contained in:
parent
1043ff49b0
commit
9852b680f5
@ -74,13 +74,14 @@ window.getLinkAmpRangeBoost = function(d) {
|
|||||||
var boost = 0.0; // initial boost is 0.0 (i.e. no boost over standard range)
|
var boost = 0.0; // initial boost is 0.0 (i.e. no boost over standard range)
|
||||||
var count = 0;
|
var count = 0;
|
||||||
|
|
||||||
$.each(d.portalV2.linkedModArray, function(ind, mod) {
|
var linkAmps = getPortalModsByType(d, 'LINK_AMPLIFIER');
|
||||||
if(mod && mod.type === 'LINK_AMPLIFIER' && mod.stats && mod.stats.LINK_RANGE_MULTIPLIER) {
|
|
||||||
// link amp stat LINK_RANGE_MULTIPLIER is 2000 for rare, and gives 2x boost to the range
|
$.each(linkAmps, function(ind, mod) {
|
||||||
var baseMultiplier = mod.stats.LINK_RANGE_MULTIPLIER/1000;
|
// link amp stat LINK_RANGE_MULTIPLIER is 2000 for rare, and gives 2x boost to the range
|
||||||
boost += baseMultiplier*scale[count];
|
// and very-rare is 7000 and gives 7x the range
|
||||||
count++;
|
var baseMultiplier = mod.stats.LINK_RANGE_MULTIPLIER/1000;
|
||||||
}
|
boost += baseMultiplier*scale[count];
|
||||||
|
count++;
|
||||||
});
|
});
|
||||||
|
|
||||||
return (count > 0) ? boost : 1.0;
|
return (count > 0) ? boost : 1.0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user