mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Implement blueprint changes to focused weapon
This commit is contained in:
@@ -583,20 +583,9 @@ export default class Module {
|
|||||||
* @return {Number} the falloff of this module
|
* @return {Number} the falloff of this module
|
||||||
*/
|
*/
|
||||||
getFalloff(modified = true) {
|
getFalloff(modified = true) {
|
||||||
if (!modified) {
|
|
||||||
const range = this.getRange(false);
|
|
||||||
const falloff = this.get('falloff', false);
|
|
||||||
return (falloff > range ? range : falloff);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Falloff from range is mapped to range
|
// Falloff from range is mapped to range
|
||||||
if (this.mods && this.mods['fallofffromrange']) {
|
if (modified && this.mods && this.mods['fallofffromrange']) {
|
||||||
return this.getRange();
|
return this.getRange();
|
||||||
// Need to find out if we have a focused modification, in which case our
|
|
||||||
// falloff is scaled to range
|
|
||||||
} else if (this.blueprint && this.blueprint.name === 'Focused') {
|
|
||||||
const rangeMod = this.getModValue('range') / 10000;
|
|
||||||
return this.falloff * (1 + rangeMod);
|
|
||||||
// Standard falloff calculation
|
// Standard falloff calculation
|
||||||
} else {
|
} else {
|
||||||
const range = this.getRange();
|
const range = this.getRange();
|
||||||
|
|||||||
Reference in New Issue
Block a user