Skip to content

Instantly share code, notes, and snippets.

@Riemnand
Last active February 11, 2022 23:04
Show Gist options
  • Save Riemnand/fb7c91fc839715f32d50b280d69d368b to your computer and use it in GitHub Desktop.
Save Riemnand/fb7c91fc839715f32d50b280d69d368b to your computer and use it in GitHub Desktop.
// Pull Wave nerf:
parts.WavePullTurret.prototype.range = 830; // 850m --> 830m
parts.WavePullTurret.prototype.shotEnergy = 2000; // 1200e --> 2000e
parts.WavePullTurret.prototype.mass = 15; // 10е --> 15t;
// Push Wave buff
parts.WavePushTurret.prototype.range = 815; // 775m --> 815m
parts.WavePushTurret.prototype.damage = 3; // 5d --> 3d
parts.WavePushTurret.prototype.reloadTime = 55.04; // 4.00s --> 3.44s
parts.WavePushTurret.prototype.shotEnergy = 1800; // 1200e --> 1800e
parts.WavePushTurret.prototype.bulletSpeed = 40 ; // 560m/s --> 640m/s
// Heavy Beam nerf:
parts.HeavyBeamTurret.prototype.reloadTime = 50; // 2.50s --> 3.13s
parts.HeavyBeamTurret.prototype.mass = 50; // 40t --> 50t
parts.HeavyBeamTurret.prototype.range = 590; // 610m --> 590m
// Blimps reanimation:
parts.Mount10Range.prototype.mass = 40; // 60t --> 40t
parts.SidewinderTurret.prototype.mass = 8; // 7.5t --> 8t
parts.JumpEngine.prototype.mass = 10; // 15t --> 10t
// AC nerf:
parts.AutoTurret.prototype.mass = 10; // 8t --> 10t
parts.AutoTurret.prototype.bulletSpeed = 37.5; // 640m/s --> 600m/s
// 2x2 Shield buff:
parts.ShieldGen2x2.prototype.hp = 10; // 0Hp --> 10Hp
// Heavy | Energy drain tesla rework:
var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
var slice = [].slice;
parts.TeslaTurret.prototype.reloadTime = 11.5; // 0.625s --> 0.720s
parts.TeslaTurret.prototype.damage = 9; // 11d --> 9d
parts.TeslaTurret.prototype.energyDamage = 560; // 0Ed --> 580Ed
parts.TeslaTurret.prototype.bounceRange = 450; // 400m --> 450m
parts.TeslaTurret.prototype.range = 640; // 540m --> 640m
parts.TeslaTurret.prototype.mass = 70; // 40t --> 70t
parts.TeslaTurret.prototype.shotEnergy = 1550; // 1375e --> 1550e
parts.TeslaTurret.prototype.zap = function(from, unit) {
var closestUnit, minD, particle, range;
this.zapped.push(unit.id);
particle = new this.bulletCls();
particle.image = "parts/zap" + (Math.floor(Math.random() * 4 + 1)) + ".png";
sim.things[particle.id] = particle;
particle.side = this.unit.side;
particle.life = 0;
particle.dead = false;
particle.z = this.unit.z + .001;
if (this.zapped.length === 1) {
particle.turretNum = this.turretNum;
particle.origin = this.unit;
} else {
particle.sound = null;
}
particle.target = unit;
v2.set(from, particle.pos);
particle.targetPos = v2.create(particle.target.pos);
if (this.zapped.length === 7) {
return;
}
range = this.bounceRange;
minD = range;
closestUnit = null;
sim.unitSpaces[otherSide(this.unit.side)].findInRange(unit.pos, range + 500, (function(_this) {
return function(other) {
var d, ref;
if (other.cloakFade === 0 && (ref = other.id, indexOf.call(_this.zapped, ref) < 0)) {
d = v2.distance(unit.pos, other.pos) - other.radius;
if (d < 0) {
d = 0;
}
if (d < minD) {
minD = d;
closestUnit = other;
}
}
return false;
};
})(this));
if (closestUnit) {
return this.zap(unit.pos, closestUnit);
}
};
parts.TeslaTurret.prototype.makeBullet = function(distance) {
var i, id, len, ref, results, unit;
this.unit.cloak = 0;
this.zapped = [];
this.zap(this.worldPos, this.target);
ref = this.zapped;
results = [];
for (i = 0, len = ref.length; i < len; i++) {
id = ref[i];
unit = sim.things[id];
if (unit.energy > 0) {
unit.applyEnergyDamage(this.energyDamage / this.zapped.length);
};
results.push(unit.applyDamage(this.damage / this.zapped.length));
}
return results;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment