change to how the 4th link amp combines to calculate portal range - it appears the 3rd + 4th are both 1/4, to give a total of 3 times the range with rare link amps

This commit is contained in:
Jon Atkins 2013-07-06 19:36:26 +01:00
parent 24fd7c8029
commit 40cd3044f0

View File

@ -68,15 +68,18 @@ window.getLinkAmpRangeBoost = function(d) {
// (at the time of writing, only rare link amps have been seen in the wild, so there's a little guesswork at how // (at the time of writing, only rare link amps have been seen in the wild, so there's a little guesswork at how
// the stats work and combine - jon 2013-06-26) // the stats work and combine - jon 2013-06-26)
// link amps scale: first is full, second half, the last two a quarter
var scale = [1.0, 0.5, 0.25, 0.25];
var boost = 1.0; // initial boost is 1.0 (i.e. no boost over standard range) var boost = 1.0; // initial boost is 1.0 (i.e. no boost over standard range)
var scale = 1.0; // scale starts at 1 (full effect of boost) - will be halved after each link amp is processed var count = 0;
$.each(d.portalV2.linkedModArray, function(ind, mod) { $.each(d.portalV2.linkedModArray, function(ind, mod) {
if(mod && mod.type === 'LINK_AMPLIFIER' && mod.stats && mod.stats.LINK_RANGE_MULTIPLIER) { 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 // link amp stat LINK_RANGE_MULTIPLIER is 2000 for rare, and gives 2x boost to the range
var baseMultiplier = mod.stats.LINK_RANGE_MULTIPLIER/1000; var baseMultiplier = mod.stats.LINK_RANGE_MULTIPLIER/1000;
boost += (baseMultiplier-1)*scale; boost += (baseMultiplier-1)*scale[count];
scale = scale / 2; // each link amp has half the effect of the previous one count++;
} }
}); });