Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Attack.js
Show First 20 Lines • Show All 421 Lines • ▼ Show 20 Lines | return { | ||||
"friendlyFire": this.template[type].Splash.FriendlyFire != "false", | "friendlyFire": this.template[type].Splash.FriendlyFire != "false", | ||||
"radius": ApplyValueModificationsToEntity("Attack/" + type + "/Splash/Range", +this.template[type].Splash.Range, this.entity), | "radius": ApplyValueModificationsToEntity("Attack/" + type + "/Splash/Range", +this.template[type].Splash.Range, this.entity), | ||||
"shape": this.template[type].Splash.Shape, | "shape": this.template[type].Splash.Shape, | ||||
}; | }; | ||||
}; | }; | ||||
Attack.prototype.GetRange = function(type) | Attack.prototype.GetRange = function(type) | ||||
{ | { | ||||
if (!type) | |||||
return this.GetFullAttackRange(); | |||||
let max = +this.template[type].MaxRange; | let max = +this.template[type].MaxRange; | ||||
max = ApplyValueModificationsToEntity("Attack/" + type + "/MaxRange", max, this.entity); | max = ApplyValueModificationsToEntity("Attack/" + type + "/MaxRange", max, this.entity); | ||||
let min = +(this.template[type].MinRange || 0); | let min = +(this.template[type].MinRange || 0); | ||||
min = ApplyValueModificationsToEntity("Attack/" + type + "/MinRange", min, this.entity); | min = ApplyValueModificationsToEntity("Attack/" + type + "/MinRange", min, this.entity); | ||||
let elevationBonus = +(this.template[type].ElevationBonus || 0); | let elevationBonus = +(this.template[type].ElevationBonus || 0); | ||||
elevationBonus = ApplyValueModificationsToEntity("Attack/" + type + "/ElevationBonus", elevationBonus, this.entity); | elevationBonus = ApplyValueModificationsToEntity("Attack/" + type + "/ElevationBonus", elevationBonus, this.entity); | ||||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator